Skip to content
Snippets Groups Projects
Commit 7e7d17ce authored by Kelter Christopher - Studierendenaccount's avatar Kelter Christopher - Studierendenaccount
Browse files

this might work with newer version of opencv

parent fb85be2d
No related branches found
No related tags found
No related merge requests found
......@@ -93,7 +93,7 @@ def do_shape_detection(img_rgb, img_depth):
if VISUALIZE:
cv2.imshow('thresh img', thresh1)
contours, hierarchy = cv2.findContours(thresh1, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
contours, hierarchy = cv2.findContours(thresh1, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)[-2:]
keypoints = []
for cnt in contours:
approx = cv2.approxPolyDP(cnt,0.01*cv2.arcLength(cnt,True),True)
......@@ -142,4 +142,4 @@ if __name__=="__main__":
#cv2.imshow("Shape", img_processed)
rate.sleep()
\ No newline at end of file
rate.sleep()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment