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
10
votes
2 answers

Bounding box on objects based on color python

I try to draw a bounding box on every object in this picture, i wrote this code from documentation import cv2 as cv2 import os import numpy as np img = cv2.imread('1 (2).png') img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY); ret,thresh =…
Zeyad Etman
  • 2,250
  • 5
  • 25
  • 42
10
votes
0 answers

Difference Between OpenCV's Haar Cascade Classifiers

OpenCV provides several Haar Cascade classidiers for face detection: - haarcascade_frontalface_alt.xml - haarcascade_frontalface_alt2.xml - haarcascade_frontalface_alt_tree.xml - haarcascade_frontalface_default.xml I wonder what is the difference…
mohaghighat
  • 1,293
  • 17
  • 29
10
votes
1 answer

How to generate a valid point cloud representation of a pair of stereo images using OpenCV 3.0 StereoSGBM and PCL

I have recently started working with OpenCV 3.0 and my goal is to capture a pair of stereo images from a set of stereo cameras, create a proper disparity map, convert the disparity map to a 3D point cloud and finally show the resulting point cloud…
emasnavi
  • 462
  • 4
  • 13
10
votes
2 answers

How to convert CvMat* to cv::Mat in OpenCV3.0

In opencv2.4.10 which I used before, conversion from CvMat* to cv::Mat can be done as below. CvMat *src = ...; cv::Mat dst; dst = cv::Mat(src); However, in opencv3.0 rc1 cannot convert like this. In certain website, this conversion can be done as…
Toshi
  • 103
  • 1
  • 5
9
votes
1 answer

setting parameters of openCV tracking API in python

I'm trying to use openCV tracking API in Python for object tracking. I tried the code in this link and don't have any problem running the code. But, looking at the openCV documentation here, I realized there are parameters for each of the tracking…
Miranda
  • 565
  • 1
  • 10
  • 27
9
votes
1 answer

How can I read/write a matrix from a persistent XML/YAML file in OpenCV 3 with Python?

I've been trying to read and write matrices to persistent file storage (for example, XML) with Anaconda's current cv2 (which I believe is actually OpenCV 3.x). I looked at the solutions online for this, and people reference something done like…
Krupip
  • 4,404
  • 2
  • 32
  • 54
9
votes
1 answer

How to Detect the bounds of a Passport page with OpenCV?

I am trying to develop a scanner that can scan a page of a Passport with the camera. So from a Passport page like this: I'd like to crop out the marked part. I have written code for edge detection using OpenCV which finds the contours and then…
Mehedi
  • 394
  • 1
  • 3
  • 19
9
votes
2 answers

How to correctly link opencv3 under ROS Indigo (using CMake)?

Am not being able to link opencv3 that I installed myself separately from ros. Am getting this error ../devel/lib/libirTest.so: undefined reference to `cv::ORB::create(int, float, int, int, int, int, int, int, int)' ../devel/lib/libirTest.so:…
Courier
  • 920
  • 2
  • 11
  • 36
9
votes
0 answers

OpenCV crashes after a short time in Android app

I have an app which performs some image stitching and uses OpenCV. It used to work but all of a sudden it crashes (randomly?) all of the time. I don't know why this happens, I didn't change the code, but also didn't try that feature for several…
j00hi
  • 5,420
  • 3
  • 45
  • 82
9
votes
3 answers

Using OpenCL accelerated functions with OpenCV3 in Python

OpenCV3 introduced its T-API (Transparent API) which gives the user the possibility to use functions which are GPU (or other OpenCL enabled device) accelerated, I'm struggling to find how to tap into that with Python. With C++ there are calls like…
Arqu
  • 419
  • 1
  • 6
  • 18
9
votes
3 answers

OpenCV 3 Tracker won't work after reinitialization

I have issue using OpenCV 3 tracking module for tracking. It behaves same, either I use interface class (cv::Tracker) or class with implementation (like cv::TrackerMedianFlow or cv::TrackerMIL, etc). Sample is a bit modified sample from OpenCV…
Nikola
  • 101
  • 1
  • 2
  • 4
9
votes
1 answer

Disable OpenCL in OpenCV completely

I want to build a static version of OpenCV (3) with OpenCL disabled. To do so, I am using cmake -D WITH_OPENCL=OFF -D BUILD_SHARED_LIBS=OFF when compiling OpenCV, among other parameters (which disable other modules that I don't need). The output of…
9
votes
3 answers

contrib module missing in opencv 3.0?

I am using OpenCV 3.0 beta. I tried to create a face recogniser using createLBPHFaceRecognizer(); class as, **Ptr model = createLBPHFaceRecognizer();** the error I have is **error: 'createLBPHFaceRecognizer' was not…
9
votes
3 answers

Is cv2.cv missing in OpenCV 3.0?

I've just installed OpenCV 3 on Win7 for using with Python 2.7. I've copied cv2.pyd to /DLLs. Unfortunately many examples I've tried, don't work, because cv2.cv seems to be missing in OpenCV3 Is there a replacement for it? Is there a table of new…
Valentin H
  • 7,240
  • 12
  • 61
  • 111
8
votes
2 answers

Shifting an image by x pixels to left while maintaining the original shape

I want to shift an image by x pixels while maintaining the original shape. I tried the following: import cv2 img = cv2.imread("roi.jpg") shift = img[:,x:size[1]] But the problem with the above approach is that, the original shape of the image is…
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328