Previous topic

flip

Next topic

hsb_adjust

This Page

gray_scale

mipylib.imagelib.filter.gray_scale(src)

A filter which converts an image to grayscale using the NTSC brightness calculation.

Parameters:src – (image) Source image.
Returns:Destination image.

Example:

Image gray scale:

fn = 'D:/Temp/image/Lenna.png'
lena = image.imread(fn)
subplot(1, 2, 1,aspect='equal', tickline=False)
imshow(lena)
subplot(1, 2, 2, aspect='equal', tickline=False)
lena_1 = imfilter.gray_scale(lena)
imshow(lena_1)
../../../../_images/image_gray_scale2.png