0
votes

I'm working on a project with EmguCV (.NET-version of OpenCV) and I'm using the probabilistic Hough Transformation to find lines.

So at first I was performing the canny-operator. Afterwards doing the Hough-transformation.

Gray cannyThreshold = new Gray(50);
Gray cannyThresholdLinking = new Gray(300);

Image<Gray, Byte> cannyEdges = gray.Canny(cannyThreshold, cannyThresholdLinking);

LineSegment2D[] linesFound_temporary = cannyEdges.HoughLines
(
    cannyThreshold,         // 1. Parameter
    cannyThresholdLinking,  // 2. Parameter
    1,                      // 3. Parameter
    Math.PI / 360.0,        // 4. Parameter
    gray.Width * 0.2,       // 5. Parameter
    gray.Width * 0.4,       // 6. Parameter
    gray.Width * 0.1        // 7. Parameter
)[0];

Later I realised that the HoughLines-Method already integrated the canny edge detection.

Nevertheless, my results in line-detection are better and more steady when I use the additional canny detection instead of leaving it out.

Can anyone explain to me, why this happens? Or has anyone experienced the same?

1

1 Answers

0
votes

I experienced the same while doing one of my project. I think it dépends on the parameter given to both function. If the first canny remove too much information and no lines, the second function will suck. If you do a "first pass", removing much of the information but leaving very apparent lines, then the Hough Line has little to do. But I discovered that by tweaking the parameter of the Hough Line in the first time could achieve almost the same result.

Hope it helps!