Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting order of precedence of ROI and Overlay in image

Hi Folks -

 

I am trying to have an overlay of points appear OVER a line ROI.  I can convert the line ROI to an overlay, and clear the ROI, to get the effect I want.

 

Point overlay over line overlay.PNG

 

However, the downside of that approach is that if the user wants to draw a new line, they always have to re-click on the line tool and redraw the line from scratch.  If the ROI line is still in the image, the user can just mouse grab the end points or entire line and shift as needed.  But if I leave the ROI line in the image, or clear it and then re-draw it, it always appears over the overlay.

 

Point overlay under ROI line.PNG

 

The order makes a significant difference when not zoomed in on the image.  One can hardly see the blue line if zoomed out.

 

I thought many years ago in the Vision user manual that I read about the order of precedence in an image for image, overlay, and ROI, and that ROI will always appear over the image and overlay.  I don't see anything about this in the current Vision concepts manual.

 

0 Kudos
Message 1 of 3
(4,702 Views)

Hello,

 

yes, it does seem that the ROI has precedence over overlay display. You could make the ROI dissapear when the mouse cursor leaves the image bounds and use your first solution (to convert the ROI to overlay). When the mouse cursor enters the image bounds, clear the overlays and add the original ROI back.

 

See the example in the attachment.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 2 of 3
(4,682 Views)

Thanks for your reply.  I can't guarantee that user will not accidentally enter the image and lose the overlay - but it is a workable idea in which I could convert the ROI to an overlay upon mouse leave and thus have the facsimile of the green ROI, now an overlay, underneath the blue line.  Then convert it back to ROI upon mouse enter.

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