So i have a 200x200 image that has a wheel on it. This wheel can vary positions so i need to find it's center in it. I have a approximate x positon of the wheel, but I still need the center. One problem is also that the wheel can have holes in it and similar things that make life harder.
A sample of an image: link
So I whold need an algorihtm in C# or maybe you could let me know if you know a good library for this or something.
Thanks in advance,

10 Years
Discussion Span
Last Post by BlackSun

Ok, looked at the library before but it didn't work too well for the whole picure. Maybe it will work better for the smaller one. But there is still something. AForge's class requires an exact diameter of the circle you are looking for, but the wheel can vary in size. That could be a problem...


If you can establish a range of the expected variance, you should be able to vary the search parameters as needed.


Try a technique called circle extraction using Hough transform. It may be difficult to implement but a line extraction version is given in aforge examples.


i can't understand u well but i understaned that u need to detect the position of any center of the target circle u can use selection tool and do it by g.draweclips(......) in name space system.drawing.drawing2d or u can load ur pic on ur panel and use

  private void Form1_MouseMove(object sender, MouseEventArgs e)
            textBox1.Text =e.X.ToString()+" "+e.Y.ToString();

sorry if isn't ur expected answer..

Edited by Dani: Formatting fixed

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.