LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding the center of a circle (in mm) on an image

Hi everybody
 
 I need to find the position of a red circle on an image. I was using find circles vi to find the circles. but the coordinates are not in mm.  So i found a vi that converts pixel to real coordinates. However, i am getting negative #s for area and radius. I think it has something to do with the setsimple calibration vi. What is the purpose of calibration axis info. My image resolution is 640 x480 and the actual size is 38in x 23.5 in. Is it even possible to find the position of the circle in mm scale?? Please help.. thank you,
 
 
rani
0 Kudos
Message 1 of 2
(2,916 Views)

Hello Rani,

The calibration axis info specifies your reference axis; you specify your original image's coordinate system. It is a cluster of three items. "Origin Pixel" specifies where the origin of the coordinate system is on your image. For instance, you could place the origin in the top right corner of the image, the bottom left, directly in the center, etc. The "Angle Relative to Horizontal (deg)" specifies the angle of the coordinate system. For instance, a value of 0 degrees would mean that the X-axis is completely horizontal and the Y-axis is completely vertical. But you can rotate your coordinate system using this input any number of degrees. "Axis Reference" allows you to have a have either a typical (direct) axis with Y values above the origin positive and Y values below the origin negative, or an indirect axis with Y values above the origin negative and Y values below the origin positive (the opposite).

I would highly recommend analyzing the LabVIEW example "Simple Calibration Example.vi" found in the example finder under the Vision category (Vision >> 2. Functions >> Calibration) and looking at the IMAQ Vision for LabVIEW VI Reference Help's information about "Set Simple Calibration.vi". The same example exists in the same path in its respective folder for LabwindowsCVI, MS Visual Basic 6.0, and MS VB.NET.

You can calibrate for millimeters. "Set Simple Calibration.vi" has an input, "Grid Descriptor", which is a cluster with an element, "units". It allows you to specify millimeters as the unit to convert to.

Regards,

Aaron B.
National Instruments
0 Kudos
Message 2 of 2
(2,893 Views)