From the course: Code Clinic: Clojure
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Inspecting the results - Clojure Tutorial
From the course: Code Clinic: Clojure
Inspecting the results
- [Narrator] In this video, we'll unpack the results from match-template. Call this function match, and I'll have it take two Mat objects, a and b. Create a let binding. First, I'll get a result matrix from calling the match-template function that we defined in the previous video. I'll pass it the a and b value given to the match function. Now I'll create a binding to variable called min-max. And I'll call cores minMaxLock static method with the result matrix. This will return OpenCV's minMaxLoc object. It will contain the x and y coordinate of the highest value that was found in the matrix which will be the x and y coordinate of a match if there is one. It will also contain the values that we can see how similar the two images are. I'll now create some bindings that pull this object apart. First, I'll pull the location apart using .maxLoc using .maxLoc on the min-max object. This will be the location of the highest match. Now I'll get its x-value by using .x on the loc and its…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.