Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

convert to real world measurement

i do a simple routine on an image where i get image, calibrate image, threshold image, and circle dectection....execpt when it does the circle detection it still relays the data in pixels instead of following the calibration setup that exists...is ther some wire that needs to be connected? i did a simple calibration and defined the center of axis and selected pixels to inches and picked two points to define spacing...i looked at the converting to real world vi and i am lost ...i just need the x and y data of the circle converted to real word units ..thanks
0 Kudos
Message 1 of 12
(5,389 Views)
Hi Lenox,
 
The IMAQ Find Circles VI only returns Circles data in pixels.  If you use context help and hover over the VI, then select "click here for more help", this will show the LabVIEW Help for this VI which describes this.  There is a VI called "IMAQ Convert Pixels to Real World" That can convert the pixel measurements to real world measurements.  However, this VI will only accept X and Y coordinates.  The Circles Data output contains X, Y, Radius, and Core Area data.  You can index the array of clusters and return only the X and Y portion, but I found that it was easier to modify the IMAQ Convert Pixels to Real World VI to accept four inputs instead of two.  I have attached the modified VI for LabVIEW 7.1.  (Let me know if you need it for a different version.)  I hope this helps.
 
Good Luck,
 
0 Kudos
Message 2 of 12
(5,363 Views)
michel thanks so much!!!! i am using labview 7.0 can you convert it to that!   this is the first time the problem was actually explained in the forums before it always ended with an unanswered thread..thanks man
0 Kudos
Message 3 of 12
(5,357 Views)
Hi Lenox,
 
Here's the VI saved for LabVIEW 7.0.  Enjoy!
 
 
0 Kudos
Message 4 of 12
(5,340 Views)
sorry i am a newb.....where are you supposed to connevt the vi...im trying to attact it after i measure the circle data... hense draggin the circles data to the array of pixel cirl cordinates...it imedially shows a bad connection...also when i drag the image to the calibrated image box it also shows a bad connection...anyway i can get help setting it up.? right now i have the x and y coordinates going to a spreadsheet...you can deleate that and convert all 4 cells of data.thanks
0 Kudos
Message 5 of 12
(5,325 Views)
Hi Lenox,
 
I added the IMAQ Convert Pixel to Real World Circular 70.vi to your almost.vi.  I included some notes in the block diagram describing what I did.  In order to find the correct sub VI, keep IMAQ Convert Pixel to Real World Circular 70.vi in the same directory as almost_2.vi.  I've tested this with a sample image I have, and it seems to work correctly.  Have a great day.
 
0 Kudos
Message 6 of 12
(5,308 Views)
thank you thats what i was lookin for !
u da best!
0 Kudos
Message 7 of 12
(5,306 Views)
is there anyway to modify the vi so that radius can be calculated? or is there another way to do this via caliper tool.....also is there a way to measure circularity using vision assistant 7.0?
0 Kudos
Message 8 of 12
(5,256 Views)
Hi Lenox,
 
The IMAQ Find Circles returns the radius (R) value of each circle found.  You can also use Find Circular Edge to find the radius of a specific circle.  You can also find the circularity of a circle by using Clamp to find the diameter in one direction, and another Clamp in the other direction (90 degree difference) and use the difference to determine circularity.  You can also average the two Clamp diameter values and divide by two to determine the radius.
 
0 Kudos
Message 9 of 12
(5,249 Views)
i have been trying to use the clamp after a calibrate threshold and circle detection to do what you say....but the object is not always goign to be at the same place....the object is a hole....i tried stretching the tool across the entire image view but then the edges disapear ..also i never get a valid pixel distance. id probably just want to measure diameter x and diameter y and make some easy calculation.blah help!
0 Kudos
Message 10 of 12
(5,171 Views)