Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

spatial calibration with LabWindows / CVI and NI-Vision

Hallo Experts,

after digging in the forum for my problem - but didn't find a solution for me - I am finally posting my question. It appears that most posts are working with LabView.

 

So, here's the task.

 - Assuming an uncalibrated image, containing markers in it.

- The postition of the markers are well known in the real-worl-coordinate system

- The marker position in pixel-coordinates can be retreived via mousclicks.

- Now i want to transform the image from pixel to real world coordinates.

I am able to create a calibration strucure using:

 

CalibrationPoints* calibPoints;

TransformReport* Transform;

 

calibPoints->numCoordinates = nrOfMarkers;

calibPoints->pixelCoordinates = imagPixelPos;

calibPoints->realWorldCoordinates = realWorldPos;

imaqLearnCalibrationPoints(ImageIn,calibPoints,NULL,NULL,NULL,NULL,&quality);

 

Next thing I do after   "imaqLearnCalibrationPoints"  is

Transform = imaqTransformPixelToRealWorld(ImageIn,imagPixelPos,nrOfMarkers);

 

I had expected that ImageIn is now somehow dewarped according to the real-world-coordinates of the markers, but it appears it is not.

The transform report also contains just one valid point, while nrOfMarkers is 16.

 

What I am missing?

Please find attached some screenshots indicating the structure of:

Pixel-Coordinates

Real-World-Coordinates

Calibration Points

 

Any help is highly appreachiated.

Thank you,

der_Phil

 

 

 

 

 

 

 

Download All
0 Kudos
Message 1 of 3
(2,958 Views)

OK,

it seems I simply had to do:

 

-imaqLearnCalibrationPoints()

 

and

- imaqCorrectCalibratedImage()

 

After this the input image is dewarped based on the marker positions.

Note: Still we are in pixel coordinates.

 

Question aside:

Where can I access the position of the markers after using

   imaqCorrectCalibratedImage()  ?

 

I would like to overlay over the dewarped image the marker location.

Please find attached a screenshot of the dewarped image.

 

 

 

Thank you.

 

0 Kudos
Message 2 of 3
(2,912 Views)

One more hint:

 

Here is the goal:

In the attachment one can se a line found in the image and drawn in a diagram.

 

This line is obviously drawn in pixel coordinates, taken from the dewarped image

..see post #2

 

Actually the goal is to have this line in real world coordinates x/c and y/b, with

0<= x/c <= 100   in [%]

0<= y/b <= 100   in [%]

 

thank you

 

0 Kudos
Message 3 of 3
(2,908 Views)