You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i use the Python package the same as the given demo ,I met a error as:
File "E:/Pycharm project/maching learning/HW2/Try.py", line 10, in
cnts,d_factor = tl.locate_tissue_cnts(slide_path,max_img_size=2048,smooth_sigma=13,thresh_val=0.80,min_tissue_size=10000)
File "C:\Users\17807\AppData\Roaming\Python\Python37\site-packages\tissueloc\locate_tissue.py", line 146, in locate_tissue_cnts
cnts = find_tissue_cnts(bw_remove)
File "C:\Users\17807\AppData\Roaming\Python\Python37\site-packages\tissueloc\locate_tissue.py", line 103, in find_tissue_cnts
method=cv2.CHAIN_APPROX_NONE)
ValueError: not enough values to unpack (expected 3, got 2)
How can I solve this error? thanks first!
The text was updated successfully, but these errors were encountered:
I believe the reason should be the version of OpenCV. The output parameters of cv2.findContours is changed. Please use the version specified in the requirements, namely opencv-python==3.4.4.19.
Thanks for the question. The package now is updated to version 2.1.0, which uses OpenCV-4.1.2.30, in which two values would return from function findContours instead of three in OpenCV-3.xx. I believe your problem would be resolved using OpenCV-4.xx and tissueloc-2.1.0.
When i use the Python package the same as the given demo ,I met a error as:
File "E:/Pycharm project/maching learning/HW2/Try.py", line 10, in
cnts,d_factor = tl.locate_tissue_cnts(slide_path,max_img_size=2048,smooth_sigma=13,thresh_val=0.80,min_tissue_size=10000)
File "C:\Users\17807\AppData\Roaming\Python\Python37\site-packages\tissueloc\locate_tissue.py", line 146, in locate_tissue_cnts
cnts = find_tissue_cnts(bw_remove)
File "C:\Users\17807\AppData\Roaming\Python\Python37\site-packages\tissueloc\locate_tissue.py", line 103, in find_tissue_cnts
method=cv2.CHAIN_APPROX_NONE)
ValueError: not enough values to unpack (expected 3, got 2)
How can I solve this error? thanks first!
The text was updated successfully, but these errors were encountered: