Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Convert Pixel to real world

I am attempting to convert pixel to real world, there are two steps in this process, as per my understanding there are two steps to this namely, application of camera matrix, followed by correction of lens distortion.

 

http://zone.ni.com/reference/en-XX/help/370281AG-01/nivisionconcepts/spatial_calibration_indepth/

 

What is the order of these steps? 

 

What the 'r' value in the distortion correction equation. ?

 

Want to get a direct equation for the conversion of pixel to real world.

0 Kudos
Message 1 of 3
(2,056 Views)

I think that link needs more info, like a whole course on photogrametry.

 

r is the radius from the center of distortion to the distorted pixel.

xdr = distorted pixel x - distortion center x

ydr = distorted pixel y - distortion center y

r = sqrt ( (xdr * xdr)  + ydr *ydr))

https://en.wikipedia.org/wiki/Distortion_(optics)

 

You should use the Vision Development Module tool "Vision Calibration Training"

It will un-distort the image for you.  It will give you the coefficients.  I think it will calculate the camera matrix too.

 

As for converting from pixel to real world...  I think you must have the world Z coordinate before you can calculate the world X and Y coordinates. The problem is there are two unknowns on the right

pixel x / (focal length in pixels) = world X / world Z

where focal length in pixels is the  focal Length in mm / pixel size in mm 

a 25 mm lens on a 3.75um sensor is a 6,666 pixel focal length.  (25 / 0.00375 = 6666)

This is where stereo disparity would be used to estimate World Z.

 

 

0 Kudos
Message 2 of 3
(1,976 Views)

I have figured this out since posting.

 

I have obtained Z and the real world coordinates as well.

 

Next step -> there is an estimated distortion error of about 10 micometer, agaist what is this compared and hence how is this calculated?

0 Kudos
Message 3 of 3
(1,962 Views)