goulib.image¶
image processing with PIL’s ease and skimage’s power
- requires:
- optional:
pdfminer.six for pdf input
Functions
|
Decorator that adapts to RGB(A) images to a gray-scale filter. :param apply_to_rgb: function Function that returns a filtered image from an image-filter and RGB image. This will only be called if the image is RGB-like. |
|
Alpha composite two RGBA images. |
|
Alpha composite an RGBA image with a single color image of the specified color and the same size as the original image. |
|
|
|
|
|
|
|
convert an image between modes, eventually using intermediary steps :param a: nparray (x,y,n) containing image :param source: string : key of source image mode in modes :param target: string : key of target image mode in modes |
|
convert inner format of image :param data: nparray (x,y,n) containing image :param type: target np.type :return: nparray (x,y,n) with new type replaces outdated skimage.util.dtype.convert using https://scikit-image.org/docs/0.24.x/api/skimage.html#utility-functions |
|
|
|
Quantize a gray image, using dithering. |
|
Convert a Matplotlib figure to a PIL Image in RGBA format and return it |
|
mimics the Matlab image toolbox fspecial function http://www.mathworks.com/help/images/ref/fspecial.html?refresh=true |
|
Quantize a gray image, using dithering. |
|
|
|
|
|
|
|
|
|
convert a Lab image to indexed colors :param a: nparray (x,y,n) containing image :param colors: int number of colors or predefined Palette :ref: http://scikit-learn.org/stable/auto_examples/cluster/plot_color_quantization.html |
|
|
|
|
|
extract the color palette of image array (in its own colorspace. |
|
Alpha composite an RGBA Image with a specified color. |
|
Alpha composite an RGBA Image with a specified color. |
|
Quantize a gray image. |
|
|
|
reads a bitmap graphics on a .pdf file only the first page is parsed |
|
|
|
Classes
|
|
|
|
|
|
|
|
|