gusucode.com > 图像处理系统仿真源码程序, > 图像处理系统仿真源码程序,/CIUGRAM/Ciugram.m

    function varargout = Ciugram(varargin)
% CIUGRAM MATLAB code for Ciugram.fig
%      CIUGRAM, by itself, creates a new CIUGRAM or raises the existing
%      singleton*.
%
%      H = CIUGRAM returns the handle to a new CIUGRAM or the handle to
%      the existing singleton*.
%
%      CIUGRAM('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in CIUGRAM.M with the given input arguments.
%
%      CIUGRAM('Property','Value',...) creates a new CIUGRAM or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before Ciugram_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to Ciugram_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help Ciugram

% Last Modified by GUIDE v2.5 22-May-2013 13:09:34

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @Ciugram_OpeningFcn, ...
                   'gui_OutputFcn',  @Ciugram_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
end

% --- Executes just before Ciugram is made visible.
function Ciugram_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to Ciugram (see VARARGIN)

% Choose default command line output for Ciugram
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes Ciugram wait for user response (see UIRESUME)
% uiwait(handles.figure1);
setappdata(0, 'hMainGui', gcf );

img = imread('ciugramLogo.png');
axes(handles.axes3);
imshow(img);

im = imread('ciuLogo.jpg');
axes(handles.axes4);
imshow(im)


end
% --- Outputs from this function are returned to the command line.
function varargout = Ciugram_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;
end

% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
hMainGui = getappdata(0, 'hMainGui');
fileName = uigetfile('*.*','File Selector');
setappdata(hMainGui, 'fileName', fileName);
set(handles.default, 'Value', 1);

img = imread(fileName);
axes(handles.axes1);
imshow(img);

set(allchild(handles.axes2),'visible','off');
set(handles.axes2, 'Visible', 'off');
end
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

hMainGui = getappdata(0, 'hMainGui');
saveImage = getappdata(hMainGui, 'saveImage');
imsave(saveImage);

end

% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
INFO;
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NOSTALGIA
function [img] = nostalgia(im)
    img = rgb2gray(im);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% REVERSE BRIGHTNESS
function [imgE] = reverseBright(im)
    img = rgb2gray(im);
    imgE = imadjust(img,[0.30; 0.85],[0.90; 0.00], 0.90);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% GRAY SCALE SKETCH
function [CI] = graySketch(im)
    img = rgb2gray(im);
    effect = entropyfilt(img,getnhood(strel('disk',5)));
    effect = effect/max(effect(:));
    CIM = imadjust(effect, [0.4 1], [0 0.6]);
    CI=imadjust(CIM,[0.30; 0.85],[0.90; 0.00], 0.90);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BLURMET

function [ blurr ] = blurmet(im)
    NewImg = im;
    blurmetFilter = fspecial('disk',17);
    NewImg = imfilter(NewImg,blurmetFilter);
    blurr = (rgb2gray(NewImg));
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SEPIAMET

function [NewImg] = sepiamet(im)
    NewImg = im;
    R=NewImg(:,:,1);
    G=NewImg(:,:,2);
    B=NewImg(:,:,3);
    %Approximate Sepia Values(From Photoshop "Color Balance" Tool)
    NewImg(:,:,1)=R+100;
    NewImg(:,:,2)=G+24;
    NewImg(:,:,3)=B-100;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % CBA
function [img] = flit1(xyz)
    a = xyz;
    [x,map] = rgb2ind(a, 0.1);

    [sx sy sz] = size(a);
    asd = x;
    img = asd;

end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ISTBL

function funk = ciugram (a)
    b = a;

    a=rgb2hsv(b);
    a(:,:,1)=a(:,:,1)+a(:,:,1)*0.4;
    a(:,:,2)=a(:,:,2)+0.5;
    c=hsv2rgb(a);
    funk = c;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ALPER4
function [img] = alper4(im)
    l= im;
    hUnsharpFiltresi = fspecial('unsharp');
    img = imfilter(l, hUnsharpFiltresi);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HAZEIMAGE
function [Ig] = haze(im)
    I = im;
    G = fspecial('gaussian',[10 70],3);
    Ig = imfilter(I,G,'same');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% YELLOWISHIMAGE

function [im] = yellowImage(img)
    im=img;
    [sx sy sz] = size(im);
   
    for j=1:sx
        for i=1:sy
            if im(j,i,1)>im(j,i,2)
                im(j,i,2)=im(j,i,1);
            else
                im(j,i,2)=im(j,i,3);
            end
        end
    end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% STRANGEFILTER
function [Enhanced1] = strangeFilter(im)
    erhan = im;
    SE = strel('Disk',18);
    Enhanced = imsubtract(imadd(erhan,imtophat(erhan,SE)),imbothat(erhan,SE));
    Enhanced1 = imadjust(erhan,[0.20 0.00 0.09; 0.83 1.00 0.52],[0.00 0.00 1.00; 1.00 1.00 0.00], [1.10 2.70 1.00]);
    r = fliplr(Enhanced1(:,:,1));
    g = fliplr(Enhanced1(:,:,2));
    b = fliplr(Enhanced1(:,:,3));
    Enhanced1 = cat(3,r,g,b);
    CompositeImage = Enhanced1;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BLURREDGRAY
function [im_lena] = blurredGray(im)
    im = im;
    I = rgb2gray(im);

    im_lena=imopen(I,strel('disk',7));
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SNAPSHOT

function [im_lena] = snapShot(img)
    im = img;
    lena = rgb2gray(im);

    img(:,:,2)=150;
    img(:,:,1)=lena;
    img(:,:,3)=100;
    im_lena=imopen(img,strel('disk',8));
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LOVEFILTER
function [imgout] = loveFilter(im)
    img = im;
    imgout = decorrstretch(img);
    imgout = imadjust(imgout,[0.15; 0.75],[0.00; 1.00], 1.10);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HOTFILTER

function [imgout] = hotFilter(im)
    imgIn = im;
    imgout = imadjust(imgIn,[0.55; 0.75],[0.10; 0.80],0.50);
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CYAN FILTER
function [img] = cyanFilter(im)
    im=im;
    imG=rgb2gray(im);

    imb(:,:,3)=imG;
    imb(:,:,1)=85;
    imb(:,:,2)=50;
    img(:,:,:)=imb;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CAK1

function [o1] = cak( x )
    im = x;
    [sx sy sz]=size(im); 
    a=0;
    for i=1:sx
        if(sx*50/100)<i
             if mod(i,50)==0
                 a=a+100;
              end

              b(i:i,:,2)=im(i,:,2)+(a); 
        end

    end
    b(:,:,3)=im(:,:,3);
    b(:,:,1)=im(:,:,1);
    o1=b;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CAK2

function [o1] = cak2(x)
    im = x;
    hsv = rgb2hsv(im); 


    h = hsv(:,:,1); 
    s = hsv(:,:,2); 
    v = hsv(:,:,3); 

    h=h*0.3;
    v=v+v*0.2;
    s=s+s*0.1;
                 b(:,:,1)=h;

                b(:,:,2)=s;

                b(:,:,3)=v;

       bb=hsv2rgb(b);
       [sx sy sz]=size(bb);
       for i=1:sx

           for j=1:sy
               if ((sx-i)<((sy-j)*25/100))||((sy-j)<((sx-i)*25/100))

                   bb(i,j,1)=bb(i,j,1)-j*0.7;
                   bb(i,j,2)=bb(i,j,2)-(i)*0.9;
                   bb(i,j,3)=bb(i,j,3)+0.2;
               end
                if ((sx-i)<((sy-j)*50/100))||((sy-j)<((sx-i)*50/100))

                   bb(i,j,1)=bb(i,j,1)-j*0.1;
                   bb(i,j,2)=bb(i,j,2)-(i)*0.9;
                   bb(i,j,3)=bb(i,j,3)+0.6;
                end
                if ((sx-i)<((sy-j)*75/100))||((sy-j)<((sx-i)*75/100))

                   bb(i,j,1)=bb(i,j,1)-j*0.1;
                   bb(i,j,2)=bb(i,j,2)-(i)*0.9;
                   bb(i,j,3)=bb(i,j,3)+0.3;
                end
                if (sx-i)<(sy-j)||(sy-j)<(sx-i)

                   bb(i,j,1)=bb(i,j,1)-j*0.1;
                   bb(i,j,2)=bb(i,j,2)-(i)*0.9;
                   bb(i,j,3)=bb(i,j,3)-0.5;
               end
           end
       end

    o1 = bb;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FSM
function [o1] = fsm(x)
    im = x;

    [sx sy sz]=size(im); 

    for i=1:sx
        for j=1:sy


              b(i:i,j:j,2)=im(i,j,2)+((i+125)-(j+5)); 

        end
    end
     b(:,:,3)=im(:,:,3);
    b(:,:,1)=im(:,:,1)-100;


    o1 = b;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FSMA

function [o1] = fsma(x)
    im = x;
    hsv = rgb2hsv(im); 


    h = hsv(:,:,1); 
    s = hsv(:,:,2); 
    v = hsv(:,:,3); 

    h=h*0.2;
    v=v+v*0.6;
    s=s+s*0.5;

                 b(:,:,1)=h;

                b(:,:,2)=s;

                b(:,:,3)=v;

       bb=hsv2rgb(b);

    o1 = bb;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CAK_FSM

function [Y] = cakfsm(source)
    x1 = fsm(source);

    x2 = cak(source);
    x3 = fsma(source);
    x4 = cak2(source);

    [sx sy sz] = size(x1);
    Y(1:sx,1:sy,:) = x1;
    Y(1:sx,1+sy:sy+sy,:) = x2;
    Y(1+sx:sx+sx,1:sy,:) = uint8(x3*255);
    Y(1+sx:sx+sx,1+sy:sy+sy,:) = uint8(x4*255);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



% --- Executes when selected object is changed in uipanel2.
function uipanel2_SelectionChangeFcn(hObject, eventdata, handles)
% hObject    handle to the selected object in uipanel2 
% eventdata  structure with the following fields (see UIBUTTONGROUP)
%	EventName: string 'SelectionChanged' (read only)
%	OldValue: handle of the previously selected object or empty if none was selected
%	NewValue: handle of the currently selected object
% handles    structure with handles and user data (see GUIDATA)
switch get(eventdata.NewValue, 'Tag')
    
        case 'default'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);
            

            axes(handles.axes1);
            imshow(img);

            set(allchild(handles.axes2),'visible','off');
            set(handles.axes2, 'Visible', 'off');
            
        case 'nostalgia'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
     
            newImg = nostalgia(img);
            
            axes(handles.axes2);
            imshow(newImg);
            colormap(pink);
            
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
      
        case 'reversebright'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
     
            newImg = reverseBright(img);
            
            axes(handles.axes2);
            imshow(newImg);
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
        
        case 'grayscalesketch'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
     
            newImg = graySketch(img);
            
            axes(handles.axes2);
            imshow(newImg);
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
            
        case 'blurmet'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
     
            newImg = blurmet(img);
            
            axes(handles.axes2);
            imshow(newImg);
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
           
        case 'sepiamet'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = sepiamet(img);
            
            axes(handles.axes2);           
            imshow(newImg);
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
            
       
        case 'cba'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = flit1(img);
            
            axes(handles.axes2);           
            imshow(newImg);  
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
             
            
        
        case 'istbl'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = ciugram(img);
            
            axes(handles.axes2);           
            imshow(newImg);      
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
            
       case 'alper1'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            imge2 = im2bw(img, 0.5);
            imge2 = im2bw(img);
            
            axes(handles.axes2);           
            imshow(imge2); 
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
                 
                
      
        case 'alper4'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = alper4(img);
            
            axes(handles.axes2);           
            imshow(newImg); 
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
                 
               
             
          
        case 'hazeimage'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = haze(img);
            
            axes(handles.axes2);           
            imshow(newImg);
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
      
        case 'yellowishimage'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = yellowImage(img);
            
            axes(handles.axes2);           
            imshow(newImg); 
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
         
         
        case 'strangefilter'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = strangeFilter(img);
            
            axes(handles.axes2);           
            imshow(newImg);  
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
            
        case 'blurredgray'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = blurredGray(img);
            
            axes(handles.axes2);           
            imshow(newImg); 
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
            
        case 'snapshot'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = snapShot(img);
            
            axes(handles.axes2);           
            imshow(newImg);   
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
              
            
        case 'lovefilter'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = loveFilter(img);
            
            axes(handles.axes2);           
            imshow(newImg);
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
            
        case 'hotfilter'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = hotFilter(img);
            
            axes(handles.axes2);           
            imshow(newImg); 
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
            
        
        case 'cyanfilter'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = cyanFilter(img);
            
            axes(handles.axes2);           
            imshow(newImg);  
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
               
            
        case 'cak1'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = cak(img);
            
            axes(handles.axes2);           
            imshow(newImg); 
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
            
        case 'cak2'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = cak2(img);
            
            axes(handles.axes2);           
            imshow(newImg);
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
            
        case 'fsm'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = fsm(img);
            
            axes(handles.axes2);           
            imshow(newImg); 
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
             
            
        case 'fsma'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = fsma(img);
            
            axes(handles.axes2);           
            imshow(newImg);
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
            
       case 'cakfsm'
            hMainGui = getappdata(0, 'hMainGui');
            fileName = getappdata(hMainGui, 'fileName');
            img = imread(fileName);   
            set(handles.pushbutton2, 'Visible', 'on');
            
            axes(handles.axes1);
            imshow(img);
   
            newImg = cakfsm(img);
            
            axes(handles.axes2);           
            imshow(newImg);
            saveImage = handles.axes2;
            setappdata(hMainGui, 'saveImage', saveImage);
            
            
        end     
 end