imghelp.colorconv

Module Contents

Functions

ColorConv(img, color)

ColorConv converts an image to different color.

imghelp.colorconv.ColorConv(img, color)[source]

ColorConv converts an image to different color. :param img: Input a 3D np.array image for convertion. :type img: numpy.array :param color: Color aim to convert: ‘gray’, ‘rad’,’green’,’blue’ :type color: string

Returns

The converted image as 3D np.array.

Return type

numpy.array

Examples

>>> import matplotlib.pyplot as plt
>>> from imghelp.ImgColorConv import ColorConv
>>> image = plt.imread('../test_img/ubc.jpeg')
>>> plt.imshow(image) #show the image
>>> ColorConv(image, 'gray')