it prints that libraries are missing. After two days searching and testing I found this: https://github.com/dusty-nv/jetson-video
I cloned it but the paths to the libraries are wrong… so again imagenet-camera.cpp prints errors. I cannot change 50 .h files to fix the paths inside. What should I do? Has anyone this problem? I am using a USB-webcam…
Hi plaketas1, from above it looks like you missed the cmake …/ command before running make. After deleting your jetson-inference directory, try running this:
$ git clone https://github.com/dusty-nv/jetson-inference
$ cd jetson-inference
$ git submodule update --init
$ mkdir build
$ cd build
$ cmake ../ # important to run this cmake command before make
$ make
$ sudo make install
If you get errors after following this, please post them here.
command I got around 200 pages of errors.
The last errors I got are depicted below:
/usr/include/c++/7/bits/ostream_insert.h:77:27: error: ‘streamsize’ has not been declared
const _CharT* __s, streamsize __n)
^~~~~~~~~~
/usr/include/c++/7/bits/ostream_insert.h: In function ‘std::basic_ostream<_CharT, _Traits>& std::__ostream_insert(std::basic_ostream<_CharT, _Traits>&, const _CharT*, int)’:
/usr/include/c++/7/bits/ostream_insert.h:87:14: error: ‘streamsize’ does not name a type; did you mean ‘streambuf’?
const streamsize __w = __out.width();
^~~~~~~~~~
streambuf
/usr/include/c++/7/bits/ostream_insert.h:88:12: error: ‘__w’ was not declared in this scope
if (__w > __n)
^~~
/usr/include/c++/7/bits/ostream_insert.h:88:12: note: suggested alternative: ‘__s’
if (__w > __n)
^~~
__s
/usr/include/c++/7/bits/ostream_insert.h: At global scope:
/usr/include/c++/7/bits/ostream_insert.h:118:68: error: ‘streamsize’ has not been declared
extern template ostream& __ostream_insert(ostream&, const char*, streamsize);
^~~~~~~~~~
/usr/include/c++/7/bits/ostream_insert.h:122:11: error: ‘streamsize’ has not been declared
streamsize);
^~~~~~~~~~
In file included from /usr/include/c++/7/bits/range_access.h:36:0,
from /usr/include/c++/7/string:51,
from /home/nobody1/Desktop/jetson/jetson-inference/utils/camera/gstCamera.h:27,
from /home/nobody1/Desktop/jetson/jetson-inference/utils/camera/gstCamera.cpp:23:
/usr/include/c++/7/initializer_list:53:15: error: ‘size_t’ does not name a type; did you mean ‘time_t’?
typedef size_t size_type;
^~~~~~
time_t
/usr/include/c++/7/initializer_list:59:7: error: ‘size_type’ does not name a type; did you mean ‘true_type’?
size_type _M_len;
^~~~~~~~~
true_type
/usr/include/c++/7/initializer_list:62:54: error: ‘size_type’ has not been declared
constexpr initializer_list(const_iterator __a, size_type __l)
^~~~~~~~~
/usr/include/c++/7/initializer_list:70:17: error: ‘size_type’ does not name a type; did you mean ‘true_type’?
constexpr size_type
^~~~~~~~~
true_type
/usr/include/c++/7/initializer_list:47:11: fatal error: definition of std::initializer_list does not match #include <initializer_list>
class initializer_list
^~~~~~~~~~~~~~~~
compilation terminated.
utils/CMakeFiles/jetson-utils.dir/build.make:259: recipe for target 'utils/CMakeFiles/jetson-utils.dir/camera/gstCamera.cpp.o' failed
make[2]: *** [utils/CMakeFiles/jetson-utils.dir/camera/gstCamera.cpp.o] Error 1
CMakeFiles/Makefile2:599: recipe for target 'utils/CMakeFiles/jetson-utils.dir/all' failed
make[1]: *** [utils/CMakeFiles/jetson-utils.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
nobody1@nobody1-desktop:~$ sudo apt-get install -y libopencv-calib3d-dev libopencv-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libopencv-dev is already the newest version (3.3.1-2-g31ccdfe11).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libopencv-calib3d-dev : Depends: libopencv-features2d-dev (= 3.2.0+dfsg-4ubuntu0.1)
libopencv-dev : Conflicts: libopencv-calib3d-dev
E: Unable to correct problems, you have held broken packages.
At this point I think I would still recommend flashing a fresh SD card image, so we can establish a proper baseline here. Then follow these steps:
$ git clone https://github.com/dusty-nv/jetson-inference
$ cd jetson-inference
$ git submodule update --init
$ mkdir build
$ cd build
$ cmake ../ # important to run this cmake command before make
$ make
$ sudo make install
Try building the repo as-is first, before attempting to make the DEFAULT_CAMERA modification for your USB camera.
I flashed the last version of nvidia-ubuntu and finally the above commnands worked. It says to change the DEFAULT_CAMERA and use the /dev/video… I don’t use Logitech C920. How do I find what to put there? How do I find the type of my webcamera?
When I put DEFAULT_CAMERA to 0, I just save the .cpp file, I don’t do any compile again? Right? After running the commands 1 and 2 I get information about my camera, but when I execute:
Yes, after changing the DEFAULT_CAMERA, you need to compile again with make from your build/ directory. It shouldn’t need to re-build everything, just that file.