Example usage for imghelp
To use imghelp in a project:
Import Required Packages
import matplotlib.pyplot as plt #import matplotlib - for viewing images in Python
To read in jpg images
img = plt.imread('../test_img/ubc.jpeg')
To show images in Python
plt.imshow(img);
Example to use ColorConv()
To change image to red - retain red channel only.
from imghelp.colorconv import ColorConv
img_colorconv = ColorConv(img, 'red')
plt.imshow(img_colorconv);
Example to use ImgRotate()
To rotate image anti-clockwise 90 degrees.
from imghelp.imgrotate import ImgRotate
img_rotate90 = ImgRotate(img, 90)
plt.imshow(img_rotate90);
Example to use ImgCompress()
Apply SVD compression on image with low compression level.
from imghelp.imgcompress import ImgCompress
img_compress = ImgCompress(img, method = 'svd', level=1)
plt.imshow(img_compress);