Hello @bhaskar1955,
The example works with:
- Windows 10
- Processing 4.01 (August 9, 2022)
- Releases · jaegonlee/opencv-processing · GitHub
I did get this error:
And added this delay to correct that problem:
void setup()
{
size(720, 480);
video = new Movie(this, "street.mov");
opencv = new OpenCV(this, 720, 480);
opencv.startBackgroundSubtraction(5, 3, false);
println(frameCount, video.width, video.height);
video.loop();
video.play();
int t1 = millis();
while (video.width == 0 )
{
//println(millis());
if (millis() - t1 > 1000)
{
// Can add a message here if over 1000 ms or 1 s
}
}
int t2 = millis();
println(t2-t1, video.width, video.height);
}
Relate discussion about that error:
https://forum.processing.org/two/discussion/23389/resizing-a-movie-possible-bug.html
Working: