03-08-2010 11:10 AM
Hi,
I am very new with vision dev module. Can someone please help me.
I have this sample vi that i want to work with.
I was normally doing OVERLAY of the image and draw the oval/lines on the image.
But I want to not draw it on the image, but draw it in the ROI so that I will save memory?
With the contstants from the oval and the lines in ARRAY CONTROL.
Can someone help me by showing me in block diagrams how would I implement that using ROI?
Thank you so much.
Solved! Go to Solution.
03-08-2010 12:00 PM
how would i place the elements to fill the ROI CONSTANTS?
03-09-2010 12:25 AM
You can bundle them and feed it into the overlay like this
03-09-2010 11:23 AM
someone told me to draw directly on the ROI instead of doing an overlay on the image to reduce process time?
it takes more time to write to an image, then to write to the ROI.
03-09-2010 01:51 PM
Hey krispiedream,
It sounds like the function you are looking for is the IMAQ Group ROI. With this, you can create an array with your various ROI descriptors and display all of them on your image. Check out these images of a little more help.
03-09-2010 04:45 PM - edited 03-09-2010 04:53 PM
can you attach the vi that you used to make that picture?
i cant seems to build the array because of different datatypes within oval and lines.
thanks
or can you help me with this vi?
i can't seems to get the datatypes right.
03-09-2010 04:58 PM - edited 03-09-2010 04:59 PM
Hey Krispiedream,
To make the ROI's, I simply used the property node to give me an indicator with the ROI, created a ROI, ran the VI, and then simply made the indicator into a constant. This made the ROI descriptor cluster for me, complete with appropriate data types. I did this a few times to make additional ROI's for the image. The attached code was written in LV 2009.
03-09-2010 06:02 PM
do you think you can try to show me how this will work with my example?
i can't seems to get the oval to connect with the 2 lines.
03-10-2010 11:57 AM
Hey krispiekream,
I took a look at your code and made some slight modifications. When using the IMAQ Convert Annulus to ROI VI the data types don't quite line up with the oval that you created. In the current configuration, you can do a little math to convert the coordinates of your lines to find the required coordinates of your Annulus. You might also want to add some math to what I did here to configure the angle of the annulus and the size of the annulus. An alternative is to create an oval ROI manually. This would require a bit of data type manipulating, but it could be done. Take a look at the code and the attached picture.
03-11-2010 10:34 AM
BCho,
thank you so much for helping me with this. i was sick yesterday so i was away from my desk.
I see that you made constants for the annulus from the element indicator?
now, do we have to do that?
how would you create it manually?
the array was created by vision assistant and it goes into an OVERLAY OF IMAGE.