June 2016
Beginner to intermediate
304 pages
6h 24m
English
Let's take a look at how to operate on images using OpenCV-Python. In this recipe, we will see how to load and display an image. We will also look at how to crop, resize, and save an image to an output file.
import sys import cv2 import numpy as np
forest.jpg, as follows:# Load and display an image -- 'forest.jpg' input_file = sys.argv[1] img = cv2.imread(input_file)
cv2.imshow('Original', img)Read now
Unlock full access