Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

ROI with known constants

Solved!
Go to solution

Here is what I wanted to do.

Can you take a look at it and see how would I make this work? is it worth doing it?

i wanted to draw the overlay in realtime. writing to the image takes more time than writting to ROI?

 

 

 untitled.PNG

 

 

Message Edited by krispiekream on 03-11-2010 10:56 AM
Best regards,
Krispiekream
0 Kudos
Message 11 of 15
(1,671 Views)

Hey krispiekream,

 

I am a little unsure what you are asking about in last few posts. In terms of building the ROI, you could build your ROI manually by constructing the ROI descriptor. Or, you could do it like we see in this example where you are using the annulus to ROI VI. 

 

In terms of which method is better, it depends on what you are looking to do. The overlay is a destructive action. Which means that you are actually changing the pixel values for the image in memory. So, if you are looking to actually change the pixel values you need to use overlay. If you are simply looking to highlight some things while the image is being acquired, you might use the ROI method. I would have to do some testing myself to find out which method was faster. Without testing, I would guess that the ROI method is slightly faster because the image itself is not being changed. So, in LabVIEW you could see these ROI lines, but if you were to save the image and open it again, you would not see those lines. However, with the overlay, you would see those lines because the image pixels themselves are being changed.

 

In terms of making this work, I am not sure what it is you are trying to do (beyond what we have already got working).

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 12 of 15
(1,665 Views)

yeah.

after testing ROI is slightly faster by about 3-4fps.

i am very happy with it.

but I just have one minor tweek i want to make.

can you show me how to get rid of the angle line?

 

also,

how do i make the oval a color different than the vertical and horizontal line?

 

 

 untitled.PNG

Best regards,
Krispiekream
0 Kudos
Message 13 of 15
(1,663 Views)

Hey krispiedream,

 

Unfortunately, that line is part of the annulus that we are working with. We could get around this by drawing an oval ROI instead of the annulus. Unfortunately, there isn't a neat shape to ROI for oval like there is with a line and annulus. So, there are two things that we could do to get ride of that line. We could either create our own oval ROI manually using the ROI descriptor data type or we could angle the annulus to 'hide' this line under the cross hairs. Both of these solutions would require a little more math; one to determine the bounding rectangle for the oval based on the location of the cross hairs, and one to determine the angle of rotation for the annulus.

 

I have not had a chance to test either of these methods, but either should work.

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 14 of 15
(1,635 Views)

i did this.

added constant 1 to start angle and 360 to end angle.

i think its acceptedable.

 

 

untitled.PNG 

Best regards,
Krispiekream
0 Kudos
Message 15 of 15
(1,628 Views)