Learn these fundamental image operations, which are key tools in many image-processing scenarios. Patrick briefly covers the high-level mathematics behind these transformations, which can assist with understanding limitations and the artifacts that can result. The key is to remember that images are essentially matrices, and vice versa.
- [Instructor] Some of the most basic,…but important image processing actions…include scaling and rotating.…Let's begin by learning how to use scaling.…To do this, we'll define…our first file called img_half = cv2.resize,…noting that cv2.resize is the main resizing function.…We'll pass in a value of (img, ),…and then we pass in the absolute size,…or (0,0) to not set an absolute size in pixels,…and then we can optionally pass…in our relative factors of fx=0.5, fy=0.5.…
This will result in an image that is half the size…in both dimensions of the original.…Next, we can type img_stretch = cv2.resize,…and then again, we'll pass in our image.…This time, in parentheses,…we'll pass in a value of (600,600),…meaning we're going to explicitly scale the image…of those dimensions.…Next, let's type out img_stretch_near,…and this will equal cv2.resize.…Again, passing an img, again,…setting it to be (600,600), in parentheses,…and then this time we're going to set interpolation mode…for the scaling process by typing interpolation=cv2.,…
AuthorPatrick W. Crawford
- Installing and configuring OpenCV
- Data types and structures
- Image types
- Manipulating pixels
- Scaling and rotating images
- Using video inputs
- Creating custom interfaces
- Object detection
- Face and feature detection
- Template matching
Skill Level Intermediate
NumPy Data Science Essential Trainingwith Charles Kelly3h 54m Intermediate
Python: Programming Efficientlywith Michele Vallisneri2h 15m Intermediate
1. Install and Configure OpenCV
2. Basic Image Operations
3. Object Detection
4. Face and Feature Detection
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.