This repo is to learn some image processing in python by scikit-image module.
$ conda install scikit-image
$ pip install -U scikit-image
io.imread(URL or xxx.jpg)
: Load an image from file.io.imshow(img)
: Display imageio.imsave(NAME)
: Save an image to file.io.ImageCollection
: Load a collection of images.
Do the color space conversion such as:
1. RGB to HSV color space conversion. (rgb2hsv(img)
)
2. RGB to XYZ color space conversion. (rgb2xyz(img)
)
3. RGB to RGB CIE color space conversion. (rgb2rgbcie(img)
)
4. CIE-LAB to CIE-LCH color space conversion. (lab2lch(img)
)
You can also use convert_colorspace(img, fromspace, tospace)
to convert color space.
-
Histogram equalization : Make the intensity distribution better of image. It can get higher contrast.
- Histogram equalizatio ---wiki
exposure.histogram
: histogram of imageexposure.equalize_hist
: image after histogram equalization
-
Gamma Correction : In human's vision, the brighteness to human is not in nonlinear. We should use gamma correction to make the brightness much linear in human sight.
- Gamma Correction ---wiki
exposure.adjust_gamma(img, gamma_value)
: Adjust gamma_value for imageexposure.is_low_contrast(img)
: To justify whether the image is in low contrast
- data_dir : It is sample data directory under the absolute path where you setup scikit-image