Matching similar pixels

In the last movie, our strategies succeeded…in matching exact pixels in PNG files…but they failed when we tried them on JPEG files.…The reason is that the JPEG format compresses images…by modifying the pixel data.…The images still look the same…but the pixel data is no longer an exact match.…To be honest, our first strategies…are not particularly robust.…If even a bit of alpha channel transparency…had been added to the cropped image…then our match would fail.…Remember, our overall goal…is to detect copyright infringement.…

It shouldn't be that easy to sneak past our detection,…but we can build on what we've learned.…In this movie, we'll learn how to match pixels…which are similar but not necessarily exactly the same.…We're gonna do that with a new method…which is called match position by pixel objects…and the short name we're gonna use for it is fuzzy.…If we look down here.…Take a look at the new method.…And it's gonna look very similar…to what we were just working with…with match position by pixel strength.…The structure is exactly the same…

Resume Transcript Auto-Scroll

Author

Updated

12/16/2014

Released

7/15/2014

Many successful programmers know more than just a computer language. They also know how to think about solving problems. They use "computational thinking": breaking a problem down into segments that lend themselves to technical solutions. Code Clinic is a series of six courses where authors solve the same problems using different programming languages. Here, Kevin Skoglund works with Ruby.

Kevin introduces challenges and provides an overview of his solutions in Ruby. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.

Visit other courses in the series to see how to solve the exact same challenges in languages like C#, C++, Java, PHP, and Python.