Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

ROI with known constants

Solved!
Go to solution

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.

 

 

untitled.PNG

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

how would i place the elements to fill the ROI CONSTANTS?

 

untitled.PNG

Best regards,
Krispiekream
0 Kudos
Message 2 of 15
(5,408 Views)

You can bundle them and feed it into the overlay like this

 

bun.JPG

0 Kudos
Message 3 of 15
(5,384 Views)

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.

 

Best regards,
Krispiekream
0 Kudos
Message 4 of 15
(5,369 Views)

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.

 

group roi.png

 

ROIs.png

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 5 of 15
(5,360 Views)

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.

 untitled.PNG

Message Edited by krispiekream on 03-09-2010 04:49 PM
Message Edited by krispiekream on 03-09-2010 04:53 PM
Best regards,
Krispiekream
0 Kudos
Message 6 of 15
(5,353 Views)

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.

 

 

Message Edited by BCho on 03-09-2010 04:59 PM
Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 7 of 15
(5,348 Views)

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.

 

untitled.PNG

 

Best regards,
Krispiekream
0 Kudos
Message 8 of 15
(5,343 Views)
Solution
Accepted by topic author krispiekream

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.

 

 roi.png

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 9 of 15
(5,324 Views)

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.

Best regards,
Krispiekream
0 Kudos
Message 10 of 15
(5,305 Views)