From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Merge Overlay issue

Hi folks, have had this issue for sometime and cannot get to the bottom of it.

 

I have an image which I'm doing some work on, namely, drawing a region of interest (just a series of lines and a rectangle using the IMAQ Draw subVI).  After doing this operation I use IMAQ Overlay Text and then IMAQ Merge Overlay to burn text metadata into the image.  My output image is mostly correct, in that the text does indeed appear on the image, but my ROI lines disappear and my ROI rectangle becomes a different color.  When I comment out my Overlay Text/Merge Overlay code the ROI looks correct on my output image.  What is Overlay Text/Merge Overlay doing to mess with my program?

 

I have toyed with what goes into the 'Image Dst' input for the IMAQ Merge Overlay subVI, thinking that might be the issue, but haven't gotten anywhere concrete.

 

Image one - With Merge Overlay edited out of code.  This looks correct.  

Image two - With Merge Overlay in code.  This looks incorrect.  Notice many lines are missing.

0 Kudos
Message 1 of 6
(3,500 Views)

You have two connections to "IMAQ Merge Overlay", one labeled Image DST for destructive.  Did you only want to pass the Image src? 

imaq_merge_overlay.png

 

 

 

0 Kudos
Message 2 of 6
(3,460 Views)

I have tried all sorts of combinations for what to put into 'Img DST', including putting nothing, like you have.  Truth be told I'm still a bit unsure as to what the 'Img DST' input refers to but like I said I have put everything there, including not wiring it, wiring in a new blank image, wiring in the source image, and so on.

0 Kudos
Message 3 of 6
(3,457 Views)

Note that their might also be a dataflow issue, since the "CreateLinearPallette.vi" isn't wired to error handling and it might act on your image at a strange time, causing the issue you are seeing.  I tidied up a bit and put error in/out of it before the IMAQ Merge Overlay.  Perhaps that makes a difference.

 

I can't see what's going on in your subvi "CreateLinear Pallette.vi", I assume you are using IMAQ Overlay Multiple Lines, but there's no image passed in to it.  I'm wondering why you don't just pass Image src (with overlaid text) to it.  Are using a property node or local variable to get the image reference? 

 

 

 

0 Kudos
Message 4 of 6
(3,448 Views)

Thanks.  I am adding lines elsewhere in the code.

 

After messing around a little more, it appears that my text overlay feature works on a certain portion of the code.  What I mean is...when I bring up an image from the hard-drive to be analyzed and worked on, my code works.  When I analyze a live image via camera, it doesn't work.  That leads me to believe something is wrong with the code in the latter case.  Unfortunately I am using the same subVIs in the majority of the code so it's difficult to pinpoint where the issue is.  Thanks for your input thus far.  

0 Kudos
Message 5 of 6
(3,446 Views)

Show more code, maybe something will pop-out.  But I'd look for dataflow issues.

0 Kudos
Message 6 of 6
(3,437 Views)