Skip to content
tezvyn:

BRIEF: Fast, Compact Binary Feature Descriptors

Source: epfl.chMediumHow cards are made

BRIEF: Fast, Compact Binary Feature Descriptors

BRIEF describes image features as a compact binary string instead of a complex vector. This makes it extremely fast for real-time matching on low-power devices. The footgun: its raw form isn't rotation-invariant, trading that robustness for raw speed.

Why it exists

Traditional feature descriptors like SURF were often too computationally expensive for real-time applications on low-power hardware. BRIEF was created to provide a feature descriptor that is extremely fast to compute and match, enabling real-time computer vision tasks on devices like mobile phones.

The mental model

Instead of describing an image patch with a detailed vector of floating-point numbers, BRIEF creates a simple binary string—a compact fingerprint. It's generated by performing a series of simple "is pixel A brighter than pixel B?" tests within the image patch around a keypoint. This binary representation makes comparison incredibly cheap.

How it works

After a keypoint detector finds an interesting point, BRIEF takes a patch of pixels around it. It then performs a fixed set of intensity comparisons on pairs of pixels within that patch. For each pair, if the first pixel is brighter than the second, it appends a '1' to a bitstring; otherwise, it appends a '0'. The result is a binary vector. To compare two BRIEF descriptors, you calculate the Hamming distance between them—the number of positions at which the corresponding bits are different. This is just a bitwise XOR followed by a population count (counting the '1's), an operation that is extremely fast on modern CPUs with the POPCNT instruction.

When to use it

Use BRIEF when matching speed and computational efficiency are your primary concerns. It is ideal for real-time applications on resource-constrained devices, such as mobile phones or embedded systems. Its speed leaves significant CPU power available for subsequent tasks in the application pipeline. It is a general-purpose descriptor and can be combined with any keypoint detector.

When not to use it

Avoid the basic version of BRIEF when your application requires strong robustness to in-plane rotation. While it handles many photometric and geometric transformations, it is not inherently rotation-invariant like SURF or SIFT. If you need to match objects that can appear at any orientation, you may need a more robust (and slower) descriptor or a variant of BRIEF designed to handle rotation.

One canonical example

In performance tests, BRIEF proved to be almost two orders of magnitude faster to compute than the U-SURF-64 descriptor on a single CPU core. When matching 1000 points between image pairs from the standard "Wall" and "Fountain" datasets, its recognition accuracy was shown to be comparable to SURF, demonstrating its ability to be both fast and effective.

Interview question

What is the main trade-off BRIEF makes for its high performance?

  • a.Its feature extraction is computationally expensive.
  • b.It generally provides lower recognition accuracy.
  • c.It uses more memory to store feature descriptors.
  • d.It lacks inherent robustness to in-plane rotation.Correct
Why?

The card explicitly states that BRIEF's raw form isn't rotation-invariant, trading that robustness for raw speed, making it a primary limitation. The card also mentions it uses a "compact binary string" and has "comparable" accuracy to SURF, disproving options A and D. Its computation is described as "extremely fast," making C incorrect.

Just read this? Test yourself on what you have been reading.

Read the original → epfl.ch

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on computer vision — each one lists the topics its interview covers.

See open roles