Closed suhas-goutham closed 5 years ago
which file did you run
Start.py
So basically the issue is in 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)
So in file DetectPlates.py line 134 should be changed to contours, npaHierarchy = cv2.findContours(imgThreshCopy, cv2.RETR_CCOMP, cv2.CHAIN_APPROX_SIMPLE) # find all contours
And in file DetectChars.py line 215 should be changed to contours, npaHierarchy = cv2.findContours(imgThreshCopy, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
Then it works
@suhas201227 I am facing the same issue. How did you resolve it? By implementing the steps above?
This repo is made with opencv 3. Please us that only. If you want it to work with opencv4 then you will need to change the code as specified by @suhas201227
imgContours, contours, npaHierarchy = cv2.findContours(imgThreshCopy, cv2.RETR_CCOMP, cv2.CHAIN_APPROX_SIMPLE) # find all contours