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
Filter by
Sorted by
Tagged with
447 votes
12 answers
357k views

Image comparison - fast algorithm

I'm looking to create a base table of images and then compare any new images against that to determine if the new image is an exact (or close) duplicate of the base. For example: if you want to ...
meade's user avatar
  • 23k
429 votes
3 answers
270k views

Simple Digit Recognition OCR in OpenCV-Python

I am trying to implement a "Digit Recognition OCR" in OpenCV-Python (cv2). It is just for learning purposes. I would like to learn both KNearest and SVM features in OpenCV. I have 100 samples (i.e. ...
Abid Rahman K's user avatar
395 votes
10 answers
26k views

How to detect a Christmas Tree?

Which image processing techniques could be used to implement an application that detects the Christmas trees displayed in the following images? I'm searching for solutions that are going to work ...
karlphillip's user avatar
  • 92.7k
260 votes
15 answers
713k views

How to verify CuDNN installation?

I have searched many places but ALL I get is HOW to install it, not how to verify that it is installed. I can verify my NVIDIA driver is installed, and that CUDA is installed, but I don't know how to ...
alfredox's user avatar
  • 4,242
232 votes
9 answers
172k views

Simple and fast method to compare images for similarity

I need a simple and fast way to compare two images for similarity. I.e. I want to get a high value if they contain exactly the same thing but may have some slightly different background and may be ...
Albert's user avatar
  • 66.7k
217 votes
6 answers
46k views

How to remove convexity defects in a Sudoku square?

I was doing a fun project: Solving a Sudoku from an input image using OpenCV (as in Google goggles etc). And I have completed the task, but at the end I found a little problem for which I came here. ...
Abid Rahman K's user avatar
193 votes
6 answers
133k views

OpenCV C++/Obj-C: Detecting a sheet of paper / Square Detection

I successfully implemented the OpenCV square-detection example in my test application, but now need to filter the output, because it's quite messy - or is my code wrong? I'm interested in the four ...
dom's user avatar
  • 11.9k
174 votes
3 answers
217k views

How can I extract a good quality JPEG image from a video file with ffmpeg?

Currently I am using this command to extract the images: ffmpeg -i input.mp4 output_%03d.jpeg But how can I improve the JPEG image quality?
Daniel Gartmann's user avatar
170 votes
11 answers
119k views

Face recognition Library [closed]

I'm looking for a free face recognition library for a university project. I'm not looking for face detection. I'm looking for actual recognition. That means finding images that contain specified faces ...
Janusz's user avatar
  • 188k
152 votes
8 answers
231k views

Converting RGB to grayscale/intensity

When converting from RGB to grayscale, it is said that specific weights to channels R, G, and B ought to be applied. These weights are: 0.2989, 0.5870, 0.1140. It is said that the reason for this is ...
ypnos's user avatar
  • 51.1k
149 votes
7 answers
41k views

How to train an artificial neural network to play Diablo 2 using visual input?

I'm currently trying to get an ANN to play a video game and and I was hoping to get some help from the wonderful community here. I've settled on Diablo 2. Game play is thus in real-time and from an ...
zergylord's user avatar
  • 4,398
129 votes
13 answers
340k views

OpenCV & Python - Image too big to display

I have an image that is 6400 × 3200, while my screen is 1280 x 800. Therefore, the image needs to be resized for display only. I am using Python and OpenCV 2.4.9. According to OpenCV Documentation, ...
Zynk's user avatar
  • 2,955
120 votes
4 answers
294k views

OpenCV: draw a rectangle around a region

How can I use OpenCV in Python to draw rectangles around some regions within an image for object detection purposes?
user961627's user avatar
  • 12.6k
117 votes
10 answers
334k views

Choosing the correct upper and lower HSV boundaries for color detection with`cv::inRange` (OpenCV)

I have an image of a coffee can with an orange lid position of which I want to find. Here is it . gcolor2 utility shows HSV at the center of the lid to be (22, 59, 100). The question is how to choose ...
Student FourK's user avatar
114 votes
5 answers
427k views

How does one convert a grayscale image to RGB in OpenCV (Python)?

I'm learning image processing using OpenCV for a realtime application. I did some thresholding on an image and want to label the contours in green, but they aren't showing up in green because my image ...
user391339's user avatar
  • 8,555
114 votes
6 answers
85k views

What is the mAP metric and how is it calculated? [closed]

In Computer Vision and Object Detection, a common evaluation method is mAP. What is it and how is it calculated?
cerebrou's user avatar
  • 5,488
108 votes
6 answers
71k views

Automatic contrast and brightness adjustment of a color photo of a sheet of paper with OpenCV

When photographing a sheet of paper (e.g. with phone camera), I get the following result (left image) (jpg download here). The desired result (processed manually with an image editing software) is on ...
Basj's user avatar
  • 43.8k
105 votes
3 answers
53k views

What is "semantic segmentation" compared to "segmentation" and "scene labeling"?

Is semantic segmentation just a Pleonasm or is there a difference between "semantic segmentation" and "segmentation"? Is there a difference to "scene labeling" or "scene parsing"? What is the ...
Martin Thoma's user avatar
100 votes
7 answers
260k views

Combining Two Images with OpenCV

I'm trying to use OpenCV 2.1 to combine two images into one, with the two images placed adjacent to each other. In Python, I'm doing: import numpy as np, cv img1 = cv.LoadImage(fn1, 0) img2 = cv....
Cerin's user avatar
  • 63k
100 votes
4 answers
72k views

How do I choose between Tesseract and OpenCV? [closed]

I recently came across Tesseract and OpenCV. It looks like Tesseract is a full-fledged OCR engine and OpenCV can be used as a framework to create an OCR application/service. I tried using Tesseract ...
Legend's user avatar
  • 115k
90 votes
4 answers
54k views

Batch Normalization in Convolutional Neural Network

I am newbie in convolutional neural networks and just have idea about feature maps and how convolution is done on images to extract features. I would be glad to know some details on applying batch ...
akshata bhat's user avatar
  • 1,103
89 votes
6 answers
26k views

Viola-Jones' face detection claims 180k features

I've been implementing an adaptation of Viola-Jones' face detection algorithm. The technique relies upon placing a subframe of 24x24 pixels within an image, and subsequently placing rectangular ...
Paul Lammertsma's user avatar
86 votes
4 answers
72k views

Instance Normalisation vs Batch normalisation

I understand that Batch Normalisation helps in faster training by turning the activation towards unit Gaussian distribution and thus tackling vanishing gradients problem. Batch norm acts is applied ...
Ruppesh Nalwaya's user avatar
85 votes
7 answers
258k views

Converting an OpenCV Image to Black and White

How do you convert a grayscale OpenCV image to black and white? I see a similar question has already been asked, but I'm using OpenCV 2.3, and the proposed solution no longer seems to work. I'm ...
Cerin's user avatar
  • 63k
85 votes
5 answers
87k views

Image Processing: What are occlusions?

I'm developing an image processing project and I come across the word occlusion in many scientific papers, what do occlusions mean in the context of image processing? The dictionary is only giving a ...
HaggarTheHorrible's user avatar
85 votes
7 answers
23k views

How do I find Wally with Python?

Shamelessly jumping on the bandwagon :-) Inspired by How do I find Waldo with Mathematica and the followup How to find Waldo with R, as a new python user I'd love to see how this could be done. It ...
tdc's user avatar
  • 8,337
81 votes
4 answers
105k views

Detect and visualize differences between two images with OpenCV Python

I have two images and would like to make it obvious where the differences are. I want to add color to the two images such that a user can clearly spot all the differences within a second or two. For ...
PlsWork's user avatar
  • 2,008
78 votes
3 answers
76k views

How to define the markers for Watershed in OpenCV?

I'm writing for Android with OpenCV. I'm segmenting an image similar to below using marker-controlled watershed, without the user manually marking the image. I'm planning to use the regional maxima as ...
Tru's user avatar
  • 1,467
72 votes
11 answers
106k views

How to recognize vehicle license / number plate (ANPR) from an image? [closed]

I have a web site that allows users to upload images of cars and I would like to put a privacy filter in place to detect registration plates on the vehicle and blur them. The blurring is not a ...
Ryan O'Neill's user avatar
  • 5,525
69 votes
2 answers
43k views

How to verify the correctness of calibration of a webcam?

I am totally new to camera calibration techniques... I am using OpenCV chessboard technique... I am using a webcam from Quantum... Here are my observations and steps.. I have kept each chess square ...
rotating_image's user avatar
69 votes
12 answers
153k views

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 ...
Joshua 's user avatar
  • 807
67 votes
7 answers
255k views

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....
tsaebeht's user avatar
  • 1,630
67 votes
5 answers
177k views

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's user avatar
  • 867
65 votes
2 answers
60k views

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 ...
nkint's user avatar
  • 11.7k
64 votes
2 answers
72k views

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's user avatar
64 votes
1 answer
21k views

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 ...
hriddle's user avatar
  • 789
62 votes
9 answers
123k views

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, ...
user961627's user avatar
  • 12.6k
60 votes
8 answers
37k views

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 ...
Ryan R.'s user avatar
  • 816
60 votes
2 answers
27k views

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 ...
Yoni Keren's user avatar
  • 1,182
59 votes
8 answers
53k views

What are good algorithms for vehicle license plate detection? [closed]

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 ...
Ash's user avatar
  • 3,532
58 votes
9 answers
3k views

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 ...
Tae-Sung Shin's user avatar
58 votes
4 answers
81k views

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 ...
Anthony's user avatar
  • 34.8k
58 votes
4 answers
43k views

Logo recognition in images [closed]

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"...
elijah's user avatar
  • 1,679
57 votes
10 answers
59k views

Sobel filter kernel of large size

I am using a sobel filter of size 3x3 to calculate the image derivative. Looking at some articles on the internet, it seems that kernels for sobel filter for size 5x5 and 7x7 are also common, but I am ...
Aarkan's user avatar
  • 3,901
57 votes
5 answers
63k views

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 ...
Lazer's user avatar
  • 92.4k
56 votes
2 answers
24k views

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) ...
Maik Klein's user avatar
  • 15.8k
54 votes
2 answers
30k views

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, ...
Chris Arriola's user avatar
54 votes
6 answers
59k views

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....
memyself's user avatar
  • 12.3k
54 votes
2 answers
65k views

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 ...
Eric's user avatar
  • 1,118
53 votes
1 answer
61k views

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"?
jmnwong's user avatar
  • 1,617

1
2 3 4 5
316