フィルターのクリア

Estimating Optical flow for one dimensional signals

9 ビュー (過去 30 日間)
Anisia Anil
Anisia Anil 2023 年 8 月 8 日
コメント済み: Anisia Anil 2023 年 8 月 22 日
I want to estimate the optical flow between two one dimensional signals. The standard method to estimate it as of my knowledge is to use the
opticFlow = opticalFlowHS
flow = estimateFlow(opticFlow,frameGray);
But, it is defined for 2D images. Is it possible to compute this for 1D signals?

採用された回答

Paras Gupta
Paras Gupta 2023 年 8 月 22 日
Hi Anisia,
I understand that you want to estimate the optical flow between one dimensional (1D) signals. Since 1D signals do not contain spatial structure in contrast to 2D signals, the same traditional optical flow techniques like Horn-Schunck (HS) method cannot directly be applied for estimation.
However, if the one-dimensional signals are treated as time series, analysis techniques like cross-correlation, dynamic time warping (DTW), or other Fourier-based techniques can be used to measure some estimate of the optical motion between the two signals. It is to be noted that these methods may not provide the same robustness or accuracy as the methods designed for 2D signals.
The following code uses cross-correlation to estimate optical flow between two 1D signals.
signal1 = [1, 2, 3, 4, 5];
signal2 = [2, 3, 4, 5, 6];
crossCorr = xcorr(signal1, signal2);
% Find the index of the maximum correlation value
[~, maxIndex] = max(crossCorr);
% Estimate the motion as the time lag corresponding to the maximum correlation
motion = maxIndex - length(signal1) + 1
motion = 1
Please refer to the documentation below for more details on the above code.
Hope this helps.

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by