LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

imaq - clamp max and real world distance

Solved!
Go to solution

Hello All,

 

I am using the imaq - clamp max vi in order to detect and measure distance between point.

I also use the example calibration image.

I would like to know how the real world distance is being calculated since the output real distance is incorrect..

And also what are the physical units of the measured value.

I am attaching the code.

the calibration image.

and the image I want to measure.

Thanks!

Gil,

0 Kudos
Message 1 of 6
(1,281 Views)

Hello?

Anyone?

0 Kudos
Message 2 of 6
(1,239 Views)

Can you save and upload your VI for LabVIEW 2015?

0 Kudos
Message 3 of 6
(1,229 Views)

Hi Ramon,

Thanks for your reply.

I have attached the file in LV 15

Thanks!

Gil,

0 Kudos
Message 4 of 6
(1,226 Views)
Solution
Accepted by gilmaor1

@gilmaor1 wrote:

I would like to know how the real world distance is being calculated since the output real distance is incorrect..

And also what are the physical units of the measured value.


Vision can help you with correcting images for perspective and lens distortion. In order to do this you need to perform a calibration using one of the available methods. This calibration information can be saved as metadata inside a PNG file (using 'IMAQ Write Image And Vision Info File'). This way you only have to calibrate once until your setup changes.

 

It looks like you took a calibration file from the IMAQ examples images and changed the canvas size of your own image to match the resolution of the calibration image. So it's no wonder the real world measurements do not match your own image. If you want get accurate measurements you will have to perform the calibration yourself using your own camera.

 

Since there is some perspective in your original image I would recommend you create your own dot pattern and place it in the (imaginary) plane where you want to do your measurements. When creating your own dot pattern you have to make sure your grid spacing is consistent in X and Y direction and even better equal in both directions.

 

Creating a perspective calibration with dot patterns is a bit of an iterative process. To get you started you can try the IMAQ assistant to guide you through the process or take a look at look at example 'Perspective Calibration.vi'.

 

I hope this helps.

0 Kudos
Message 5 of 6
(1,222 Views)

Hi Ramon.

Thank you very much for the detailed and thorough explanation,

Gil,

0 Kudos
Message 6 of 6
(1,215 Views)