LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically how to find the circular objects present in the main image using NI Vision

Hi - Can anyone help me on the following requirement that needs to be done using NI-Vision
 
I want to extract the more circular objects in an RGB color image and then I want to divide the each circular objects by 1 cm2 sections and then I need to process further on the each sections.
For accomplishing the above task , I had followed the below steps and results is not successful. Please guide me to get successful results on this task.
1) Used IMAQ detect circle function to find the ROI of the circular objects automatically.
2) Then used IMAQ mask and extract function to pick out the circular object from the original image based on the programmatically given ROI value.
3) using nested for loops and image size information , overlaid the rectangles on the extracted circular object based on the given x and y step size and extracted each objects and shown separately.
 
My problem here is , This above implementation is  working only if the main image has only one circular object and if it has more circular objects , the algorithm fails. I want to basically know and need better algorithm to detect as many no .of circular objects present in the main color image.
 
Please do the needful.
 
Regards,
Dinesh

0 Kudos
Message 1 of 5
(4,034 Views)
Does your IMAQ Detect Circle function detect all circles?
Have you used proper IMAQ buffers?
If possible include sample images and code that will help.
You can check difference between other algorithms: https://forums.ni.com/t5/Machine-Vision/What-s-the-differences-between-quot-IMAQ-Find-Circular-Edge-...
Thanks
uday
0 Kudos
Message 2 of 5
(4,021 Views)

Uday - Thanks for your reply. 

 

To answer your question - It is not detecting more than one circular objects in an image. It is only detecting one circular object that too not efficiently. I am new bee to the vision development module , I hope I have been used the IMAQ buffers properly in my code. Please find attached the relevant vi's and let me know the proper way to detect and extract all the circular objects in a color image? Please do the needful.

 

Regards,

Dinesh

0 Kudos
Message 3 of 5
(4,007 Views)

-The sample image you provided contains single circle and it detected only one.

-Please try below and with default values it detects four circles and shows the overlay on the image.

Code modified to show detected circlesCode modified to show detected circlesSample Image with multiple circlesSample Image with multiple circles

Thanks
uday
0 Kudos
Message 4 of 5
(3,982 Views)

Thanks udhay , I will check and let you know.

Regards,

Dinesh

0 Kudos
Message 5 of 5
(3,978 Views)