Remote QR code recognition based on HOG and SVM classifiers
QR codes have become useful and efficient data storage tools which are exploited in many commercial applications including product tracking, website redirection, etc. A QR code is a 2-dimensional barcode localised through three finder patterns (three squares characterised by a series of alternative black and white modules at ratios 1∶1∶3∶1∶1) placed in its three corners. QR codes are generally placed in different environments with complex backgrounds (overlapping text, pictures, etc.), and are often captured under unfavourable conditions such as poor lighting. These factors can significantly affect the recognition ability and thus may hinder correct QR code localisation and identification. In order to appropriately address these issues, in this paper, we present a QR code recognition algorithm based on histogram of oriented gradients (HOG) features combined with support vector machine (SVM) classifiers. Using HOG, we extract gradient features of each extracted pattern. Subsequently, the obtained features are passed to two linear SVM classifiers, one trained with finder patterns and one trained with alignment patterns, to remove irrelevant patterns. QR codes are then conveniently localised according to a pattern closeness constraint. In the last stage, the captured code is enhanced by applying a perspective correction followed by image binarisation and morphological processing. Finally, the patterns are decoded using an accurate 2-d barcode decoder. Our proposed approach is designed for an embedded systems using a Raspberry Pi equipped with a HD camera and a small robot carrying the equipment.