atduskgreg / opencv-processing

OpenCV for Processing. A creative coding computer vision library based on the official OpenCV Java API
Other
1.33k stars 462 forks source link

Issue with openvc.loadiamge #101

Closed f41ardu closed 7 years ago

f41ardu commented 7 years ago

All examples using videos won't work on my installation (win 8.1/ latest version of Processing. Add check video.width and heigth solve my issue. I'm not sure if thia is also an issue using an external camera.

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

atduskgreg commented 7 years ago

It sounds like you're calling this before the video frames are actually available. Check out the background subtraction example for the right way to do this.