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
14
votes
3 answers

Books for OpenCV and Python?

Does anyone know if there are any books on OpenCV and Python? I have OReilly Learning OpenCV book but its for C so I'm looking for books/pdfs/online tutorials specifically Python and OpenCV. I've looked at…
user1401950
  • 967
  • 2
  • 12
  • 28
14
votes
7 answers

Accurate binary image classification

I'm trying to extract letters from a game board for a project. Currently, I can detect the game board, segment it into the individual squares and extract images of every square. The input I'm getting is like this (these are individual letters): At…
Blender
  • 289,723
  • 53
  • 439
  • 496
13
votes
3 answers

How do I get a list of webcam devices using opencv?

I am using OpenCV2.2 with videoInput. I want to upgrade to OpenCV2.3.1 where videoInput has apparently been merged into OpenCV2.3. My problem is that there doesn't appear to be a listdevices() function to return all the video sources…
Phil Hannent
  • 12,047
  • 17
  • 71
  • 118
13
votes
2 answers

Displacement Map Filter in OpenCV

I'm curious to know how one can implement the effect demonstrated here using OpenCV. I think it's some sort of displacement map filter but I'm not 100% sure. After that page has fully loaded, move the mouse around to see the background image move…
karlphillip
  • 92,053
  • 36
  • 243
  • 426
13
votes
5 answers

Drawing and Plotting graph in OpenCV

Does OpenCV provide a function on how to draw and plot a graph? I found this link by Shervin Emami http://www.shervinemami.info/graphs.html which was created by himself.
Mzk
  • 1,102
  • 3
  • 17
  • 40
13
votes
5 answers

Key Frame Extraction From Video

I need Need To extract Key Frames from Video/Stream.So is there any standard implementation. I am using open CV. (Currently i am extracting frames each second which is slower i need to improve performance.) So if any one has optimized implementation…
user1178178
  • 147
  • 1
  • 1
  • 6
13
votes
2 answers

OpenCV Shows Gray Window

I'm trying to display an image using OpenCV. I have the following very basic code: import cv2 img = cv2.imread('myimage.png', 0) # Reads a Gray-scale image img2 = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR) cv2.imshow("window", img2) The window is…
zmbq
  • 38,013
  • 14
  • 101
  • 171
13
votes
3 answers

Face Detection with OpenCV for non frontal images

I am trying to use opencv to detect faces. Faces are not frontal, the camera captured the faces from side so only one eye and part of the mouth is viewed. I tried HaarDetectObjects with multiple configurations without getting benefit. I changed the…
Hani
  • 1,517
  • 5
  • 20
  • 28
13
votes
2 answers

Python OpenCV SVM implementation

So I have a matrix with my sample images (all turned into vectors) which was run trough PCA/LDA, and a vector which denotes the class each images belongs to. Now I want to use the OpenCV SVM class to train my SVM (I am using Python, OpenCV 2.3.1).…
Veles
  • 1,512
  • 4
  • 14
  • 28
13
votes
2 answers

Supervised Motion Detection Library

Can anyone recommend a motion detection library that's trainable via a supervised learning algorithm? I have an IP webcam that I'm trying to detect motion from. I'm been using the motion software detector project to do this, but I'm getting a lot of…
Cerin
  • 60,957
  • 96
  • 316
  • 522
13
votes
2 answers

Difference between adaptive thresholding and normal thresholding in opencv

I have this gray video stream: The histogram of this image: The thresholded image by : threshold( image, image, 150, 255, CV_THRESH_BINARY ); i get : Which i expect. When i do adaptive thresholding with : adaptiveThreshold(image,…
Olivier_s_j
  • 5,490
  • 24
  • 80
  • 126
13
votes
3 answers

track eye pupil in a video

I am working on a project aimed to track eye pupil. For this I have made a head-mounted system that captures the images of the eye. Completed with the hardware portion I am struck in software part. I am using opencv. Please let me know what would be…
siso
  • 265
  • 1
  • 7
  • 20
13
votes
3 answers

Head pose estimation with Opencv

I am using OpenCV Haar Algorithm to track the Head and overlay an image over the Head. What I am doing is saving frames generated by camera and overlaying image over each frames. And time is not a constraint as I am not doing it Real-Time. My code…
Wazy
  • 8,822
  • 10
  • 53
  • 98
13
votes
3 answers

HOG for "detecting object" opencv

I would like to know, if there is any code or any good documentation available for implementing HOG features? I tried to read the documentation here but it's quite difficult to understand and it needs SVM.. What I need is just to implement a HOG…
Mario
  • 1,469
  • 7
  • 29
  • 46
13
votes
2 answers

convert OpenCV 2 vector to vector

The OpenCV 2 contour finder returns a vector, but sometimes you want to use these with a function that requires a vector. What is the fastest, most elegant way to convert? Here are some ideas. A very general conversion function for…
Kyle McDonald
  • 1,171
  • 2
  • 11
  • 17