Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To solve the "too many values to unpack" error #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions leaf sampler/leafdetectionALLmix.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1,

#contour to find leafs
bordered = cv2.cvtColor(canny,cv2.COLOR_BGR2GRAY)
contours,hierarchy = cv2.findContours(bordered, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)
contours,hierarchy = cv2.findContours(bordered, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)[-2:]

maxC = 0
for x in range(len(contours)):
Expand Down Expand Up @@ -203,7 +203,7 @@ def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1,


#Finding contours for all infected regions
contours,heirarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)
contours,heirarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)[-2:]

Infarea = 0
for x in range(len(contours)):
Expand Down