www.gusucode.com > signal 案例源码程序 matlab代码 > signal/AlignHandwritingSamplesWithBlotchExample.m

    %% Align Blotched Handwriting Samples
% The files |MATLAB1.gif| and |MATLAB2.gif| contain two handwritten samples
% of the word "MATLAB(R)." Load the files. Add outliers by blotching the
% data.

%%

samp1 = fullfile(matlabroot,'examples','signal','MATLAB1.gif');
samp2 = fullfile(matlabroot,'examples','signal','MATLAB2.gif');

x = double(imread(samp1));
y = double(imread(samp2));

x(15:20,54:60) = 4000;
y(15:20,84:96) = 4000;

%%
% Align the handwriting samples along the _x_-axis using the edit distance.
% Specify a tolerance of 450.

edr(x,y,450);