How do I obtain the aligned sequence using distance warping

1 回表示 (過去 30 日間)
Tino
Tino 2021 年 7 月 5 日
回答済み: Mathieu NOE 2021 年 7 月 6 日
I have a sequence A and B
And I want to warp them using distance warping
x = dtw(A, B)
Please how do I get the vector of warped sequence instead of distance (x)
Thanks for your help in advance.

採用された回答

Mathieu NOE
Mathieu NOE 2021 年 7 月 6 日
hello
my suggestion below :
% Example 3:
% Align handwriting samples along the x-axis.
load blockletterex
%dtw(MATLAB1,MATLAB2); % native TMW example
% my example
[m1,n1] = size(MATLAB1);
[m2,n2] = size(MATLAB2);
[DIST,IX,IY] = dtw(MATLAB1,MATLAB2);
MATLAB2b = interp2(MATLAB2,IY(1:n1),1:m2); % streched version of MATLAB2 that matches size of MATLAB1
figure,
subplot(211),imagesc(MATLAB1),subplot(212),imagesc(MATLAB2b)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by