09-03-2010 02:14 AM
I am trying to detect partial circles in images. We are taking pictures of the moon over the full range of phases so that we end up with the partial circle of the bright side of the moon. The goal is to detect where the center of the moon is within the image. From that we want to get outputs and use it to center the camera over the true center of moon so that the image is centered.
This algorithm to detect the center is readily available in Matlab, but for reasons that aren't worth discussing we can't use it on the machine. Using an exe from Matlab and called from Labview doesn't seem to allow inputs or outputs. I've read through numerous threads on here about that and I am confused. If a Matlab script is called and doesn't have an output, what is it good for? Obviously, I don't understand the basics here.
Anyway, is it possible to do center detection using some Labview vision processing? I've read the vision package help files on the processing vi's but nothing seems to fit as far as I can understand it.
Thanks
09-04-2010 03:54 PM
This is a straightforward operation using IMAQ Vision : The find circular edge function, applied directly to a grey level image, returns the position of the center.
09-06-2010 06:24 AM
CC,
Thank you. This looks great. I will give it a try.
09-07-2010 02:17 PM
Hi
I am doing pretty much very similar to what you are doing.
I need to detect partial circles in the image. I didnot understand
what ahve you done here.
Yeshwanth KAdire
09-08-2010 01:15 AM
If there is a single partial circle, this is a one step operation, using the find circular edge function. Try it.
If there are several circles, you'll need some processing to isolate the different circle portions and apply the FCE successively to each portion.
09-08-2010 01:37 AM
Correction : when there are several circles, you should use the shape detection function, using the "occulted" option. Again, a one step operation, that returns a table with radius, X,Y position, angle (when working with ellipses...
09-08-2010 08:34 AM
The code shown above is not clear. What processign steps you have used to detect the half circle.
What I did in my code for something similar to this was
Acquire
extract red plane with minimum threshold.(I donot know but that decreased noise)
Dilate and erode the circle until there are no holes in the circle.
then extract the circlular image using IMAQ mask.
I don't know what to do if its a semi circle as shown above. COULD
ANYONE PLEASE EXPLAIN WHAT you guys did in the above code.
Yeshwanth
09-08-2010 09:02 AM - edited 09-08-2010 09:04 AM
It uses the IMAQ Find Circular Edge Vi. Give it an inner and outer circle (the red ones) and it will search between then for an edge along a number of spokes (the blue lines). It then does a best fit (I think) of the edge points (faint white dots on the edge of the circle you're looking for) to work out the circle. Interesting that I've just been doing the same thing with an incomplete circle so I know it works.
09-08-2010 09:12 AM
I played with the edge detector and the spokes confused me. The documentation is pretty weak on this function.
Anyway, is it possible to programatically control the location of those spoked wheels? I am brand new at this, but I am assuming that once you have defined a script in the assistant you can convert this to regular LV code like any other Express vi. Is that the case?
09-08-2010 09:18 AM
That's what I've done this week. I used Vision Assistent to play around with things, then export as a vi so I can use it in large vi.
Yes, you can define a start and finish angle of the spokes, so they don't need cover 360 deg from the centre if you don't need to.