OpenCV can't detect color red correctly

Recently, I'm trying to use java OpenCV to detect the color of a Rubik's Cube. My Rubik's Cube has six colors including white, yellow, orange, red, blue and green. The color space I use is HSV color space. According to Wiki, each color has their uniq...
more »

2017-05-14 16:05 (0) Answers

FileStorage::WRITE .xml tag on opencv

I've been trying to write a nested .xml file with a vector<vector<Point>> data type in OpenCV (on C++). However, I have always one extra tag created within the loops: string filename = "test.xml"; FileStorage fs(filename, FileStorage::W...
more »

2017-04-22 19:04 (1) Answers

Remove glare from photo opencv

So, im using opencv to capture a document, scan it and crop it. When there is no lighting in the room, it works perfectly. When there is some light in the room, and there is a glare on the table and the document is near it, it also grabs the glare as...
more »

2017-04-18 13:04 (1) Answers

Java - Reading a frame in OpenCV

i have just started to learn openCV in java and i have setup my Eclipse IDE with all OpenCV java dependencies. Now i have a task in hand to extract a single frame from a video file which i have recorded in .avi file format. i searched from this lin...
more »

2017-02-26 10:02 (1) Answers

python opencv - blob detection or circle detection

I am having problems detecting circle areas. I tried it with the HoughCircles function from opencv. However even though the images are pretty similar the parameters for the funtion have to be different in order to detect the cirles. Another approac...
more »

2017-02-13 13:02 (2) Answers

Executing sudo make install in Eclipse CDT?

I'm contributing to OpenCV using Eclipse Neon. I edited the Build command in Project->Proprieties->C/C++ Build->Build command as sudo make -j8 install, so when I build the project, Eclipse compiles OpenCV and then install it in my system. However,...
more »

2017-01-30 19:01 (1) Answers

Access OpenCV documentation in spyder

I have Python 2.7.9 and OpenCV 3.1.0 installed on a Windows System. I'm using Spyder 2.3.2 and would love to access documentation for OpenCV in the IDE, however using Ctrl+I on cv2 functions/objects only shows No documentation available. According t...
more »

2017-01-10 10:01 (0) Answers

Average face - algorithm

Quesion and code is at the end I hope this question belongs here and not to the TCS's stack. I am trying to go through algorithms in Turk and Pentland's "Eigenfaces for Recognition". On page 74 one can read (last paragraph of left column): Let t...
more »

2017-01-03 22:01 (1) Answers

Opencv Python Crop Image Using Numpy Array

I am using OpenCV 3.1.0-dev and python 2.7. I am trying to crop out the black exterior of an image I have stitched. The struggle is that there are other pixels in the image that are black so cv2.findcontours returns a very interesting numpy array. ...
more »

2016-12-09 23:12 (1) Answers

How to run OpenCV code without OpenCv Manager

I am using OpenCV4Android version 2.4.10 and i test my code on Samsung Galayx GT-I9300. the problem i have is, that i must download Opencv Manager from play store so that my opencv code runs, otherwise the App would not start. I referred to some post...
more »

2016-11-18 17:11 (2) Answers

Remove background and noise from image

Im trying to remove the background from a video and get a binary images( or 8-bit) where value of the object that moves is 1 and static background is 0. something like this: at first I tried it with getting the difference absDiff() from running a...
more »

2016-11-06 07:11 (1) Answers

Global name 'camera' is not defined in python

In this script :- camera_port = 0 ramp_frames = 400 camera = cv2.VideoCapture(camera_port) def get_image(): global camera retval, im = camera.read() return im def Camera(): global camera for i in xrange(ramp_frames): temp = get_...
more »

2016-10-06 16:10 (1) Answers

Filling holes in image with OpenCV or Skimage

I m trying to fill holes for a chessboard for stereo application. The chessboard is at micro scale thus it is complicated to avoid dust... as you can see : Thus, the corners detection is impossible. I tried with SciPy's binary_fill_holes or simila...
more »

2016-09-24 16:09 (2) Answers