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

Why is cv::resize so slow?

I'm doing some edge detection on a live video feed: - (void)processImage:(Mat&)image; { cv::resize(image, smallImage, cv::Size(288,352), 0, 0, CV_INTER_CUBIC); edgeDetection(smallImage); cv::resize(smallImage, image,…
fredley
  • 32,953
  • 42
  • 145
  • 236
14
votes
2 answers

Android Face recognition & get similar faces from the database

In my application I'm going to implement an image search like Google image search. Only difference is here I'm searching only for human faces. Here's how it goes.. user take a picture of a person using the camera. my app should identify the face of…
Ramesh Jaya
  • 671
  • 1
  • 10
  • 16
14
votes
1 answer

Android Fatal signal 11 (SIGSEGV) at 0x00000040 (code=1) Error

I am working on an android application. In which I am getting users photo images(5 images)(Using opencv2.4.2 camera with face detection) and save into my database in the server using web service. For this I am using Opencv2.4.2 face detection…
SKK
  • 1,705
  • 3
  • 28
  • 50
14
votes
2 answers

'opencv2/opencv.hpp' file not found

I successfully installed OpenCV on Mac OS X 10.8.2. After that I configured Xcode 4.5.2 by following this guide by SSteve even that this guide was for Xcode 3.5.1 - everything was like it's suppose to be. My openCV dylib's are in: /usr/lib Always…
h4cky
  • 899
  • 1
  • 13
  • 33
14
votes
1 answer

How to train and predict using bag of words?

I have a folder of images of a car from every angle. I want to use the bag of words approach to train the system in recognizing the car. Once the training is done, I want that if an image of that car is given it should be able to recognize it. I…
ipunished
  • 684
  • 2
  • 6
  • 22
14
votes
4 answers

OpenCV Python calcOpticalFlowFarneback

Thanks a lot, if any people can help me. Im try, use a example of book "OReilly Programming Computer Vision with Python", at end of page 216. #!/usr/bin/env python import cv2 def draw_flow(im,flow,step=16): h,w = im.shape[:2] y,x =…
user1872896
  • 149
  • 1
  • 1
  • 3
14
votes
3 answers

OpenCV create Mat from byte array

In my C++ dll I am creating Mat from byte array: BYTE * ptrImageData; //Image data is in this array passed to this function Mat newImg = Mat(nImageHeight, nImageWidth, CV_8UC3, ptrImageData); The image is created with some gray shade not the…
user1858884
  • 159
  • 1
  • 2
  • 6
14
votes
2 answers

HOW TO use Homography to transform pictures in OpenCV?

I've two pictures (A and B) slightly distorted one from the other, where there are translation, rotation and scale differences between them (for example, these pictures:) Ssoooooooo what I need is to apply a kind of transformation in pic B so it…
marcelosalloum
  • 3,481
  • 4
  • 39
  • 63
14
votes
1 answer

How do I create my own haar cascade and apply it?

I am interested in creating my own haar cascade xml file, for use with python, to detect a certain logo (let's say it's the apple logo). I have tried following the instructions at http://docs.opencv.org/trunk/doc/user_guide/ug_traincascade.html and…
eran
  • 14,496
  • 34
  • 98
  • 144
14
votes
1 answer

Using OpenCV Mat images with Intel IPP?

I've recently started using Intel Performance Primitives (IPP) for image processing. For those who haven't heard of IPP, think of IPP as the analogue of MKL for image processing instead of linear algebra. I've already implemented a somewhat…
solvingPuzzles
  • 8,541
  • 16
  • 69
  • 112
14
votes
3 answers

OpenCV: transforming 3 channel image into 4 channel

I am trying to change 3-channel image into 4-channel like this: cv::VideoCapture video; video.open("sample.avi"); cv::Mat source; cv::Mat newSrc; int from_to = { 0,0, 1,1, 2,2, 3,3 }; for ( int i = 0; i < 1000; i ++ ) { video >> source; …
E_learner
  • 3,512
  • 14
  • 57
  • 88
14
votes
5 answers

OpenCV and python/virtualenv?

I'm working on a project in python that uses OpenCV (2.3.1), among other libraries. So far, I just apt-get installed everything, but now I want to share my code with someone that might not have everything installed already. So, virtualenv seems like…
Nate Parsons
  • 14,431
  • 13
  • 51
  • 67
14
votes
1 answer

GPUImage equivalent of cv::findContours

My app uses opencv's cv::findContours on a binary image. I now need to make it realtime. GPUImage has a cannyedge filter but I couldn't find anything related to findContours. Does GPUImage have anything that closely resembles findContours? If not,…
0xSina
  • 20,973
  • 34
  • 136
  • 253
14
votes
8 answers

Compiling opencv samples: unknown cmake command ocv_check_dependencies

I am trying to build the OpenCV samples which come with the source package and I get the following: CMake Error at CMakeLists.txt:10 (ocv_check_dependencies): Unknown CMake command "ocv_check_dependencies". I did install OpenCV using cmake…
scravy
  • 11,904
  • 14
  • 72
  • 127
14
votes
1 answer

Otsu thresholding for depth image

I am trying to substract background from depth images acquired with kinect. When I learned what otsu thresholding is I thought that it could with it. Converting the depth image to grayscale i can hopefully apply otsu threshold to binarize the…
bahti
  • 636
  • 1
  • 7
  • 21