I’d appreciate too a simplest possible example of code in C++ with OpenCV that would use the on-board camera.
I just flashed my TX1 board with the latest Jetpack 2.3.1 and it seems the OpenCV is 2.4.13 according to /usr/lib/libopencv* files. Nothing custom, all is out of the box, the Jetpack 2.3.1. Gstreamer pipe started with gst-launch-1.0 as suggested above works perfectly. So the hardware is good and gstreamer works I suppose. However when I try to create a cv::VideoCapture object with the pipe string as Ankit tried above I can’t connect to the camera (cap.isOpened() returns false). If I give it a 0 (zero) as the parameter it opens OK and can even read an image which is huge (I guess it’s 2592 x 1458) but completely black - all color zero I’d say.
A simple hello-world example engaging the camera would be a great help for me and a good starting point for many fellow developers. Something like the one at the very end of this video: NVIDIA Jetson OpenCV Tutorials - Episode 2 - YouTube - just a simple piece of code that was tested to work with the CSI camera that comes with the TX1 board. Please.
Hello,
the sample code is provided in URL of #41.
Please read that reply carefully.
note that the on-board camera is a raw-sensor, and it needs openCV-3.x and access the camera through GST pipeline.
Hi
Chenjian,
why I am not able to open web camera using “cv::VideoCapture(0)” in my program (using opencv4tegra).
As you said I am installing opencv 3.1.0!
but worrier about the FPS performance with haarcascades!(If you know the performance please post the results)
Will updating to recent jetpack will solve camera my onboard or USB camera problems ?
@ShaktiD
Did you use reference board sensor ov5693? There’s no problem for this command on my device by using JetPack 3.1
Please check the sensor driver by v4l2-ctl --list-devices
VIDIOC_QUERYCAP: failed: Inappropriate ioctl for device
VIDIOC_QUERYCAP: failed: Inappropriate ioctl for device
vi-output, imx274 30-001a (platform:15700000.vi:0):
/dev/video0
/dev/v4l-subdev1
/dev/v4l-subdev0
There is something wrong with the L4T 28.1 build the OV5693 camera does not show up on the TX1 development kit. I purchased the TX2 and and TX1 se kit recently. I moved the camera from the TX2 to the TX1 and it does not come up. The TX1 will function with the camera board if you roll back the release to l4t-r24.2.1. I did not try l4t 27.1