Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
3543
views
CMake returns linux/videodev.h not exist while build opencv
Got problem while building `opencv` accoding to [link][1]: Determining if the include file linux/videodev.h exists failed with the following output: Change Dir: /home/pi/opencv-3.1.0/build/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make" "cmTC_affcb/fast" /usr/bin/make -f CMakeFiles/cmTC_affcb....
Got problem while building
opencv
accoding to link :
Determining if the include file linux/videodev.h exists failed with the following output:
Change Dir: /home/pi/opencv-3.1.0/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_affcb/fast"
/usr/bin/make -f CMakeFiles/cmTC_affcb.dir/build.make CMakeFiles/cmTC_affcb.dir/build
make[1] : Entering directory '/home/pi/opencv-3.1.0/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_affcb.dir/CheckIncludeFile.c.o
/usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG -o CMakeFiles/cmTC_affcb.dir/CheckIncludeFile.c.o -c /home/pi/opencv-3.1.0/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/home/pi/opencv-3.1.0/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:28: fatal error: linux/videodev.h: No such file or directory
#include
^
compilation terminated.
.....
.....
I just did cd linux in order to look file videodev.h is there, but system can't find such directory. File /usr/include/linux/videodev.h
exist on my system. I suppose compiler is not able to find it. How to solve such problem?
vico
(843 rep)
Jul 27, 2017, 01:04 PM
• Last activity: May 28, 2025, 02:06 PM
3
votes
1
answers
2190
views
release/close capture of camera
I have opened webcam for capturing using OpenCV in C++. Then I stopped the program using CTRL + Z ; The webcam could not turn off, Because was not defined in program. And I can not start my program again because the capture program is still using webcam and is busy. Error: libv4l2: error setting pix...
I have opened webcam for capturing using OpenCV in C++.
Then I stopped the program using CTRL+Z;
The webcam could not turn off, Because was not defined in program. And I can not start my program again because the capture program is still using webcam and is busy.
Error:
libv4l2: error setting pixformat: Device or resource busy
HIGHGUI ERROR: libv4l unable to ioctl S_FMT
...
I found the process id using
lsof|grep libv4l2
:
capture 5591 mylove mem REG 8,8 52584 1737777 /usr/lib64/libv4l2.so.0.0.0
and tried to close the capture using kill 5591
and also pkill capture
using normal user and root user. But the camera LED is still turned on and my program can not start.
What is fastest and best method to release/close the camera?
Mohammad Etemaddar
(13227 rep)
Dec 16, 2014, 05:53 PM
• Last activity: Aug 7, 2024, 02:03 PM
1
votes
0
answers
279
views
Why does opencv-python-headless take so long time to complete
I've noticed that when installing opencv-python-headless using pip3, the process takes a considerable amount of time to complete. I'm curious about the factors that contribute to this lengthy installation time. OS: CentOS 7
I've noticed that when installing opencv-python-headless using pip3, the process takes a considerable amount of time to complete. I'm curious about the factors that contribute to this lengthy installation time.
OS: CentOS 7
ianasystems
(11 rep)
Mar 31, 2024, 02:40 AM
0
votes
0
answers
231
views
Is it possible to install 2 python packages via pip, simultaneously, in different terminals?
My question is not about installing several packages in one line (all the questions I researched previously to asking this, talk about oneliner, but it is still sequential). I am installing `opencv-python`, specific version for my system: 3.4.0.14. System: uname -a Linux orangepi4 4.4.179-rk3399 #2...
My question is not about installing several packages in one line (all the questions I researched previously to asking this, talk about oneliner, but it is still sequential). I am installing
opencv-python
, specific version for my system: 3.4.0.14.
System:
uname -a
Linux orangepi4 4.4.179-rk3399 #2 SMP Thu May 6 10:53:22 CST 2021 aarch64 aarch64 aarch64 GNU/Linux
Although I updated pip, it is taking a long time building wheel for opencv-python (setup.py)...
(no questions regarding this, I know it is an issue with pre-built and pip versions, I'll just have to wait). I need that version specifically, and it must be with python 2.7
, not python 3.X
.
python -m pip install --upgrade pip
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Requirement already up-to-date: pip in /home/orangepi/.local/lib/python2.7/site-packages (20.3.4)
Now, I have seen that there is also a headless option, which should be faster.
pip install opencv-contrib-python-headless==3.4.0.14
(Although contrib should also take longer). But I don't want to stop the opencv building process as it has already been running for an hour. Can I run in another terminal another pip install
command WHILE there is another pip install
running already? I haven't tried it because I do not want to risk having broken dependencies or problems with packages.
As a final note: from the only 3 packages proposed by pip, this is the only one that seems to be building. The rest kept giving errors:
ERROR: Could not find a version that satisfies the requirement opencv-python==3.4.3.18 (from versions: 3.4.0.14, 3.4.10.37, 4.3.0.38)
ERROR: No matching distribution found for opencv-python==3.4.3.37
M.K
(143 rep)
Nov 22, 2022, 01:06 PM
3
votes
0
answers
1286
views
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" on arch linux
I'am currently trying to get some images outputted after running this code: ``` import cv2 as cv import matplotlib.pyplot as plt img = cv.imread('Photos/cat.jpg') cv.imshow('cat', img) plt.imshow(img) plt.show() ``` But instead, I'm receiving the following error message in Pycharm: ``` qt.qpa.plugin...
I'am currently trying to get some images outputted after running this code:
import cv2 as cv
import matplotlib.pyplot as plt
img = cv.imread('Photos/cat.jpg')
cv.imshow('cat', img)
plt.imshow(img)
plt.show()
But instead, I'm receiving the following error message in Pycharm:
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/Joel/PycharmProjects/opencv_project/venv/lib/python3.9/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.
I wanted to install 'xcb', but there is no such package in arch repos (there is 'libxcb' though, so I installed that and still get this error).
Coelll
(41 rep)
Oct 10, 2021, 05:41 AM
1
votes
1
answers
4533
views
How can I find the usb devices camera?
I am begginer in LINUX, sorry if my question isn't the best. I have a c++ app that uses OpenCV lib. This app runs at startup via a service(using systemctl). My app needs as arguments, the id of usb camera devices. I have 2 usb camera. When I switch off these devices, the output of ls /dev/video* is:...
I am begginer in LINUX, sorry if my question isn't the best.
I have a c++ app that uses OpenCV lib. This app runs at startup via a service(using systemctl). My app needs as arguments, the id of usb camera devices.
I have 2 usb camera. When I switch off these devices, the output of ls /dev/video* is:
/dev/video1
If I plug in the devices, the output of ls /dev/video* is:
/dev/video0
/dev/video1
/dev/video2
So,I find out the usb camera devices and right now, I know how to run my c++ app:
./my_app 0 2
Here is my problem:
My app runs automatically at every start up without to plug in/off my camera devices so I am not able to find out these ids (in this case, 0 and 2).
At each restart, these ids differs.
What is the rules to find out only the usb camera devices?
My OS : Ubuntu 18.04 LTS
My board: Nvidia Jetson Tx2 ( it has an integrated camera that I don't want to use)
EDIT:output of lsusb:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 03f0:094a Hewlett-Packard Optical Mouse [672662-001]
Bus 001 Device 004: ID 258a:0001
Bus 001 Device 039: ID 0ac8:0346 Z-Star Microelectronics Corp.
Bus 001 Device 038: ID 0ac8:0346 Z-Star Microelectronics Corp.
Bus 001 Device 037: ID 14cd:8601 Super Top
Bus 001 Device 002: ID 14cd:8601 Super Top
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Fredi
(79 rep)
Sep 24, 2021, 08:31 AM
• Last activity: Sep 27, 2021, 06:47 AM
0
votes
1
answers
329
views
v4l2 loopback working fine with openCV but weird output on OBS
I'm as CS student and i'm trying to make a project where I output my webcam video flow but as an ascii art. In order to do so, I get the image from v4l2. then i use OpenCV to decode the image (i wasn't able to find an easier way to do so) Then i get the data from my openCV mat and, in a new buffer,...
I'm as CS student and i'm trying to make a project where I output my webcam video flow but as an ascii art.
In order to do so, I get the image from v4l2. then i use OpenCV to decode the image (i wasn't able to find an easier way to do so)
Then i get the data from my openCV mat and, in a new buffer, create an ascii art from my image.
after that i send data from my buffer in v4l2 but when i use the v4l2 loopback input on obs the output is realy weird (see image)
I've tried to output the image in a new mat using opencv and the image output correctly. i really don't understand what happen neither why. Also i've tried to use discord instead of OBS the output is completely black ...
Any help would be appreciate. Thanks by advance.
(all my code is available through github, i'm not sure if i should post it since this is not stack overflow. if ever you need it just let me know i'll add a link)
Expected Output (got from OpenCV):
OBS Output :


Dzious
(101 rep)
May 15, 2021, 02:59 PM
• Last activity: May 15, 2021, 07:06 PM
1
votes
2
answers
3011
views
Can't build Darknet with CUDNN support
I`m trying to compile the sources from https://github.com/pjreddie/darknet using manjaro linux. But the build is having problems when I try to use the CUDNN switch. g++ -DOPENCV -I/usr/include/opencv4/opencv2/ `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors...
I`m trying to compile the sources from https://github.com/pjreddie/darknet using manjaro linux. But the build is having problems when I try to use the CUDNN switch.
g++ -DOPENCV -I/usr/include/opencv4/opencv2/
pkg-config --cflags opencv
-DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/http_stream.cpp -o obj/http_stream.o
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
Package 'opencv', required by 'virtual:world', not found
./src/http_stream.cpp:46:10: fatal error: opencv2/opencv.hpp: Arquivo ou diretório inexistente
#include "opencv2/opencv.hpp"
^~~~~~~~~~~~~~~~~~~~
Here is my make file.
GPU=1
CUDNN=1
CUDNN_HALF=0
OPENCV=1
AVX=0
OPENMP=0
LIBSO=0
# set GPU=1 and CUDNN=1 to speedup on GPU
# set CUDNN_HALF=1 to further speedup 3 x times (Mixed-precision using Tensor Cores) on GPU Tesla V100, Titan V, DGX-2
# set AVX=1 and OPENMP=1 to speedup on CPU (if error occurs then set AVX=0)
DEBUG=0
ARCH= -gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_50,code=[sm_50,compute_50] \
-gencode arch=compute_52,code=[sm_52,compute_52] \
-gencode arch=compute_61,code=[sm_61,compute_61]
OS := $(shell uname)
# Tesla V100
# ARCH= -gencode arch=compute_70,code=[sm_70,compute_70]
# GTX 1080, GTX 1070, GTX 1060, GTX 1050, GTX 1030, Titan Xp, Tesla P40, Tesla P4
ARCH= -gencode arch=compute_61,code=sm_61 -gencode arch=compute_61,code=compute_61
# GP100/Tesla P100 � DGX-1
# ARCH= -gencode arch=compute_60,code=sm_60
# For Jetson TX1, Tegra X1, DRIVE CX, DRIVE PX - uncomment:
# ARCH= -gencode arch=compute_53,code=[sm_53,compute_53]
# For Jetson Tx2 or Drive-PX2 uncomment:
# ARCH= -gencode arch=compute_62,code=[sm_62,compute_62]
VPATH=./src/
EXEC=darknet
OBJDIR=./obj/
ifeq ($(LIBSO), 1)
LIBNAMESO=darknet.so
APPNAMESO=uselib
endif
CC=gcc
CPP=g++
NVCC=nvcc
OPTS=-Ofast
LDFLAGS= -lm -pthread
COMMON=
CFLAGS=-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas
ifeq ($(DEBUG), 1)
OPTS= -O0 -g
else
ifeq ($(AVX), 1)
CFLAGS+= -ffp-contract=fast -mavx -msse4.1 -msse4a
endif
endif
CFLAGS+=$(OPTS)
ifeq ($(OPENCV), 1)
COMMON+= -DOPENCV -I/usr/include/opencv4/opencv2/
CFLAGS+= -DOPENCV
LDFLAGS+= pkg-config --libs opencv
COMMON+= pkg-config --cflags opencv
endif
ifeq ($(OPENMP), 1)
CFLAGS+= -fopenmp
LDFLAGS+= -lgomp
endif
ifeq ($(GPU), 1)
COMMON+= -DGPU -I/usr/local/cuda/include/
CFLAGS+= -DGPU
ifeq ($(OS),Darwin) #MAC
LDFLAGS+= -L/usr/local/cuda/lib -lcuda -lcudart -lcublas -lcurand
else
LDFLAGS+= -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand
endif
endif
ifeq ($(CUDNN), 1)
COMMON+= -DCUDNN
ifeq ($(OS),Darwin) #MAC
CFLAGS+= -DCUDNN -I/usr/local/cuda/include
LDFLAGS+= -L/usr/local/cuda/lib -lcudnn
else
CFLAGS+= -DCUDNN -I/usr/local/cudnn/include
LDFLAGS+= -L/usr/local/cudnn/lib64 -lcudnn
endif
endif
ifeq ($(CUDNN_HALF), 1)
COMMON+= -DCUDNN_HALF
CFLAGS+= -DCUDNN_HALF
ARCH+= -gencode arch=compute_70,code=[sm_70,compute_70]
endif
OBJ=http_stream.o gemm.o utils.o cuda.o convolutional_layer.o list.o image.o activations.o im2col.o col2im.o blas.o crop_layer.o dropout_layer.o maxpool_layer.o softmax_layer.o data.o matrix.o network.o connected_layer.o cost_layer.o parser.o option_list.o darknet.o detection_layer.o captcha.o route_layer.o writing.o box.o nightmare.o normalization_layer.o avgpool_layer.o coco.o dice.o yolo.o detector.o layer.o compare.o classifier.o local_layer.o swag.o shortcut_layer.o activation_layer.o rnn_layer.o gru_layer.o rnn.o rnn_vid.o crnn_layer.o demo.o tag.o cifar.o go.o batchnorm_layer.o art.o region_layer.o reorg_layer.o reorg_old_layer.o super.o voxel.o tree.o yolo_layer.o upsample_layer.o
ifeq ($(GPU), 1)
LDFLAGS+= -lstdc++
OBJ+=convolutional_kernels.o activation_kernels.o im2col_kernels.o col2im_kernels.o blas_kernels.o crop_layer_kernels.o dropout_layer_kernels.o maxpool_layer_kernels.o network_kernels.o avgpool_layer_kernels.o
endif
OBJS = $(addprefix $(OBJDIR), $(OBJ))
DEPS = $(wildcard src/*.h) Makefile
all: obj backup results $(EXEC) $(LIBNAMESO) $(APPNAMESO)
ifeq ($(LIBSO), 1)
CFLAGS+= -fPIC
$(LIBNAMESO): $(OBJS) src/yolo_v2_class.hpp src/yolo_v2_class.cpp
$(CPP) -shared -std=c++11 -fvisibility=hidden -DYOLODLL_EXPORTS $(COMMON) $(CFLAGS) $(OBJS) src/yolo_v2_class.cpp -o $@ $(LDFLAGS)
$(APPNAMESO): $(LIBNAMESO) src/yolo_v2_class.hpp src/yolo_console_dll.cpp
$(CPP) -std=c++11 $(COMMON) $(CFLAGS) -o $@ src/yolo_console_dll.cpp $(LDFLAGS) -L ./ -l:$(LIBNAMESO)
endif
$(EXEC): $(OBJS)
$(CPP) $(COMMON) $(CFLAGS) $^ -o $@ $(LDFLAGS)
$(OBJDIR)%.o: %.c $(DEPS)
$(CC) $(COMMON) $(CFLAGS) -c $< -o $@
$(OBJDIR)%.o: %.cpp $(DEPS)
$(CPP) $(COMMON) $(CFLAGS) -c $< -o $@
$(OBJDIR)%.o: %.cu $(DEPS)
$(NVCC) $(ARCH) $(COMMON) --compiler-options "$(CFLAGS)" -c $< -o $@
obj:
mkdir -p obj
backup:
mkdir -p backup
results:
mkdir -p results
.PHONY: clean
clean:
rm -rf $(OBJS) $(EXEC) $(LIBNAMESO) $(APPNAMESO)
It seems something related with new gcc or opencv version but I`m not right.
vfbsilva
(3757 rep)
May 18, 2019, 03:05 AM
• Last activity: Jan 26, 2021, 07:11 PM
0
votes
0
answers
61
views
After installing opencv3.4 Centos 7 not rebooting in GUI
I was already using OpenCV 2.4.5 by installing it using `yum install opencv opencv-devel`. But I was facing some problems as it doesn't have FFmpeg. I installed OpenCV 3.4 following [this guide][1]. After following these steps I followed [guide to link share lib][2], and I created `opencv.conf` file...
I was already using OpenCV 2.4.5 by installing it using
yum install opencv opencv-devel
.
But I was facing some problems as it doesn't have FFmpeg. I installed OpenCV 3.4 following this guide .
After following these steps I followed guide to link share lib , and I created opencv.conf
file at
/etc/ld.so.conf.d/opencv.conf
and wrote the path of my libs to it that is
/usr/local/installation/opencv3.4/lib64
Then I ran
sudo ldconfig -v
It was all working fine after that and I could successfully build QT projects using new OpenCV libs.
But once I restarted my CentOS7 I got the "Oh no! Something has gone wrong" screen.
I have to install it in a system but for now, I was doing it all on Oracle VirtualBox as I can't risk it on main system. I am able to login using Ctrl+Alt+F1. What could be the possible problem?
A.k.
(101 rep)
Jan 7, 2021, 04:32 AM
• Last activity: Jan 7, 2021, 09:34 AM
0
votes
1
answers
387
views
cmake and Installing opencv 4.x on Linux Debian 10 with Kernel 4.19.x
I am finding this info. online for building OpenCV 4.x on their homepage. I have not found a way to compile the samples or examples. Is it possible with cmake to install examples from the OpenCV 4.x build process? https://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html is the link I follow...
I am finding this info. online for building OpenCV 4.x on their homepage. I have not found a way to compile the samples or examples. Is it possible with cmake to install examples from the OpenCV 4.x build process?
https://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html is the link I followed to install with cmake and make, and sudo make install. I got the
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
down pat but I am trying to configure the examples/samples.
I have not been able to compile these examples or samples from the /build dir.
I also tried to install and compile the Python3 libraries but the compilation only allows for Python2. Are any other people having this issue and could you please provide some feedback?
De Funct
(105 rep)
Jul 9, 2020, 08:45 AM
• Last activity: Oct 12, 2020, 06:15 PM
0
votes
1
answers
1301
views
Install OpenCV on Arch Linux for C++ and Python using `pacman`
I want to install OpenCV (with GTK) latest stable version on my Arch Linux. I know how to manually build and install the library, but I don't want to go through all that. Is there a way to get it via `pacman`. I know that packages are available for `qt` but its causing issues for me. I am using `Gno...
I want to install OpenCV (with GTK) latest stable version on my Arch Linux. I know how to manually build and install the library, but I don't want to go through all that. Is there a way to get it via
pacman
. I know that packages are available for qt
but its causing issues for me. I am using Gnome
.
Mansoor Ahmed Memon
(138 rep)
Oct 5, 2020, 10:31 AM
• Last activity: Oct 8, 2020, 05:33 AM
0
votes
0
answers
284
views
How to make a debian package dependency to an older version of a library
I want to prepare a debian package with dependency to OpenCV 3.4.1. In debian/control I specify: ``` Build-Depends: ... libopencv-dev (=3.4.1-xenial1.3), ``` The problem is, that in our apt repository there is also OpenCV 3.4.10. Now, my package is built and linked to OpenCV 3.4.1, but a package bui...
I want to prepare a debian package with dependency to OpenCV 3.4.1. In debian/control I specify:
Build-Depends: ...
libopencv-dev (=3.4.1-xenial1.3),
The problem is, that in our apt repository there is also OpenCV 3.4.10. Now, my package is built and linked to OpenCV 3.4.1, but a package building tool specifies the package dependencies on the level of .so number (3.4), so the latest OpenCV is installed automatically. And unfortunately, the shared objects contain symbols that have changed between 3.4.1 and 3.4.10 (that concerns libopencv_dnn.so). In the end, my application cannot find the symbols from libopencv_dnn.so.3.4.1 in libopencv_dnn.so.3.4.10, and I can't make it install version 3.4.1 as the dependency.
Piotr G
(121 rep)
Sep 8, 2020, 04:24 PM
2
votes
2
answers
1588
views
pip3 install opencv is looking at the wrong URL
I'm trying to install opencv with `pip3` on my Devuan GNU/Linux 3, and this is what happens: ``` $ pip3 install opencv Collecting opencv Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/opencv ``` and indeed, if you browse that URL,...
I'm trying to install opencv with
pip3
on my Devuan GNU/Linux 3, and this is what happens:
$ pip3 install opencv
Collecting opencv
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/opencv
and indeed, if you browse that URL, you get a 404 page.
Why is this happening? Am I to blame? Devuan? pypi.org administrators? Somebody else?
Also - can I replace the URL somehow? Or manually install from somewhere?
einpoklum
(10753 rep)
Apr 27, 2020, 10:12 PM
• Last activity: May 31, 2020, 01:45 PM
0
votes
1
answers
693
views
Installing CUDA on my Ubuntu 18.04 system
I want to install CUDA on my system to run OpenCV. I have the NVIDIA 1050 Ti Mobile which supports the driver 390.116. I tried to install CUDA 10 and failed, I think because of the driver incompatibility. According to the wiki https://github.com/NVIDIA/nvidia-docker/wiki/CUDA, it seems that I can on...
I want to install CUDA on my system to run OpenCV.
I have the NVIDIA 1050 Ti Mobile which supports the driver 390.116. I tried to install CUDA 10 and failed, I think because of the driver incompatibility.
According to the wiki https://github.com/NVIDIA/nvidia-docker/wiki/CUDA , it seems that I can only CUDA 9.1, which isn't supported in Ubuntu 18.04.
How can I have CUDA on 18.04? Will I need a different GPU? Will I need to downgrade my OS to run CUDA?
araman92
(1 rep)
Apr 9, 2019, 09:20 PM
• Last activity: May 2, 2020, 09:52 AM
1
votes
1
answers
4026
views
pip install opencv-python gives error on Raspbian
I'm using a Raspberry Pi 3 B+ with Raspbian installed. When I run `pip install opencv-python` I get the following message: ``` Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting opencv-python ERROR: Could not find a version that satisfies the requirement opencv-p...
I'm using a Raspberry Pi 3 B+ with Raspbian installed.
When I run
pip install opencv-python
I get the following message:
Looking in indexes: https://pypi.org/simple , https://www.piwheels.org/simple
Collecting opencv-python
ERROR: Could not find a version that satisfies the requirement opencv-python (from version: none)
ERROR: No matching distribution found for opencv-python
I've tried pip install opencv-contrib-python
, python3 -m pip install opencv-python
and that gives me the same error.
And pip install --upgrade pip
before trying to install opencv, but it says I already have the latest version.
What I have:
$ python --version
Python 2.7.13
$ python3 --version
Python 3.6.3
$ pip --version
pip 19.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
Jorge Rosas
(31 rep)
Apr 26, 2019, 06:46 PM
• Last activity: May 2, 2019, 04:57 PM
0
votes
2
answers
70
views
Making sense of a package with almost no files included
$ uname -a Linux laptop 4.19.0-2-amd64 #1 SMP Debian 4.19.16-1 (2019-01-17) x86_64 GNU/Linux I need to use `cv::face::createLBPHFaceRecognizer()`, which is not a part of the core OpenCV but rather a contributed module. $ dpkg -l libopencv-contrib-dev ii libopencv-contrib-dev:amd64 3.2.0+dfsg-6 amd64...
$ uname -a
Linux laptop 4.19.0-2-amd64 #1 SMP Debian 4.19.16-1 (2019-01-17) x86_64 GNU/Linux
I need to use
cv::face::createLBPHFaceRecognizer()
, which is not a part of the core OpenCV but rather a contributed module.
$ dpkg -l libopencv-contrib-dev
ii libopencv-contrib-dev:amd64 3.2.0+dfsg-6 amd64 development files for libopencv-contrib3.2
everything fine ... no:
src/cmd.cpp:150: error: ‘cv::face’ has not been declared
const auto model = cv::face::createLBPHFaceRecognizer();
^~~~
OK. Let's then include the needed headers manually:
$ dpkg -S libopencv-contrib-dev
libopencv-contrib-dev:amd64: /usr/share/doc/libopencv-contrib-dev
libopencv-contrib-dev:amd64: /usr/share/doc/libopencv-contrib-dev/changelog.Debian.gz
libopencv-contrib-dev:amd64: /usr/share/doc/libopencv-contrib-dev/copyright
libopencv-contrib-dev:amd64: /usr/share/doc/libopencv-contrib-dev/README.Debian
Nothing! Is this a packager's mistake (this is Debian **testing** after all)? An OpenCV peculiarity? A minor oversight on my side? I would like to continue using the package manager, instead of compiling the whole thing myself.
Vorac
(3197 rep)
Mar 16, 2019, 09:37 AM
• Last activity: Apr 26, 2019, 04:17 PM
0
votes
1
answers
2089
views
lsd-slam installation failed during rosmake
I am trying to install the lsd-slam library without success. When typing during the last step of the installation: `rosmake lsd_slam` I got this output: [ rosmake ] rosmake starting... [ rosmake ] Packages requested are: ['lsd_slam'] [ rosmake ] Logging to directory /home/marcel/.ros/rosmake/rosmake...
I am trying to install the lsd-slam library without success. When typing during the last step of the installation:
rosmake lsd_slam
I got this output:
[ rosmake ] rosmake starting...
[ rosmake ] Packages requested are: ['lsd_slam']
[ rosmake ] Logging to directory /home/marcel/.ros/rosmake/rosmake_output-20150525-155638
[ rosmake ] Expanded args ['lsd_slam'] to:
['lsd_slam_core', 'lsd_slam_viewer']
[rosmake-0] Starting >>> catkin [ make ]
[rosmake-0] Finished >> genmsg [ make ]
[rosmake-8] Starting >>> cpp_common [ make ]
[rosmake-6] Starting >>> cmake_modules [ make ]
[rosmake-2] Starting >>> rosgraph [ make ]
[rosmake-3] Starting >>> rosclean [ make ]
[rosmake-0] Finished >> genlisp [ make ]
[rosmake-10] Starting >>> genpy [ make ]
[rosmake-4] Starting >>> geneus [ make ]
[rosmake-11] Starting >>> gencpp [ make ]
[rosmake-3] Finished >> roslang [ make ]
[rosmake-8] Finished >> rostime [ make ]
[rosmake-7] Starting >>> xmlrpcpp [ make ]
[rosmake-6] Finished >> rospack [ make ]
[rosmake-2] Finished >> rosparam [ make ]
[rosmake-9] Starting >>> rosmaster [ make ]
[rosmake-9] Finished >> message_generation [ make ]
[rosmake-9] Starting >>> roscpp_traits [ make ]
[rosmake-4] Starting >>> roslib [ make ]
[rosmake-4] Finished >> rosunit [ make ]
[rosmake-9] Finished >> roscpp_serialization [ make ]
[rosmake-11] Finished >> roslz4 [ make ]
[rosmake-9] Finished >> message_runtime [ make ]
[rosmake-7] Finished >> rosbag_storage [ make ]
[rosmake-4] Finished >> std_msgs [ make ]
[rosmake-0] Starting >>> rosbuild [ make ]
[rosmake-7] Finished >> geometry_msgs [ make ]
[rosmake-11] Starting >>> rosconsole [ make ]
[rosmake-0] Starting >>> rosgraph_msgs [ make ]
[rosmake-0] Finished >> sensor_msgs [ make ]
[rosmake-8] Starting >>> roscpp [ make ]
[rosmake-5] Finished >> cv_bridge [ make ]
[rosmake-8] Finished >> rosout [ make ]
[rosmake-4] Starting >>> rospy [ make ]
[rosmake-4] Finished >> roslaunch [ make ]
[rosmake-8] Finished >> rostest [ make ]
[rosmake-8] Finished >> topic_tools [ make ]
[rosmake-8] Finished >> rosbag [ make ]
[rosmake-8] Finished >> rosmsg [ make ]
[rosmake-8] Finished >> rosservice [ make ]
[rosmake-8] Finished >> dynamic_reconfigure [ make ]
[rosmake-8] Finished >> lsd_slam_viewer [ make ]
[ rosmake ] Last 40 linesd_slam_viewer: 3.6 sec ] [ 1 Active 41/43 Complete ]
{-------------------------------------------------------------------------------
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/liblz4.so
collect2: error: ld returned 1 exit status
CMakeFiles/videoStitch.dir/build.make:118: recipe for target '../bin/videoStitch' failed
make: *** [../bin/videoStitch] Error 1
make: Leaving directory '/home/marcel/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/build'
CMakeFiles/Makefile2:851: recipe for target 'CMakeFiles/videoStitch.dir/all' failed
make: *** [CMakeFiles/videoStitch.dir/all] Error 2
make: *** Waiting for unfinished jobs....
Linking CXX executable ../bin/viewer
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_videostab.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_video.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_superres.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_stitching.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_photo.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_ocl.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_objdetect.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_ml.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_legacy.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_gpu.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_flann.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_features2d.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_contrib.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libopencv_calib3d.so.2.4.9
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/libboost_program_options.so
/usr/bin/ld: cannot find -l:/usr/lib/x86_64-linux-gnu/liblz4.so
collect2: error: ld returned 1 exit status
CMakeFiles/viewer.dir/build.make:355: recipe for target '../bin/viewer' failed
make: *** [../bin/viewer] Error 1
make: Leaving directory '/home/marcel/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/build'
CMakeFiles/Makefile2:886: recipe for target 'CMakeFiles/viewer.dir/all' failed
make: *** [CMakeFiles/viewer.dir/all] Error 2
make: Leaving directory '/home/marcel/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/build'
Makefile:117: recipe for target 'all' failed
make[1] : *** [all] Error 2
make[1] : Leaving directory '/home/marcel/rosbuild_ws/package_dir/lsd_slam/lsd_slam_viewer/build'
/opt/ros/jade/share/mk/cmake.mk:7: recipe for target 'all' failed
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package lsd_slam_viewer written to:
[ rosmake ] /home/marcel/.ros/rosmake/rosmake_output-20150525-155638/lsd_slam_viewer/build_output.log
[rosmake-8] Finished <<< lsd_slam_viewer [FAIL] [ 3.68 seconds ]
[ rosmake ] Halting due to failure in package lsd_slam_viewer.
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:
[ rosmake ] Built 42 packages with 1 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /home/marcel/.ros/rosmake/rosmake_output-20150525-155638
I followed the instructions of their readme . I am using Ubuntu 15.04 with OpenCV 2.4.11 and ROS (Robot Operating System) Jade. I have to use OpenCV 2.4.11 or higher because my cameras are only supporting this or a higher version. So, there is not option to downgrade.
Also the messages ..."cannot find"... are confusing. These files exist but apparently cannot be found.
Any solutions?
holzkohlengrill
(584 rep)
May 25, 2015, 03:02 PM
• Last activity: Apr 17, 2019, 06:40 PM
3
votes
1
answers
2957
views
How to add shared library dependencies to debian/control?
I am trying to make a debian package from a Qt application relying on OpenCV. What I did so far: 1. I set up an Ubuntu in a Virtualbox 2. I installed the neccessary software to compile and run the application (Qt related things, `ffmpeg`, codecs, OpenCV etc.) 3. I successfully compiled and ran the a...
I am trying to make a debian package from a Qt application relying on OpenCV.
What I did so far:
1. I set up an Ubuntu in a Virtualbox
2. I installed the neccessary software to compile and run the application (Qt related things,
ffmpeg
, codecs, OpenCV etc.)
3. I successfully compiled and ran the application
4. I created a GPG key
5. With dh_make I created the debian directory in my project dir
6. I added the packages to debian/control->Build Depends what I got by executing dpkg-depcheck -d qmake
7. I added to the Depends also what I got by dpkg-depcheck -d SampleApp
8. I edited the copyright and changelog files
9. I tried to run dpkg-buildpackage -b
At this point I got the error message:
dpkg-shlibdeps: error: no dependency information found for /usr/local/lib/libopencv_imgcodecs.so.3.1 (used by debian/sampleapp/opt/SampleApp/bin/SampleApp)
dh_shlibdeps: dpkg-shlibdeps -Tdebian/sampleapp.substvars debian/sampleapp/opt/SampleApp/bin/SampleApp returned exit code 2
make: *** [binary] Error 2
dpkg-buildpackage: error: debian/rules binary gave error exit status 2
All these files can be found under /usr/local/lib/
. I have read this: https://www.debian.org/doc/debian-policy/ch-sharedlibs.html but I could not find the solution. How could I add these dependencies to the package?
### Edit:
Build-Depends field:
Build-Depends: debhelper (>= 8.0.0), libpopt0:i386, libqt5core5a:i386, qtdeclarative5-dev, libglib2.0-0:i386, qtchooser, pkg-config, qt5-qmake:i386, locales
Depends field:
Depends: ${shlibs:Depends}, ${misc:Depends}, udev, libxext6:i386, libxcomposite1:i386, libopencore-amrwb0:i386, libglib2.0-0:i386, libpangocairo-1.0-0:i386, libva-drm1:i386, libxinerama1:i386, libmp3lame0:i386, libnih1:i386, libx11-6:i386, libxcb-render0:i386, libffi6:i386, libgdk-pixbuf2.0-0:i386, libdrm2:i386, libvorbis0a:i386, libfontconfig1:i386, libxrender1:i386, libpango-1.0-0:i386, libdbus-1-3:i386, libpixman-1-0:i386, libopenexr6:i386, libxvidcore4:i386, libjpeg-turbo8:i386, libcgmanager0:i386, libcairo2:i386, libjasper1:i386, libxfixes3:i386, libilmbase6:i386, libtiff5:i386, libusb-1.0-0:i386, libdc1394-22:i386, libxi6:i386, libfreetype6:i386, libxrandr2:i386, libqt5network5:i386, libpng12-0:i386, libthai0:i386, libxcb-shm0:i386, libva1:i386, libvorbisenc2:i386, libtheora0:i386, libharfbuzz0b:i386, libicu52:i386, libjbig0:i386, libopencore-amrnb0:i386, libogg0:i386, libxcursor1:i386, libxcb1:i386, libraw1394-11:i386, libudev1:i386, libnih-dbus1:i386, libqt5core5a:i386, libgraphite2-3:i386, libva-x11-1:i386, libatk1.0-0:i386, libexpat1:i386, libgtk2.0-0:i386, libpangoft2-1.0-0:i386, libdatrie1:i386, libxdmcp6:i386, libvdpau1:i386, libxdamage1:i386, libxau6:i386
user203733
Dec 4, 2016, 03:03 AM
• Last activity: Jan 5, 2019, 09:24 PM
1
votes
1
answers
2524
views
Docker image with OpenCV and FFPMEG
I'm building a Docker image that enables `OpenCV` with `ffmpeg` support. My Dockerfile looks like RUN apt-get update && apt-get install -y \ git \ curl \ wget \ unzip \ ffmpeg \ build-essential \ cmake git pkg-config libswscale-dev \ libtbb2 libtbb-dev libjpeg-dev \ libpng-dev libtiff-dev libjasper-...
I'm building a Docker image that enables
OpenCV
with ffmpeg
support.
My Dockerfile looks like
RUN apt-get update && apt-get install -y \
git \
curl \
wget \
unzip \
ffmpeg \
build-essential \
cmake git pkg-config libswscale-dev \
libtbb2 libtbb-dev libjpeg-dev \
libpng-dev libtiff-dev libjasper-dev \
python3-numpy
RUN cd \
&& wget https://github.com/opencv/opencv/archive/3.1.0.zip \
&& unzip 3.1.0.zip \
&& cd opencv-3.1.0 \
&& mkdir build \
&& cd build \
&& cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_CUDA=OFF \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D WITH_FFMPEG=ON \
-D BUILD_NEW_PYTHON_SUPPORT=ON \
-D WITH_TBB=ON .. \
&& make -j"$(nproc)" \
&& make install \
&& cd \
&& rm 3.1.0.zip
When I build my container ffmpeg
is installed, but OpenCV
does not detect it as I can clearly see from the general configuration:
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: NO
-- FFMPEG: NO
-- codec: NO
-- format: NO
-- util: YES (ver 54.31.100)
-- swscale: YES (ver 3.1.101)
-- resample: NO
-- gentoo-style: YES
-- GStreamer: NO
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- OpenNI2: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: NO/YES
-- XIMEA: NO
-- Xine: NO
even if ffpmeg gets installed
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
loretoparisi
(297 rep)
Apr 12, 2017, 07:52 PM
• Last activity: Oct 5, 2018, 07:00 PM
2
votes
1
answers
7277
views
Split a video to multiple chunks according to multiple starting and ending frame indices
Are there any tools (like `FFmpeg` or `OpenCV`) can split a video into multiple chunks according to some specific starting and ending frame indices? For example, given `(0,20),(21,33),(40,60)...`, each tuple means a starting and ending frame indices pair for a chunk, and the neighbor chunks might no...
Are there any tools (like
FFmpeg
or OpenCV
) can split a video into multiple chunks according to some specific starting and ending frame indices? For example, given (0,20),(21,33),(40,60)...
, each tuple means a starting and ending frame indices pair for a chunk, and the neighbor chunks might not adjoin.
Note that, the number of chunks might be large. For example, given a 1 hour video, there might be 1500 splits.
Jon
(2317 rep)
Oct 7, 2015, 02:24 PM
• Last activity: Aug 5, 2018, 03:01 PM
Showing page 1 of 20 total questions