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 in opening movie files #104

Closed
juanfadev opened this issue Oct 25, 2017 · 2 comments
Closed

Error in opening movie files #104

juanfadev opened this issue Oct 25, 2017 · 2 comments

Comments

@juanfadev
Copy link

Error when trying to open a movie. Just tried with the example 'OpticalFlow' and it is imposible.

Failing in row: opencv.loadImage(video);

Width (0) and height (0) cannot be <=0

@f41ardu
Copy link

f41ardu commented Jan 11, 2018

This may solve your issue.

 while (video.height == 0 )  delay(10); // <-- add  
 opencv.loadImage(video);

or

 if (video.width > 0 && video.height > 0) {//check if the cam instance has loaded pixels
    opencv.loadImage(video);
  } 

I have no idea why this is necessary.
Solved it for my using Processing 3.3.6.

@sean369see
Copy link

This above two modifications also work for Processing 3.3.7.

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