# Save camera frames using OpenCV

Source: https://forum.modalai.com/topic/53/save-camera-frames-using-opencv
Category: VOXL SDK and Software (https://forum.modalai.com/category/47/voxl-sdk-and-software)
Posted: 2020-12-04 10:42:21 UTC by Alex123
Replies: 4 · Views: 1812

## Alex123 · 2020-12-04 10:42:21 UTC

Hi,
I'm working on OpenCV using the voxl core-board. I've connected **hires + tracking** camera.

I want to **save the frames of hires camera** using **cv2.VideoCapture(0)** method but it prompts an error.
**I'm unable to open the video stream using cv2.VideoCapture(0).**

**I also want to know the scope of OpenCV using the voxl core-board. (Any limitations?)**

Any suggestions would be greatly appreciated!

Thanks!

## Reply by modaltb (ModalAI staff) · 2020-12-08 00:59:47 UTC

Hi @Alex123 ,

Here's an example that is in development that should similar to what you need:

https://gitlab.com/voxl-public/modal-pipe-architecture/voxl-dfs-server/-/blob/master/clients/voxl-camera-logger.cpp

## Reply by Alex123 · 2020-12-11 06:45:19 UTC

Hi @modaltb 
The above example is in development and it's not that useful. As I'm looking for on-board processing.
Is there any option to access the video feed of Hires camera directly using OpenCV for on-board processing?
(on-board operations like Object Tracking)

## Reply by Eric Katzfey (ModalAI staff) · 2020-12-12 17:59:45 UTC

There is no direct interface with the hires camera in OpenCV that would allow you to use the VideoCapture API. You will need to get the frames from the camera and feed them to your OpenCV application directly. You could use voxl-rtsp in pipe mode (-m) which would output raw nv21 frames in a named pipe (/dev/frame0). In your application you can read the frames from the pipe (/dev/frame0).

## Reply by Alex123 · 2020-12-17 08:51:30 UTC (in reply to Eric Katzfey)

@Eric-Katzfey 
Yes! There is no direct interface with the hires camera in OpenCV.
I'll follow the steps as you suggested.

Thanks!
