1 | initial version |
Hi Jean-Francois. You're welcome - well, again this isn't an answser, but my comment wouldn't fit in a comment :-| Curve fitting is a big subject area which you'd need to research a bit more on your own. Here's some ways to head out: almost any 2 dimensional curve can be generated using polynomial equations. Take for example a basic parabola, y = x^2. Each x value generates a y. This process can be reversed. Any set of points, if they are not too chaotic or random, can be used to 'connect the dots' making a curve. If you fit your image data points (you know now the y, but need to figure out the x ), you can figure out :)) what figure it is. So how to get the image points? If, as Sammy suggests, you get the crescent to stand out enough, you can use the black/white transistion pixels, either to make a filled form (meaning you don't care about whats 'inside' the crescent), or, create a shadow line drawing. (There's also a set of opencv routines that do this, but I don't recall their name - maybe some can chime in here.) It's like a hit or miss, like the mine sweeper game ... your points will be on one or the other side of the "edge" of the crescent, then you use those points to 'regress' and refine the actual location of the edges. Once you have a x,y matrix of points, you can figure out the polynomial equation. If the curve edge of the crescents are smooth and circle like, then you only need the polynomial for a partial circle, used twice - one for the inner (partial) circle, and one for the outer. The only difference is the radii of the two. - H
Hi Jean-Francois. You're welcome - well, again this isn't an answser, but my comment wouldn't fit in a comment :-| Curve fitting is a big subject area which you'd need to research a bit more on your own. Here's some ways to head out: almost any 2 dimensional curve can be generated using polynomial equations. Take for example a basic parabola, y = x^2. Each x value generates a y. This process can be reversed. Any set of points, if they are not too chaotic or random, can be used to 'connect the dots' making a curve. If you fit your image data points (you know now the y, but need to figure out the x ), you can figure out :)) what figure it is. So how to get the image points? If, as Sammy suggests, you get the crescent to stand out enough, you can use the black/white transistion pixels, either to make a filled form (meaning you don't care about whats 'inside' the crescent), or, create a shadow line drawing. (There's also a set of opencv routines that do this, but I don't recall their name - maybe some someone can chime in here.) It's like a hit or miss, like the mine sweeper game ... your points will be on one or the other side of the "edge" of the crescent, then you use those points to 'regress' and refine the actual location of the edges. Once you have a an x,y matrix of points, points, you can figure out the polynomial equation. If the curve edge of the crescents are smooth and circle like, then you only need the polynomial for a partial circle, used twice - one for the inner (partial) circle, and one for the outer. The only difference is the radii of the two. - H