0

I'm trying to capture video from raspberry pi camera using OpenCV and display it without using gtk or x11. I noticed that raspivid displays camera output without using any window, I wonder if it's possible to use the same method to make opencv display video without using gtk.

Edit: I'm using raspbian lite without any desktop environment or GUI services, it's just a tty environment. I don't want to use any of their lightweight counterparts. How can I create a frame to display a picture/video on a tty environment and also use that approach to make OpenCV use it instead of regular windows generated by namedWindow() function?

  • Now the question is clear, but it seems that what you ask for requires some serious coding, and I wouldn't expect people to write code for you. – Dmitry Grigoryev Sep 3 at 8:11
  • So the linux framebuffer is one way to do this; it is accessed via a special device node and an iotctl() based C API. However, glancing at the raspicam/raspivid source I think it uses the VideoCore libraries distributed with the pi: raspberrypi.stackexchange.com/questions/tagged/mmal – goldilocks Sep 3 at 13:37
  • @goldilocks Thanks for your great explanations! A lot of helpful info in 4 lines. Actually the way raspistill uses VideoCore libraries might help me to get to the answer. Instead of creating a window using OpenCV I might be able to feed image data to the mmal component, preview, in order to display image. I will dig in more, you might want to write the answer so that I can approve it. – Brian SP2 Sep 10 at 9:13
-1

Instead of playing video on command line you can use scp and download recorded video from raspberry pi to your system then you can enjoy your video.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.