Join Dan Gookin for an in-depth discussion in this video Scanning for image data, part of Code Clinic: C.
- After practicing my JPEG reading kung fu,…I worked on the actual problem…of finding one image within another.…An image is a grid of pixels, rows and columns.…A subimage is a smaller portion of that same image.…To begin the search,…I needed to plot out every potential location…for that subimage.…Specifically, I would match the upper left corner…of the subimage to every potential starting location…in the primary image.…So the code had to calculate the difference in size…between the two images.…
The result was to obtain a grid…in which to perform the search.…The subimage could start at any pixel in that grid.…To expedite searching,…the images are converted to gray scale.…For each location within the grid,…a row of pixels from the subimage…is compared with the same row of pixels…in the primary image.…Because JPEG is a lossy compression,…the comparison doesn't need to have to match exactly.…It can be fuzzy or within a given range…and within a given number of mismatches.…
So with all that, if the rows of the subimage…
Dan introduces challenges and then provides an overview of his solutions in C. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.
Skill Level Beginner
Q: I am unable to access the Lake Pend Oreille data from outside the U.S.
A: A static copy of this data is provided here for lynda.com members outside of the U.S.
1. Problem One: Exploring Lake Pend Oreille
2. Problem Two: Image Analysis
3. Problem Three: Eight Queens
4. Problem Four: Accessing Peripherals
5. Problem Five: Recursion and Directories
6. Problem Six: 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?
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.