Hi All,
It is my first time with a UVC endpoint. I read a lot on the protocol in the last days. But I still have problem using the options of the processing unit descriptors.
Here is a little context:
I merged the "evkmimxrt1060_dev_video_virtual_camera_bm" demo project with the "evkmimxrt1060_csi_raw8" project.
I am able to get a video feed in RGB565 format from the MT9M114 camera. I use opencv2 in python to get the feed.
I am using the UVC class version 1.1.
Here is the problem:
I set the processing descriptors to unable the brightness control
/* Processing Unit Descriptor start*/
USB_VIDEO_VIRTUAL_CAMERA_VC_PROCESSING_UNIT_LENGTH, /* Size of this descriptor, 10+n */
USB_DESCRIPTOR_TYPE_VIDEO_CS_INTERFACE, /* CS_INTERFACE, descriptor type */
USB_DESCRIPTOR_SUBTYPE_VIDEO_VC_PROCESSING_UNIT, /* VC_PROCESSING_UNIT, descriptor subtype */
USB_VIDEO_VIRTUAL_CAMERA_VC_PROCESSING_UNIT_ID, /* A non-zero constant that uniquely identifies the
Terminal within the video function. This value is
used in all requests to address this Terminal. */
USB_VIDEO_VIRTUAL_CAMERA_VC_INPUT_TERMINAL_ID, /* ID of the Unit or Terminal to which this Terminal is
connected */
0x00U, 0x00U, /* This field indicates the maximum digital magnification, multiplied by 100U */
0x02U, /* Size of the bmControls field, in bytes: n */
0x00U, 0x01U, /* Brigthness control */
0x00U, /* A bitmap of all analog video standards supported by the Processing Unit */
However, when I send the following, there is not breakpoint I can place anywhere that will get triggered.
cap = cv2.VideoCapture(1)
exposure = cap.set(cv2.CAP_PROP_BRIGHTNESS, 0.1)
Any ideas on how to make this work?
Ok, I have found the function in usb_device_video.c.
USB_DeviceVideoVcProcessingUnitRequest
However, the openCV command below does not trigger the function. Does openCV need UVC version 1.5 in order to work? What am I missing?
exposure = cap.set(cv2.CAP_PROP_BRIGHTNESS, 1)
Hello,
Thank you for contacting NXP support.
We have the following application note that explain how to implement and use an UVC device on the RT. I think this could be helpful as a guide for your project.
Please let me know if there is anything else where I can help you.