curved line detection

asked 2015-11-03 23:14:31 -0500

hans gravatar image

updated 2015-11-03 23:53:31 -0500

I'm using OpenCV (in Java) to implement curved line detection, to detection a curve like the yellow one in this image. I do not know how. Help.

original image
image description


detection curve line
image description

MatOfInt4 lines = new MatOfInt4();
Imgproc.HoughLinesP(mat, lines, 1, Math.PI / 180, 20, 15, 10);

for (int i = 0; i < lines.cols(); i++) {
    double[] l          = lines.get(0, i);
    Point startPoint    = new Point(l[0], l[1]);
    Point endPoint      = new Point(l[2], l[3]);

    Core.line(mat, startPoint, endPoint, new Scalar(255, 0, 255), 1);
}
edit retag flag offensive close merge delete

Comments

hi uploaded original image! thank you :D

hans gravatar imagehans ( 2015-11-03 23:54:04 -0500 )edit