image thumbnail
from Display the fusion of two images by Dany Simard
This is a simple but efficient tool (GUI) for the visualization of 2 superposed images from workspa

DispFusion(Im1,Im2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Dany Simard                                                  %
%  dany.simard@gmail.com                                        %
%  CHUM, Universit de Montral , Qubec                        %
%  Visualization tool for 2D image fusion                       %
%  Version 1.0                                                  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function DispFusion(Im1,Im2)

if nargin==0
    Im1=zeros(4);
    Im2=zeros(4);
elseif nargin==1
    if ~isempty(Im1)
        Im2=zeros(size(Im1));
    else
        Im1=zeros(4);
        Im2=zeros(4);
    end
elseif nargin>1
    if isempty(Im2) && isempty(Im1)
        Im1=zeros(4);
        Im2=zeros(4);        
    elseif isempty(Im2)
        Im2=zeros(size(Im1));
    elseif isempty(Im1)
        Im1=zeros(size(Im2));    
    end
    
    if size(Im1)~=size(Im2)
    error('Two images with the same size are needed!!')
    end
end

    handles=guidata(DisplayFusionGUI);
    handles.Im1=Im1;
    handles.Im2=Im2;
    
    DisplayFusionGUI('Afficher',handles.figure1,[],handles);
    guidata(handles.figure1,handles);

Contact us at files@mathworks.com