LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

imaq overlay pen size

I need to add overlays to an imaq image, but when I do, the overlays are often to hard to see.  Is their a way to set a "pen size" similar to the picture control?
0 Kudos
Message 1 of 4
(3,662 Views)

All VIs located on the Overlay palette of NI Vision do not support a pen size. So they always draw with a width of 1. (And I don't know a way that allows for specifying a different value.)

Regards, Guenter
BTW: Do you know NI's Vision Forum? I didn't check if a question similar to yours is already in it.

0 Kudos
Message 2 of 4
(3,653 Views)

tiemanjw,

   I had a similar concern and after poking around found that you can’t change pen size. So, I made my own VI to accomplish it. Granted, it is a hack and there may be better ways to do it but it works well for me. There are several caveats to my solution because I made it for a specific purpose so it isn’t as generic as maybe it could be. One is that I only did it for a rectangular bounding box. The second is instead of the input being a bounding box from a matches cluster mine accepts an optional rectangle array. But, there is no reason why you couldn't take what I did and extend it to any type of overlay and also change the optional rectangle input type to some other type to fit your needs.

The basic idea is to just put the IMAQ Overlay Multiple Lines.vi into a for-loop and draw multiple progressively smaller overlays inside one another. The resulting effect is it looks like a thicker overlay. Here are the vis. Let me know if it works for you or if I can give any more info.


 

Download All
0 Kudos
Message 3 of 4
(3,593 Views)

Actually, I found a problem with my solution. If the image you are trying to draw an overlay box around is small the lines tend to cover up the image if you add thickness inward. So, I added an option to add thickness in or out. I just made it a boolean called Large Image? If it is true it will add thickness inward. If false it adds thickness outward. Actually I just made a new version of the Draw Pattern Match Position.VI and called it "Variable Size Draw Pattern Match Position.vi"

0 Kudos
Message 4 of 4
(3,585 Views)