03-11-2010 10:55 AM - edited 03-11-2010 10:56 AM
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?
03-11-2010 11:43 AM
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).
03-11-2010 11:54 AM
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?
03-12-2010 09:14 AM
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.
03-12-2010 11:29 AM
i did this.
added constant 1 to start angle and 360 to end angle.
i think its acceptedable.