TX2 nvx_sample_object_tracker USB Cam

Hi I want use a USB cam with

 ./nvx_sample_object_tracker  --source=“device:///v4l2?index=1”
VisionWorks Object Tracker version: 0.88.2

Can't open source URI “device:///v4l2?index=0”

I have try with no success :
[visionworks-1.6-samples issue - #13 by michaelq2eo7]
This line work (with few usb cam philips logitech)

gst-launch-1.0 v4l2src ! video/x-raw, width=640, height=480 ! xvimagesink
this line works only with logitech

gst-launch-1.0 v4l2src ! video/x-raw, width=640, height=480,format={YUY2} ! xvimagesink

How can i solve this ?

Hi,

Since NVX is open source, you can update the pipeline directly.

Could you read the image with gst-launch-1.0?
If yes, please change the pipeline below accordingly:

/usr/share/visionworks/sources/nvxio/src/NVX/FrameSource/GStreamer/GStreamerCameraFrameSourceImpl.cpp

Thanks.

Thank’s for your reply.

How I compile this modification ? with the makefile in dir ?

Should I do re install ? same procedure to install visionwork or another ?

Regard’s.
Laarent.

Hi,

The Visionworks library is by default not compiled.
You can generate the library with the following command:

$ /usr/share/visionworks/sources
$ sudo make

And please re-compile the library as above when you updated the NVX source.

Thanks.

Hi thank’s AastaLLL,

To solve this pb the entire procedure:

a) first use gst-launch-1.0 to determine the index and other parameters (here index v4l camera is 0)

$ gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! xvimagesink

for find others informations install:

$ install sudo apt install qv4l2

Test the parameters with gst-launch before the modification (be sur to connect it to the right device…)…

$ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, width={1280}, height={800}, format={YUY2} ! xvimagesink -e

When its ok, go to and edit as sudo

$/usr/share/visionworks/sources/nvxio/src/NVX/FrameSource/GStreamer/GStreamerCameraFrameSourceImpl.cpp

b) at line 143 (for gst-launch1.0) modify like this (not very proper…) with using the qv4l2 reading parameters (or as you want) in this case this is a HP USB cam:

//~ stream << "video/x-raw, format=(string){YUY2}, width=[1," << configuration.frameWidth <<strong text //~ “], height=[1,” << configuration.frameHeight << “], framerate=” << configuration.fps << “/1;”;

$ stream << "video/x-raw, format=(string){**YUY2**}, width=[1," << **1280** <<
$ "], height=[1," << **800** << "], framerate=" << **30** << "/1;";

as said upper recompile:

$ /usr/share/visionworks/sources
$ sudo make

And it’s work…
Regard’s
Laurent.