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

How to initialize array of cv::Mat with rows, cols and value?(In a c++ Class)

How to initialize an array with 10 Mat's? I tried: (Its working in function but not in class) cv::Mat outIm[10]; for(int i=0; i<10; i++) outIm[i] = Mat(rows, cols, CV_8UC3, cv::Scalar(0,0,0)); Is there something like below legal? cv::Mat…
Jai
  • 377
  • 2
  • 14
0
votes
4 answers

How do I read a text file of numbers into an array of arrays

In python, using the OpenCV library, I need to create some polylines. The example code for the polylines method shows: cv2.polylines(img,[pts],True,(0,255,255)) I have all the 'pts' laid out in a text file in the…
Brian P.
  • 206
  • 3
  • 14
0
votes
1 answer

Thin Plate Spline shape transformation run-time error [exited with code -1073741819]

I have been trying to warp an image my using opencv 3.1.0, Shape Tranformation class. Specifically, Thin Plate Sline Algorithm (I actually tried a block of code from Shape Transformers and Interfaces OpenCV3.0 ) But the problem is that I keep…
0
votes
0 answers

How to Read the BGR format RAW Image data from the Read buffer using opencv

I have one Read buffer which has BGR 8 bit raw Image data, I want to read it by using opencv Mat function, I tried below code but I am not getting proper Image frame, It seems like my program not reading Read buffer properly I tried this code …
Gagandeep
  • 11
  • 6
0
votes
0 answers

Detect green color in an image without using the HSV threshold values

I am trying to identify only green color in an image. That means, other than Green color (sample image attached) in the image the rest should be blacked out. Here is the original image: original image of a Rose with green leaves Here is the expected…
parupalu
  • 51
  • 2
  • 9
0
votes
1 answer

How to Read raw (YUV 4:2:2) format Image data from the memory

I am trying to read the raw YUV 4:2:2 (720p) data from the Read buffer, I mapped the physical address of the Read buffer to the virtual address. mem is a pointer which is pointing to Read buffer base address. I tried with below below-mentioned code…
Gagandeep
  • 11
  • 6
0
votes
0 answers

How to concatenate matrices along z axis using opencv

How to concatenate P M*N matrices to get a M* N* P matrix ?
Harjatin
  • 1,313
  • 1
  • 12
  • 22
0
votes
1 answer

OpenCV SVM Classifier Image Recognition

I am using C++ and OpenCV 3.3.1 I try to train a SVM with OpenCV my steps are: Preprocess the Image Feature Extraction with SURF creating the DataSet for learning positiv and negative Images reshape the Images 1 row 1 feature creating the…
Julian K.
  • 37
  • 1
  • 6
0
votes
0 answers

GVIM Syntax for CV2

I cant figure out how to highlight cv2 syntaxs, or any CV based syntaxs in gvim. any help? Im able to highlight python and other langs, but for computer vision am having trouble. this is in ubuntu 16.04lts
dxVxb
  • 41
  • 2
0
votes
1 answer

Use custom OpenCV install in ROS package

I am trying to build a ROS package in which I use a custom OpenCV 3.4 install in which I have CUDA enabled. The OpenCV install, in /usr/local, is working just fine, I can build and run samples from the GPU folder no problem using g++ -o houghlines…
Mr Squid
  • 1,196
  • 16
  • 34
0
votes
1 answer

Image retention in perspective transformation in OpenCV C++

I have an image of white paper on the desk, with a different orientation. Something like this: Now, I detected the white paper and obtained the coordinates of the trapezium. I now have another image, say of a keyboard like this: Now my aim is to…
Bms bharadwaj
  • 483
  • 5
  • 18
0
votes
1 answer

Compiling opencv3 get "libgdal.so.20 undefined reference"

While I try to compile opencv3 I got this error: ../../lib/libopencv_imgcodecs.so.3.4.2: undefined reference "TIFFReadDirectory@LIBTIFF_4.0" //usr/lib/libgdal.so.20: undefined reference "TIFFLastDirectory@LIBTIFF_4.0" …
Stefano Borzì
  • 1,019
  • 1
  • 15
  • 32
0
votes
0 answers

How to change data for cutting with OpenCV?

I'm making an android application with opencv that involves cutting images by hand and I'm having a problem. I recover the points that the user makes with his hand on the screen and then I apply a mask on the original image to get the part that the…
0
votes
1 answer

Separating image into channels by using numpy

I want to separate my image's channels. Then, I want to apply Otsu Thresholding to each one, and finally, merge them together. However, in line 4 of my code, it gives me the following error: File "C:/Users/Berke/PycharmProjects/goruntu/main.py",…
0
votes
1 answer

How to split colour channels in openCV without returning a gray scale image? I have tried the following it returns a gray scale image

How to split colour channels in openCV without returning a gray scale image? I have tried the following it returns a gray scale image? import cv2 import numpy as np img = cv2.imread("1.jpeg") (channel_b, channel_g, channel_r) = (img[:,:,0],…