赞
踩
github:https://github.com/MichaelBeechan
CSDN:https://blog.csdn.net/u011344545
===================================================================
function [fx, fy, ft] = computeDerivatives(im1, im2)
if size(im2,1)==0
im2=zeros(size(im1));
end
% Horn-Schunck original method
fx = conv2(im1,0.25* [-1 1; -1 1],'same') + conv2(im2, 0.25*[-1 1; -1 1],'same');
fy = conv2(im1, 0.25*[-1 -1; 1 1], 'same') + conv2(im2, 0.25*[-1 -1; 1 1], 'same');
ft = conv2(im1,
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。