/normxcorr/trunk

To get this branch, use:
bzr branch http://suren.me/webbzr/normxcorr/trunk

« back to all changes in this revision

Viewing changes to automate_image.m

  • Committer: Suren A. Chilingaryan
  • Date: 2010-04-22 13:42:41 UTC
  • Revision ID: csa@dside.dyndns.org-20100422134241-fv5m2ufk8n2tc9h5
Implementation of image and fragment modes, support for non-cacheable grids

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
% 0 - in the end
53
53
% 1 - per iteration
54
54
 
55
 
OPTIMIZE = 5;
 
55
OPTIMIZE = 4;
56
56
CORRSIZE = 15;  
57
57
PRECISION = 1000;
58
58
SILENT = 1;
176
176
 
177
177
 
178
178
if OPTIMIZE > 2
179
 
%    Verification of GPU local sum and denom computations
180
 
%    dic_basecorr3(CORRSIZE, PRECISION, OPTIMIZE, hwid, base_points_x, base_points_y, base);
181
 
 
182
179
    normxcorr_hw(hwid, 3, base_points_x, base_points_y);
183
180
    if OPTIMIZE > 4
184
181
        normxcorr_hw(hwid, 4, strcat(imagedir, filenamelist(1,:)));
185
182
    else
186
183
        base = uint8(mean(double(imread([imagedir, filenamelist(1,:)])),3));            % read in the base image ( which is always  image number one. You might want to change that to improve correlation results in case the light conditions are changing during the experiment
 
184
 
 
185
%       Verification of GPU local sum and denom computations
 
186
%       dic_basecorr3(CORRSIZE, PRECISION, OPTIMIZE, hwid, base_points_x, base_points_y, base);
 
187
 
187
188
        normxcorr_hw(hwid, 4, base);
188
189
    end 
189
190
else
276
277
        normxcorr_hw(hwid, 13, strcat(imagedir, filenamelist((i+1),:)));
277
278
        input_correl = normxcorr_hw(hwid, 14);
278
279
    elseif OPTIMIZE > 2
 
280
        input = uint8(mean(double(imread([imagedir, filenamelist((i+1),:)])),3));       % read in the image which has to be correlated
 
281
 
279
282
        %Validate findpeak
280
283
        %dic_cpcorr3(CORRSIZE, PRECISION, OPTIMIZE, hwid, ncp, input);
281
284
 
282
 
        input = uint8(mean(double(imread([imagedir, filenamelist((i+1),:)])),3));       % read in the image which has to be correlated
283
285
        normxcorr_hw(hwid, 13, input)
284
286
        input_correl = normxcorr_hw(hwid, 14);
285
287
    elseif OPTIMIZE > 0