# Unable to show video image using OpenCV

**URL:** <https://discourse.processing.org/t/unable-to-show-video-image-using-opencv/41833>\
**Category:** Libraries\
**Created:** [April 26, 2023, 5:26am UTC](https://discourse.processing.org/t/unable-to-show-video-image-using-opencv/41833 "2023-04-26T05:26:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![doni](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@doni](https://discourse.processing.org/u/doni)\
**Post date:** [April 26, 2023, 5:26am UTC](https://discourse.processing.org/t/unable-to-show-video-image-using-opencv/41833/1 "2023-04-26T05:26:36Z")

</div>

hi forum i am trying to display image video and want to pass it to opencv for image processing but the image wont show up. thabk you for help

```auto
import processing.video.*;
import java.awt.*;
import gab.opencv.*;

  OpenCV opencv;
  Movie test;

    void setup() {
      size(680, 480);
      background(0);
      test = new Movie(this, "vid1.mp4");
      test.loop();
      opencv = new OpenCV(this, test.width, test.height);
    
    }
 
    void draw() {
      opencv.loadImage(test);
      //image(test, 0, 0, width, height);
      image(opencv.getOutput(), 0, 0);
    }
    
  void movieEvent(Movie m) {
    m.read();
  }

```

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [April 26, 2023, 9:47am UTC](https://discourse.processing.org/t/unable-to-show-video-image-using-opencv/41833/2 "2023-04-26T09:47:11Z")

</div>

Hello @doni,

Related:

> [@OpenCV error in Processing 4.0b2](https://discourse.processing.org/t/opencv-error-in-processing-4-0b2/33284/10):
>
> Hello @bhaskar1955, The example works with: Windows 10 Processing 4.01 (August 9, 2022) [Releases · jaegonlee/opencv-processing · GitHub](https://github.com/jaegonlee/opencv-processing/releases) 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();…

`:)`
