Code covered by the BSD License  

Highlights from
Contrast Stretch and Normalization

5.0

5.0 | 1 rating Rate this file 28 Downloads (last 30 days) File Size: 2.2 KB File ID: #11429

Contrast Stretch and Normalization

by

 

15 Jun 2006 (Updated )

Stretches contrast on the image and normalize image from 0 to 1

| Watch this File

File Information
Description

Stretches contrast on the image and normalize image from 0 to 1. The main difference of this function to the standard stretching functions is that standard function finds global minimum and maximum on the image, then uses some low and high threshold values to normalize image (values below LowTHR are equated to LowTHR and values above HighTHR are equated to HighTHR). This function uses threshold values that are NEXT to miminum and maximum. Thus, we can exclude image background (which is normally zero) and find minimum value on the image itself. Same consideration goes to high thr. We exclude first global maximum because, if its a spike, we have better chance with the next value, and if it is not a spike, normally, next value is quite close to max (assuming smooth image), so our error is small. If image is uniform, (all pixels have the same value), for instance zero, function returns the input array

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
08 Mar 2012 Alexander Farley

Worked well for me.

Contact us