An image histogram is chart representation of the distribution of intensities in an Indexed image or grayscale image. It shows how many times each intensity value in image occurs.
Code #1: Display histogram of an image using MATLAB library function.
Code #2: Display Histogram of an Image without using MATLAB Library function.
- Read the source image file into image matrix
- Convert it to grayscale, if it is an RGB image
- Iterate over image matrix and count the frequency of every possible value of intensity
- plot the counted frequency
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- MATLAB | RGB image to grayscale image conversion
- MATLAB | Converting a Grayscale Image to Binary Image using Thresholding
- MATLAB | Complement colors in a Grayscale Image
- Display the red, green and blue color planes of a color image in MATLAB
- Java | Converting an Image into Grayscale using cvtColor()
- Histogram Equalisation in C | Image Processing
- Histogram of an Image
- Extract bit planes from an Image in Matlab
- Image Processing in MATLAB | Fundamental Operations
- MATLAB | RGB image representation
- MATLAB | Complement colors in a Binary image
- MATLAB | Complement colors in RGB Image
- LSB based Image steganography using MATLAB
- Image Complement in Matlab
- Image Resizing in Matlab
- Flip image across Secondary Diagonal in MATLAB
- Matlab | Edge Detection of an image without using in-built function
- Matlab | Erosion of an Image
- Matlab | Dilation of an Image
- Create Mirror Image using MATLAB
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.