Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

converting pixel measurements to millimeters

I have an image which I gather data in the form of measurements. the default unit is pixels with VISION. I have another image taken with the same camera that shows the distance of 1mm. how may I use this image to convert the units of my measurements from pixels to millimeters?

thanks
0 Kudos
Message 1 of 8
(4,755 Views)
I may be one of the most incompetent persons ever as my question was answered right below this thread...wow. i'll blame it on the fact that it's monday!
0 Kudos
Message 2 of 8
(4,748 Views)
did u end up gettin the vi to work??? mind posting they proper way to connect this vi? thanks
0 Kudos
Message 3 of 8
(4,736 Views)
lenox:

to be honest I actually didn't. I was hoping that NI vision had a special way of doing it. in the mean time, I was going to use the caliper tool to measure the distance in pixels which I know is 1 mm, and then myself make the unit conversions based on that ratio. Though I would like to know if one could do it entirely in NI vision.
0 Kudos
Message 4 of 8
(4,728 Views)
blah well im waitin for the other thread to be answered hopefully that will clear up ur issue as well thanks
0 Kudos
Message 5 of 8
(4,728 Views)

Hello,

The best way to achieve your goal may be to use the calibration VIs that ship with Vision.  I would suggest that you start by looking at the IMAQ Vision calibration shipping examples.  Open the NI Example Finder (Help >> Find Examples) and search for calibration.  Open the example titled "Simple Calibration Example."  This VI uses the IMAQ Set Simple Calibration to specify the real-world units that will be associated with a single pixel. 

In your case, when you have an existing image where you have already determined the real-world distance associated with an image distance, use a caliper to determine the length in pixels and then divide your distance by the number of pixels and use that ratio for the Set Simple Calibration VI to create a calibrated image.  Now, for any caliper measurement, you can use pixel or real-world units.

Regards,
Scott R.
Applications Engineer
National Instruments

 

Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 6 of 8
(4,716 Views)
could u take alook at the other thread converting pixels to real world measurment ..included is a vi i do not know how to connect ..thanks
0 Kudos
Message 7 of 8
(4,710 Views)
i got it to work...drag the vi into labview and it will make a small box.....connect the image to the place that says image on the box.....the array to the arry imput ......the output is array of real world cordinates. i printed to a file and it workd
0 Kudos
Message 8 of 8
(4,707 Views)