Hi NXPs,
My name is Toan. I just bought a new OV5640 camera which compatible with iMX6ULEVK(I am using this board). I can display preview video(approx 30 fps) , capture image and record video(640x480 is 15 fps) with gstreamer command. Now I wanna read video from Python 3 and image processing with OpenCV. I am using:
camera = cv2.CaptureVideo('/dev/video1') but fps is only 7.5 instead of 30 fps like gstreamer command. I tried with camera = cv2.CaptureVideo(1) but not working.
I also try to install v4l2capture but not compatible with python 3.
So what should I do now(except using v4l2capture ).
Thank you very much,
Toan
To capture a video in Python, use the cv2 VideoCapture class, and then create an object of VideoCapture. VideoCapture has the device index or the name of a video file. The device index is just an integer to define a which Camera. If we pass 0, then it is for the first or primary camera, 1 for the second camera so on. We capture the video frame by frame.
OpenCV is the computer vision library that contains various methods to perform operations on Images or videos.
OpenCV library can be used to perform multiple operations on videos. Python OpenCV library provides a cv2 VideoCapture class. Let’s understand this better.
OpenCV allows a candid interface to capture live stream with the Camera (webcam).
We need to create an object of VideoCapture class to capture a video. It accepts either a device index or the name of a video file.
A number which is specifying to the Camera is called device index. We can select a Camera bypassing the O or 1 as an argument. After that, we can capture the video frame-by-frame.
Hi Toan
unfortunately i.MX6UL does not have gpu and hardware support for OpenCV,
so it is not supported in nxp linux releases. One can try it in software following
OpenCV Python tutorials:
OpenCV-Python Tutorials — OpenCV-Python Tutorials 1 documentation
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Toan
if you have project requiring this feature may be suggested to proceed with
extended support of Commercial Support and Engineering Services | NXP
Best regards
igor
Hi igorpadykov,
Can we have some trick to read video streaming from OV5640 camera ? I have some informations:
My goal is stream video with OV5640 at 24 FPS on Python with OpenCV. I think possible but I have not found it yet. May you help me ?
Best regards,
Toan