Simple Template Matching with Variable Image Template Ratio: In this process, we aim to locate the template Itm (binary image) within the Is (grayscale image) using a canny edge-detected version of Is. The template matching method accommodates scaling, meaning the template size doesn't have to match the exact target size in the main image, allowing for scanning at various scale ratios of Itm.

Input:

- Is: The main color image containing the target.

- Itm: The binary image of the template.

Output:

- Best Match Location (x, y): Coordinates of the optimal match.

- Matching Score: Quality score of the best match.

- Resized Image and Template: Outputs the resized main image and template for the best scale ratio found.

Methodology:

1. Edge Detection: Convert Is to a canny edge-detected image.

2. Scale Adjustment: Iterate through various size scales of Itm and Is.

3. Template Matching with Cross-Correlation: Utilize a cross-correlation approach to match edges between Is and Itm.

4. Result Visualization: Display Is with the optimal match position highlighted.

Primary Function: MAIN_find_template_in_image