Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ATTENTION: Fast Line Detector which is available in OpenCV 4.x.x.

import cv2 img = cv2.imread("box.jpg", 0)

fld = cv2.ximgproc.createFastLineDetector() lines = fld.detect(img)

result_img = fld.drawSegments(img,lines)

cv2.imshow("Result", result_img) cv2.waitKey(0)

ATTENTION: Fast Line Detector which is available in OpenCV 4.x.x.

import cv2
img = cv2.imread("box.jpg", 0)

0)

fld = cv2.ximgproc.createFastLineDetector() lines = fld.detect(img)

fld.detect(img)

result_img = fld.drawSegments(img,lines)

fld.drawSegments(img,lines)

cv2.imshow("Result", result_img) cv2.waitKey(0)

cv2.waitKey(0)