I have a RB5 development kit with a vision mezzanine. I would like to capture images from the main camera on the mezzanine board by using OpenCV. I tried cv2.VideoCapture(0) function but i got the error: U"nable to stop the stream: Inappropriate ioctl for device" and the capture doesn't start. What causes this problem? How can i capture images from the main camera? Please help me asap. Any help would be greatly appreciated
Video Capture with OpenCV
Posted: Mon, 2021-07-26 04:14
Hi yukselbera
The OpenCV engineers are working on this issue.
I will let you know result asap.
Thanks
Kevin
Hi yukselbera
How to use openCV in your system?
Can you post your code which use OpenCV?
I will try to reproduce your issue on my board.
Thanks
Kevin
Hi Kevin,
Thanks for the quick response.
It's actually not a complicated code. It was just to see if the capture starts after installing openCV on the board by using pip install. Here is the code:
I pushed the python file to the board through adb and ran it on the board but it prints "Video capture didn't start" message and gives the "unable to stop the stream: Inappropriate ioctl for device" error.
Looking forward to hearing from you,
thanks
This error happened on my USB camera, after I removed USB camera, I got the same error as you got.
I will check with camera engineers on it
Thanks
Kevin
Hi yukselbera
I was thinking if camera should be enabled, or the OpenCV default enabled the camera?
You mar refer this sample code for CV app.
https://github.com/quic/sample-apps-for-Qualcomm-Robotics-RB5-platform/t...
Thanks
Kevin
Hi yukselbera,
Please collect the complete log as follows:
adb root
adb remount
mkdir -p /vendor/etc/camera/ and chmod 777 /vendor/etc/camera/
touch /vendor/etc/camera/camxoverridesettings.txt
adb shell "echo overrideLogLevels=0xFF > /vendor/etc/camera/camxoverridesettings.txt"
adb shell "echo logInfoMask=0x10080 >> /vendor/etc/camera/camxoverridesettings.txt"
adb shell "echo logVerboseMask=0 >> /vendor/etc/camera/camxoverridesettings.txt"
adb reboot
adb logcat -G 256M
adb logcat -b all > xxx/logcat.txt
Hi yukselbera,
You can capture the image from main camera with the help of GStreamer. You can install the GStreamer by using https://gstreamer.freedesktop.org/documentation/installing/on-linux.html
After installation you can run following command to capture image
or you can use following code
Thanks & Regards,
Mayur
You can process video by following code & run in new terminal
Thanks & regards,
Mayur
How can I capture two different MIPI cameras using VideoCapture? Eg: Usually you just define by VideoCapture(0 or 1)
I am trying to Calibrate two MIPI OV 9282 cameras into stereo.