Circle Tracking and Alignment Check
Jarrett from Australia  [5 posts]
6 years
hi everyone,

i'm working on a system to check in real-time the alignment of a small circle within a larger circle, as shown in the attached images.

at the moment i prep the image with a threshold, close, smooth hull and canny edge detector, which is working well.

there are two things i'm hoping to improve on:

1) i'm using 'circles' to find the large circle. i extract the centre and diameter information and put it in a new variable using python. then, i use circles a second time to find the small circle, and compare the variables in python. is there a more efficient way to do this?

2) the circles module seems a bit uncertain about the centre of the circles, fluctuating 1-2 pixels even on a static image. is there any way to trim up the variation on this output? at the moment i've been filtering variables to the average over the last 10 frames, but if i can reduce the variation of the module, that would be better.

Jarrett from Australia  [5 posts] 6 years
seems the forum didn't like my original images, here they are again.

Anonymous 6 years

Can you confirm the first image? I understand the black hole in the second image being what you want to detect but are unsure about the first image. Or if you can include the robofile that you found to somewhat work that would help us understand what circles you are detecting and how to improve the results.

Also, not sure if this would apply but the Circle Probe module may also be worth looking at if you've not already done so.

Jarrett from Australia  [5 posts] 6 years
Hi STeven,

here's a more thorough explanation - my apologies, i was trying to keep it simple but seems i didn't explain it well enough!

the camera is looking down the barrel of a hole punch that we are using to punch holes in a thick film. we want the holes on the film to be very accurately positioned.

the large circle is the view with no film in place, showing the shape of the barrel. i plan to use this as the 'reference' position for the circle. since the camera can shift slightly during a punch operation, i don't feel comfortable matching the target to absolute pixels positions. hence the large and small circles.

the small circle is a target used on the film to indicate the centre position of the hole. the outside edge of the hole is also black, hence the half-moon shapes shown when the target is not aligned correctly. since this pattern has been used on our films for years in an older punch system, we can't modify the pattern to allow for better recognition.

i've attached some images both with and without the overlay of an empty barrel, a mis-aligned placement and an aligned placement. i've also attached the .robo file i'm currently using. the overlay is to indicate to an operator that they can trigger the punch when the target is correctly aligned.

at the moment with live video the position of the found circles varies by 1-2 pixels. can i improve that at all? i tried a circle probe on the large circle and it did improve the accuracy slightly. is there anything else i can do to decrease variation?

sorry for the long post!



This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index