⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fm_gui.m

📁 此为基于图像配准的傅立叶变换源代码
💻 M
📖 第 1 页 / 共 2 页
字号:
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'Callback','fm_guifun register; fm_guifun regSelect;', ...
	'ListboxTop',0, ...
	'Position',[0.79 0.76 0.16 0.12], ...
   'String','REGISTER', ...
   'TooltipString','Register', ...
   'Tag','Pushbutton1');

% slider to control how many scale/rotation peaks to look at in finding the solution
h1 = uicontrol('Parent',h0, ...
    'Units','normalized', ...
	'BackgroundColor',colo, ...
    'Callback','fm_guifun setPerformanceLevel', ...
	'FontSize',10, ...
	'ForegroundColor',[1 0 0], ...    
    'Min',1,'Max',200,'Value',1, ...
    'Position',[0.79 0.74 0.16 0.02], ...
    'Style','slider',...
    'Tag','performLevel', ...
    'TooltipString','Number of phase correlation peaks to search');


% ------------------- axes for REGISTERED image ------------------------------------

h1 = axes('Parent',h0, ...
	'Box','on', ...
	'CameraUpVector',[0 1 0], ...
	'CameraUpVectorMode','manual', ...
	'Color',[1 1 1], ...
   'FontSize',8, ...
	'Position',[0.575 0.225 0.4 0.45], ...
   'Tag','Axes3', ...
   'NextPlot','add', ...
	'XColor',[0 0 0], ...
	'XTickMode','manual', ...
	'YColor',[0 0 0], ...
	'YTickMode','manual', ...
	'ZColor',[0 0 0]);

% xlabel
h2 = text('Parent',h1, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','off', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[0.4966216216216217 -0.03041825095057016 9.160254037844386], ...
	'Tag','Axes3Text4', ...
	'VerticalAlignment','cap');
set(get(h2,'Parent'),'XLabel',h2);

% ylabel
h2 = text('Parent',h1, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','off', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[-0.02364864864864864 0.4942965779467681 9.160254037844386], ...
	'Rotation',90, ...
	'Tag','Axes3Text3', ...
	'VerticalAlignment','baseline');
set(get(h2,'Parent'),'YLabel',h2);

% zlabel
h2 = text('Parent',h1, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','off', ...
	'HorizontalAlignment','right', ...
	'Interruptible','off', ...
	'Position',[-0.0777027027027027 2.247148288973384 9.160254037844386], ...
	'Tag','Axes3Text2', ...
	'Visible','off');
set(get(h2,'Parent'),'ZLabel',h2);

% title
h2 = text('Parent',h1, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','off', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[0.4966216216216217 1.022813688212928 9.160254037844386], ...
	'Tag','Axes3Text1', ...
	'VerticalAlignment','bottom');
set(get(h2,'Parent'),'Title',h2);

% -------------- POP-UP MENUS......... -------------------------------------

% static text for window type
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'FontSize',12, ...
   'ListboxTop',0, ...
  	'ForegroundColor',[0 0 1], ...
   'HorizontalAlignment','left', ...
   'Position',[0.58 0.86 0.07 0.04], ...
	'String','Window :', ...
	'Style','text', ...
	'Tag','textWindowType', ...
    'TooltipString','Window Type');

% ------------- Pop-up menu for window selection -------------------
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'Callback','fm_guifun SelectWindow; fm_guifun RotateScaleCropInput2; fm_guifun input1Select; fm_guifun input2Select;', ...
	'ListboxTop',0, ...
	'Position',[0.66 0.86 0.1 0.04], ...
	'String','none|bartlett|blackman|boxcar|chebwin|hamming|hann|kaiser|triang', ...
    'Style','popupmenu', ...
    'TooltipString','Choice of window for FFT calculation', ...
	'Tag','FFTwindow', ...
	'Value',1);

% static text for rotation interpolation type
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'FontSize',12, ...
   'ListboxTop',0, ...
  	'ForegroundColor',[0 0 1], ...
   'HorizontalAlignment','left', ...
   'Position',[0.58 0.82 0.07 0.04], ...
	'String','Rotation :', ...
	'Style','text', ...
	'Tag','textRotInterp', ...
    'TooltipString','Rotation Interpolation');

% ------------- Pop-up menu for rotation interpolation type -------------------
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'Callback','fm_guifun SetRotInterp; fm_guifun RotateScaleCropInput2; fm_guifun input1Select; fm_guifun input2Select;', ...
	'ListboxTop',0, ...
	'Position',[0.66 0.82 0.1 0.04], ...
	'String','nearest|bilinear|bicubic', ...
    'Style','popupmenu', ...
    'TooltipString','Rotation interpolation', ...
	'Tag','RotInterp', ...
	'Value',1);

% static text for scale interpolation type
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'FontSize',12, ...
   'ListboxTop',0, ...
  	'ForegroundColor',[0 0 1], ...
   'HorizontalAlignment','left', ...
   'Position',[0.58 0.78 0.07 0.04], ...
	'String','Scale :', ...
	'Style','text', ...
	'Tag','textSclInterp', ...
    'TooltipString','Scale Interpolation');

% ------------- Pop-up menu for scale interpolation type -------------------
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'Callback','fm_guifun SetSclInterp; fm_guifun RotateScaleCropInput2; fm_guifun input1Select; fm_guifun input2Select;', ...
	'ListboxTop',0, ...
	'Position',[0.66 0.78 0.1 0.04], ...
	'String','nearest|bilinear|bicubic', ...
    'Style','popupmenu', ...
    'TooltipString','Scale interpolation', ...
	'Tag','SclInterp', ...
	'Value',1);

% static text for log-polar interpolation type
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'FontSize',12, ...
   'ListboxTop',0, ...
  	'ForegroundColor',[0 0 1], ...
   'HorizontalAlignment','left', ...
   'Position',[0.58 0.74 0.07 0.04], ...
	'String','Log-polar :', ...
	'Style','text', ...
	'Tag','textLPInterp', ...
    'TooltipString','Log-Polar Interpolation');

% ------------- Pop-up menu for logpolar conversion selection -------------------
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'Callback','fm_guifun SetLogPolInterp; fm_guifun input1Select; fm_guifun input2Select;', ...
	'ListboxTop',0, ...
	'Position',[0.66 0.74 0.1 0.04], ...
	'String','nearest|bilinear|bicubic', ...
    'Style','popupmenu', ...
    'TooltipString','Log-polar interpolation', ...
	'Tag','LogPolInterp', ...
	'Value',1);

% ------------- Check-box for Text Display
h1 = uicontrol('Parent',h0, ...
   'Units','normalized', ...
  	'BackgroundColor',colo, ...
	'Callback','fm_guifun dispText', ...
	'ListboxTop',0, ...
	'Position',[0.8 0.88 0.05 0.05], ...
   'String','Debug', ...
   'TooltipString','Display text information', ...
   'Style','checkbox',...
	'Tag','cb_dispText');


% pop-up menu for registered image selection -------------------------------------
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'Callback','fm_guifun regSelect', ...
	'ListboxTop',0, ...
	'Position',[0.6 0.675 0.15 0.04], ...
	'String','Registered|Registered Image 1|Registered Image 2|Log-Polar Phase Correlation|Spatial Phase Correlation', ...
    'Style','popupmenu', ...
    'TooltipString','Registered image analysis selection', ...
	'Tag','reganalysis', ...
	'Value',1);

% static text boxes for displaying registration information ----------------------
% -------------------- TRANSLATION output -------------------------------------
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'FontSize',12, ...
   'ListboxTop',0, ...
  	'ForegroundColor',[0 0 1], ...
   'HorizontalAlignment','left', ...
   'Position',[0.6 0.15 0.07 0.02], ...
	'String','Translation', ...
	'Style','text', ...
	'Tag','textTransOut', ...
    'TooltipString','');

h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'FontSize',12, ...
   'ListboxTop',0, ...
  	'ForegroundColor',[0 0 1], ...
   'HorizontalAlignment','left', ...
   'Position',[0.68 0.15 0.07 0.02], ...
	'String','', ...
	'Style','text', ...
	'Tag','TransOut', ...
    'TooltipString','Registered Translation');

% -------------------- ROTATION output -------------------------------------
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'FontSize',12, ...
   'ListboxTop',0, ...
  	'ForegroundColor',[0 0 1], ...
   'HorizontalAlignment','left', ...
   'Position',[0.6 0.10 0.07 0.02], ...
	'String','Rotation', ...
	'Style','text', ...
	'Tag','textRotOut', ...
    'TooltipString','');

  h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'FontSize',12, ...
   'ListboxTop',0, ...
  	'ForegroundColor',[0 0 1], ...
   'HorizontalAlignment','left', ...
   'Position',[0.68 0.1 0.07 0.02], ...
	'String','', ...
	'Style','text', ...
	'Tag','RotOut', ...
    'TooltipString','Registered Rotation');

% -------------------- SCALE output -------------------------------------
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'FontSize',12, ...
   'ListboxTop',0, ...
  	'ForegroundColor',[0 0 1], ...
   'HorizontalAlignment','left', ...
   'Position',[0.6 0.05 0.07 0.02], ...
	'String','Scale', ...
	'Style','text', ...
	'Tag','textScaleOut', ...
    'TooltipString','');

  h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'FontSize',12, ...
   'ListboxTop',0, ...
  	'ForegroundColor',[0 0 1], ...
   'HorizontalAlignment','left', ...
   'Position',[0.68 0.05 0.07 0.02], ...
	'String','', ...
	'Style','text', ...
	'Tag','ScaleOut', ...
    'TooltipString','Registered Scale');

% ------------------------ DISPLAY PEAK CORRELATIONS ---------------------
% -------------------- SCALE output -------------------------------------
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'FontSize',12, ...
   'ListboxTop',0, ...
  	'ForegroundColor',[0 0 1], ...
   'HorizontalAlignment','left', ...
   'Position',[0.75 0.15 0.07 0.02], ...
	'String','', ...
	'Style','text', ...
	'Tag','TransPeakOut', ...
    'TooltipString','Translation Peak Phase Correlation');

  h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'FontSize',12, ...
   'ListboxTop',0, ...
  	'ForegroundColor',[0 0 1], ...
   'HorizontalAlignment','left', ...
   'Position',[0.75 0.06 0.07 0.04], ...
	'String','', ...
	'Style','text', ...
	'Tag','RSPeakOut', ...
    'TooltipString','Rotation/Scale Peak Phase Correlation');

% message saying what this is and who I am...
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',colo, ...
	'FontSize',10, ...
	'ForegroundColor',[1 0 0], ...
	'ListboxTop',0, ...
	'Position',[0.53  0.92 0.43 0.04], ...
   'Style','text', ...
   'String','Fourier-Mellin Transform GUI ... Adam Wilmer (aiw99r@ecs.soton.ac.uk)', ...
	'Tag','Text');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -