python
import cv2
image = cv2.imread('image.jpg')
python
from PIL import Image
image = Image.open('image.jpg')
python
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
python
resized_image = image.resize((new_width, new_height))
python
edged_image = cv2.Canny(image, threshold1, threshold2)
python
from skimage import exposure
hist, bins = exposure.histogram(image)
python
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
faces = face_cascade.detectMultiScale(gray_image, scaleFactor, minNeighbors)
python
from skimage import segmentation
segmented_image = segmentation.slic(image, n_segments)