Curve interpolation

asked 2018-05-15 10:03:15 -0600

Kamel gravatar image

updated 2018-05-15 10:04:00 -0600

Hi,

I want to automatically detect lateral maxima and minima on this image :

image description

Like you can see, I already detect this points. However, the detection precision is about a pixel. I want to make the detection more precise. Thus, I thought to interpolate the curves in order to obtain continuous points and be more precise. Does anyone an idea to make that on OpenCV, in C++ ?

Thanks for any help,

edit retag flag offensive close merge delete

Comments

Your research is impressive. Aren't the points on the right a little off? I'd get the maximum and minima by detecting where the dark pixels start on the right and end on the left, but that's just my opinion.

Bézier curves are not too hard to handle, if there is no direct support for curves in OpenCV. Bézier curves are differentiable too (you can calculate their derivative). There is plenty of C++ code, check Google.

In any case, you can draw/approximate the curve as a series of line function calls. The smaller the lines the better.

sjhalayka gravatar imagesjhalayka ( 2018-05-15 11:09:41 -0600 )edit