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
15559 questions
67
votes
5 answers

Convert RGB to Black & White in OpenCV

I would like to know how to convert an RGB image into a black & white (binary) image. After conversion, how can I save the modified image to disk?
mohammed
  • 867
  • 1
  • 9
  • 9
65
votes
7 answers

How do I increase the contrast of an image in Python OpenCV

I am new to Python OpenCV. I have read some documents and answers here but I am unable to figure out what the following code means: if (self.array_alpha is None): self.array_alpha = np.array([1.25]) self.array_beta = np.array([-100.0]) #…
tsaebeht
  • 1,570
  • 5
  • 18
  • 32
65
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
  • 11,513
  • 31
  • 103
  • 174
64
votes
1 answer

Classification of detectors, extractors and matchers

I am new to opencv and trying to implement image matching between two images. For this purpose, I'm trying to understand the difference between feature descriptors, descriptor extractors and descriptor matchers. I came across a lot of terms and…
63
votes
2 answers

What is the difference between a disparity map and a disparity image in stereo matching?

I am new to stereo matching. I couldn't understand the concept of disparity. What are a disparity map and disparity image, and what is the difference between them?
user2522560
  • 783
  • 1
  • 7
  • 13
60
votes
12 answers

RuntimeError: Attempting to deserialize object on a CUDA device

I encounter a RunTimeError while I am trying to run the code in my machine's CPU instead of GPU. The code is originally from this GitHub project - IBD: Interpretable Basis Decomposition for Visual Explanation. This is for a research project. I tried…
60
votes
9 answers

Calculating percentage of Bounding box overlap, for image detector evaluation

In testing an object detection algorithm in large images, we check our detected bounding boxes against the coordinates given for the ground truth rectangles. According to the Pascal VOC challenges, there's this: A predicted bounding box is…
user961627
  • 12,379
  • 42
  • 136
  • 210
60
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.
  • 816
  • 1
  • 8
  • 13
59
votes
2 answers

CNN - Image Resizing VS Padding (keeping aspect ratio or not?)

While people usually tend to simply resize any image into a square while training a CNN (for example, resnet takes a 224x224 square image), that looks ugly to me, especially when the aspect ratio is not around 1. (In fact, that might change ground…
59
votes
8 answers

What are good algorithms for vehicle license plate detection?

Background For my final project at university, I'm developing a vehicle license plate detection application. I consider myself an intermediate programmer, however my mathematics knowledge lacks anything above secondary school, which makes producing…
Ash
  • 3,494
  • 12
  • 35
  • 42
58
votes
4 answers

How to add border around an image in opencv python

If I have an image like below, how can I add border all around the image such that the overall height and width of the final image increases but the height and width of the original image stays as-is in the middle.
Anthony
  • 33,838
  • 42
  • 169
  • 278
58
votes
4 answers

Logo recognition in images

Does anyone know of recent academic work which has been done on logo recognition in images? Please answer only if you are familiar with this specific subject (I can search Google for "logo recognition" myself, thank you very much). Anyone who is…
elijah
  • 1,669
  • 2
  • 12
  • 17
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
  • 20,215
  • 33
  • 138
  • 240
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
  • 90,700
  • 113
  • 281
  • 364
56
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
  • 15,548
  • 27
  • 101
  • 197