Module movemeter.cc_backends.opencv
Cross-correlation backend using OpenCV, a computer vision programming library.
Functions
def find_location(orig_im, ROI, orig_im_ref, max_movement=None, upscale=1)-
Returns the location of orig_im, cropped with crop (x,y,w,h), in the location of orig_im_ref coordinates.
orig_im Image ROI Crop of the orig_im orig_im_ref Reference image
def find_rotation(orig_im, ROI, orig_im_ref, upscale=1, max_movement=None, max_rotation=None, round1_steps=36, extra_rounds=5, extra_round_steps=6)-
Rotates template along its center and checks the best rotation.
The ROI is internally change to the largest square ROI that fits withing the given (rectangular) ROI.
Arguments
max_rotation:floatorint- In degrees, how many degrees is the total range of rotation to be checked. Between 0 and 360 degrees.
round1_steps:int- How many steps to take on the round 1.
extra_rounds:int- How many extra rounds to take in the vicinity of the first round result.
extra_round_steps:int- How many rotations to test on the extra rounds.
def resize(image, factor)def rotate(image, degrees)-
Rotates an image along its center.
Returned image has the same shape as the original,