Coder Social home page Coder Social logo

samahussien7 / image-histogram-analysis-and-enhancement Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 765 KB

This Python script analyzes image histograms and performs various histogram-based enhancements, including histogram shift, histogram equalization, and contrast stretching. These techniques aim to improve the visual quality and enhance the contrast of digital images.

Jupyter Notebook 100.00%

image-histogram-analysis-and-enhancement's Introduction

Image-Histogram-Analysis-and-Enhancement

This Python script analyzes image histograms and performs various histogram-based enhancements, including histogram shift, histogram equalization, and contrast stretching. These techniques aim to improve the visual quality and enhance the contrast of digital images.

Image Histogram Analysis and Enhancement:

Plot Corresponding Image Histogram:

Generates and plots the histogram of the input image, displaying the distribution of pixel intensities. Histogram Shift by Value:

Shifts the histogram by a specified value, effectively changing the brightness or contrast of the image. This operation is useful for adjusting the overall brightness level. Plot Cumulative Image Histogram:

Computes and plots the cumulative histogram of the input image, providing insights into the cumulative distribution of pixel intensities.

Histogram Equalization:

Performs histogram equalization on the input image to enhance contrast and improve visual quality. This technique redistributes pixel intensities to achieve a more balanced histogram.

Sub-steps:

Compute the cumulative distribution function (CDF) of the image histogram. Transform pixel intensities based on the CDF to achieve a more uniform distribution. Output the histogram-equalized image. Plot Modified Image:

Displays the modified image resulting from histogram equalization, providing a visual comparison with the original image. Plot Modified Image Histogram:

Generates and plots the histogram of the modified image to visualize the effects of histogram equalization. Plot Modified Image Cumulative Histogram:

Computes and plots the cumulative histogram of the modified image, illustrating the distribution of pixel intensities after histogram equalization.

Experiment-2: Contrast Stretching

Use Image Histogram to Deduce Parameters for Contrast Stretching:

Analyzes the image histogram to determine suitable parameters for contrast stretching, such as minimum and maximum intensity values. Apply Contrast Stretching on the Corresponding Image:

Utilizes the deduced parameters to perform contrast stretching, expanding the dynamic range of pixel intensities to enhance image contrast and improve visual clarity.

image-histogram-analysis-and-enhancement's People

Contributors

samahussien7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.