Another Example: Circle Detection

Slides:



Advertisements
Similar presentations
Perceptron Learning Rule
Advertisements

Presented by Xinyu Chang
電腦視覺 Computer and Robot Vision I
November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Computer Vision Lecture 18: Object Recognition II
Computer vision: models, learning and inference Chapter 13 Image preprocessing and feature extraction.
Computer Vision Lecture 16: Texture
Instructor: Mircea Nicolescu Lecture 15 CS 485 / 685 Computer Vision.
Instructor: Mircea Nicolescu Lecture 13 CS 485 / 685 Computer Vision.
Lecture 6: Feature matching CS4670: Computer Vision Noah Snavely.
A Study of Approaches for Object Recognition
Ensemble Tracking Shai Avidan IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE February 2007.
Lecture 4: Feature matching
Distinctive Image Feature from Scale-Invariant KeyPoints
Feature extraction: Corners and blobs
Distinctive image features from scale-invariant keypoints. David G. Lowe, Int. Journal of Computer Vision, 60, 2 (2004), pp Presented by: Shalomi.
Scale Invariant Feature Transform (SIFT)
Automatic Image Alignment (feature-based) : Computational Photography Alexei Efros, CMU, Fall 2006 with a lot of slides stolen from Steve Seitz and.
CS4670: Computer Vision Kavita Bala Lecture 8: Scale invariance.
Exercise Session 10 – Image Categorization
October 8, 2013Computer Vision Lecture 11: The Hough Transform 1 Fitting Curve Models to Edges Most contours can be well described by combining several.
Distinctive Image Features from Scale-Invariant Keypoints By David G. Lowe, University of British Columbia Presented by: Tim Havinga, Joël van Neerbos.
Computer vision.
Learning Visual Bits with Direct Feature Selection Joel Jurik 1 and Rahul Sukthankar 2,3 1 University of Central Florida 2 Intel Research Pittsburgh 3.
OBJECT RECOGNITION. The next step in Robot Vision is the Object Recognition. This problem is accomplished using the extracted feature information. The.
Reporter: Fei-Fei Chen. Wide-baseline matching Object recognition Texture recognition Scene classification Robot wandering Motion tracking.
September 23, 2014Computer Vision Lecture 5: Binary Image Processing 1 Binary Images Binary images are grayscale images with only two possible levels of.
776 Computer Vision Jan-Michael Frahm Fall SIFT-detector Problem: want to detect features at different scales (sizes) and with different orientations!
Fitting: The Hough transform
Lecture 7: Features Part 2 CS4670/5670: Computer Vision Noah Snavely.
Distinctive Image Features from Scale-Invariant Keypoints David Lowe Presented by Tony X. Han March 11, 2008.
October 16, 2014Computer Vision Lecture 12: Image Segmentation II 1 Hough Transform The Hough transform is a very general technique for feature detection.
776 Computer Vision Jan-Michael Frahm Spring 2012.
Robotics Chapter 6 – Machine Vision Dr. Amit Goradia.
Recognizing specific objects Matching with SIFT Original suggestion Lowe, 1999,2004.
776 Computer Vision Jan-Michael Frahm Spring 2012.
April 21, 2016Introduction to Artificial Intelligence Lecture 22: Computer Vision II 1 Canny Edge Detector The Canny edge detector is a good approximation.
Face recognition using Histograms of Oriented Gradients
SIFT Scale-Invariant Feature Transform David Lowe
CS262: Computer Vision Lect 09: SIFT Descriptors
Interest Points EE/CSE 576 Linda Shapiro.
Lecture 13: Feature Descriptors and Matching
Presented by David Lee 3/20/2006
Lecture 07 13/12/2011 Shai Avidan הבהרה: החומר המחייב הוא החומר הנלמד בכיתה ולא זה המופיע / לא מופיע במצגת.
Distinctive Image Features from Scale-Invariant Keypoints
Mean Shift Segmentation
Computer Vision Lecture 12: Image Segmentation II
Feature description and matching
Common Classification Tasks
Computer Vision Lecture 5: Binary Image Processing
Fitting Curve Models to Edges
CAP 5415 Computer Vision Fall 2012 Dr. Mubarak Shah Lecture-5
Computer Vision Lecture 16: Texture II
From a presentation by Jimmy Huff Modified by Josiah Yoder
Local Binary Patterns (LBP)
Brief Review of Recognition + Context
Creating Data Representations
Morphological Operators
Outline Announcement Perceptual organization, grouping, and segmentation Hough transform Read Chapter 17 of the textbook File: week14-m.ppt.
Introduction to Artificial Intelligence Lecture 24: Computer Vision IV
CSE 185 Introduction to Computer Vision
Fourier Transform of Boundaries
Lecture VI: Corner and Blob Detection
Feature descriptors and matching
Lecture 5: Feature invariance
Lecture 5: Feature invariance
Introduction to Artificial Intelligence Lecture 22: Computer Vision II
Random Neural Network Texture Model
Presentation transcript:

Another Example: Circle Detection Task: Detect any circular objects in a given image. Here, the output space is three-dimensional: center coordinates (k, l) and radius r. The math is simpler here: If there is an edge at position (i, j) in the input image, add a vote for all positions (k, l, r) in the Hough space for which we have: (i-k)2 + (j-l)2 = r2 April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Another Example: Circle Detection April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Texture Gradient April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Texture Gradient April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Texture Gradient April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

ORB (Oriented FAST and Rotated BRIEF) Question: How can we use the computed image features to recognize objects (i.e., object classes)? Let us first look at the ORB algorithm that improves on the FAST and BRIEF methods to recognize arbitrary object classes. Problem: BRIEF is only very little rotation and scale invariant. Solution: First, enhance FAST to determine the orientation of the corners that it detects. To do that, let us first look at moments. April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Oriented FAST Moments are useful for a variety of purposes in computer vision. For example, the centroid (center of gravity) G of an image patch is given by: April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Oriented FAST Now let us compute the centroid G for the square patch that embeds the FAST circle for a detected corner: Then the orientation  of the vector from corner C to centroid G is given by: G where atan2(y, x) is the quadrant-aware variant of arctan. April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Oriented FAST In order to make FAST less scale-dependent, compute an image pyramid and apply FAST at each level. April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Oriented FAST Compute a total of N keypoints for each image. To do that, set the FAST threshold low enough to generate at least N keypoints. Then pick the N keypoints with the strongest FAST responses. Each of the resulting keypoints now includes orientation information that can be used to make the BRIEF features rotation-invariant. The basic idea is that we rotate the BRIEF features to match the orientation of keypoints. April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Rotated BRIEF Let us say that we have n BRIEF pairs (a1, b1), …, (an, bn). Then we can write them as a matrix S: Using a rotation matrix R for the orientation  of a given keypoint, we compute a rotated version S of the BRIEF pairs as follows; April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Rotated BRIEF The resulting matching of BRIEF pairs is (ideally) rotation-invariant. In order to avoid the matrix multiplication with every test, we can pre-compute rotated brief masks for 0, 12, 24, …, 348 and pick the one closest to the desired orientation. We can also optimize the selection of BRIEF pairs instead of using random distributions, but that is beyond the scope of our discussion. April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV ORB Results April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV ORB Results April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Rotated BRIEF The resulting matching of BRIEF pairs is (ideally) rotation-invariant. In order to avoid the matrix multiplication with every test, we can pre-compute rotated brief masks for 0, 12, 24, …, 348 and pick the one closest to the desired orientation. We can also optimize the selection of BRIEF pairs instead of using random distributions, but that is beyond the scope of our discussion. April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Bag-of-Keypoints Approach We still have not answered the initial question: How can we use the computed image features to recognize objects (i.e., object classes)? One possible approach is called “Bag of Keypoints.” We compute ORB feature descriptors for all test images. Then we perform a cluster analysis on the set of all descriptors (for example, using k-means). The centers of these clusters are our visual words, forming the vocabulary. April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Bag-of-Keypoints Approach For each training image, determine the closest visual word for each keypoint. Create a histogram of matched visual words. April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Bag-of-Keypoints Approach These histograms form the feature vectors for the training images. They should be similar within object classes and distinct between classes. Then a classifier can be trained on these data and should be able to categorize the feature vectors of new (test) images. April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Face Recognition In face images, we can expect certain features to always appear in roughly the same relative location and orientation. April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Face Recognition Therefore, when our goal is to recognize people from their face images, we do not have to determine the location of these features. Instead, we can normalize the face images as best as possible (for example, make sure that the eyes are always in the same two image positions) and then compute descriptors for fixed sections of the images. The most popular and successful descriptor of this kind is referred to as Local Binary Patterns (LBPs). April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Local Binary Patterns For each pixel in a given section, we look at its 8 neighbors (we can also pick neighbors at radii greater than 1; radius 2 is most popular). Then we form a binary string by looking at each neighbor in a specified order and adding a “1” to a binary string if it is brighter than the center pixel and “0” otherwise. The binary string can be interpreted as a number. April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Local Binary Patterns Different patterns (numbers) describe different types of gradients, i.e., local changes in intensity. A consistent gradient should result in exactly one uninterrupted sequence of 1s and the remaining bits should be 0s, as in the 5 examples below: There are exactly 58 patterns of this kind. April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Local Binary Patterns For a given area of pixels, we can now compute how many fall into each of these 58 categories or the “inconsistent” category. This results in a histogram with 59 bins. We can split a given face image into, for example, 76 sections and obtain a histogram for each section. Then we concatenate these histograms to obtain a feature vector that describes the given face image. In our example, these feature vectors have 7659 = 2478 elements. April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Local Binary Patterns Some of these sections are more important for recognition than others, so we may assign weights: April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV

Introduction to Artificial Intelligence Lecture 24: Computer Vision IV Local Binary Patterns For LBP descriptors Aij and Bij and weights wj, with bins i and sections j, a good similarity measure is: April 28, 2016 Introduction to Artificial Intelligence Lecture 24: Computer Vision IV