• CES
  • AMARTS
  • Electronic Kid
  • Useful-news
  • Forum
  • Fellowship
  • E-Library
  • All

Archives

gravatar

Understanding Digital Camera Histograms Using MATLAB

Hello
electronic!


Understanding Digital Camera Histograms Using MATLAB

Ahlad Kumar and Vijeta Khare 

This article discusses the importance of histograms generated by high-end cameras, which help in clicking better pictures. Apart from a general discussion on histogram, a MATLAB implementation of the same is provided for the hard-core programmers.

Histogram is an excellent feature available in most of the modern-day cameras from Nikon, Canon, etc. Unfortunately, very few people know how to make good use of histograms. By understanding histograms we can predict how good the picture is going to be even before clicking it.

Fig. 1 shows a typical LCD screen of a high-end camera. The control menu of the camera is shown in Fig. 2. On the top right corner of control menu is a black box marked as histogram, which shows a waveform that most camera-users think is useless. But if we understand this waveform we can click our pictures perfectly, without later realising that the lightening or illumination was poor.


To view Figures 1 & 2 along with full article:  Click here

Histogram
Histogram of an image is the graphical representation of the frequency of occurrence of each gray level in an image. To understand this statement clearly, the meaning of gray level must be understood first. 


To view Figures 3 & 4 along with full article:  Click here

Image is stored in a computer in the form of a matrix. Each pixel of an image denotes the intensity value at that point. This intensity value is known as its gray level. So, if a point is dark, its intensity (gray) value is zero. If it is the brightest possible, its intensity value is 255. So an image stored in a computer in the form of matrix has its values ranging from 0 to 255. For example, a typical image (refer Fig. 3) is stored in a computer in the form of matrix shown in Fig. 4.

The values present in the matrix shown in Fig. 4 are the gray values of an image. For example, 9 being close to zero its contribution to an image will be dark. But 133 is a much higher value, so its contribution to an image will be bright.

Histogram plots the occurrence (frequency) of these gray levels on y-axis while x-axis plots the value of gray levels from 0 to 255. We observe that gray values 64 and 45 occur twice each while value 121 occurs thrice, and rest of the pixels occur once only. Accordingly, the histogram of this image is shown in Fig. 5.

To view Figures 5 along with full article:  Click here

It can be observed from the histogram that y-axis corresponds to the number of times a specific gray value shown on x-axis occurs. If we generalise this discussion further, we arrive at the conclusion that, if an image is almost dark then its histogram will be towards the left side of the graph, while for a very bright image it will be towards extreme right side. But if an image is uniformly bright, its histogram will be uniform throughout from left to right.

To understand it clearly, let us take three different cases of bright, dark and uniform images.
 
Electronics For You, A-001, Garden Mansions, Old Airport Road, Bangalore, India.
Forward this email



This email was sent to dragonkhm1.babe@blogger.com by newsletter@electronicsforu.com |  


EFY Group | A-001, Garden Mansions | Old Airport Road | Bangalore | Karnataka | 560008 | India