The steps for this recipe are as follows:
- Suppose we have identified an object of interest—here, a baboon's face—as shown in the following screenshot (refer to this book's graphics PDF to view this image in color):
- This time, we will describe this object by using the hue channel of the HSV color space. This means that we need to convert the image into an HSV one and then extract the hue channel and compute the 1D hue histogram of the defined ROI. Refer to the following code:
// Read reference image cv::Mat image= cv::imread("baboon1.jpg"); // Baboon's face ROI cv::Mat imageROI= image(cv::Rect(110,260,35,40)); // Get the ...