Home Pi Camera with v4l2 OpenCv - can't get 2592x1944 Resolution
Reply: 1

Pi Camera with v4l2 OpenCv - can't get 2592x1944 Resolution

Eray Varyeter
1#
Eray Varyeter Published in 2018-02-14 11:31:47Z

I am using pi camera v1 (5 MP) on raspberry pi3 with v4l2 driver. When I use the commands below, it captures 5 MP image but I can't get the same image when I capture it from OpenCV. Captured image from OpenCV is always 480x480.

sudo modprobe bcm2835-v4l2 max_video_width=2592 max_video_height=1944
v4l2-ctl --set-fmt-video=width=2592,height=1944,pixelformat=MJPG
v4l2-ctl -p 15
v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=somefile.mjpeg

What can I do to change the resolution to 5 MP in OpenCV ?

julian59189
2#
julian59189 Reply to 2018-02-14 22:51:20Z

I am not sure what you have tried, but one way to specify the resolution is:

cv::VideoCapture cap;
cap.set(CV_CAP_PROP_FRAME_WIDTH, 2592);
cap.set(CV_CAP_PROP_FRAME_HEIGHT, 1944);
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.295373 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO