Questions tagged [opencv]

OpenCV (Open Source Computer Vision Library)

Filter by
Sorted by
Tagged with
0 votes
3 answers
4k views

How to install OpenCV 3.0.0 and 2.4?

I know that a lot of questions have been posted regarding the installation of OpenCV, but right now I need to install both OpenCV 2.4 along with OpenCV 3.0.0 Since there are a lot of research codes ...
2 votes
2 answers
2k views

Error when installing opencv (any version) on Ubuntu 18.04

I got an error in make command in opencv. [/usr/bin/ld: /usr/local/lib/libavcodec.a(vc1dsp_mmx.o): relocation R_X86_64_PC32 against symbol `ff_pw_9' can not be used when making a shared object; ...
3 votes
1 answer
4k views

fatal IO error 22 (Invalid argument) on X server ":0"

When trying to do openCV subplot on my Ubuntu 20.04 I get the following error The X11 connection broke: Maximum allowed requested length exceeded (code 4) XIO: fatal IO error 22 (Invalid argument) ...
0 votes
0 answers
60 views

Cannot find USB camera index with VideoCapture() OpenCV

I'm trying to connect a GoPro 10 to RPi5 and work with OpenCV library. I'm having issues to find "camera index" in order to create VideoCamera object. I followed https://github.com/jschmid1/...
0 votes
1 answer
122 views

No package 'opencv4' found

I have makefile has this line : $(CLINAME): $(LIBNAME) main.c $(CC) -o $@ main.c -std=c99 `pkg-config --cflags --libs opencv4` -Iinclude -L. -l$@ -lm I am trying to run my code but I got on this ...
0 votes
1 answer
5k views

opencv was not found in the pkg-config

Using cmake and cuda i create opencv , the file was saved in /usr/local/lib/python3.8/dist-packages/cv2/python-3.8/cv2.so now i'm trying to install darknet but i got this error Package opencv was not ...
0 votes
1 answer
5k views

How to use opencv-python on WSL2 Ubuntu20.04

I have just installed a Ubuntu-20.04 on WSL2. And I installed a miniconda env with python 3.7, and then I installed opencv-python by "conda install opencv". But when I try the simplest cv2....
5 votes
4 answers
10k views

how do I install opencv4.0 on 18.10?

I have been trying to install opencv4.0.1 on ubuntu for a few weeks now. I have followed the opencv installation instructions and I am able to make and compile the library, yet after installation, ...
1 vote
1 answer
2k views

PiCamera with OpenCV 4.5.4 on Ubuntu 22.04 Server (RaspberryPi 4B) Capture Returns Empty Frame

Installed OpenCV 4.5.4 to Ubuntu 22.04 Server on Raspberry Pi4B. ( sudo apt install python3-opencv -y ) Video4Linux sees the camera: $ v4l2-ctl --list-devices ... unicam (platform:fe801000.csi): /...
4 votes
3 answers
16k views

libv4l2: error turning on stream: Invalid argument VIDIOC_STREAMON: Invalid argument

I'm working on camera using opencv 3.0.0 and C++ with Ubuntu 14.04 , When I run a program using the camera and stop it with Ctrl + C, I can't get it run for a second time and it gives me the ...
3 votes
1 answer
16k views

Capturing webcam video with OpenCV in WSL2

I am trying to access my webcam through OpenCV in WSL2 (Ubuntu). I found this blog post where it explains how to connect USB devices to WSL2. Running usbipd wsl list in windows command prompt lists ...
0 votes
0 answers
62 views

OpenCV imgproc not found

i am trying to compile a OpenCV Application for an ARMs target. I crosscompiled all the libraries but when i try to compile my code: #include<opencv2/imgcodecs.hpp> #include<opencv2/highgui....
0 votes
0 answers
120 views

I would like to connect my Kinect v2 to my pc in ubuntu 22.04, Is it possible?

I am trying to use the Kinect v2 for a project using OpenCV in Ubuntu, but a quick Google search gives me the drivers for Ubuntu 20.04 only. I Don't know how to proceed. Should the Ubuntu version be a ...
4 votes
3 answers
3k views

OpenCV compiles correctly but fails during .deb packaging

Attempting to follow some tutorials on building a .deb package for a newer version of OpenCV in Ubuntu 18.04. Here are my steps: wget https://github.com/opencv/opencv/archive/4.1.0.zip unzip 4.1.0....
0 votes
1 answer
650 views

Opencv crashes on startup

Trying to use face recognition on real time on my webcam but opencv crashes just after opening camera. here is the code: import face_recognition import cv2 import os import re fileIndex = { '#...
0 votes
1 answer
77 views

Can't use opencv in upgraded Python3

I upgraded my Python 3.6.9 to Python 3.9. Prior to upgrading, I was able to use opencv but somehow I can't use opencv and other libraries (matplotlib.pyplot etc.). What is problem with that ? I also ...
1 vote
0 answers
524 views

Unmet dependencies for libopencv

I tried to upgrade to ubuntu 20 but the process somehow got stuck in the middle. Now I am finding it difficult to get back my system to normal as everything I install meets with the same output. For ...
0 votes
1 answer
2k views

cannot build install opencv4.5.5 for ubuntu 22.04

I am trying to build install opencv4.5.5 with cuda10.6 on ubuntu 22.04. Followed every step in this tutorial https://www.sproutworkshop.com/2022/02/how-to-compile-opencv-4-5-5-with-cuda-11-6-and-cudnn-...
9 votes
2 answers
28k views

Unable to locate package libgstreamer0.10-dev on Ubuntu 18.04

I'm trying to install OpenCV4 as explained here When I get to sudo apt -y install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev I receive Reading package lists... Done Building dependency ...
0 votes
1 answer
403 views

Is it possible to connect 8 usb cameras to Ubuntu , I'm using a TP-Link 7 ports hub , and I cant find the way to access the cameras at the same time

I'm working on a project on ROS and I need to connect 8 usb cameras , so I bought a usb hub from TP-link but still cant access all the cameras at the same time , could you help me with this ?
3 votes
1 answer
2k views

How to control mouse cursor using c?

As in windows there is a function setCursorPos in windows.h for controlling cursor position. What is the way to do this in ubuntu?
4 votes
2 answers
17k views

make opencv2/opencv.hpp not found

I am trying to build fastfusion from this repo: https://github.com/tum-vision/fastfusion . In the installation step, after running CMake ., I have to run make. But the make command fails with the ...
0 votes
2 answers
3k views

not able to create sym-link our OpenCV cv2.so bindings into cv

(cv) dell@dell-Inspiron-3442:~/.virtualenvs/cv/lib/python2.7/site-packages$ cd ~/.virtualenvs/cv/lib/python2.7/site-packages/ (cv) dell@dell-Inspiron-3442:~/.virtualenvs/cv/lib/python2.7/site-...
5 votes
2 answers
11k views

Linking error when trying to compile on a shared drive

I am trying to compile the OpenCV library on a shared drive on my system. I was able to configure and generate makefiles successfully by using these settings, but when I try to compile I get the ...
0 votes
1 answer
1k views

Error when installing libtiff5-dev

I've got stucked for 4 days on installing openCV.always got error while compile the source code. I assume because libtiff5-dev not installed on my machine, then I tiedy to install libtiff5-dev, here ...
5 votes
2 answers
5k views

How can I use OpenCV 3.0 without overwriting my current version of OpenCV (2.4.8) on Ubuntu?

I'm working with ROS indigo on Ubuntu 14.04 LTS, which automatically installs OpenCV 2.4.8 on my Linux machine. I'm very new to how Ubuntu works, so I really don't want to mess with the OpenCV that's ...
0 votes
1 answer
871 views

Why am I getting import cv2 error even I have installed it properly?

I'm trying to run python script which import opencv, I have sucessfully installed opencv, I can see the installation and version but when I try to call it through the script I get import error (cv) ...
1 vote
1 answer
3k views

libopencv-dev and dependencies could not be installed [duplicate]

I am attempting to install howdy, and apt yields this result: Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable ...
2 votes
1 answer
405 views

Recover opencv2/ opencv4 folders from /usr/include

I had a lot of problems with my opencv installation and along the way I accidentally deleted the opencv folders in /usr/include. How can I recover them in the right way so that the following error ...
0 votes
1 answer
432 views

Linking error building OpenCV Contrib 4.5.4 with LibTiff4

Scenario I am having some trouble building the latest version of OpenCV's contrib codebase from source, but the issue might just underlie a more generic lack of depth on my part: Fetching the 4.5.4 ...
3 votes
3 answers
17k views

VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV Unable to stop the stream: Device or resource busy

Running a private code that reads the data from the Webcam, I get the following error: Loading weights from handyolo/weights/000010.weights... Done! INFO:...
1 vote
0 answers
326 views

Enable "use CUDA" for OpenCV

In Ubuntu 18.04 (Jetson Nano) I have OpenCV 4.1.1 and CUDA 10.2.89. However, the command below, in Python, returns 0: cv2.cuda.getCudaEnabledDeviceCount() which means OpenCV is not using CUDA. What ...
1 vote
0 answers
971 views

Ubuntu 21: sudo apt install failed, causing by gcc-11-base unmet dependencies on libgfortran5 :(

My sudo apt install encountered problem when trying to install OpenCV. It fails on package libgfortran5, which OpenCV and libopencv-dev needs. The output is The following packages have unmet ...
2 votes
1 answer
22k views

Uninstall OpenCV 4.2.0 and its Libraries

I'm quite new to Ubuntu and I just installed opencv and some additional libraries using sudo apt update sudo apt install libopencv-dev python3-opencv ...
0 votes
0 answers
44 views

OpenCV installation in ubuntu 18.04 on Jetson Nano [duplicate]

when I am running this ubuntu command below error is coming: For installation I am using this link: https://jkjung-avt.github.io/opencv-on-nano/ Err:12 http://old-releases.ubuntu.com/ubuntu xenial-...
1 vote
0 answers
73 views

I'm having trouble installing OCRopy, I want to use it to create train data for an old manuscript in latin. What prereqs are needed and lines to write

So I am new to using Ubuntu and I am trying to install OCRopy to make train data with the end goal of creating a transcript for a 15th c. manuscript. So far I am considering that my problem may be a ...
0 votes
2 answers
3k views

Compiling Opencv cpp code in ubuntu

while compiling the below code.. #include <opencv2/core/core.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/highgui/highgui.hpp> #include <iostream> #include <...
20 votes
3 answers
86k views

ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory

How should I solve this error in Ubuntu16.04? import cv2 File "/opt/conda/envs/pytorch-py3.6/lib/python3.6/site-packages/cv2/__init__.py", line 3, in <module> from .cv2 import * ...
0 votes
1 answer
2k views

Problems installing OpenCV with Cmake

I'm following a tutorial (https://www.learnopencv.com/install-opencv3-on-ubuntu/) to install opencv 3.0 on ubuntu 16, but I've got problems in step 5.2: Run Cmake, until step 5.1 was everything ok. ...
1 vote
0 answers
432 views

libopencv-highgui2.4v5 : Depends: libpng12-0 (>= 1.2.13-4) but it is not going to be installed when installing libopencv-dev python-opencv [duplicate]

How should I fix the following problem? (vision) mona@goku:~/research/code/vision/integration$ sudo apt-get install libopencv-dev python-opencv Reading package lists... Done Building dependency tree ...
0 votes
0 answers
238 views

OpenCv for c++ on ubuntu is not getting installed

Assalamualaikum I followed this article from top to bottom But when I executed - pkg-config --modversion opencv an error message showed up -'Package opencv4 was not found in the pkg-config search ...
0 votes
1 answer
57 views

Can't boot ubuntu, deleted 86_64x gnu accidently

Hi please help by mistake I deleted all of x86_64 linux folder and now the boot got stuck. Please help thank you
2 votes
1 answer
3k views

OpenCV error in setting resolution with c910

I've been trying to use OpenCV to control my webcam (Logitech c910) through python. I 've managed to capture images through .read() but they are 640 x 480 and I haven't managed to set the resolution ...
26 votes
7 answers
125k views

How to install OpenCV 3.1 for Python 3.5 On Ubuntu 16.04 LTS?

How to install OpenCV version 3.1 on Ubuntu 16.04 LTS to work with Python 3.5.1? I tried this on a VM but obviously that is useful to do if you want to work with Python 2.
0 votes
1 answer
2k views

Ubuntu 20.04 : error when installing Caffe

I'm trying to install Caffe-Segnet (http://mi.eng.cam.ac.uk/projects/segnet/tutorial.html) on my Ubuntu 20.04 for a project I'm working on, and I encountered many difficulties, even when trying to ...
0 votes
1 answer
358 views

OpenCV: Error - Module not found -(on IDLE)

I have installed OpenCV on Ubuntu 18.04. The python installation is using conda(screenshot attached) I can import OpenCV from terminal and jupyter notebooks import on terminal and work with it. Now I ...
0 votes
0 answers
2k views

How to specify the display used by cv2.imshow()

Goal: On a system with two displays and I want to specify the display used by the cv2.imshow command (python 3.6 with Ubuntu 18.04) Here is what I have tried: import os import cv2 def f(display): ...
5 votes
1 answer
4k views

How to install python-opencv without answering the quesitons?

I'm trying to create a docker image (using a Dockerfile) and as part of the process, I have to install apt-get install python-opencv. But it asks all these questions about geographic area and other ...
2 votes
1 answer
1k views

How to reinstate videodev2.h in ubuntu 20.04

While building OpenCV I accidentally linked the wrong header file. Instead of linking videodeh.h like this : $ sudo apt-get install libdc1394-22 libdc1394-22-dev libxine2-dev libv4l-dev v4l-utils $ cd ...
1 vote
1 answer
755 views

GTK style widget error in cv2

I wrote a script which perfectly runs in Windows. This is the script: import imutils import cv2 from imutils.video import VideoStream vs = VideoStream(src=0).start() while True: frame = vs.read()...

1
2 3 4 5 6