/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: 2009-12-12 01:38:41 UTC
  • Revision ID: csa@dside.dyndns.org-20091212013841-feih3qa4i28x75j4
Provide stand-alone library

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
 
189
189
    normxcorr_hw(hwid, 3, base_points_x, base_points_y);
190
190
    normxcorr_hw(hwid, 4, base);
191
 
 
192
 
    normxcorr_hw(hwid, 5);
193
191
else
194
192
  base_points_for(:,1)=reshape(base_points_x,[],1);
195
193
  base_points_for(:,2)=reshape(base_points_y,[],1);
271
269
    input_correl(:,2)=reshape(input_points_y,[],1);
272
270
end
273
271
 
 
272
input = uint8(mean(double(imread([imagedir, filenamelist((firstimage+1),:)])),3));       % read in the image which has to be correlated
274
273
for i=firstimage:(r-1)               % run through all images
275
274
    tic             % start the timer
276
275
 
277
 
    input = uint8(mean(double(imread([imagedir, filenamelist((i+1),:)])),3));       % read in the image which has to be correlated
 
276
%    input = uint8(mean(double(imread([imagedir, filenamelist((i+1),:)])),3));       % read in the image which has to be correlated
278
277
 
279
278
    if OPTIMIZE > 2
280
279
        %Validate findpeak
281
280
        %dic_cpcorr3(CORRSIZE, PRECISION, OPTIMIZE, hwid, ncp, input);
282
 
 
283
281
        normxcorr_hw(hwid, 13, input)
 
282
        if i < (r-1)
 
283
            input = uint8(mean(double(imread([imagedir, filenamelist((i+2),:)])),3));       % read in the image which has to be correlated
 
284
        end
284
285
        input_correl = normxcorr_hw(hwid, 14);
285
286
    elseif OPTIMIZE > 0
286
287
        input_correl(:,:)=dic_cpcorr(CORRSIZE, PRECISION, OPTIMIZE, hwid, data_base, input_correl, input);
287
288
    else
288
289
        input_correl(:,:)=cpcorr(input_correl, base_points_for, input, base);
289
290
    end
290
 
 
 
291
    
291
292
    %We need to copy
292
293
    validx(:,i)=double(input_correl(:,1));                                       % the results we get from cpcorr for the x-direction
293
294
    validy(:,i)=double(input_correl(:,2));                                       % the results we get from cpcorr for the y-direction