10-01-2013 03:25 AM
I am having an image that goes through several stages. At one stage an overlay is created on the image. But this image with overlay is not saved anywhere. My question now is: Is there a way to find the coordinates of the centroid (x) in the image with overlay ?Since I am not saving the file i cannot use IMAQ Read image & vision info vi.( correct me if i am wrong)
Any better ideas to deal with it?
10-01-2013 04:08 AM
You may also want to post the same query to a much relevant board, that's 'Machine Vision'.
10-01-2013 04:58 AM
Do you want the centroid of the overlay or the centroid of the image?
If the centroid of the image why not just use the Image Size then work it out from the x,y coordinates.
If the centroid of the overlay, how are you creating the overlay? If you are creating it from an ROI, you could work it out from the global rectangle of the ROI.
10-01-2013 09:06 AM
It's been a bit since I've worked in Vision but I believe the problem is the overlay is a type of meta data on top of the image, and when you go to save it just saves the image not the ROI. If this is the case you need to use these two functions to merge the ROI and the image so the save will include it.
http://zone.ni.com/reference/en-XX/help/370281M-01/imaqvision/imaq_overlay_roi/
http://zone.ni.com/reference/en-XX/help/370281M-01/imaqvision/imaq_merge_overlay/
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-03-2013 04:21 AM
@ Phil_ : I want to have the centroid of the overlay. I looked trying to find how the overlay is created. All of the overlay creation steps are done inside a dll. I was not able to find any ROI in it. And i am not supposed to reveal the dll due to privacy problms.
@Hooovahh: I do not want to save the image with overlay. I just need to use the image with overlay to find the centroid.
10-03-2013 04:37 AM - edited 10-03-2013 04:38 AM
So this isn't an Imaq overlay, this is an overlay drawn with your own dll?
I assume that means that your original image will be greyscale, and your image with overlay will be RGB?
If the overlay is always the same colour maybe you can isolate the overlay using the colour information somehow and work out its centroid from there?