Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
OpenCV Android Programming By Example

You're reading from   OpenCV Android Programming By Example Leverage OpenCV to develop vision-aware and intelligent Android applications.

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781783550593
Length 202 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Calculating an image histogram

We are one step closer to understanding the image content, and one of the fundamental image analysis techniques is calculating the image histogram.

What are histograms?

Histograms are plots used to give you an overall idea about the distribution of the intensity values of a given image. In the x axis, the plot will have values ranging from 0 to 255 depending on the image depth as explained earlier and the y axis will represent the number of occurrences of the corresponding intensity value.

Once you calculate and display the histogram of an image, you can easily gain some insights about the image contrast, intensity distribution, and so on. Actually, if you normalize the histogram, making it sum to one, you can treat the histogram as a probability density function and answer questions such as what is the probability of a given intensity value to occur on an image and the answer is simply the y axis reading at that intensity value. In the following figure, you...

You have been reading a chapter from
OpenCV Android Programming By Example
Published in: Dec 2015
Publisher:
ISBN-13: 9781783550593
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image