mirror of
https://github.com/zebrajr/opencv.git
synced 2026-01-15 12:15:17 +00:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -85,13 +85,13 @@ contours, _ = cv.findContours(bw, cv.RETR_LIST, cv.CHAIN_APPROX_NONE)
|
||||
|
||||
for i, c in enumerate(contours):
|
||||
# Calculate the area of each contour
|
||||
area = cv.contourArea(c);
|
||||
area = cv.contourArea(c)
|
||||
# Ignore contours that are too small or too large
|
||||
if area < 1e2 or 1e5 < area:
|
||||
continue
|
||||
|
||||
# Draw each contour only for visualisation purposes
|
||||
cv.drawContours(src, contours, i, (0, 0, 255), 2);
|
||||
cv.drawContours(src, contours, i, (0, 0, 255), 2)
|
||||
# Find the orientation of each shape
|
||||
getOrientation(c, src)
|
||||
## [contours]
|
||||
|
||||
Reference in New Issue
Block a user