LDB - Local Difference Binary

An Ultrafast and Distinctive Binary Feature Description

Xin Yang1, Chong Huang2, Kwang-Ting (Tim) Cheng1

1Dept. of ECE, University of California, Santa Barbara, CA 93106, USA

2School of ICE, Beijing University of Posts and Telecommunications, Beijing, 100876, China

What is LDB ?

LDB (Local Difference Binary) is a highly efficient, robust and distinctive binary descriptor. The distinctiveness and robustness of LDB are achieved through 3 steps. First, LDB captures the internal patterns of each image patch through a set of binary tests, each of which compares the average intensity Iavg and first-order gradients, dx and dy, of a pair of image grids within the patch (Fig1. (a) and (b)). Second, LDB employs a multiple gridding strategy to capture the structure at different spatial granularities (Fig1. (c)). Coarse-level grids can cancel out high-frequency noise while fine-level grids can capture detailed local patterns, thus enhancing distinctiveness. Third, LDB selects a subset of highly-variant and distinctive bits and concatenates them to form a compact and unique LDB descriptor. Fig.1 illusrtaes the key idea of LDB feature extraction.

More details about LDB can be found in our papers:
[1] Yang, X., and K.-T. Cheng. Local Difference Binary for Ultra-fast and Distinctive Feature Description. IEEE Trans. on PAMI, vol. 36, no. 1, 2014.
[2] Yang, X., and K.-T. Cheng. Learning Optimized Local Difference Binariesfor Scalable Augmented Reality on Mobile Devices. IEEE Trans. on VCG, 2014.
[3] Yang, X., and K.-T. Cheng. LDB: An ultra-fast feature for scalable Augmented Reality on mobile devices. In Proc. of ISMAR, 2012.

Fig. 1 Illustration of Key Idea of LDB Feature Extraction


What is libLDB ?

libLDB is a C++ library for extracting an ultrafast and distinctive binary feature — LDB (Local Difference Binary) from an image patch. libLDB is very suitable for vision apps which require real-time performance, especially for apps running on mobile handheld devices, such as real-time mobile object recognition and tracking, markerless mobile augmented reality, mobile panorama stitching. This software is available under the GNU General Public License (GPL) v3.

libLDB is consist of 5 principle components: image pyramid construction, dominant orientation estimation, upright/rotated integral image construction, binary tests on pairwise grid cells and bit selection and concatenation. Fig.2 illustrates the workflow of LDB feature extraction in libLDB .

Fig. 2 Workflow of LDB Feature Extraction in libLDB

The latest version of source code can be download here. It can be redistributed and modified under the terms of the GNU General Public License version 3.

Detailed documentation of libLDB can be found here.

How to explore libLDB ?
w to explore libLDB?

In LDB initialization, it involves one tunable parameter:
_patchSize: the size of patch centered on keypoint

LDB::LDB(int _patchSize)

Once LDB is initialized, you can call the following function to compute descriptors.
_image: input image
_keypoints_1: input keypoints
_descriptors_1: output descriptors
_flag: input flag determining whether to rotate window

void LDB::compute( const Mat& _image, vector& _keypoints, Mat& _descriptors, bool _flag)

To make sure that this work, please check whether the version of OpenCV is 2.4.0 or above. If so, you can run the test program in this package.
_image1: the path of image1
_image2: the path of image2
_flag: 1 - rotate image window 0 – don’t rotate image window

./ldb _image1 _image2 _flag

We provide a sample code to demonstrate how to use libLDB for feature extraction. In this demo, we extract ORB points and compute LDB descriptors. Then we search its nearest neighbor using a brute-force descriptor matching for each point. The putative matches (e.g. the ratio between the shortest and second shortest distance is lower 0.8) are then used in homography estimation based on RANSAC. Figures below display exampler matching results based on LDB. The green box is the map of the left image on the right image. More results on the dataset ImageSequences can be found here.

The demo is implemented in Red Hat Enterprise Linux Server release 5.5 (Tikanga). The OpenCV version is 2.4.0 and GCC is 4.7.1. According to the following results, we can demonstrate that our descriptor is robust against occluding, rotation and scaling changes.


For any technical issues, you can reach us at xinyang@umail.ucsb.edu or chonghuang@umail.ucsb.edu.

Postal Address:
Harold Frank Hall, Rm 4110
UC Santa Barbara
Santa Barbara, CA 93106, USA