-
大小: 3KB文件類型: .m金幣: 1下載: 0 次發布日期: 2021-01-04
- 語言: Matlab
- 標簽: 光流場??optical_flow??MATLAB??
資源簡介
自己編寫的計算光流場的源碼,基于梯度的方法,非常簡單
代碼片段和文件信息
function?[UV]?=?OpticalFlow(Img1Img2iter_numalpha)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?This?MATLAB?codes?calculate?optical?flow?of?two?consecutive?frames(images)
%?using?Horn?&?Schunck‘s?method.
%?Input:
%????????Img1Img2??:??image?data
%????????iter_num???:??the?time?of?iteration
%??????????alpha????:??wighting?coefficient
%?Author:
%????????Huazhong?University?of?Science?and?Technology
%???????????Institute?of?Pattern?Recognition?and?Artificial?Intelligence
%???????????????Lee?Chi
%?Contact?me:?leechi1010@163.com
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%?Pre_process
[height_1width_1dim_1]?=?size(Img1);
if?dim_1?==?3
????Img1?=?rgb2gray(Img1);
end
[height_2width_2dim_2]?=?size(Img2
- 上一篇:LMS均衡算法的matlab仿真
- 下一篇:Matlab光學實驗的模擬
評論
共有 條評論