Learn how to generate the comparison matrix between two images.
- [Instructor] In this video,…we'll leverage OpenCV to compare our images.…First, I'd like to leverage the diff-dimensions function…to determine if two images can be compared.…If one image is both narrower and taller…than the other, they cannot be compared,…and OpenCV will throw an exception if you try.…OpenCV calls the two images in the comparison,…the source and template, so I'm gonna call my function…find S-R-C…and T-E-M-P-L…for source and template.…
For parameters, I'll make this function take…a file-a and a file-b, and I'll destructure…into a and b from a call to map load-image…on the vector with file-a and file-b.…In this way, the map will call load-image…on both of our inputs, and we'll destructure them…into a and b.…Next, I'll call diff-dimensions on our a and b,…and on the left-hand side, I'll destructure this return…into cols and rows.…With cols and rows in hand,…we now know the relative dimensions…between the two images.…
In the let body, I'll now create a cond expression.…For my first predicate, I'll check if the cols…
Skill Level Intermediate
1. Problem 1: Exploring Lake Pend Oreille
2. Problem 2: Image Analysis
3. Problem 3: Eight Queens
4. Problem 4: Accessing Peripherals
5. Problem 5: Recursion and Directories
6. Problem 6: Building the Web
- 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.