* Changed displacement calculation to account for the template matching function returning the upper-left corner of the matching window rather than the center.