Image Processing
Processing Digital Images digital images are often processed using “digital filters” digital filters are based on mathematical functions that operate on the pixels of the image MotionFilter
2 Classes of Digital Filters Global filters transform each pixel uniformly according to the function regardless of its location in the image Local filters transform a pixel depending upon its relation to surrounding ones
Global Filters Brightness and Contrast control Histogram thresholding Histogram stretching or equalization Color corrections Inversions
Contrast and Brightness functions like the knobs on your TV set Input Image Scale Output Image Scale Input Image Scale Output Image Scale Contrast Knob Brightnesss Knob
Contrast and Brightness functions like the knobs on your TV set Input Image Scale Output Image Scale Increase Slope Contrast Input Image Scale Output Image Scale Contrast Knob Brightnesss Knob
Contrast and Brightness functions like the knobs on your TV set Input Image Scale Output Image Scale Increase Slope Contrast Input Image Scale Output Image Scale Increase Offset Brightness Contrast Knob Brightnesss Knob
Increasing Contrast
How Contrast Functions Work Index into the Input Array of brightness (index = brightness) Get the corresponding brightness value from the Output Array What does this function do? Brightness
What would this function do? Brightness
Increasing Brightness
What would this function do? Brightness
Contrast & Brightness Demo Photoshop –Image->Adjust->Brightness/Contrast –Image->Adjust->Curves (more advanced)
Global Filters Brightness and Contrast control Histogram thresholding Histogram stretching or equalization Color corrections Inversions
Histogram Thresholding thresholding creates a binary image by converting pixels according to a threshold value
Thresholding Demo Photoshop –Image->Adjust->Threshold
Global Filters Brightness and Contrast control Histogram thresholding Histogram stretching or equalization Color corrections Inversions
Histogram Stretching
The Algorithm for Histogram Stretching Find darkest pixel = D Find lightest pixel = L Let max possible pixel value = M Then the new value for every pixel in the image is: New pixel value = x M (Old pixel value – D) (L – D)
Histogram Equalization Can you read this?
Histogram Equalization Now can you read this?
Histogram Equalization Demo Photoshop –Image->Adjust->Equalize –Image->Adjust->Levels (more advanced)
Global Filters Brightness and Contrast control Histogram thresholding Histogram stretching or equalization Color corrections Inversions
Color Corrections Making changes to the colors in an image - Hue shifting - Pseudo coloring Performed by manipulation of re-mapping functions
Hue-shifting Hue-shifting is used to modify the color makeup of an image
Hue-shifting Demo Photoshop –Image->Adjust->Hue/Saturation
Pseudo-coloring Pseudo-coloring can be used to add color to grayscale images Different colors are assigned to each level of gray
Pseudo-coloring Demo Photoshop –Image->Adjust->Gradient Map
Global Filters Brightness and Contrast control Histogram thresholding Histogram stretching or equalization Color corrections Inversions
Inversions
Inversion Demo Photoshop –Image->Adjust->Invert
Review Global Filters - Contrast & Brightness Control - Thresholding - Histogram stretching & equalization - Color corrections - Inversion