Questions tagged [opencv]

OpenCV (Open Source Computer Vision) is a library for real time computer vision. When using this tag, please add a language specific tag (python, c++, ...), if relevant.

OpenCV is a code library for Computer Vision related applications, spanning from many very basic tasks (capture and pre-processing of image data) to high-level algorithms (feature extraction, motion tracking, machine learning).

It is free software. Versions from 4.5.0 are licensed under the Apache 2 license, versions before that under the BSD 3-clause license. OpenCV provides a rich API in C++, Python, and Java. Third party wrappers are available. The library is platform-independent and often used for real-time image processing and computer vision (e.g. tracking in videos). It supports Windows, Linux, and OS X as well as Android (native and Java) and iOS.

OpenCV was officially launched by Intel in 1999. Version 2.0 (2009) was an important landmark as it introduced the new, comprehensive C++ interface, which since then is also to be used internally in the library. Since this release, OpenCV saw a strong acceleration of development in improving the library and adding new features. Version 3.0, released in 2015, deprecated the C API and emphasized object-oriented design for increased modularity and intuitive interface. More information may be found in Wikipedia.

Latest stable versions:

Homepage: https://opencv.org

Documentation: https://docs.opencv.org

Tutorials including source code:


Books

Note that this list is likely outdated and not vetted for quality. A book or course on computer vision in general, along with the official documentation of OpenCV, will give a better understanding of the matter and the library.

72729 questions
13
votes
2 answers

How to pixelate image using OpenCV in Python?

Top answer in this link How to pixelate a square image to 256 big pixels with python? uses PIL to pixelate image. Converting image from PIL to cv2.Mat is possible but I'm not allowed to use other library, and I couldn't find any good method using…
gameon67
  • 3,981
  • 5
  • 35
  • 61
13
votes
2 answers

OpenCV - How to get real world distance from a 2D image using a chessboard as reference

After checking several pieces of codes, I took several shots, found the chessboard corners and use them to get the camera matrix, distortion coefficients, rotation, and translation vectors. Now, can someone tell me which python opencv function do I…
Pablo Gonzalez
  • 673
  • 2
  • 10
  • 24
13
votes
1 answer

Python OpenCV streaming from camera - multithreading, timestamps

I ran simple python script on Raspberry Pi 3. This script is responsible to open video device and stream data (800x600) to HTTP endpoint using MJPEG. When I receive this stream one of my Raspberry Pi cores works on 100%. It possible to run OpenCV…
lukassz
  • 3,135
  • 7
  • 32
  • 72
13
votes
2 answers

Receive webRTC video stream using python OpenCV in real-time

Hi, I am creating a pipeline where I need to access data from the camera and do some OpenCV algorithms in it. I am able to send the video from the source using webRTC.…
Sreekiran A R
  • 3,123
  • 2
  • 20
  • 41
13
votes
1 answer

OpenGL texture inverted

I'm trying to map the input from my webcam to a plane in OpenGL. I'm using OpenCV to get the images from the webcam. The problem I have is that the texture is vertically inverted, if my texture is "v", the current result is "^". I want to fit…
Eric Bautista
  • 403
  • 3
  • 8
  • 18
13
votes
1 answer

How to build a custom opencv.js with opencv_contrib

I would like to include xfeatures2D from opencv_contrib into opencv.js. I follow this documentation Build OpenCV.js. Everything is ok. I got a brand new opencv.js that I'm able to use in my html page, but it doesn't include the xfeatures2D module. I…
13
votes
2 answers

How can I pass flags to R when it is compiling C++ code to be used in a package?

I am trying to use some code from OpenCV in an R package, using Rcpp to build the package. When I compile the c code on my machine, it works fine. For example, I am using the the following syntax locally to compile the facedetect.cpp code: g++…
Solomon
  • 946
  • 14
  • 18
13
votes
1 answer

How to compile a c++ application using static opencv libraries within docker

I'm building my first OpenCV based application in C++. My goal is to build an intermediate docker image that can compile the application statically so that it can run standalone in the resulting smaller image. I'm open to using any docker image for…
counterbeing
  • 2,721
  • 2
  • 27
  • 47
13
votes
3 answers

Blur a specific part of an image

I have an image. Like this: I detect a subject(which is a person in this case) & it masks the image like this: I want the background of the subject to be blurrred. Like this: Below is the code I have tried. the following code only blurs import…
penta
  • 2,536
  • 4
  • 25
  • 50
13
votes
5 answers

Skip frames and seek to end of RTSP stream in OpenCV

I capture and process an IP camera RTSP stream in a OpenCV 3.4.2 on Raspberry Pi. Unfortunately the processing takes quite a lot of time, roughly 0.2s per frame, and the stream quickly gets delayed. I don't mind if I skip some frames so I'm looking…
MLu
  • 1,218
  • 2
  • 15
  • 28
13
votes
1 answer

How to use OpenCV ConnectedComponents to get the images

How to use Python OpenCV ConnectedComponents function to obtain the images? From searching some past question, I have only been able to find how to shade the connected objects in different colors (Which I tested and it worked, but I have no idea how…
Chopin
  • 303
  • 1
  • 3
  • 7
13
votes
4 answers

Cannot import cv2 on PyCharm

I am trying to import cv2 module in PyCharm, but it shows error. I tried in terminal as well pip install opencv-python pip3 install cv2 pip install opencv-python pip3 install cv2 and whatnot. Trying to install opencv-python from terminal shows…
thesamiroli
  • 420
  • 3
  • 8
  • 21
13
votes
2 answers

openCV - ffmpeg H264 and Webm error

I have ubuntu 16.04 LTS and OpenCV 3.4.0 Installed(Intel i5 and AMD graphics card), I need to create a browser supported video, which is playable in browser. If I'm using H264 im getting OpenCV: FFMPEG: tag 0x34363248/'H264' is not supported with…
Karthikaeyan
  • 655
  • 1
  • 9
  • 13
13
votes
1 answer

Find coordinates of a Canny Edge Image - OpenCV & python

I want to save in a list the coordinates of all edges that the openCV detect, I succeed in showing the edges on screen (on the subscribed photo), and I don't know how to save the coordinates (all the white lines). Thanks in advance.
rdo123
  • 149
  • 1
  • 1
  • 9
13
votes
2 answers

What are the advantages / disadvantages between the different predefined ArUco dictionaries?

I want to use ArUco markers to detect objects and use a predefined dictionary. I only need a small amount of different markers. About 10. I am now wondering what the advantages and disadvantages are between the different predefined dictionaries.…
Incanus
  • 389
  • 1
  • 4
  • 16
1 2 3
99
100