Camera-capture command no found

Hello,

I am trying to train my own object detection model : https://github.com/dusty-nv/jetson-inference/blob/master/docs/pytorch-collect.md and trying to collect own dataset.

When I run camera-capture, I get the following error:

bash: camera-capture: command not found

PATH: /jetson-inference/tools/camera-capture$

I also removed this folder and cloned new folder from : https://github.com/dusty-nv/camera-capture.git and ran cmake …/ and make.

But what jetson module you are using (Nano, TX2, etc.)? Also, what camera model do you have?
Initially, those sample tutorials where done with a specific camera described in the link below. Do you have the same model?

https://github.com/dusty-nv/jetson-inference/blob/master/docs/imagenet-camera-2.md

Hi,

I am using Jetson TX2 which has on board MIPI CSI camera and running

camera-capture

without any argument uses on-board camera as described in this tutorial.

Hi @arjunTX2, please run sudo apt-get install qtbase5-dev first. The camera-capture app will then be built. Normally this happens when you choose to install PyTorch during the cmake step.

Also, if you deleted the camera-capture dir from your local copy of the repo, you probably want to start fresh and re-clone to repo to properly build that tool.

1 Like

It is working now pretty well.

Thanks :)

Hi @arjunTX2, lets move over to your other post for discussion about torchvision: Torchvision not found - Jetson Inference

Hi,
I cannot load the β€œcamera-capture” tool. I tried several locations (see the list below). I get the following error each time: bash: camera-capture: command not found

Locations tried:
ahalim@Xavier:~/jetson-inference/build/tools/camera-capture$ camera-capture
ahalim@Xavier:~/jetson-inference/tools/camera-capture$ camera-capture
ahalim@Xavier:~/jetson-inference/build/aarch64/bin$
ahalim@Xavier:/usr/local/bin$

I did install qtbase5-dev:
sudo apt-get install qtbase5-dev** ** cd jetson-inference/build
cmake ../** Linking jetson-inference with OpenCV 4.1.1 -- Configuring done -- Generating done -- Build files have been written to: /home/ahalim/jetson-inference/build ** make

After β€œmake” I tried running from the following location again but to no avail:
ahalim@Xavier:~/jetson-inference/build/tools/camera-capture$ camera-capture

I am running :

  • JetPack 4.4 on Jetson Xavier NX
  • Python 3.6.9 on linux
  • torch version: 1.4.0a0+7f73f1d
  • CUDA available: True

If possible kindly recommend a solution.
Regards

Hi @halimatif, try running the following commands:

$ cd jetson-inference/build
$ cmake ../
$ make

I think it should then build the tool for you (to jetson-inference/build/aarch64/bin)

Hi,
I tried your recommendation but it did not work for me. Below I have listed all output. Bold lines are my commands. In the output, I did note the following:

– detecting Python 3.7…
– Python 3.7 wasn’t found

I have Python 3.6.9 installed.

Now the actual output:
ahalim@Xavier:~ cd jetson-inference/build** **ahalim@Xavier:~/jetson-inference/build cmake …/

Note: this project uses git submodules in the source tree.
if you haven’t already, run the following command from
the project’s root directory:

       git submodule update --init

– using patched FindCUDA.cmake
– CUDA version: 10.2
– CUDA 10 detected, enabling SM_72
– OpenCV version: 4.1.1
– OpenCV version >= 3.0.0, enabling OpenCV
– system arch: aarch64
– output path: /home/ahalim/jetson-inference/build/aarch64
– Copying /home/ahalim/jetson-inference/c/detectNet.h
– Copying /home/ahalim/jetson-inference/c/homographyNet.h
– Copying /home/ahalim/jetson-inference/c/imageNet.h
– Copying /home/ahalim/jetson-inference/c/segNet.h
– Copying /home/ahalim/jetson-inference/c/superResNet.h
– Copying /home/ahalim/jetson-inference/c/tensorNet.h
– Copying /home/ahalim/jetson-inference/c/imageNet.cuh
– Copying /home/ahalim/jetson-inference/calibration/randInt8Calibrator.h
– Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
– found Qt5Widgets version: 5.9.5
– found Qt5Widgets defines: -DQT_WIDGETS_LIB;-DQT_GUI_LIB;-DQT_CORE_LIB
– found Qt5Widgets library: Qt5::Widgets
– found Qt5Widgets include: /usr/include/aarch64-linux-gnu/qt5/;/usr/include/aarch64-linux-gnu/qt5/QtWidgets;/usr/include/aarch64-linux-gnu/qt5/QtGui;/usr/include/aarch64-linux-gnu/qt5/QtCore;/usr/lib/aarch64-linux-gnu/qt5//mkspecs/linux-g++
– camera-capture: building as submodule, /home/ahalim/jetson-inference/tools
– jetson-utils: building as submodule, /home/ahalim/jetson-inference
– Copying /home/ahalim/jetson-inference/utils/XML.h
– Copying /home/ahalim/jetson-inference/utils/commandLine.h
– Copying /home/ahalim/jetson-inference/utils/filesystem.h
– Copying /home/ahalim/jetson-inference/utils/mat33.h
– Copying /home/ahalim/jetson-inference/utils/pi.h
– Copying /home/ahalim/jetson-inference/utils/rand.h
– Copying /home/ahalim/jetson-inference/utils/timespec.h
– Copying /home/ahalim/jetson-inference/utils/camera/gstCamera.h
– Copying /home/ahalim/jetson-inference/utils/camera/v4l2Camera.h
– Copying /home/ahalim/jetson-inference/utils/codec/gstDecoder.h
– Copying /home/ahalim/jetson-inference/utils/codec/gstEncoder.h
– Copying /home/ahalim/jetson-inference/utils/codec/gstUtility.h
– Copying /home/ahalim/jetson-inference/utils/cuda/cudaFont.h
– Copying /home/ahalim/jetson-inference/utils/cuda/cudaMappedMemory.h
– Copying /home/ahalim/jetson-inference/utils/cuda/cudaNormalize.h
– Copying /home/ahalim/jetson-inference/utils/cuda/cudaOverlay.h
– Copying /home/ahalim/jetson-inference/utils/cuda/cudaRGB.h
– Copying /home/ahalim/jetson-inference/utils/cuda/cudaResize.h
– Copying /home/ahalim/jetson-inference/utils/cuda/cudaUtility.h
– Copying /home/ahalim/jetson-inference/utils/cuda/cudaWarp.h
– Copying /home/ahalim/jetson-inference/utils/cuda/cudaYUV.h
– Copying /home/ahalim/jetson-inference/utils/display/glDisplay.h
– Copying /home/ahalim/jetson-inference/utils/display/glTexture.h
– Copying /home/ahalim/jetson-inference/utils/display/glUtility.h
– Copying /home/ahalim/jetson-inference/utils/image/imageIO.h
– Copying /home/ahalim/jetson-inference/utils/image/loadImage.h
– Copying /home/ahalim/jetson-inference/utils/input/devInput.h
– Copying /home/ahalim/jetson-inference/utils/input/devJoystick.h
– Copying /home/ahalim/jetson-inference/utils/input/devKeyboard.h
– Copying /home/ahalim/jetson-inference/utils/network/Endian.h
– Copying /home/ahalim/jetson-inference/utils/network/IPv4.h
– Copying /home/ahalim/jetson-inference/utils/network/NetworkAdapter.h
– Copying /home/ahalim/jetson-inference/utils/network/Socket.h
– Copying /home/ahalim/jetson-inference/utils/threads/Event.h
– Copying /home/ahalim/jetson-inference/utils/threads/Mutex.h
– Copying /home/ahalim/jetson-inference/utils/threads/Process.h
– Copying /home/ahalim/jetson-inference/utils/threads/Thread.h
– trying to build Python bindings for Python versions: 2.7;3.6;3.7
– detecting Python 2.7…
– found Python version: 2.7 (2.7.17)
– found Python include: /usr/include/python2.7
– found Python library: /usr/lib/aarch64-linux-gnu/libpython2.7.so
– CMake module path: /home/ahalim/jetson-inference/utils/cuda;/home/ahalim/jetson-inference/utils/python/bindings
– NumPy ver. 1.13.3 found (include: /usr/lib/python2.7/dist-packages/numpy/core/include)
– found NumPy version: 1.13.3
– found NumPy include: /usr/lib/python2.7/dist-packages/numpy/core/include
– detecting Python 3.6…
– found Python version: 3.6 (3.6.9)
– found Python include: /usr/include/python3.6m
– found Python library: /usr/lib/aarch64-linux-gnu/libpython3.6m.so
– CMake module path: /home/ahalim/jetson-inference/utils/cuda;/home/ahalim/jetson-inference/utils/python/bindings
– NumPy ver. 1.19.0 found (include: /home/ahalim/.local/lib/python3.6/site-packages/numpy/core/include)
– found NumPy version: 1.19.0
– found NumPy include: /home/ahalim/.local/lib/python3.6/site-packages/numpy/core/include
– detecting Python 3.7…
– Python 3.7 wasn’t found
– Copying /home/ahalim/jetson-inference/utils/python/examples/camera-viewer.py
– Copying /home/ahalim/jetson-inference/utils/python/examples/cuda-from-numpy.py
– Copying /home/ahalim/jetson-inference/utils/python/examples/cuda-to-numpy.py
– Copying /home/ahalim/jetson-inference/utils/python/examples/gl-display-test.py
– trying to build Python bindings for Python versions: 2.7;3.6;3.7
– detecting Python 2.7…
– found Python version: 2.7 (2.7.17)
– found Python include: /usr/include/python2.7
– found Python library: /usr/lib/aarch64-linux-gnu/libpython2.7.so
– detecting Python 3.6…
– found Python version: 3.6 (3.6.9)
– found Python include: /usr/include/python3.6m
– found Python library: /usr/lib/aarch64-linux-gnu/libpython3.6m.so
– detecting Python 3.7…
– Python 3.7 wasn’t found
– Copying /home/ahalim/jetson-inference/python/examples/detectnet-camera.py
– Copying /home/ahalim/jetson-inference/python/examples/detectnet-console.py
– Copying /home/ahalim/jetson-inference/python/examples/imagenet-camera.py
– Copying /home/ahalim/jetson-inference/python/examples/imagenet-console.py
– Copying /home/ahalim/jetson-inference/python/examples/my-detection.py
– Copying /home/ahalim/jetson-inference/python/examples/my-recognition.py
– Copying /home/ahalim/jetson-inference/python/examples/segnet-batch.py
– Copying /home/ahalim/jetson-inference/python/examples/segnet-camera.py
– Copying /home/ahalim/jetson-inference/python/examples/segnet-console.py
– Linking jetson-inference with OpenCV 4.1.1
– Configuring done
– Generating done
– Build files have been written to: /home/ahalim/jetson-inference/build
ahalim@Xavier:~/jetson-inference/build$ make
[ 31%] Built target jetson-utils
[ 43%] Built target jetson-inference
[ 45%] Built target imagenet-console
[ 47%] Built target imagenet-camera
[ 48%] Built target detectnet-console
[ 50%] Built target detectnet-camera
[ 51%] Built target segnet-console
[ 53%] Built target segnet-camera
[ 55%] Built target superres-console
[ 57%] Built target homography-console
[ 59%] Built target homography-camera
[ 60%] Automatic MOC for target camera-capture
[ 60%] Built target camera-capture_autogen
[ 64%] Built target camera-capture
[ 66%] Built target trt-bench
[ 68%] Built target trt-console
[ 70%] Built target camera-viewer
[ 72%] Built target v4l2-console
[ 74%] Built target v4l2-display
[ 76%] Built target gl-display-test
[ 82%] Built target jetson-utils-python-27
[ 89%] Built target jetson-utils-python-36
[ 95%] Built target jetson-inference-python-27
[100%] Built target jetson-inference-python-36
ahalim@Xavier:~/jetson-inference/build$ cd aarch64/bin
ahalim@Xavier:~/jetson-inference/build/aarch64/bin$ ls
camera-capture homography-camera segnet-batch.sh
camera-viewer homography-console segnet-camera
camera-viewer.py imagenet-camera segnet-camera.py
cuda-from-numpy.py imagenet-camera.py segnet-console
cuda-to-numpy.py imagenet-console segnet-console.py
detectnet-camera imagenet-console.py superres-console
detectnet-camera.py images trt-bench
detectnet-console my-detection.py trt-console
detectnet-console.py my-recognition.py v4l2-console
gl-display-test networks v4l2-display
gl-display-test.py segnet-batch.py
ahalim@Xavier:~/jetson-inference/build/aarch64/bin$ camera-capture
bash: camera-capture: command not found

Hi @ahalim, it built camera-capture, you just need to run it as ./camera-capture when you are in the same dir.

Otherwise you can do a sudo make install and then run it without the leading ./

Thank you so much. I am sure this will work. Unfortunately my xavier does not want to reboot any more. Earlier today the system prompted me to install an available update. I opted to update. Now, on restart I just see a blank screen with a small cursor blinking on the top left corner of the screen. I now have to resolve this first. Perhaps I need to rebuild the system…

Hi @halimatif, you might want to see this post: JetPack 4.4 - L4T R32.4.3 production release

We are currently looking into the issue, however you may want to re-flash from the SD card image for JetPack 4.4 production release. If you have files you need to backup, you should be able to mount your SD card from a Linux PC first.

Hi,
I had to re-image xavier (jetpack 4.4) to get it to reboot. Trying to set up for the Hello AI World lesson again.

In the section β€œBuilding the Project from Source”, after install Pytorch for Python 3.6, under the section below

Compiling the Project
Make sure you are still in the jetson-inference/build directory, created above in step #3.
Then run make followed by sudo make install to build the libraries, Python extension bindings, and code samples:

cd jetson-inference/build # omit if working directory is already build/ from above make
sudo make install sudo ldconfig

When I execute the β€œmake” command I get the following:
ahalim@Xavier:~/jetson-inference/build$ make
make: *** No targets specified and no makefile found. Stop.

This did not happen when i first tired it. Can you please help.
Regards

First, you probably want to run sudo apt-get install qtbase5-dev again.

Then, did you run cmake ../ from the build dir before running make? Normally if it says β€˜no makefile found’, it was because cmake hadn’t been run yet.

Hi,
Executing the cmake …/ worked. Thank you. I can not run the Hello AI World tutorial. Since the Jetpack 4.4 update yesterday, I noticed that opencv face_recognition has become extremely slow. I don’t think the GPUs are working at all in this case now. Can you comment on this?
Regards

Glad that you got the camera-capture to build - what part of Hello AI World can’t you run? Or did you mean you can now run it.

By default OpenCV is not build with GPU acceleration. Had you previously installed a custom build of it? I recommend you file a new topic about the issue since this topic was about something different - thanks!