09-01-2014 04:35 PM
Hello all,
I need to group the attributes(like radius, center x, center y) of circles from IMAQ Detect Circles function. For instance, all of the y positions need to be grouped in an array. I could not seperate them.
I tried a few things to do that. I'm adding my last try as attachment. Because I am new at Labview it may be not a good way. If it is not a good way to do this task, I would be pleased to hear different methods or modifying the VI would be appreciated 🙂
Solved! Go to Solution.
09-01-2014 07:12 PM
@omersevinc wrote:
Hello all,
I need to group the attributes(like radius, center x, center y) of circles from IMAQ Detect Circles function. For instance, all of the y positions need to be grouped in an array. I could not seperate them.
I tried a few things to do that. I'm adding my last try as attachment. Because I am new at Labview it may be not a good way. If it is not a good way to do this task, I would be pleased to hear different methods or modifying the VI would be appreciated 🙂
The IMAQ Detect Circle vi returns an array of clusters. Each cluster contains a position cluster with X and Y information (single precision float), the radius (double precision float), and the score (double precision float). You can separate these out by first getting a single element from the array. In the snippet below, I use an indexed tunnel in a For Loop to do this. Then use the Unbundle by Name function to separate the three elements of the cluster. You'll need to use the Unbundle by Name function again to pull out X and Y from the Position Cluster. Then just run all values out of the For Loop with an indexed tunnel and you have it. Hope this was what you were looking for.
Regards,
09-01-2014 08:59 PM
09-02-2014 03:47 AM
Thank you both for your helps. I did it like you explained.
I don't know do I need to open a new topic but now I have another problem with circle detection. As you can see from the image, I have only 6 circles. But the function detects 12 circles. It detects each circle twice with small differences. What should I do to constraint the second detections?
09-02-2014 03:52 AM
09-02-2014 04:23 AM
GerdW,
You are right but I need to detect only the black ones
09-02-2014 04:38 AM
09-02-2014 10:04 AM
GerdW,
I was looking for an option like find best edge in VBAI but sorting also works for now
Thanks for your help.