Questions tagged [opencv3.1]

Use this tag only for questions that are specific to version 3.1 of OpenCV, for general questions use the [opencv] tag.

OpenCV is an open source computer vision library

Version 3.1 released in December 2015. Its documentation can be found here.

For more information, see .

340 questions
1
vote
1 answer

Is Intensity Slicing the Same with Color Maps Implementation in OpenCV?

I was really confuse between intensity slicing and color map implementation in OpenCV. Is the color maps implementation in OpenCV the same with the concept of intensity slicing? Can anyone clarify this to me. Your help will be very much appreciated.…
alyssaeliyah
  • 2,214
  • 6
  • 33
  • 80
1
vote
2 answers

Python: Perform Grey Image to RGB

I have a grey image and I want to convert it into RGB. How will I do it in OpenCV? image = cv2.imread("image.jpg", cv2.IMREAD_GRAYSCALE) cv2.imshow('Grey Scale Image', image) cv2.waitKey() backtorgb =…
alyssaeliyah
  • 2,214
  • 6
  • 33
  • 80
1
vote
1 answer

python cv2.face lacking arguments

the code attached below import cv2 import numpy as np recognizer = cv2.face recognizer.loadTrainingData('trainer/example.yml') #recognizer.read() cascadePath = "haarcascade_frontalface_default.xml" faceCascade =…
1
vote
0 answers

how to send image over TCP socket from raspberry pi (client) to server (laptop)?

I am using raspberry pi 3 model B and Rpi camera B.(OS is raspbian stretch) I want to send an image taken by raspberry pi to my laptop (ubuntu 16.04) via TCP.Raspberry pi and laptop are connected with wifi from router. But when I receive data,…
1
vote
1 answer

OpenCV python inRange method causes error in C++ module

I am getting the following error when I call my method [given after the error]. error: /feedstock_root/build_artefacts/opencv_1496434080029/work/opencv-3.2.0/modules/core/src/arithm.cpp:1984: error: (-215) lb.type() == ub.type() in function…
heretoinfinity
  • 1,528
  • 3
  • 14
  • 33
1
vote
0 answers

OpenCV template matching does not work if the object is moved farther or closer to the camera

I am working with template matching but i change picture distance program doesn't work Codes # -- coding: cp1254 -- import cv2 import numpy as np cap = cv2.VideoCapture(0) ret, frame = cap.read() template =…
1
vote
1 answer

Very precise line detection, openCV Java

I will start by explaining the problem in a real world application; I have a camera that is pointed at a dark surface. A paper feeder (just simple machine that spits out pages when it's told to by the controlling computer) feeds paper into the area…
Jesse Fogel
  • 75
  • 2
  • 10
1
vote
1 answer

How to use the PCACompute function from Python in OpenCV 3?

The cv2.PCACompute function worked well in OpenCV 2.4 using the following syntax : import cv2 mean, eigvec = cv2.PCACompute(data) The function exists in OpenCV 3.1, but raises the following exception : TypeError: Required argument 'mean' (pos 2)…
F.X.
  • 6,809
  • 3
  • 49
  • 71
1
vote
0 answers

accessing and changing multiple pixels in opencv using a vector of coordinates of those locations

I have a Mat matrix in openCV in c++, and I want to change the values in this matrix by providing the row and column positions in vectorial form. For example: Mat M = Mat::zeros(10,10,CV_8UC1); Mat IJ_coord = (Mat_(3,2) << 0,0, 1,0,…
1
vote
1 answer

Detecting simple geometric shapes using OpenCV [Java]

I'm programming a Java application that detects simple geometric shapes. The following Python code is used as a reference: How to detect simple geometric shapes using OpenCV This is some of the code [Python]: contours,h =…
user2426320
  • 81
  • 1
  • 11
1
vote
0 answers

Cmake make install fails with INSTALL cannot find opencv_annotation

Problem: I am installing OpenCV 3.1.0 with CUDA support in ubuntu 16.04 and for that I chose defined by myself destination folder instead of /usr/local . cmake and make go on properly, however I get an error upon make install (sudo make install does…
beginh
  • 1,133
  • 3
  • 26
  • 36
1
vote
1 answer

no libopencv_core.so in java.library.path hadoop

I was working in hadoop and suddenly once i created runnable jar for my image processing program this error occured it has relation with opencv native library path while using eclipse the path i can set using : //…
1
vote
0 answers

OpenCV 3: several identifiers like "imread" and "FaceRecognizer" are undefined

I've successfully built both latest OpenCV and OpenCV contrib from git on 64-bit Windows 10, using VS 2017. Now the problem is when trying to re-compile a program (source code) that previously used OpenCV 2.x The editor displays some errors, like…
anta40
  • 6,511
  • 7
  • 46
  • 73
1
vote
1 answer

Error with InitFont - OpenCV 3.1 (Python)

I am working on OpenCV 3.1 and I would like to know how I can replace: font = cv2.cv.InitFont(cv2.cv.CV_FONT_HERSHEY_SIMPLEX, 1, 1, 0, 1, 1) in OpenCV 3.1 because this line generates the error "module object has no attribute cv" and even if I…
Arthor
  • 11
  • 1
  • 3
1
vote
1 answer

OpenCV 3.1 optimization

I'm currently trying to implement an algorithm from a paper with OpenCV 3.1 on python 2.7 but the process is taking way too long. The section of my code that's giving me trouble looks something like this: width, height = mr.shape[:2] Pm = [] for i…
Mira
  • 1,983
  • 1
  • 11
  • 10