From the course: Code Clinic: Ruby

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Overview of my solution

Overview of my solution

From the course: Code Clinic: Ruby

Start my 1-month free trial

Overview of my solution

- [Voiceover] Let's begin by getting a big picture overview of my solution. We're going to write a control program, in Ruby, called ImageMatcher and it will handle all the aspects of out matching. The ImageMatcher class will do several things: It will load up all the libraries and code that we need; It will accept two images as input, a search image and a template image. The search image is the big image, the image we're going to be searching inside of. The template image is the smaller image that's potentially a crop of the search image. We call it the template because we're going to be using it as a template, as we scan through the search image looking for a match. Therefore, our ImageMatcher will also need to implement a given search strategy and return the location of any match that it finds and optionally, it will save a new image which highlights the matched areas. So that we can see it visually, as well as just having the coordinates. What's nice about this approach is that the…

Contents