<< binaryxor Image_Processing_Tool_3 colsierra >>

Image_Processing_Tool_3 >> Image_Processing_Tool_3 > bricontra

bricontra

Adjusts brighness and contrasts of a gray scale image

Calling Sequence

y = bricontra(x,m,s)
y = bricontra(x,m,s,o)

Parameters

x

A matrix representing a gray scale image.

m

A positive number representing the brighness of the adjusted image.

s

A positive number representing the constrast of the adjusted image.

o

An optional parameter of character constant 'm' to specify mean absolute deviation method.

y

A matrix representing the gray level image with new brightness and contrast specified respectively in the 2nd and 3rd parameters.

Description

It adjust the brightness and constrast of a given gray scale image. The desired brightness and contrast levels are given as positive numbers in the 2nd and 3rd parameters. If only the first three parameter are given, then the birghtness and contrasts are adjusted using the means and standard deviation method. If fourth parameter is given and is 'm', the brightness and contrast adjustment is performed based on median and mean absolute deviation method.

Examples

x=imread('lena.png');
x=rgb2gray(x);
x=double(x);
// brightness and contrast adjustment using mean and standard deviation
ax=bricontra(x,120,100);
// displaying the adjusted image
imshow(uint8(ax))

// brightness and contrast adjustment using median and mean absolute deviation
bx=bricontra(x,120,100,'m');
// displaying the adjusted image
imshow(uint8(bx))

// displaying the difference
 imshow(uint8(floor(mat2gray(abs(ax-bx))*255)))

See Also

Authors

<< binaryxor Image_Processing_Tool_3 colsierra >>