Detection method of wine bottles in static pictures
The invention discloses a detection method of wine bottles in static pictures. The method includes training and detecting steps. The training step includes producing wine bottle samples, calculating sample features and training a cascade classifier. The detecting step includes loading images to be detected, loading a wine bottle classifier and detecting cascade wine bottles. According to the method, by means of a large amount of the wine bottle samples, on the basis of extracting Haar features, the wine bottles in the images to be detected can be detected through the cascade classifier obtained by training by the AdaBoost method, and accordingly the wine bottles can be directly positioned in the images by the method without influence of environments. 1. Static picture of the grape wine bottle in the detection method, characterized in that the detection method is based on frame AdaBoost, it comprises a training phase and a detection stage. 2. Static picture in the detection method of grape wine bottle according to Claim 1, characterized in that the training stage includes: Making wine bottle samples, collected from the network containing grape wine bottle of the picture, and calibration of the position of the grape wine bottle, according to the position information extraction grape wine bottle Image; Calculate sample feature, is a rectangular structure, each of the rectangle is made to correspond a Haar characteristic; Classifier training the poststage, input from the previous steps to obtain and training of training samples, the training is ultimately the strong classification and its corresponding plurality of weak classifiers are connected in series. 3. Static picture in the detection method of grape wine bottle according to Claim 1, is characterized in that the detection stage includes: Loading the picture to be measured, and converted to the gray-scale map for histogram equalization; Loading grape wine bottle classifier, comprising strong, weak classifier threshold value and the selected feature of the corresponding rectangular characteristic information; Grape wine bottle the poststage detection, by first detecting Image in front of the detection of the strong classifier, if not grape wine bottle Image, it will be excluded from the forward end, only grape wine bottle Image can be finally passed the detection of the strong classifier at all levels. 4. Static picture in the detection method of grape wine bottle according to Claim 1, characterized in that said preparation grape wine bottle sample the steps of: extracting grape wine bottle according to the position information of the Image, according to the inherent grape wine bottle aspect ratio scaling, and through the histogram are equalized to eliminate illumination effects, such as the positive sample bottles of wine, the other sample pictures of not containing grape wine bottle as a negative sample. 5. Static picture in the detection method of grape wine bottle according to Claim 2, characterized in that the is Haar of the rectangular area is defined as corresponding to the pixel value of the and with the weight, calculated by integration of the Image is Haar; integral Image SAT (x, y) expressed the original Image pixel point in the upper left (x, y) the sum of all pixel values, the calculated increment mode, then only need to traverse by column or retrieves whole Image a, can be calculated that the corresponding integral Image; and in the art of a rectangular area and the difference of the pixel value, as long as the rectangular four vertexes of the integrating position in the Image to a value of about four, the four value can be an add-subtract operation of this rectangular area equivalent to the sum of the pixel values. 6. Static picture in the detection method of grape wine bottle according to Claim 3, characterized in that in the setting of T the training times, each training, the classifier will be produced a strong, and at the same time in this process a plurality of weak classifier is selected, the final classification is then each and its corresponding plurality of weak classifiers are connected in series, and form the final classifier the poststage.