// FILE: sciLabTracking0_1a.sce
// DATE: 03/08/20 09:24
// AUTH: P.Oh
// DESC: Goal: Find object in an image.

scicv_Init();
img = imread("M:\00courses\scilabVideo\puffin.png");
img_template = imread(getSampleImage("puffin_pattern.png"));
img_result = matchTemplate(img, img_template, CV_TM_SQDIFF_NORMED)

gcf().color_map = graycolormap(255);
colorbar(0, 255);

img_out = normalize(img_result, 0, 255, NORM_MINMAX);

matplot(img_out);

delete_Mat(img);
delete_Mat(img_template);
delete_Mat(img_result);


