Questions tagged [opencv3.0]

OpenCV (Open Source Computer Vision) is a library for real time computer vision. (This tag is for questions about OpenCV 3.0. Use [opencv] for general questions.)

OpenCV is an open source computer vision library

Version 3.0 released in June 2015. Its documentation can be found here.

For more information, see .

2111 questions
21
votes
3 answers

OpenCV ORB descriptor: TypeError: Incorrect type of self (must be 'Feature2D' or its derivative)

I followed this simple OpenCV Feature Matching example exactly: import cv2 img = cv2.imread('box.png',0) # queryImage orb = cv2.ORB() # Initiate ORB detector # find the keypoints and descriptors with ORB kp1, des1 =…
Sam
  • 11,799
  • 9
  • 49
  • 68
20
votes
4 answers

Python OpenCV video format play in browser

I'm trying to create a video from a sequence of images and display it in a browser but from some weird reason no matter what codec or file format I use I get the following error: No video with supported format and mime type found Here is my…
Vali
  • 629
  • 2
  • 6
  • 14
20
votes
7 answers

Anaconda: cannot import cv2 even though opencv is installed (how to install opencv3 for python3)

I have Anaconda (version: conda 4.2.9, python3) installed and am trying to do import cv2 when I get the following error: ImportError: No module named 'cv2' With conda search cv2 I get this: opencv 2.4.2 …
Linda
  • 1,003
  • 1
  • 11
  • 25
20
votes
1 answer

AttributeError: 'module' object has no attribute 'ORB'

when I run my python code import numpy as np import cv2 import matplotlib.pyplot as plt img1 = cv2.imread('/home/shar/home.jpg',0) # queryImage img2 = cv2.imread('/home/shar/home2.jpg',0) # trainImage # Initiate SIFT detector orb =…
shar
  • 1,233
  • 6
  • 20
  • 30
19
votes
1 answer

Efficiently load a large Mat into memory in OpenCV

Is there a more efficient way to load a large Mat object into memory than the FileStorage method in OpenCV? I have a large Mat with 192 columns and 1 million rows I want to store locally in a file and load into memory then my application starts.…
user622194
18
votes
1 answer

How to check if point is placed inside contour?

I have drawn a contour around extreme points. Inside polygon figure I have others points. How to check if they are inside contour?
POV
  • 11,293
  • 34
  • 107
  • 201
16
votes
2 answers

How to detect multiple objects with OpenCV in C++?

I got inspiration from this answer here, which is a Python implementation, but I need C++, that answer works very well, I got the thought is that: detectAndCompute to get keypoints, use kmeans to segment them to clusters, then for each cluster do…
Suge
  • 2,808
  • 3
  • 48
  • 79
16
votes
2 answers

Removing black background and make transparent from grabcut output in python open cv

I have been trying to remove the black background from the grabcut output using python opencv. import numpy as np import cv2 img = cv2.imread(r'myfile_1.png') mask = np.zeros(img.shape[:2],np.uint8) bgdModel = np.zeros((1,65),np.float64) fgdModel…
Srikanth Bhandary
  • 1,707
  • 3
  • 19
  • 34
15
votes
2 answers

Opencv: Crop out text areas from license

I have the below image of a single drivers license, I want to extract information about the drivers license, name, DOB etc. My thought process is to find a way to group them line by line, and crop out the single rectangle that contains name,…
George
  • 3,757
  • 9
  • 51
  • 86
15
votes
4 answers

LineSegmentDetector in Opencv 3 with Python

Can a sample implementation code or a pointer be provided for implementing LSD with opencv 3.0 and python? HoughLines and HoughLinesP are not giving desired results in python and want to test LSD in python but am not getting anywhere. I have tried…
user1996684
  • 265
  • 1
  • 3
  • 8
15
votes
2 answers

Is sift algorithm invariant in color?

I will use sift in identifying a certain type of object what if that object change in color can it recognize it? i will use opencv library for sift cv2.xfeatures2d.SIFT_create()
jude
  • 360
  • 3
  • 12
15
votes
1 answer

Image Processing - Dress Segmentation using opencv

I am working on dress feature identification using opencv. As a first step, I need to segment t-shirt by removing face and hands from the image. Any suggestion is appreciated.
14
votes
1 answer

How to compress png file with opencv in python?

I tried this code: compression_params = [cv2.CV_IMWRITE_PNG_COMPRESSION, 9] img = cv2.imread('img1.png', cv2.IMREAD_UNCHANGED) cv2.imwrite('compress_img1.png', img, compression_params) But I obtain this error: AttributeError: module 'cv2' has…
A. Sarmiento
  • 145
  • 1
  • 1
  • 5
14
votes
2 answers

CMake error when building OpenCV - CMakeLists not match

I attempted to build OpenCV 3.1.0 on my Raspberry Pi 2B. Unfortunately, when I ran: cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D INSTALL_C_EXAMPLES=OFF \ -D INSTALL_PYTHON_EXAMPLES=OFF …
3Qax
  • 324
  • 1
  • 2
  • 12
14
votes
2 answers

OpenCV vs Matlab : Different Values on pixels with imread

I have encountered a problem with the function imread() in Matlab (2014) and OpenCV (3.0) on Windows 7 with jpg files. I don't have the same values by reading the same file jpg and the same pixel. Here are my 2 codes : (OpenCV code followed by the…
Nablast
  • 211
  • 2
  • 7