Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image processing find cirle

Solved!
Go to solution

Hi

 

I created an application finding a circle in my working area. The application is not so stable.

I have used the following modules sequentially in a flat sequence structure (I will delete it finally):

 

IMAQ Extract 2 -> IMAQ ExtractSingleColorPlane -> IMAQ Inverse -> IMAQ AutoBThreshold 2 -> IMAQ FindCirles -> IMAQ Equalise

 

 

Using Vision Assistant the sequence of these modules is different. I have to use IMAQ Threshold before IMAQ Inverse and at the final I have to put IMAQ Lookup for visualisation of the result.

 

I would like to know if my code is correct and is it necessary to use so many IMAQ Dispose VIs after using IMAQ Create VIs. Is it better to use IMAQ AutoBThreshold 2 before IMAQ Inverse and to put at the final IMAQ Lookup VI?

 

Here is a screenshot of my code:

 

Snapshot.jpg

 

Regards

0 Kudos
Message 1 of 6
(4,753 Views)

I'm sorry i couldn't see the vision assistant script which you tried. let me give my inputs on this

-You said you used IMAQ inverse in vision assistant, is that right? have you used "Binary image inversion from binary palette"?

-If it is so, you need to convert the image to binary by thresholding then only you can use this operator.

-You can also use inversion on gray scale image by "Reverse" operation in lookup table.

 

-Coming to IMAQ Dispose, it is developer responsibility to dispose the image created by using IMAQ Create. There is one option to dispose all images by changing the "All images?" to True for IMAQ dispose.But, be careful when to dispose image!!!

 

-Can't understand "application is not so stable" is it detecting circles properly or not?may be provide sample images to see where it got failed!!

Thanks
uday
Message 2 of 6
(4,737 Views)

Hi,

 

In this application I don't use Vision Assistant. I wanted to tell that using the same sequence of IMAQ operators listed in the previous message I receive different results. Par example I have an image after thresholding and the final sphere after lookup table is white inside.

 

I am sending my results after each IMAQ operator. You can see that after thresholding there is no sphere. After IMAQ Equalise the shere is black inside and only the contour is white. Where I am wrong. I can not use IMAQ Find Circle if I don't use IMAQ Inverse and Thresholding before. 

 

The application is working well. It finds the circle correct but I am not sure if my code is OK. 

 

Here is my code and the final results:

 

Vision_Code.jpg

Vision_Templates.jpg

0 Kudos
Message 3 of 6
(4,729 Views)
Solution
Accepted by tiho
For a binary image to display, change the palette to binary.
-right click on image indicator, goto palette and select binary instead of grayscale.
Thanks
uday
Message 4 of 6
(4,725 Views)

Thank you very much. It was so easy. I feel ashamed. 

Have a nice day

 

Regards

0 Kudos
Message 5 of 6
(4,714 Views)
Glad i could help....
Thanks
uday
0 Kudos
Message 6 of 6
(4,706 Views)