Image texture characteristic extracting method
Technical field
The present invention relates to image processing field, especially a kind of image texture characteristic extracting method。
Background technology
Object detection is one of key problem of computer vision。The object detecting method of Corpus--based Method is mainly by machine learning, and from a series of training datas, training obtains a grader, then utilizes grader that input window is identified。What object detecting method was crucial have 2 points, first feature extraction, it two is classifier design。The purpose of feature extraction is to reduce the dimension of data, obtains reflecting the feature of thingness, thus convenient classification。The features such as good feature should have that separating capacity is strong, calculate simple, strong robustness and form is simple。Classifier design belongs to machine learning category, its objective is to obtain that computation complexity is relatively low and the good grader of generalization。
Histogram of gradients (HistogramofOrientedGradients, HOG) is characterized by a kind of Feature Descriptor for carrying out object detection, and the verification and measurement ratio of existing HOG feature extracting method is still relatively low, limits its popularization and application in object detection。Textural characteristics is the build-in attribute of body surface, is also a kind of key character of image, shows as the change of gray scale or color, the characteristic such as sparse, smooth, systematicness reflecting image-region。Be primarily used for the textural characteristics of object detection based on the Texture descriptor of LBP, it is with statistics with histogram local grain change information。It has plurality of advantages, and such as computer complexity is low, time cost is little, dull grey scale change is had invariance, parameter is arranged simply, classification capacity is strong。It obtains research widely and application in fields such as human face detection and tracing, pedestrian detection, moving object real-time tracking, image retrieval and background modelings。Based in the pedestrian detection algorithm of textural characteristics, most documents is devoted to the impact studying single textural characteristics to pedestrian detection performance on the one hand, they are by the extracting mode of variation characteristic, intensive description or pyramid description etc., continue to optimize the performance of single textural characteristics, it is enable to detect performance comparable with HOG feature, even slightly it is better than HOG feature, but considerably increases computation complexity。
Texture is a kind of to reflect the visual signature of homogeneity phenomenon in image, and what it embodied body surface has slowly varying or periodically variable surface textural alignment attribute。Textural characteristics shows as the gray scale of image or the change of color, and it shows the characteristic such as sparse, smooth of image-region by the intensity profile of pixel and surrounding space neighborhood thereof。Local binary patterns (LocalBinaryPattern, LBP) is for describing the operator of image local textural characteristics in field of machine vision, and it has, and calculating is simple, the significant advantage such as rotational invariance, gray scale invariance。It is widely used in fields such as recognition of face, shadow removal, pedestrian detection, image retrieval and background modelings。
Summary of the invention
It is an object of the invention to: providing a kind of image texture characteristic extracting method, it improves the verification and measurement ratio of object detection, and simple, to overcome the deficiencies in the prior art。
The present invention is achieved in that image texture characteristic extracting method, comprises the steps:
1) image to be detected inputted;
2) to the image zooming-out to be detected of input by class Haar method texture feature extraction rectangular histogram;
3) extract the central point pixel of image to be detected and its up and down, left and right and four angular vertexs compare acquisition textural characteristics rectangular histogram;
4) cascade image step 2 to be detected) and step 3), thus obtaining final pedestrian to describe sub-textural characteristics。
Step 2) described in extraction by class Haar method texture feature extraction rectangular histogram, specific as follows:
A) level and vertical direction local binary patterns feature forming step: take in the image-region of 3 × 3 both horizontally and vertically first and the third line pixel value summation compare;
B) diagonal zones local binary patterns feature forming step: take four three adjacent pixel pixel value summations of angle pixel in the image-region of 3 × 3, the upper left corner and lower right field are carried out difference comparsion, the upper right corner and region, the lower left corner are carried out difference comparsion;
C) local binary patterns feature forming step: define a tetrad by step a) and step b), to the raw 16 dimension histogram features of each block common property。In level, vertical and diagonally opposed pixel value and the absolute value that carries out differing from show that optimized threshold value compares with experiment, it is thus achieved that binary system in adding the process that rectangular histogram is often one-dimensional to, add weighted value。
The central point pixel extracting image to be detected described in step 3) and its upper and lower, left and right and four angular vertexs compare acquisition textural characteristics rectangular histogram, specific as follows:
A) central pixel point and up and down, left and right pixel local binary patterns feature forming step: take 2 times of center pixel pixel value be adjacent respectively upper and lower, left and right pixel values and compare;
B) central pixel point and four angle pixel local binary patterns feature forming step: take 2 times of center pixel pixel value with its upper left corner, lower right corner corner pixels value and compare;Take 2 times of center pixel pixel value with its upper right corner, lower left corner corner pixels value and compare;
C) tetrad is defined by step a) and step b), to the raw 16 dimension histogram features of each 3 × 3 image-region common property。Pixel value and carry out the absolute value that differs from and show that optimized threshold value compares with experiment, it is thus achieved that binary system in adding the process that rectangular histogram is often one-dimensional to, add margin of image element as weight。
Cascade image step 2 to be detected described in step 4)) and step 3), specifically: concatenation step 2) and step 3), it is normalized, it is thus achieved that the feature histogram of 32 dimensions of each piece, window with 16 × 16 carries out intensive scanning, will produce the feature of 3360 dimensions at the image of 64 × 126。
Local binary patterns feature forming step described in step c) is: absolute value pixel value and carrying out differed from and experiment show that optimized threshold value compares, it is thus achieved that binary system in adding the process that rectangular histogram is often one-dimensional to, add pixel value'sWith as weight。
6. the image texture characteristic extracting method according to claim 1,3 or 4, it is characterized in that: feature forms unit, concatenation step 3) and step 4), it is normalized, obtain the feature histogram of 32 dimensions of each piece, window with 16 × 16 carries out intensive scanning, will produce the feature of 3360 dimensions at the image of 64 × 126。
Owing to have employed above technical scheme, the present invention is by providing a kind of image characteristics extraction, training, detection method。Original image normalization reduces illumination variation,ShadeWith the impact of noise, feature extraction adopts class Haar method, remains with the edge gradient information in original image, simultaneously by Correlation Centre point and its point up and down, four, to angle point, plus weight information in characteristic extraction procedure, compensate for the deficiency of conventional texture feature;The compound mode of feature greatly reduces characteristic dimension, and final feature extracting method, when pedestrian detection, has less intrinsic dimensionality and training faster and detection speed compared to conventional textural characteristics, and verification and measurement ratio obtains and is correspondingly improved simultaneously。
Accompanying drawing explanation
Fig. 1 is the human body edge correspondence Haar feature diagram of the testing image of embodiments of the invention;
Fig. 2 is the local binary feature calculation matrix of embodiments of the invention;
Fig. 3 be embodiments of the invention center pixel and surrounding pixel between calculate matrix;
The block that Fig. 4 is 16 × 16 of embodiments of the invention produces 32 bin rectangular histograms。
Detailed description of the invention
Embodiments of the invention: image texture characteristic extracting method, comprise the steps:
Input image to be detected;
In order to reduce the impact on texture such as illumination variation or noise, with formula (4), image is carried out initial normalization。Wherein νi, νi` represents the gray value of the forward and backward any pixel of image normalization, table ν respectivelymaxShow the maximum of all pixel gray values。
1, Haar-LBP textural characteristics
In the present embodiment, Haar-LBP feature thinking derives from relation between body local edge and background and constitutes similar with Haar feature;As shown in Figure 1, from Fig. 1 (a) it may be seen that, shoulder people, head, the places such as waist (in figure shown in square frame), with the Haar feature similarity shown in Fig. 1 (b), so we can be designed that shown in Fig. 2 calculating matrix, Fig. 2 (a) and Fig. 2 (b) calculated level and characteristic matrix, Fig. 2 (c) and Fig. 2 (d) calculates the right diagonally opposed eigenmatrix of left diagonal sum, describes as follows with formula (1):
Threshold tau in above-mentioned formula1It it is an empirical value;One the block symbiosis of Haar-LBP feature becomes the feature histogram of 16 dimensions;Haar-LBP local grain calculates matrix, and human body edge and background characteristics texture are had reasonable expression ability;
2, RCP-LBP feature
Above-mentioned local binarization texture calculates matrix, have ignored the relation between center pixel and surrounding pixel;In order to describe the relation between center pixel and surrounding pixel, we adopt the eigenmatrix being illustrated in fig. 3 shown below, and computing formula is as shown in (2):
Above-mentioned formula threshold tau2It it is an empirical value;Mono-block symbiosis of RCP-LBP becomes the feature histogram of 16 dimensions。
Features described above is weighted, and weighting scheme is when carrying out the statistics with histogram of block, and the weighting of the amplitude of respective histogram is no longer 1, but the absolute value of 8 surrounding pixel points and the difference of the gray value of central pixel point and, as shown in formula (3)。WeightDescribing the proportion of different 3 × 3 neighborhood territory pixels and center pixel difference, the weighting comparing common texture feature amplitude is all the situation of 1, uses the method for Weight to make feature specifically have higher discriminant classification ability。
3, feature cascade
Cascade H aar-LBP and RCP-LBP, finally carries out L1-Sqrt mode normalization to cascade nature, reduces the impact of illumination variation, shade or noise。Forming final feature, each piece of symbiosis of this feature becomes 32 dimensional feature rectangular histograms, as shown in Figure 4。
For the sample image of 64 × 128, we select the block of 16 × 16, and block overlap step-length is 8, block horizontal direction move generation 7 blocks, 15 blocks of vertically moveable generation, namely block add up to 7 × 15=105, last intrinsic dimensionality is 105 × 32=3360。This feature pedestrian detection rate on INRIA data base is higher than the LBP of invariable rotary, close with the textural characteristics UniformLBP of uniform pattern, slightly below the LBP feature of basic model。It is maximum is advantageous in that characteristic dimension significantly reduces, and is greatly accelerated the speed of pedestrian's training and detection。
The embodiment being not limited to described in detailed description of the invention of the present invention, those skilled in the art draw other embodiment according to technical scheme, also belong to the technological innovation scope of the present invention。The present invention can be carried out various change and modification without deviating from the spirit and scope of the present invention by obvious those skilled in the art。So, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification。