LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Image Overlay not working when saving image to folder

Solved!
Go to solution

The gray text you're seeing could be the result of casting between I16 and U16 representations. For instance, the raw data value that corresponds to white for a I16 cooresponds to a gray when represented as a U16. This article explains this in a little more detail and provides some solutions.

 

As for the difference in how the image is displayed in Vision Assistant vs Windows Photo Viewer, I recommend taking a look here. The difference can occur since Vision Assistant will scale the image based on the full dynamic range and Window Photo Viewer may not.

0 Kudos
Message 11 of 25
(3,891 Views)

It looks like the change in text color is partially coming from that fact that I am using the IMAQ UserLookup function to apply BCG values to my image that is stitched together. The color of the text is altered by the BCG values making it hard to see at all when I view the images. Any suggestions? I tried playing with signed vs unsigned 16 bit images and converting back and forth, nothing that I tried worked to solve the color/text issue. Ideally, i would be able to apply the IMAQ UserLookup function before I overlay the text and stitch the images together, but when I perform the functions in this order I end up with the correctly edited image but I loose the overlayed text. Does the IMAQ UserLookup function have any odd glitches? I have been unable to solve this issue. I have attached my VI and subVIs.

Thank You 

0 Kudos
Message 12 of 25
(3,868 Views)

It might be worth trying the IMAQ BCGLookup VI instead since this function is specifically meant for applying BCG values. The UserLookup function provides more flexibility but also more room for error. It's possible that there's something unexpected happening with your custom lookup table.

0 Kudos
Message 13 of 25
(3,858 Views)

The issue with the BCG lookup function is it only handles 8-bit images, but I am working with 16 bit images. 

0 Kudos
Message 14 of 25
(3,852 Views)

I switched the order in the VI, so now I stitch the two images together, then apply the BCG values and then I overlay the text, but I am having an issue with the text overlay because it is no longer saving to a file/i can no longer see it when viewing it using a third party software. Could you take a look at my overlay VI and let me know how I could fix this. I should be destructively overlaying the text on the image but it doesn't seem to save. I have attached the VI and the two subVIS.

0 Kudos
Message 15 of 25
(3,848 Views)
Solution
Accepted by chivasmaniac12

chivasmaniac,

 

Comparing your Overlay VI to the Vi from the original forum post, it looks like you are missing an IMAQ Merge Overlay VI:

mergeoverlay.png

 

When I added this back in, it allowed me to save the image with the text overlaid.

 

-Jordan

 

Message 16 of 25
(3,832 Views)

hello elcalverado,

I merge overlay as you said, but when i open the overlayed image using Imaq Readfile.vi It shows overlays with dotted lines, when i increase zoom of the image, then the overlays are visabled clearly.

 

On the  other hand when i open the same image with windows viewer there it visabled clearly in incressing and decressing in zoom.

0 Kudos
Message 17 of 25
(3,774 Views)

I had a similar issue. I got around this by making the text a larger font and boldface.

0 Kudos
Message 18 of 25
(3,763 Views)

It's OK for the text overlay, if I draw Line,Oval,Rectangle,free hand,polygon with a width greater than 1 it will show overlays with out any dotted lines when I opened the image, If  zoom--  is performed on the image then the overlays on the image is displayed as dotted lines.

 

I used Imaq overlay multiple lines.vi to maintain the width of the overlay on the image. 

 

Is there any solution for this to avoid the dotted lines in zoom-- mode.

thank's in advance.

0 Kudos
Message 19 of 25
(3,745 Views)

Can you attach your code that shows the dotted-line behavior? I never noticed that when I was testing this before.

 

-Jordan

0 Kudos
Message 20 of 25
(3,730 Views)