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

Error: (-215: Assertion failed) !_scr.empty() in function 'cv::cvtColor' #127

Open
Henrilux opened this issue Oct 20, 2020 · 10 comments
Open

Comments

@Henrilux
Copy link

Hi

I'm having error when running processing the pictures.
Error screen reads as attached file 1.png
processing photos while having this error as attached file 2.png

I saved this project under below route
C:\Users\edz\Desktop\ailab-master\VirtualStage\BackgroundMatting

would you be able to help solving this issue?

thanks.

1

2

@enquel
Copy link

enquel commented Oct 23, 2020

@Henrilux I have solved a bunch or errors leading to this one. Have you figured it out? For me the path to OpenCV stated in error is the same as yours, and actually there is nothing there on my system, so my guess is that the paths are mixed in .py script, causing the script to point to a nonexistent address.

@enquel
Copy link

enquel commented Oct 23, 2020

This may mean that the Python bindings for OpenCV are not initialized properly at all. Can someone from MS pick that up?

@berak
Copy link

berak commented Oct 23, 2020

please make sure you give a proper image path (DOUBLE CHECK!) to the --back argument of the script

@enquel
Copy link

enquel commented Oct 23, 2020

@berak thank you for answer. Is there a resource somewhere on actual usage patterns or do I need to go each python script line by line to figure out how to use the script parameters? Also, is there a way to get output without compositing the new background video with --back parameter?

@enquel
Copy link

enquel commented Oct 25, 2020

@berak I have checked and it works for me, I think we can close this.

@Henrilux
Copy link
Author

@berak I have checked and it works for me, I think we can close this.

Hi,

I still haven't solve the issue..

below is where we tried to fix the path but didnt work. would you be able to have a quick look see if we have missed anything?

e0e26fb9bb1298ab40ab6d04c5b8a53

feec98d9886c3cf96000a527099b8f8

@enquel
Copy link

enquel commented Oct 28, 2020

@Henrilux the paths seem ok. Have you modified the Python script just like @berak suggested? I had no further issues afterwards.

@berak
Copy link

berak commented Oct 28, 2020

@Henrilux -- you probably misunderstood something, it's NOT AT ALL about installing opencv.

you have to invoke the python script with a proper --back /some/valid/imagepath argument, that's all.

@hutianyang
Copy link

@berak I have checked and it works for me, I think we can close this.

Hi,

I still haven't solve the issue..

below is where we tried to fix the path but didnt work. would you be able to have a quick look see if we have missed anything?

e0e26fb9bbtoo1298ab40ab6d04c5b8a53 feec98d9886c3cf96000a527099b8f8

I have the same problem ,too . Have you found any solutions

@neaorin
Copy link
Member

neaorin commented Feb 17, 2021

I tracked down this error to running the run.ps1 script for background matting from a regular PowerShell prompt.
I instead ran it from PowerShell ISE, and everything went fine.

For some reason, one of the data preparation steps fails (it's the one calling KinectMaskGenerator.exe in prepare_data.py) and then everything breaks.

Use PowerShell ISE to run the script instead.

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

5 participants