这是我之前在2.4.8版本中使用的一些代码。
matLines来自这个:
Imgproc.HoughLinesP(matOutline, matLines, 1, Math.PI / 180, houghThreshCurrent, houghMinLength, houghMaxGap);
…
Point[] points = new Point[]{ new Point(), new Point() };for (int x = 0; x < matLines.cols(); x++) { double[] vec = matLines.get(0, x); points[0].x = vec[0]; points[0].y = vec[1]; points[1].x = vec[2]; points[1].y = vec[3]; //...}


