Questions tagged [computer-vision]

Use this tag for questions related to Computer Vision -- any aspect of software that enables computers to perceive, understand and react to their environment using cameras. For questions related to image filtering and quantification, use the tag [image-processing] instead.

Computer vision enables images, or sequences of images, to be processed by a computer using algorithms. There are many aspects to computer vision, including mathematics, physics (especially optics), imaging hardware, , and .

Some basic techniques used in computer vision are:

  • Image acquisition
  • Pre-processing
  • Feature Extraction
  • Detection/Segmentation
  • High-Level processing
  • Decision making
13127 questions
58
votes
9 answers

How to draw a crystal ball with two-color particles inside

I am just throwing an idea with possibility of closing. I need to draw a crystal ball in which red and blue particles randomly locate. I guess I have to go with photoshop, and even tried to make the ball in an image but as this is for research paper…
Tae-Sung Shin
  • 18,949
  • 31
  • 125
  • 230
57
votes
2 answers

Camera position in world coordinate from cv::solvePnP

I have a calibrated camera (intrinsic matrix and distortion coefficients) and I want to know the camera position knowing some 3d points and their corresponding points in the image (2d points). I know that cv::solvePnP could help me, and after…
nkint
  • 10,470
  • 30
  • 93
  • 159
57
votes
5 answers

How to use SIFT algorithm to compute how similar two images are?

I have used the SIFT implementation of Andrea Vedaldi, to calculate the sift descriptors of two similar images (the second image is actually a zoomed in picture of the same object from a different angle). Now I am not able to figure out how to…
Lazer
  • 79,569
  • 109
  • 264
  • 349
56
votes
8 answers

How can I determine distance from an object in a video?

I have a video file recorded from the front of a moving vehicle. I am going to use OpenCV for object detection and recognition but I'm stuck on one aspect. How can I determine the distance from a recognized object. I can know my current speed and…
Ryan R.
  • 776
  • 1
  • 7
  • 13
53
votes
6 answers

Writing robust (color and size invariant) circle detection with OpenCV (based on Hough transform or other features)

I wrote the following very simple python code to find circles in an image: import cv import numpy as np WAITKEY_DELAY_MS = 10 STOP_KEY = 'q' cv.NamedWindow("image - press 'q' to quit", cv.CV_WINDOW_AUTOSIZE); cv.NamedWindow("post-process",…
memyself
  • 9,999
  • 12
  • 56
  • 99
52
votes
2 answers

Custom loss function in Keras

I'm working on a image class-incremental classifier approach using a CNN as a feature extractor and a fully-connected block for classifying. First, I did a fine-tuning of a VGG per-trained network to do a new task. Once the net is trained for the…
Eric
  • 853
  • 3
  • 9
  • 22
51
votes
2 answers

What is the difference between feature detection and descriptor extraction?

Does anyone know the difference between feature detection and descriptor extraction in OpenCV 2.3? I understand that the latter is required for matching using DescriptorMatcher. If that's the case, what is FeatureDetection used for?
51
votes
2 answers

Should I calculate matrices on the GPU or on the CPU?

Should I prefer to calculate matrices on the CPU or GPU? Let's say I have the following matrices P * V * M , should I calculate them on the CPU so that I can send the final matrix to the GPU (GLSL) or should I send those three matrices separately…
Maik Klein
  • 13,812
  • 20
  • 88
  • 168
50
votes
5 answers

How to predict input image using trained model in Keras?

I'm only beginning with keras and machine learning in general. I trained a model to classify images from 2 classes and saved it using model.save(). Here is the code I used: from keras.preprocessing.image import ImageDataGenerator from keras.models…
ritiek
  • 1,654
  • 2
  • 14
  • 21
49
votes
4 answers

Explain Hough Transformation

I am just being adventurous and taking my first baby step toward computer vision. I tried to implement the Hough Transformation on my own but I just don't get the whole picture. I read the wikipedia entry, and even the original "use of the hough…
49
votes
10 answers

proportions of a perspective-deformed rectangle

Given a 2d picture of a rectangle distorted by perspective: I know that the shape was originally a rectangle, but I do not know its original size. If I know the pixel coordinates of the corners in this picture, how can I calculate the original…
48
votes
7 answers

Computing camera pose with homography matrix based on 4 coplanar points

I have 4 coplanar points in a video (or image) representing a quad (not necessarily a square or rectangle) and I would like to be able to display a virtual cube on top of them where the corners of the cube stand exactly on the corners of the video…
JimN
  • 703
  • 1
  • 6
  • 8
47
votes
17 answers

OpenCV Error: (-215)size.width>0 && size.height>0 in function imshow

I am trying to make a face tracker that combines Haar Cascade Classification with Lucas Kanade good feature detection. However, I keep getting an error that I cannot figure out what it means nor how to solve it. Can anyone help me here? Error: line…
user3377126
  • 1,743
  • 4
  • 23
  • 38
47
votes
2 answers

Computer Vision - filtering convex hulls and convexity defects with OpenCV

I have the problem with processing digital signals. I am trying to detect fingertips, similar to the solution that is presented here: Hand and finger detection using JavaCV. However, I am not using JavaCV but OpenCV for android which is slightly…
Marek
  • 3,451
  • 9
  • 37
  • 63
46
votes
1 answer

What is the definition of a "disparity map"?

I've been asked to implement an edge-based disparity map, but I fundamentally don't understand what a disparity map is. What is the definition of a "disparity map"?