How to use multi cameras in VisionWorks sample nvgstcamera_capture?

Thanks in advanced. I use xavier and 3 leopard imx274 cameras are used. This sample can read J1 camera normally. This sample includes codes:

......
    std::string resolution = "1280x720", input = "device:///nvcamera";
......

    //
    // Create a Frame Source
    //

    std::unique_ptr<ovxio::FrameSource> source(ovxio::createDefaultFrameSource(context, input));
......

Obviously, ‘input’ decides which camera will be used, would anyone can tell me how to decide which camera by this variable?

Hi,

You can control the input source with the index parameter:

input = "device:///nvcamera?index=0"

Thanks.

On xavier, it’s not work, it always open the 1st camera regardless index.

Hi,

This config is for nvcamera, which is mounted on the dev board directly.
Please use the v4l2 interface if you are using a USB camera.

device:///v4l2?index=0

Thanks.