Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Change ROI color when measures is less than

Hello to all.

First of all thanks a lot for reading this post and beeing able to help.

 

I have a VI which has two "Imaq Clamp Horizontal Max VI".

In those VI rectangle inputs are two different rectangles for each.

I can watch on a display that my VI meas the section in those rectangles correctly.

 

No I would like to do that when meas is less than 50px, the property rectangle will be red (by default is green)

 

How can I do that?

 

thanks a lot!!!

0 Kudos
Message 1 of 6
(3,224 Views)
it is not clear what you want could you explain a bit about it
0 Kudos
Message 2 of 6
(3,180 Views)

First of all thanks a lot for answering!

Yes, I can explain better.

I am using imaq clamp horizontal max vi, this VI has a input "rectangle" and it draw this rectangle (ROI) in green by default.

So when the output of this VI is less than 50pixels I would like that that rectangle will be red.

Look at attached image.

 

Thanks a lot

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

Hi,

 

I gave this a look and found two ways that may work:

-Maybe using this VI: http://zone.ni.com/reference/en-XX/help/370281AA-01/imaqvision/imaq_overlay_roi/

-Or using property nodes: http://forums.ni.com/t5/Machine-Vision/How-can-I-create-different-colored-ROIs-using-the-ROI-propert...

(In your case it may be easier if there is only one ROI)

 

So you could use a case structure and if the condition you mention is true, you can set the color with the property node. (I think in this case a property node is a better option).

 

I'm not 100% sure of the implementation, but I think it is possible.

 

Regards, 

Rodrigo Martín
Application Engineer
NI Spain
Message 4 of 6
(3,169 Views)

Thanks a lot ofr answering!

I have looked at your solutions and absolutely they both can work.

The problem is that I have rectangles (not ROIS) but I can convert from rectangle to roy and then apply "overlay ROI) with a specific color.

If I do that in the image I will have drawed the rectangle in green(this rectangle is drawed by clamp vi by default) and ROI over it in a specific color. Maybe there is a better solution for jus having just rectangle or ROI.. not both.

 

Thanks again! I will try it.

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

that is good question because I think it is some kind of problem that should be fix for this vi 

anyway your answer is this 

this vi is subvi if you double click on this vi you could open windows of this subi

there is on other subvi inside this vi that relate to overlay (check figure that I attach )
as you see there is no terminal output  for color control and it is green by default 
you can add out put thermal for this control and save it ofter that you can change overlay any time that you want 

gogo.jpg

Message 6 of 6
(3,155 Views)