Flag is a rather special recognition target in image recognition because of its non-rigid features with the location, scale and rotation characteristics. The location change can be handled well by the depth learning algorithm Convolutional Neural Networks (CNNs), but the scale and rotation changes are quite a challenge for CNNs. Since it has good rotation and gray scale invariance, the local binary pattern (LBP) is combined with grayscale stretching and CNNs to make LBP and grayscale stretching as CNNs pretreatment, which can not only significantly improve the efficiency of flag recognition, but can also evaluate the recognition effect through ROC, accuracy, MSE and quality factor.
In complex scene, the exact determination and division of color is the key to color flag recognition tasks. Aiming at the problem that the traditional recognition methods have low recognition accuracy and can not be identified in complex scene and multi-targets, this paper proposes a color threshold determination (CTD) method to identify color flag. Firstly, the color sample data set under different light conditions is constructed, and the filtering of the noise pixels is realized by the projection method in the HSV color space to obtain the final color decision threshold. Secondly, color decision is made for each pixel in the candidate region of interest detected by Gentle Adaboost cascade classifier based on HOG feature. Finally, the color feature is matched by the preset threshold, and the matching region is retained to obtain the final recognition results. Experiments show that the proposed approach has better performance in the color flag recognition task under complex scene. The recognition accuracy was 97.1%, the sensitivity was 90.70% and the specificity was 99.33%.