Conversion to JPEG format using OpenCV taking varying time

Hi all,

We are using v4l2capture camera pipeline for capturing images from e-con See3cam_CU135 USB camera. This camera support both UYVY and MJPEG formats as output, we are using MJPEC output format and converting it into JPG images using OpenCV.

frame = cv2.imdecode(image, cv2.IMREAD_COLOR)

This operation is taking as long as 200ms to 2s depending system load. We need to do this operation in fixed time for our use case. Is there any HW supported libraries for Jetson Xavier platform to decode JPEG images with Python, so that this operation will be completed in a predicted manner?

Also, Please share any insights on capturing images continuously in predictable manner using either of UYVY or MJPEG camera formats using Python.

Thanks and regards
Vishnu Prasad

Hi,
You may try to run a gstreamer pipeline in cv2.VideoCapture() like:
Set camera decoder in OpenCV on Jetson Nano - #8 by DaneLLL