// FILE: sciLabTracking1_0a.sce - Works! // DATE: 03/18/20 16:02 // AUTH: P.Oh // VERS: 1_0a: SSD tracking of 1x1 black pixel template thru a 50x10 image // DESC: Goal: Find object in an image. scicv_Init(); img = imread("M:\00courses\scilabVideo\image1BlackPixel.png"); img_template = imread("template1BlackPixel.png"); img_result = matchTemplate(img, img_template, CV_TM_SQDIFF); // 0 = match disp("Result: number of Rows:"); disp(Mat_rows_get(img_result)); disp("Result: number of Columns:"); disp(Mat_cols_get(img_result)); /* uncomment if wish to all values disp("img_result: entire"); disp(img_result(:,:)); */ [min_value, max_value, min_value_loc, max_value_loc] = minMaxLoc(img_result) disp("min_value ="); disp(min_value); disp("location in image:") disp(min_value_loc); delete_Mat(img); delete_Mat(img_template); delete_Mat(img_result);