find shift using cross correlation

11 ビュー (過去 30 日間)
mustafa alnasser
mustafa alnasser 2015 年 5 月 1 日
コメント済み: Angel Romero 2017 年 6 月 21 日
Dear all;
i have a confusion when i am using xcorr function in matlab , suppose i have attached two signals , is this function give the amount of shift in between signals ? is there any conversion factor that shall i use ?

回答 (1 件)

Image Analyst
Image Analyst 2015 年 5 月 1 日
I suggest you start with a simple example, like
signal1 = zeros(1, 10);
signal1(5) = 1;
signal2 = zeros(1, 10);
signal2(8) = 1;
Then look at the length of the output and where the max/peak/spike is located. You'll figure it out.
By the way, I don't think it's well known that the max of the correlation is not always when the two signals are optimally overlapped - it just tells you when the area under the curve of the multiplication of the two signals is greatest. I believe this is why normalized cross correlation was invented. This is done by the function normxcorr2 in the Image Processing Toolbox. (Demo available upon request).
  6 件のコメント
Angel Romero
Angel Romero 2017 年 6 月 21 日
Hi there! I tried to solve your problem but I wasn´t able. Any solution so far?
Angel Romero
Angel Romero 2017 年 6 月 21 日
Were you able to fix it?. I'm looking forward to hearing from you. Thanks.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by