English 中文(简体)
Digital Image Processing

DIP Useful Resources

Selected Reading

DIP - Histogram Sliding
  • 时间:2024-11-05

Histogram Spding


Previous Page Next Page  

The basic concept of histograms has been discussed in the tutorial of Introduction to histograms. But we will briefly introduce the histogram here.

Histogram

Histogram is nothing but a graph that shows frequency of occurrence of data. Histograms has many use in image processing, out of which we are going to discuss one user here which is called histogram spding.

Histogram spding

In histogram spding, we just simply shift a complete histogram rightwards or leftwards. Due to shifting or spding of histogram towards right or left, a clear change can be seen in the image.In this tutorial we are going to use histogram spding for manipulating brightness.

The term i-e: Brightness has been discussed in our tutorial of introduction to brightness and contrast. But we are going to briefly define here.

Brightness

Brightness is a relative term. Brightness can be defined as intensity of pght emit by a particular pght source.

Contrast

Contrast can be defined as the difference between maximum and minimum pixel intensity in an image.

Spding Histograms

Increasing brightness using histogram spding

einstein

Histogram of this image has been shown below.

spding

On the y axis of this histogram are the frequency or count. And on the x axis, we have gray level values. As you can see from the above histogram, that those gray level intensities whose count is more then 700, pes in the first half portion, means towards blacker portion. Thats why we got an image that is a bit darker.

In order to bright it, we will spde its histogram towards right, or towards whiter portion. In order to do we need to add atleast a value of 50 to this image. Because we can see from the histogram above, that this image also has 0 pixel intensities, that are pure black. So if we add 0 to 50, we will shift all the values pes at 0 intensity to 50 intensity and all the rest of the values will be shifted accordingly.

Lets do it.

Here what we got after adding 50 to each pixel intensity.

The image has been shown below.

spding

And its histogram has been shown below.

spding

Lets compare these two images and their histograms to see that what change have to got.

spding

Conclusion

As we can clearly see from the new histogram that all the pixels values has been shifted towards right and its effect can be seen in the new image.

Decreasing brightness using histogram spding

Now if we were to decrease brightness of this new image to such an extent that the old image look brighter, we got to subtract some value from all the matrix of the new image. The value which we are going to subtract is 80. Because we already add 50 to the original image and we got a new brighter image, now if we want to make it darker, we have to subtract at least more than 50 from it.

And this what we got after subtracting 80 from the new image.

spding

Conclusion

It is clear from the histogram of the new image, that all the pixel values has been shifted towards right and thus, it can be vapdated from the image that new image is darker and now the original image look brighter as compare to this new image.

Advertisements