Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Different color ROIs

I've seen this post:

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=418659&query.id=2770634#M418659

 

But it doesn't really help in what we're trying to do. is there any known way to have multiple ROIs programatically drawn with different colors? I have tried to draw 1, change the color, and then draw another. If I do this using the ROI tools LabVIEW is happy and let's the previous colored ROIs stay on the viewer. If I do it programatically, then when I draw the last ROI it destroys all of the previous ROIs. Is there any way to add a new ROI of a different color without changing the color of (or destroying) the previous ROIs?


LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.
0 Kudos
Message 1 of 12
(6,229 Views)

Hi Matt,

 

I didn't look too closely at the VI in the post you linked to, but it looked like it was grouping the ROIs, which would mean all of the ROIs will have the same color when converted into an overlay. If you convert each ROI to overlays individualy, you can make each ROI a different color.

 

 

 

0 Kudos
Message 2 of 12
(6,190 Views)

We have the same issue - we group ROIs in order to show different ones at the same time and also to be able to add previously saved ROIs to an image. The ROIs always need to be modifyable so converting them into an overlay is does not quite do the trick here.

 

Since "color" is not a property contained in the ROI descriptor, but a property of the image indicator I am now afraid that there will hardly be a work-around. Can anyone else come up with a neat idea about this? help is greatly appreciated.

 

Falk

inpro.de

0 Kudos
Message 3 of 12
(5,881 Views)

Hi Falk,

 

One workaround would be to clear and then redefine your Group if you need to change the properties of individual ROIs within the group. IMAQ Clear Overlay can be used to clear one or several groups, then you could use IMAQ Overlay ROI again, with different ROI descriptors, to redefine your overlay with the new parameters.


Regards,

Daniel H.  

Daniel Hays | Test Software Business Manager
0 Kudos
Message 4 of 12
(5,860 Views)

Thanks Daniel. I figured that continuously updating overlays would be a way.

 

However - overlaying does not allow for changing the ROI. Whenever this shall be done, how would you determine via a mouse click, which ROI is expected to be altered? I know you can read out the coords of the mouse within the image indicator, but it seems to be a whole lot of trouble to go through, just to be able to give different ROI geometries different colors. A respective property within the ROI descriptor does seem like the most logical thing to implement here. My proposed feature for LabVIEW 2012 or 2013... 😉

0 Kudos
Message 5 of 12
(5,857 Views)

Can you draw an ROI in transparent color?  If you can, you could display the transparent ROIs over the overlays.  Whenever the ROI was adjusted, adjust the overlay underneath as well.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 6 of 12
(5,847 Views)

Hi Falk,

 

Probably an easier way to go would be to use a Combo Box string control on the front panel to select which "group" overlay you want to clear, modify, and redefine. The problem is that ROIs are not primarily intended to be viewed -- they are kind of a behind-the-scenes tool for machine vision, not necessarily intended for viewing by humans. Thus, they normally don't require a certain color to be associated with them. That's why we have the function to create an overlay from the ROI, and the overlay is the part that has color as an input. 

 

If you can give some more info about your application and why you need to be changing the ROI, we may be able to come up with a different method that could be more useful for you. Would IMAQ ContstructROI be something that you could use instead? It allows you to draw the ROI right on the image, so if you needed to change the ROI you could clear the current ROI and then construct a new one with IMAQ ConstructROI.


Regards,

Daniel H. 

Daniel Hays | Test Software Business Manager
Message 7 of 12
(5,844 Views)

Thanks Bruce and Daniel.

 

Bruce: Unfortunately "ROI Color" as an Image Display Property does not support Transparency or Alpha Blending or the like. Just RGB, as I see it. But the idea is quite innovative Smiley Wink Also a desired feature for future releases...

 

Daniel: The ComboBox String Control would indeed be a neat way of (re)distinguishing the usually grouped ROIs/Overlays from each other and modifying them separately and independently. This also seems to be a good alternative to the mouse coords calculations that are involved in "automatically" determining the ROI/Overlay desired for modification. I'll have a try on that.

 

As for the focus that's leading us to want to have different colored ROIs: We process thermographic sequences and want to plot (and compare) the intensity timelines of different pixel regions. Therefore we need a correspondence between the ROI color and the respective plot color. And as we explore the sequences for hints about defective inspection part areas we tend to move around those ROIs a lot. So that's were the wish is coming from. Hope the explanation makes sense to you at all.

0 Kudos
Message 8 of 12
(5,837 Views)

Wow, I has been 6 years!! This feature is supposed to be a routine in machine vision to allow operators manually select different ROI. Why? Why?

0 Kudos
Message 9 of 12
(5,161 Views)

ok  I think  I answer this before but I attach my code here to  answer this topic also 

0 Kudos
Message 10 of 12
(5,143 Views)