[英]How to extract the contour of a material (2D drawing) with the image processing library opencv and python language?
I'm assuming you're doing something like this.我假设你正在做这样的事情。
edges = cv2.Canny(gray, 50, 150)
_, contours, hierarchy = cv2.findContours(edges, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
You can increase the canny thresholds to only have thick edges.您可以增加精明阈值以仅具有厚边缘。
edges = cv2.Canny(gray, 100, 300)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.