• 大小: 3KB
    文件类型: .zip
    金币: 2
    下载: 2 次
    发布日期: 2021-05-27
  • 语言: Matlab
  • 标签: FFBP  matlab  

资源简介

经测试可用的FFBP实现,提供给各位还在努力钻研的国内博士们参考

资源截图

代码片段和文件信息

function [Bp Im]=ffbp_for_david_pearce(Sim Pos Bp f)

%FFBP Fast factorised backprojection of synthetic aperture sonar data
%
% Usage: [Bp Im]=ffbp(Sim Pos Bp f)
%
%  Sim: struct containing important information about the simulation / raw data.
%
%  Bp: struct containing important information about the
%  backprojection.
%
%  Pos: struct containing the positions of the transmitter and the
%  receivers.
%  
%  See params_for_ffbp.m for a description of the required fields in Sim
%  Bp and Pos.
%
%  f: matrix containing the raw data.
%
%  Im: resulting image
%

tic

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------Main---------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[Fact Bp Im f]=pre_allocate(Sim Bp Pos f);
[Sim Bp Fact f]=stages(Fact Sim Bp Pos f);
[Im Bp]=last_stage(Fact Sim Bp Pos f Im);
toc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%---------stages-----------------------------------
function [Sim Bp Fact f]=stages(Fact Sim Bp Pos f)
Fact.stage=0;
Bp.error=0;
Fact.noSubimages=0;
Fact.min_range_old(1:Bp.Q_image(1)^2)=Sim.y_image_start;
Fact.parent(1:Bp.Q_image(1)^2)=[1:Bp.Q_image(1)^2];
if strcmp(Bp.weighting ‘ones‘) %Setting weights
    Bp.w(1:Fact.noReceivers)=ones(1 Fact.noReceivers);
else
    Bp.w(1:Fact.noReceivers)=eval(strcat(Bp.weighting‘(Fact.noReceivers)‘));
end %if strcmp(Bp.weighting ‘ones‘)

for s=Fact.stage+1:Bp.totalNoStages-1
    Fact.stage=Fact.stage+1;
    disp([‘-----------------------------------‘])
    disp([‘Stage=‘ num2str(Fact.stage)])
    sc=1; %Subimage count
    Fact.E=prod(Bp.Q_image(1:Fact.stage)); %Number of subimages on each side
    
    Fact.noSubimages=Fact.E^2; %Total number of subimages in the current stage
    
    Bp.error=Bp.error+(((Fact.xReceivers(12)-Fact.xReceivers(11))*Bp.Q_receivers(s)*Bp.xImageLength/Fact.E)/(4*Bp.y_image_start));
    
    disp([‘Error must be less than lambda/4‘])
    disp([‘Error=lambda/‘num2str(Sim.lambda/Bp.error)])
    if Sim.lambda/Bp.error<=4
        disp([‘Approximation error to large!‘])
    else
        disp([‘Approximation error OK‘])
    end
    if Bp.error>Bp.highest_error
        Bp.highest_error=Bp.error;
    end
    disp([‘Number of subimages=‘num2str(Fact.noSubimages)])
    disp([‘Number of receivers=‘num2str(Fact.noReceivers)])
    Fact.xEdges=Bp.x_image_start:(Bp.x_image_stop-Bp.x_image_start)/Fact.E:Bp.x_image_stop; %Edges of the subimages in x-direction [m]
    Fact.yEdges=Bp.y_image_start:(Bp.y_image_stop-Bp.y_image_start)/Fact.E:Bp.y_image_stop; %Edges of the subimages in y-direction [m]
    xMiddle=Bp.x_image_start+0.5*(Fact.xEdges(2)-Fact.xEdges(1)):Fact.xEdges(2)-Fact.xEdges(1):Bp.x_image_start+0.5*(Fact.xEdges(2)-Fact.xEdges(1))+(Fact.E-1)*(Fact.xEdges(2)-Fact.xEdges(1)); %Middle point of the subimages in x-direction [m]
    yMiddle=Bp.y_image_start+0.5*(Fact.yEdges(2)-Fa

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件       11049  2012-06-15 11:15  ffbp.m
     文件        1633  2012-06-15 11:15  params_for_ffbp.m

评论

共有 条评论