12-08-2015 02:56 PM
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?
12-09-2015 01:49 PM
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/
12-09-2015 06:09 PM
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?
12-11-2015 06:07 PM
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.
I understand that this is not an ideal solution, but it may be a functional workaround for your application. I hope this helps!
12-11-2015 06:15 PM
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.
12-11-2015 07:59 PM
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.)