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

image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) cv2.error: OpenCV(3.4.4) /io/opencv/modules/imgproc/src/color.cpp:181: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor' #32

Open
ArjunCRPSM opened this issue Dec 28, 2018 · 3 comments

Comments

@ArjunCRPSM
Copy link

please help!!!!!!!!!!!!!!!!!!!!

@Nosherwan-Akram
Copy link

Nosherwan-Akram commented Mar 31, 2019

@markjay4k Can you look into this? Having the same issue here.
So basically when I am annotating images I get several of the images annotated but after that I run into this issue for the next upcoming image that needs to be annotated.

@Nosherwan-Akram
Copy link

Figured this out the rename function ended up creating image 00071.png as a folder instead of an image. I deleted this folder and ran the annotation script again. This solved the issue for me. What I came to understand was that this specific error is the cv2's way of telling that it can not process the image path given and the issues lies there so I suggest using the print(image.path) in your script to break down where the actual error is @ArjunCRPSM

@mpky
Copy link

mpky commented Mar 31, 2019

Yeah cv2 won't throw an error when reading in an image even if an image actually isn't there. Probably why the error did appear once it went through cvtColor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants