当前位置: 首页 > 工具软件 > oct > 使用案例 >

OCT-图像降采样

韩征
2023-12-01
function Idown = dsample(I,N) 
[row,col] = size(I); 
drow = round(row/N); 
dcol = round(col/N); 
Idown = ones(drow,dcol); 
p =1; 
q =1; 
for i = 1:N:row 
    for j = 1:N:col 
         Idown(p,q) = I(i,j); 
         q = q+1; 
    end 
    q =1; 
    p = p+1; 
end 
end 
 
 
 
%¸更改主程序部分
    adata=dsample(adata,2);%降采样系数为2
    adata=dsample(adata,4);%K=4
    adata=dsample(adata,8);%K=8
    abs_fft_correct_adata2(:,:)=abs_fft_correct_adata(1:sp/4,:)-40;
    abs_fft_correct_adata2(:,:)=abs_fft_correct_adata(1:sp/8,:)-40;
    abs_fft_correct_adata2(:,:)=abs_fft_correct_adata(1:sp/16,:)-40;
 类似资料: