Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Image Coordinate System

Hello guys,
 
 
Working with images and Imaq functions, I've noticed that the coordinate center of the image is by default the left-upper corner. In my application that would be a lot easier to set the coordinate system center at the center of the image.
 
Is this possible to do ?
0 Kudos
Message 1 of 4
(4,308 Views)
Hi Mic_Scale -

The coordinate/reference system cluster has parameters for the origin.  You should be able to set this to the middle pixel of your image.  Which functions are you using with coordinate systems?

David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 2 of 4
(4,293 Views)

Hello David

 

I didnt understand "The coordinate/reference system cluster has parameters for the origin."? How is it possible. Iam having an image and want to change the origin to its centre. I am using LabVIEW 8.2.

 

Thanks

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 4
(3,892 Views)

Hi,

 

To be able to do that, you need to calibrate your image using for example IMAQ Set Simple Calibration (located in the Vision Utilities>>Calibration Palette).

Once the image is calibrated, some function will directly return calibrated results, taking into account the new coordinate system you defined (like for example IMAQ Edge Tool3. In this VI the output Location (real-world) will be expressed in the new coordinate system). Some other VIs don't compute the real-world coordinates like for example IMAQ Centroid, which only returns a point in pixels, with the origin being the top left corner of the image. In this case, to figure out what the value should be in the calibrated world, we provide helper VIs located in the Vision Utilities>>Calibration palette, that converts a location in pixels to its corresponding "real-world" or calibrated position (IMAQ Convert Pixel to Real-World).

We also have the corresponding VI that convert real-world (calibrated) coordinate to the corresponding pixel location (origin being top-left corner of the image).

I encourage you to look at the calibration examples located here: C:\Program Files\National Instruments\LabVIEW 8.x\examples\Vision\2. Functions\Calibration\

Start with the Simple Calibration Example.

 

Best regards,

 

-Christophe

0 Kudos
Message 4 of 4
(3,871 Views)