By: Haroon Iqbal & Zhongdi Guo

------------------------------------------------------------------------------------

Sunday, 3 March 2013

Details of the Project-3

After we got the edge image, we found the edge of two patterns is similar with circle arc. Accordingly, we try to use Hough Transformation to detect circles:
  • First we create our accumulator space which is made up of a cell for each pixel, initially each of these will be set to 0.
  • For each(edge point in image(i, j)): Increment all cells which according to the equation of a circle( (i-a)² + (j-b)² = r² ) could be the center of a circle, these cells are represented by the letter 'a' in the equation.
  • For all possible value of a found in the previous step, find all possible values of b which satisfy the equation.
  • Search for the local maxima cells, these are any cells whose value is greater than every other cell in it's neighbourhood. These cells are the one with the highest probability of being the location of the circle(s) we are trying to locate.
  • The result we got finally is shown as following, where the step of radius=10, the step of angles=0.1, the minimum radius=650, the maximum radius=750, the threshold value=0.4.

    When the step of radius=10, the step of angles=0.1, the minimum radius=1390, the maximum radius=1400, the threshold value=0.3, we got


    We selected some groups of data from all the data we got, according to the centres and radius, we drew 8 circles, then used curve fitting to create a new circles based on the 8 circles we drew. Next, we can get a circle which is much more closed to the edges of two patterns. The print shot is shown below, where the location of the centre is (xc,yc), the radius is R.

    After we got the circles above, we can get the equations of those two circles. Finally, we draw them in the original images to check whether they fits the edges of two patterns.
    The result we got is great, we can use the equation of two circles to calculate the coordinate value of arbitrary point on the circle, and obtain the distance between them.

    No comments:

    Post a Comment