Clipping and Scaling
• clip(M, [min, max])—Return vector or matrix M clipped to set limits.
• scale(M, [min, max])—Return vector or matrix M scaled to set limits.
These functions scale an image's intensity levels to lie between the specified minimum and maximum, or truncate them to a minimum and maximum. It is often desirable to scale or clip a processed image to a standard grayscale range of 0 - 255.
The functions return another matrix, an image with the specified scaled or clipped intensity range.
Arguments
• M is an image vector or matrix.
• min, max are optional and represent the lowest and highest values in the output intensity scale.
If min, max are not supplied, then they default to min = 0 and max = 255.