‎02-24-2015 08:17 AM - edited ‎02-24-2015 08:36 AM
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:
Regards
Solved! Go to Solution.
‎02-24-2015 11:00 PM
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!!
‎02-25-2015 02:26 AM
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:
‎02-25-2015 02:32 AM
‎02-25-2015 05:52 AM
Thank you very much. It was so easy. I feel ashamed.
Have a nice day
Regards
‎02-25-2015 06:52 AM