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
1 answer

Scanned Document - Text & Background clarity not good using OpenCV + iOS

After the scanning the document, I am applying the image processing using OpenCV library. I am not getting the quality of the scanned document like the Scannable iOS app. I am using below code for image processing: - (UIImage…
mital solanki
  • 2,394
  • 1
  • 15
  • 24
13
votes
6 answers

OpenCV 4.x+ requires enabled C++11 support compilation darknet fatal error

I just compiled and installed the last version of OpenCV 3.4.0 and I would like to compile darknet (for yolo object detection), but at compilation, I have gcc -Iinclude/ -Isrc/ -DOPENCV `pkg-config --cflags opencv` -DGPU…
FlavienRJ
  • 191
  • 1
  • 1
  • 7
13
votes
4 answers

OpenCV - Calibrate fisheye lens error (Ill-conditioned matrix)

I am trying to calibrate a fisheye lens following these instructions https://medium.com/@kennethjiang/calibrate-fisheye-lens-using-opencv-333b05afa0b0 where you can find the full code I'm using for the calibration part. I arrive at this point…
Francesco
  • 471
  • 1
  • 9
  • 18
13
votes
2 answers

What's the theory behind computing variance of an image?

I am trying to compute the blurriness of an image by using LaplacianFilter. According to this article: https://www.pyimagesearch.com/2015/09/07/blur-detection-with-opencv/ I have to compute the variance of the output image. The problem is I don't…
denis631
  • 1,765
  • 3
  • 17
  • 38
13
votes
3 answers

Detecting hair in a portrait image?

What would be the best approach for detecting and removing a person's hair in a simple portrait image ? Any useful libraries of algorithms ? I have been looking over openCV which looks like it could be of some use
Ewan
  • 159
  • 1
  • 1
  • 4
13
votes
1 answer

android.useDeprecatedNdk=true is no longer supported

I try to use OpenCv to build a facetracking camera app but I have a problem when I set up my OpenCv. I have this error I use the android.useDeprectedNdk=true in gradle.properties but it doesn't work.
13
votes
4 answers

ModuleNotFoundError: No module named 'cv2'

I have been working on this error for a long time now. I have Python 3.6 and Python 2.7. I have tried to install opencv 2 and 3 in Python 2.7 and Python 3.6 respectively. I know the python interpreter I am using and I can interchange between them…
hkhan
  • 843
  • 2
  • 19
  • 45
13
votes
4 answers

Checking version of OpenCV (cv)

I was checking the version of OpenCV installed previously in a system. I tried to check using from cv2 import __version__ Its gave me the following error No module named cv2 When I tried import cv, it's not giving me error. Is there a way to know…
Venkat kamal
  • 279
  • 2
  • 3
  • 8
13
votes
3 answers

Read video from bytes

I am writing simple REST API using Flask, which reads uploaded video and returns some JSON. Video is sent as file by POST request, with content type application/x-www-form-urlencoded. I want to process it using opencv, but I do not know how to read…
13
votes
2 answers

Load BytesIO image with opencv

I'm trying to load an image with OPENCV from an io.BytesIO() structure. Originally, the code loads the image with PIL, like below: image_stream = io.BytesIO() image_stream.write(connection.read(image_len)) image_stream.seek(0) image =…
Henrique
  • 328
  • 1
  • 2
  • 10
13
votes
4 answers

Blob extraction in OpenCV

I'm using OpenCV to filter an image for certain colours, so I've got a binary image of the detected regions. Now I want to erode those areas and then get rid of the smaller ones, and find the x,y coordinates of the largest 'blob' I was looking for…
amr
  • 1,255
  • 3
  • 15
  • 23
13
votes
3 answers

Tesseract installation in windows

I am currently working on optimal character recognition project using python 2.7,open computer vision in windows.To accomplish this task i came to know that it can be done by using tesseract (software).But, it cannot be installed on windows. I…
zeeshan
  • 131
  • 1
  • 1
  • 5
13
votes
1 answer

Iterations vs. Kernel Size in Morphological Operations (OpenCV)

I've been using morph opening in OpenCV to reduce noise outside of my ROI in images via opencv, and until now, whenever I need a higher degree of noise reduction I just randomly increase kernel size or increase the number of iterations until I'm…
pyhat
  • 155
  • 1
  • 1
  • 7
13
votes
11 answers

PyCharm OpenCV- autocomplete with import cv2.cv2, no errors with import cv2

I'm just getting started with PyCharm, python, and OpenCV, and I'm trying to set up my environment. I've installed all the necessary packages and I import OpenCV like so: import cv2 However, this does not autocomplete and shows warnings that the…
Socratic Phoenix
  • 556
  • 1
  • 7
  • 19
13
votes
1 answer

Stream realtime video between 2 computers using Python

I am trying to send my macbook air webcam video in realtime and receive it using python on another computer. The motivation for this is to be able to offload realtime image recognition tasks to a server. The server requires having access to the…
alexbhandari
  • 1,310
  • 12
  • 21
1 2 3
99
100