개정판 6c609196
issue #701: line no indi detector
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
1718 | 1718 |
''' |
1719 | 1719 |
import math |
1720 | 1720 |
[x, y, w, h] = cv2.boundingRect(contours[idx]) |
1721 |
if (w < 100 and h < 100):
|
|
1721 |
if (w < 150 and h < 150):
|
|
1722 | 1722 |
return False |
1723 | 1723 |
|
1724 | 1724 |
fLines = [] |
... | ... | |
1737 | 1737 |
maxDifH, maxDifW = math.ceil(math.tan(4 * math.pi / 180) / 2 * w), math.ceil(math.tan(4 * math.pi / 180) / 2 * h) |
1738 | 1738 |
|
1739 | 1739 |
edged2 = cv2.Canny(out, 100, 200) |
1740 |
lines = cv2.HoughLines(edged2, 1, np.pi/180, 65)
|
|
1740 |
lines = cv2.HoughLines(edged2, 1, np.pi/180, 60)
|
|
1741 | 1741 |
if lines is None: |
1742 | 1742 |
return False |
1743 | 1743 |
for line in lines: |
내보내기 Unified diff