2017-03-12 00:13:14 -0600 | received badge | ● Enthusiast |
2017-03-05 21:49:00 -0600 | commented answer | Opencv Python 3.2: How to get freeman chain code from edge/contours Regarding to the contour detection, as you said, if the object is not closed then duplications might be understood. However, I tried another example which is closed, as below: Then the contours still contains lots of duplications: [2, 1],[1, 2],[1, 3],[1 ... (more) |
2017-03-05 04:12:15 -0600 | asked a question | Opencv Python 3.2: How to get freeman chain code from edge/contours I'm trying to get Freeman chain code from binary image/edge by using Python version of OpenCV 3.2. However, it seems this feature is not yet implemented in Python. By now, there are just possible method: CHAIN_APPROX_NONE, CHAIN_APPROX_SIMPLE, CHAIN_APPROX_TC89_KCOS and CHAIN_APPROX_TC89_L1. Is it right? Anybody has same requirements as mine? Another question related to the findContours function. Let's assume I created 10x10 images with numpy array as following: cv2.findContours(test_image.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) Returned list coordinate contains lots duplication: Anyone can explain why there are so many duplications, and the order of coordinate seems very mess. Thanks! |