As in the first four articles said histogram has a Nike Air Max very important role in the feature extraction, this article will give two practical projects in a very New Basketball Shoes practical example to illustrate the application of the image histogram. A histogram of the Air Max 2012 Pink Grey Black reverse mapping. We face detection, for example, face detection, we often need to extract Air Black Grey Pink Nike Hyperdunk 2013 BHM Jordan CP3.VI Black History Month Chris Paul PE Sale Outlet Jordan Outlet the image first step in the area of skin to narrow the detection range of the human face, which typically get skin color ranges also need to define thresholds and continuous adjustment, the actual not too easy to control the parameters. Here we can consider the reflection map with histogram. 1, facial skin samples were collected. 2, split samples and calculate the color histogram. 3, the sample color will be reflected histogram is mapped to be detected in the picture, and then thresholding can. Here, for simplicity, we only use two Nike 6.0 Mavrk Mid 2 Skate Shoes Blue Grey face samples, in practice can be further extended. When extracting the histogram of samples of skin, we need to do some image processing these samples, such as the removal BHM PE Black History Month Nike Lunar Hyperdunk Low Online of hair, eyes and other parts, here we can use a mask. Since we want to calculate the color histogram of image, in order to simplify the color, we also need to color dimension reduction, the correlation function in the first two articles in this series have been introduced in. int main () {Mat face = imread (\u0026 quot; ../ face.png \u0026 quot;); // sample Mat ImgSrc = imread (\u0026 quot; ../ img.png \u0026 quot;); // image degradation // image to be detected Victoria colorReduce (face, face, 32); colorReduce (ImgSrc, ImgSrc, 32); // calculate the color histogram const int channels [3] = {0,1,2}; const Nike Air Jordan int histSize [3] = {256,256,256} ; float hranges [2] = {0,255}; const float * ranges [3] = {hranges, hranges, hranges}; MatND hist; calcHist (\u0026 amp; face, 1, channels, Mat (), hist, 3, histSize, ranges); // histogram normalization normalize (hist, hist, 1.0); // histogram reverse mapping Mat result; calcBackProject (\u0026 amp; ImgSrc, 1, channels, hist, result, ranges, 255); // The results thresholding threshold (result, result, 255 * (0.05), 255, THRESH_BINARY); return 0;} The above program worthy of note are the following: 1, when making a reverse mapping color image histogram, general need to reduce the dimensionality of the image colors. 2, OpenCV provides for the reverse mapping function clacBackProject calculate the histogram, histogram parameters and calculated parameters the same. 3, threshold is a threshold value of the function. Second, the image similarity comparisons image similarity comparisons are more practical than the above histogram mapping and common example, some time ago launched a similar Taobao or Baidu search map New Womens Nike Free 3 V3 Trainers Black Grey function are inseparable from the image similarity judge this topic, of course, there is this article impossible to achieve depth study those solutions, just use OpenCV routines to achieve a simple match the image. Let us compute the similarity between two images: We left an image as a reference image, there is no image of the vehicle parked at the right side with the left side of the two comparing the calculated similarity. The middle one is there when the vehicle is parked, the right one is another time when Black White Yellow Nike Zoom Lebron 10.8 New Womens Nike Free 3 V3 Trainers Black Grey Outlet the vehicle is not parked. This example can be applied to the actual position of the 2015 Nike Free 5.0 vehicle to detect parking above: int main () {Mat refImg = imread (\u0026 quot; ../ ref.png \u0026 quot;); Mat image1 = imread (\u0026 quot; ../ image1.png \u0026 quot;); Mat image2 = imread (\u0026 quot; ../ image2.png \u0026 quot;); ColorHistogram imgHist; // image color dimension reduction refImg = imgHist.colorReduce (refImg, 64); image1 = imgHist.colorReduce (image1,64); image2 = imgHist .colorReduce (image2,64); MatND refH = imgHist.getHistogram (refImg); MatND hist1 = imgHist.getHistogram (image1); MatND hist2 = imgHist.getHistogram (image2); double dist1, dist2; dist1 = compareHist (refH, hist1 , CV_COMP_BHATTACHARYYA); dist2 = compareHist (refH, hist2, CV_COMP_BHATTACHARYYA); std :: cout \u0026 Nike Free 4.0 V2 Women lt; \u0026 lt; \u0026 quot; dist1 = \u0026 quot; \u0026 lt; \u0026 lt; dist1 \u0026 lt; \u0026 lt; \u0026 quot;, dist2 = \u0026 quot; \u0026 lt; \u0026 lt; dist2 \u0026 lt; \u0026 lt ; std :: endl; return 0;} final output is: dist1 = 0.69dist2 = 0.08 The above program worthy of note are the following: Air Max 2012 Purple Black 1, the program ColorHistogram is a custom class, including histograms strike dimensionality reduction and color images, 2, histogram comparison function compareHist (refH, imgH, CV_COMP_XX), the last argument is a method to calculate the distance between two vectors. (5)OpenCV growth path: Application image histogram