Issue
So I am getting this error after i updated all the packages.
<ipython-input-48-e9a9716d4b8c> in extractText(path)
15 plt.show()
16
---> 17 img, contours, hierarchy = cv2.findContours(edged, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE)
18 contours = sorted(contours, key=cv2.contourArea, reverse=True)
19
ValueError: not enough values to unpack (expected 3, got 2)
Solution
In openCV4, cv2.findContours()
returns 2 values contours, hierarchy
, so it should be:
contours, hierarchy = cv2.findContours(edged, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE)
Answered By - Ha Bom
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.