How to config resolution at generic usb camera while using DriveWorks 0.6


For POC over our PX2 we are using multipile USB cameras in parallel.
In order to set the device I am using DriveWorks 0.6 and example camera_usb.

The USB cameras resolution is 1280X720 but when I running the code I get resolution of 640x480.
I trying to figure out for couple of hours which arguments should I use at function dwSAL_createSensor in order to create camera at wanted resolution.


Dear yehonatan,

Did you check camera_usb src code in /usr/local/driveworks-1.2/samples/src/sensors/camera_usb?

void onResizeWindow(int width, int height) override
            dwRectf rect;
            rect.width  = width;
            rect.height = height;
            rect.x      = 0;
            rect.y      = 0;
            CHECK_DW_ERROR(dwRenderEngine_setBounds(rect, m_renderEngine));

I had not time to check the code,

Instead we for now we used openCV for camera interface