# Oriented FAST and Rotated BRIEF (ORB)

## Learn how to use the fastest and efficient alternative to SIFT

May 31, 2019 · 3 min read

So first let’s get a general idea about what it does & how it works. Then we’ll see both of these algorithms separately i.e. FAST and BRIEF. Fast and brief, are a feature detection in a vector creation algorithm respectively.

ORB, starts by finding special regions in an image called key points. Key points are the highly-distinctive locations in an image. For example, the edges of an image (where the brightness varies i.e where the pixel values change sharply ).

1. First, it uses FAST to find key points, then applies a Harris corner measure to find top N points among them. FAST stands for Features from Accelerated Segments Test, and it quickly selects key points by comparing the brightness levels in a given pixel area.
2. BRIEF, to create feature vectors.

# Feature Detection using FAST( Features from Accelerated Segments Test):

1. Select a pixel p in the image which is to be identified as an interesting point or not. Let its intensity be I.
2. Select the appropriate threshold value t.
3. Consider a circle of 16 pixels around the pixel under test. (See the image below).

pixel ‘p’ is selected as a key point if there are at least a pair of consecutive pixels that are either brighter or darker than p. This optimization reduces the time required to search an entire image for key points by a factor of four.
So, the key points found by FAST, give us information about the location of an object defining edges in an image.
One problem is that FAST doesn’t compute the orientation. So what about rotation invariance? The answer is: Machine Learning a Corner Detector and Non-maximal Suppression.

# BRIEF (Binary Robust Independent Elementary Features):

The second part of the ORB algorithm is to take the key points found by the FAST algorithm and turn those into feature vectors that together can represent an object. To create feature vectors, ORB uses a BRIEF algorithm.

It basically creates binary feature vectors from a set of key points. As we already know a binary feature vector, is also known as a binary descriptor, which is just a feature vector that contains only ones and zeros.

BRIEF provides a shortcut to find the binary strings directly. It takes a smoothened image patch and selects a set nd(x,y) location pairs in a unique way and then pixel intensity comparisons are done on these location pairs. For mathematical aspects, you can look up: OpenCV documentation

In short, BRIEF is a faster method feature descriptor calculation and matching. It also provides a high recognition rate unless there is a large in-plane rotation.

Check out its implementation code on GitHub.

Written by

## More From Medium

### Data Scientist Coding Exercise

Mar 19 · 6 min read

#### More from Towards AI

Apr 5 · 6 min read

### Image Filtering

Mar 28 · 5 min read

#### 115

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just \$5/month. Upgrade