Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Offset overlays

I am looking for a way to offset overlays. I do image processing on a cropped image, as it is fasster to crop to an ROI and process than it is to process the entire image, even with an ROI. But then, any overlays I get on the cropped image, need to be placed on the main image in the right place. I can't find a way to do this. 

 

If I could just get the overlay descriptors, I could apply an offset to them. Is this possible?

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 1 of 6
(4,964 Views)

Hi littlesphaeroid,

 

What software are you working with to process your images?  Is this in the Vision Assistant, Vision Development Module in LabVIEW, or Vision Builder for AI? 

 

If you are working with the IMAQ driver VIs in LabVIEW, are you familiar with the IMAQ Copy Overlay VI?  This may be what you are looking for.

http://zone.ni.com/reference/en-XX/help/370281AA-01/imaqvision/imaq_copy_overlay/

Regards,
Kelly B.

National Instruments
0 Kudos
Message 2 of 6
(4,940 Views)

Hi Kelly, I'm working with vision development module for LabVIEW. I do know about copy overlay, but as I mentioned, i'm using a crop of a larger image for my clamp function, so the overlay would end up on hte wrong part of the main picture.

 

Since the overlay can't be placed with an offset, and the overlay vectors canot be accessed as far as I can tell, I can't put the overlay in the right place on the uncropped image. It's a strange oversight. I simply want to have access to the overlay decriptors. They are like ROIs, but different?

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 3 of 6
(4,928 Views)

Hi littlesphaeroid,

 

I agree, this does not seem to be ideal.  As a workaround, you may be able to set the properties of the overlay so that anything applied to the image is also applied to the overlay, described here: http://zone.ni.com/reference/en-XX/help/372916T-01/nivisionconcepts/nondestructive_overlay/

 

From there, you should be able to copy the smaller image onto the larger image to move the overlay, and then set the offset of the smaller image to place it where you would like.

IMAQ ImageToImage 2 VI

IMAQ SetOffset VI

 

I understand that this is not an ideal solution, but it may be a functional workaround for your application.  I hope this helps!

Regards,
Kelly B.

National Instruments
0 Kudos
Message 4 of 6
(4,897 Views)

Since you are cropping (i.e. You know the coordinates of the crop from the original image), write those coordinates to the cropped image as custom image data.  Then, when it is time to position the overlay in the original image, simply read the values back out of the cropped image reference, and use the top/left as you position offsets for the overlay.

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
0 Kudos
Message 5 of 6
(4,892 Views)

Kelly, thank you, I'll think about this.

 

MoviJOHN: I appreciate your thoughts on this, but there isnot, to my knowledge, a wayto offset an overlay.If there were, I'd have solved this problem already. Perhaps I'm not understanding your suggestion. (BTW, I appreciate your idea of saving custom image data, which I have not yet explored.)

 

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 6 of 6
(4,887 Views)