当前位置:   article > 正文

matlab 仿真投影,MATLAB代做|FPGA代做】基于MATLAB的灰度投影算法仿真与分析

灰度投影算法matlab

资源简介:

MATLAB程序下载——一基于MATLAB的灰度投影算法仿真与分析。

if nargin == 2

range = 7;

flag = 0;

end

[m n] = size(imRef);

% vertical projection

refPv = sum(imRef);

curPv = sum(imCur);

% horizontal projection

refPh = sum(imRef');

curPh = sum(imCur');

% alculate MAD

for i=0:2*range

Pv_sum(i+1) = sum(abs(refPv(range+1:end-range) - curPv(i+1:end-2*range+i)));

Ph_sum(i+1) = sum(abs(refPh(range+1:end-range) - curPh(i+1:end-2*range+i)));

end

[vmin a] = min(Pv_sum);

[hmin b] = min(Ph_sum);

dc = a-range-1;

dr = b-range-1;

if flag == 1

% sub-pixel

% 抛物线插值法

if a>1&b>1

dc_sub = (Pv_sum(a-1)-Pv_sum(a+1))/(Pv_sum(a-1)+Pv_sum(a+1)-2*Pv_sum(a))/2.0;

dr_sub = (Ph_sum(b-1)-Ph_sum(b+1))/(Ph_sum(b-1)+Ph_sum(b+1)-2*Ph_sum(b))/2.0;

% sub-pixel 精度的位移矢量

else

dc_sub = 0;

dr_sub = 0;

end;

dc = dc + dc_sub;

dr = dr + dr_sub;

end

output = [dr dc];

资源下载:

解压密码均为:QQ1224848052

-------------------------------------------------------------------------------------

FPGA嵌入式代做,ZYNQ代做,APAC代做

QQ:1224848052

联系:highspeedlogic

QQ :1224848052

微信:HuangL1121

邮箱:1224848052@qq.com

微信扫一扫:

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/134975
推荐阅读
相关标签
  

闽ICP备14008679号