We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I was running the main.py and all worked well except one cell (I have been running it on google colab)
from google.colab.patches import cv2_imshow import cv2 from CCA_Analysis import * ##Plotting - RESULT Example img=cv2.imread("/content/drive/Images/107.png")#original img 107.png predict1 = cv2.resize(predict, (img.shape[1],img.shape[0]), interpolation=cv2.INTER_LANCZOS4) mask=np.uint8(predict1*255)# _, mask = cv2.threshold(mask, thresh=255/2, maxval=255, type=cv2.THRESH_BINARY) cnts,hieararch=cv2.findContours(mask,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE) img = cv2.drawContours(img[:,:,0], cnts, -1, (255, 0, 0) , 2) img = cv2.UMat.get(img) cv2_imshow(img)
AttributeError Traceback (most recent call last) <ipython-input-16-dfb2228e54c2> in <module>() 7 img=cv2.imread("/content/drive/Images/107.png")#original img 107.png 8 ----> 9 predict1 = cv2.resize(predict, (img.shape[1],img.shape[0]), interpolation=cv2.INTER_LANCZOS4) 10 11 mask=np.uint8(predict1*255)# AttributeError: 'NoneType' object has no attribute 'shape'
Do you have any idea how to resolve this?
The text was updated successfully, but these errors were encountered:
Hi Testbild,
Thanks for return. I think that the problem is misidentifing of path of "img".
We must find to path of original image.You can try:
img=cv2.imread("/content/Data/Images/107.png")
Please dont forget your feedback
Sorry, something went wrong.
Hi SerdarHelli,
that was the solution. Thanks. Maybe you can update the source code.
Best regards
Testbild
No branches or pull requests
Hi,
I was running the main.py and all worked well except one cell (I have been running it on google colab)
Do you have any idea how to resolve this?
The text was updated successfully, but these errors were encountered: