Now that we are familiar with the process of computing histograms using the APIs provided by OpenCV, we turn our attention to the problem of representing the information inside a histogram. In the previous section, we saw that we could easily traverse the Mat
object representing our histogram to get a glimpse of the values (frequency counts). Also, in the section on the basics of histogram processing, we saw that a visual representation of a histogram in the form of a bar chart has the advantage of possessing a greater visual appeal. This section essentially attempts to the answer this question: Given a histogram that has been computed by the calcHist()
function (or any other method for that matter), how do we represent the same graphically using OpenCV/C++? The key thing to note here is that we are trying to plot the histogram graphically using the same framework of OpenCV and C++ that we have been working with throughout this book. If we relax this restriction...
You're reading from Learning OpenCV 3 Application Development
The rest of the page is locked
You have been reading a chapter from
Learning OpenCV 3 Application DevelopmentPublished in: Dec 2016Publisher: PacktISBN-13: 9781784391454
© 2016 Packt Publishing Limited All Rights Reserved