Analisis Perbandingan Least Significant Bit (LSB) dan Least Significant Bit (LSB) dengan Penyisipan menurut Fungsi Linear Pada teknik Steganografi

Gratis

0
0
16
7 months ago
Preview
Full text

Listing Menu Sistem

  function varargout = ekstrak(varargin) gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @ekstrak_OpeningFcn, ... 'gui_OutputFcn', @ekstrak_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 function ekstrak_OpeningFcn(hObject, eventdata, handles, varargin) handles.output = hObject; guidata(hObject, handles); function varargout = ekstrak_OutputFcn(hObject, eventdata, handles) varargout{1} = handles.output; function edit1_Callback(hObject, eventdata, handles) function edit1_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function pushbutton1_Callback(hObject, eventdata, handles) [nama_file,nama_path] = uigetfile({'*.bmp';},'Buka Citra'); if ~isequal(nama_file,0) awal1=(fullfile(nama_path,nama_file)); handles.citra1=imread(awal1); guidata(hObject,handles); axes(handles.axes1); imshow(handles.citra1); ok=imfinfo(awal1); set(handles.edit1,'String',ok.Filename); end function pushbutton2_Callback(hObject, eventdata, handles) load('pqfile.mat', 'rr','cc'); [bbb1 kk1 zz1]=size(handles.citra1); jum1=bbb1*kk1*zz1; bar1=reshape(handles.citra1,jum1,1); p1=dec2bin(bar1); [b1 k1]=size(p1); x=1; q=1; for tt=1:b1 for dd=1:k1 if mod (dd,8)==0 && x<=rr && q<=cc pesan(x,q)= p1(tt,dd); q=q+1; if q==8 q=1; x=x+1; end end end end g=bin2dec(pesan); h=char(g);

  lol=transpose(h); guidata(hObject,handles); set(handles.listbox1,'String',lol); function pushbutton3_Callback(hObject, eventdata, handles) [file,path]=uiputfile('*.bmp','save'); Name=fullfile(path,file); imwrite(handles.formasi,Name); function pushbutton4_Callback(hObject, eventdata, handles) cla(handles.axes1,'reset'); set(handles.axes1,'xtick',[],'ytick',[],'Xcolor','b','Ycolor','b'); cla(handles.axes2,'reset'); set(handles.axes2,'xtick',[],'ytick',[],'Xcolor','b','Ycolor','b'); set(handles.listbox1,'String',''); set(handles.edit1,'String',''); set(handles.edit2,'String',''); function pushbutton5_Callback(hObject, eventdata, handles) close(gcbf) Menu_mahdi function listbox1_Callback(hObject, eventdata, handles) function listbox1_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit2_Callback(hObject, eventdata, handles) function edit2_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function menu_Callback(hObject, eventdata, handles) Menu_mahdi function embed_Callback(hObject, eventdata, handles) function ekstrak_Callback(hObject, eventdata, handles) function keluar_Callback(hObject, eventdata, handles) choice = questdlg('Exit?','confirm',... 'Yes','No','No'); switch choice case 'Yes' close all; end function LSB_eks_Callback(hObject, eventdata, handles) ekstrak function MLSB_eks_Callback(hObject, eventdata, handles) extmlsb function LSB_Callback(hObject, eventdata, handles) sisip function MLSB_Callback(hObject, eventdata, handles) sismlsb

  

Listing Insertion LSB dan perhitungan Fidelity

  function varargout = sisip(varargin) gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @sisip_OpeningFcn, ... 'gui_OutputFcn', @sisip_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 function sisip_OpeningFcn(hObject, eventdata, handles, varargin) handles.output = hObject; guidata(hObject, handles); function varargout = sisip_OutputFcn(hObject, eventdata, handles) varargout{1} = handles.output; function pushbutton1_Callback(hObject, eventdata, handles) R1_s = handles.citra(:,:,:); R2_s = handles.formasi(:,:,:); dR_s = abs(double(R1_s) - double(R2_s)); mse_s=(dR_s(:).^2); p=length(mse_s); mse2=(sum(mse_s(1:p))/p); set(handles.edit1,'String',mse2); function pushbutton2_Callback(hObject, eventdata, handles) R1_s = handles.p(:,:); R2_s = handles.baru(:,:); dR_s = ((R1_s) - (R2_s)); ber_o=(dR_s(:)); p=length(ber_o); beru=(sum(dR_s(1:p))/p); set(handles.edit7,'String',beru); function pushbutton3_Callback(hObject, eventdata, handles) [file,path]=uiputfile('*.bmp','save'); Name=fullfile(path,file); imwrite(handles.formasi,Name); function pushbutton4_Callback(hObject, eventdata, handles) [nama_file,nama_path] = uigetfile({'*.bmp';},'Buka Citra'); if ~isequal(nama_file,0) awal=(fullfile(nama_path,nama_file)); handles.citra=imread(awal); guidata(hObject,handles); axes(handles.axes1); imshow(handles.citra); o=imfinfo(awal); set(handles.edit4,'String',o.FileSize/1024); end function pushbutton5_Callback(hObject, eventdata, handles) [nama_file,nama_path] = uigetfile({'*.txt';},'Buka Citra'); if ~isequal(nama_file,0) awal=(fullfile(nama_path,nama_file)); handles.tulis=fileread(awal); guidata(hObject,handles); set(handles.listbox1,'String',handles.tulis); end function edit1_Callback(hObject, eventdata, handles) function edit1_CreateFcn(hObject, eventdata, handles)

  if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function pushbutton6_Callback(hObject, eventdata, handles) close(gcbf); function pushbutton7_Callback(hObject, eventdata, handles) tic [bbb kk zz]=size(handles.citra); jum=bbb*kk*zz; bar=reshape(handles.citra,jum,1); p=dec2bin(bar); handles.p=p; [b k]=size(p); l=double(handles.tulis); j=dec2bin(l); savefile = 'pqfile.mat'; [rr cc]=size(j); s=1; r=1; for aa=1:b for bb=1:k if mod (bb,8) ==0 && s<rr+1 && r<cc+1 baru(aa,bb)=j(s,r); r=r+1; if r==cc+1 r=1; s=s+1; end else baru(aa,bb)=p(aa,bb); end end end baru handles.baru=baru; g=bin2dec(baru); lolo=toc; handles.formasi=uint8(reshape(g,bbb,kk,zz)); axes(handles.axes2); imshow(handles.formasi); guidata(hObject,handles); set(handles.edit3,'String',lolo); save(savefile, 'rr', 'cc'); function edit2_Callback(hObject, eventdata, handles) function edit2_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit2_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit3_Callback(hObject, eventdata, handles) function edit3_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function pushbutton8_Callback(hObject, eventdata, handles) cla(handles.axes1,'reset'); set(handles.axes1,'xtick',[],'ytick',[],'Xcolor','b','Ycolor','b'); cla(handles.axes2,'reset'); set(handles.axes2,'xtick',[],'ytick',[],'Xcolor','b','Ycolor','b'); set(handles.edit4,'String',''); set(handles.edit1,'String',''); set(handles.edit3,'String',''); set(handles.text7,'String',''); set(handles.text9,'String',''); function pushbutton9_Callback(hObject, eventdata, handles) close(gcbf) Menu_mahdi function edit4_Callback(hObject, eventdata, handles) function edit4_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function listbox1_Callback(hObject, eventdata, handles) function listbox1_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function menu_Callback(hObject, eventdata, handles) Menu_mahdi function embed_Callback(hObject, eventdata, handles) function ekstrak_Callback(hObject, eventdata, handles) function LSB_ex_Callback(hObject, eventdata, handles) ekstrak function MLSB_ex_Callback(hObject, eventdata, handles) extmlsb function LSB_Callback(hObject, eventdata, handles) sisip function MLSB_Callback(hObject, eventdata, handles) sismlsb function Keluar_Callback(hObject, eventdata, handles) choice = questdlg('Exit?','confirm',... 'Yes','No','No'); switch choice case 'Yes' close all; end function pushbutton10_Callback(hObject, eventdata, handles) [bbb kk zz]=size(handles.citra); jum=bbb*kk*zz; bar=reshape(handles.citra,jum,1); p=dec2bin(bar); [b k]=size(p); handles.kar=floor(b/7); guidata(hObject,handles); set(handles.edit6,'String',handles.kar); function edit6_Callback(hObject, eventdata, handles) function edit6_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end

function edit7_Callback(hObject, eventdata, handles) function edit7_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end

Listing Insertion MLSB dan Perhitungan Fidelity

  function varargout = sismlsb(varargin) gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @sismlsb_OpeningFcn, ... 'gui_OutputFcn', @sismlsb_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 function sismlsb_OpeningFcn(hObject, eventdata, handles, varargin) handles.output = hObject; guidata(hObject, handles); function varargout = sismlsb_OutputFcn(hObject, eventdata, handles) varargout{1} = handles.output; function pushbutton1_Callback(hObject, eventdata, handles) R1_s = handles.citra(:,:,:); R2_s = handles.formasi(:,:,:); dR_s = abs(double(R1_s) - double(R2_s)); mse_s=(dR_s(:).^2); p=length(mse_s); mse2=(sum(mse_s(1:p))/p); set(handles.edit5,'String',mse2); function pushbutton2_Callback(hObject, eventdata, handles) R1_s = handles.p(:,:); R2_s = handles.gambarbaru(:,:); dR_s = ((R1_s) - (R2_s)); ber_o=(dR_s(:)); p=length(ber_o); beru=(sum(dR_s(1:p))/p); set(handles.edit6,'String',beru); function pushbutton3_Callback(hObject, eventdata, handles) [file,path]=uiputfile('*.bmp','save'); Name=fullfile(path,file); imwrite(handles.formasi,Name); function pushbutton4_Callback(hObject, eventdata, handles) [nama_file,nama_path] = uigetfile({'*.bmp';},'Buka Citra'); if ~isequal(nama_file,0) awal=(fullfile(nama_path,nama_file)); handles.citra=imread(awal); citra=handles.citra; guidata(hObject,handles); axes(handles.axes1); imshow(handles.citra); o=imfinfo(awal); set(handles.edit4,'String',o.FileSize/1024); set(handles.edit1,'String',o.Filename); end function pushbutton5_Callback(hObject, eventdata, handles) [nama_file,nama_path] = uigetfile({'*.txt';},'Buka Citra'); if ~isequal(nama_file,0) awal=(fullfile(nama_path,nama_file)); handles.tulis=fileread(awal); l=double(handles.tulis); j=dec2bin(l); [apa ini]=size(j); if apa > handles.kar errordlg('text melampaui kapaitas ','Error'); return end guidata(hObject,handles); set(handles.listbox1,'String',handles.tulis); end function edit1_Callback(hObject, eventdata, handles) function edit1_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function pushbutton6_Callback(hObject, eventdata, handles) close(gcbf); function pushbutton7_Callback(hObject, eventdata, handles) tic [bbb kk zz]=size(handles.citra); jum=bbb*kk*zz; lipat=bbb*3; bar=reshape(handles.citra,jum,1); p=dec2bin(bar); handles.p=p; l=double(handles.tulis); j=dec2bin(l); savefile = 'varmlsbfile.mat'; [rr cc]=size(j); x1=1; y1=1; m=handles.m; b=handles.b; a=1; semua=lipat*kk*8; skalar=8*kk; for yuyu=1:lipat rumus=(m*yuyu)+b; if rumus <= kk barisasli(a)=kk*yuyu+rumus; nilai_x(a)=yuyu; a=a+1; rumus1=barisasli; end end %figure,plot(nilai_x,rumus1) %handles.r=handles.nilai_x; barisasli; handles.rumus1=rumus1; handles.nilai_x=nilai_x; [ko l]=size(barisasli); ss2=1; barisasli; for tt=1:lipat*kk for uu=1:8 gambarbaru(tt,uu)=p(tt,uu); if ss2<=l && barisasli(ss2)==tt && uu==8 && x1<=rr gambarbaru(tt,8)=j(x1,y1); y1=y1+1; ss2=ss2+1; if y1>cc x1=x1+1; y1=1; end end end end p; j; gambarbaru; handles.gambarbaru=gambarbaru; [be le lu]=size(handles.citra); [jj1 kk1]=size(gambarbaru); g=bin2dec(gambarbaru); kok=toc;

handles.g=g; handles.formasi=uint8(reshape(g,be,le,lu)); axes(handles.axes2); imshow(handles.formasi); guidata(hObject,handles); set(handles.edit3,'String',kok); m=handles.m; b=handles.b; save(savefile, 'rr', 'cc','m','b'); function edit2_Callback(hObject, eventdata, handles) function edit2_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit3_Callback(hObject, eventdata, handles) function edit3_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function pushbutton8_Callback(hObject, eventdata, handles) cla(handles.axes1,'reset'); set(handles.axes1,'xtick',[],'ytick',[],'Xcolor','b','Ycolor','b'); cla(handles.axes2,'reset'); set(handles.axes2,'xtick',[],'ytick',[],'Xcolor','b','Ycolor','b'); set(handles.edit4,'String',''); set(handles.edit1,'String',''); set(handles.edit3,'String',''); set(handles.edit5,'String',''); set(handles.edit6,'String',''); set(handles.edit7,'String',''); set(handles.edit8,'String',''); set(handles.text5,'String',''); set(handles.text6,'String',''); set(handles.listbox1,'String',''); clear all; clc; function pushbutton9_Callback(hObject, eventdata, handles) close(gcbf) Menu_mahdi function edit4_Callback(hObject, eventdata, handles) function edit4_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function listbox1_Callback(hObject, eventdata, handles) function listbox1_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end

function pushbutton10_Callback(hObject, eventdata, handles) handles.m=randi([1,3]);%%%%%%% set(handles.edit7,'String',handles.m); handles.b=randi([1,3]); %%%%%%% set(handles.edit8,'String',handles.b); [bbb kk zz]=size(handles.citra); jum=bbb*kk*zz; lipat=bbb*3; bar=reshape(handles.citra,jum,1); p=dec2bin(bar); x1=1; y1=1; a=1; semua=lipat*kk*8; skalar=8*kk; for yuyu=1:lipat rumus=(handles.m*yuyu)+handles.b; if rumus <= kk barisasli(a)=kk*yuyu+rumus; a=a+1; end end [ko l]=size(barisasli); ss1=1; barisasli; for tt=1:lipat*kk for uu=1:8 if ss1<=l && barisasli(ss1)==tt && uu==8 ss1=ss1+1; end end end bit=ss1-1; set(handles.text5,'String',bit); handles.kar=floor(bit/7); guidata(hObject,handles); set(handles.text6,'String',handles.kar); function edit5_Callback(hObject, eventdata, handles) function edit5_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit6_Callback(hObject, eventdata, handles) function edit6_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit7_Callback(hObject, eventdata, handles) function edit7_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end

  function edit8_Callback(hObject, eventdata, handles) function edit8_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function menu_Callback(hObject, eventdata, handles) Menu_mahdi function embed_Callback(hObject, eventdata, handles) function ekstrak_Callback(hObject, eventdata, handles) function keluar_Callback(hObject, eventdata, handles) choice = questdlg('Exit?','confirm',... 'Yes','No','No'); switch choice case 'Yes' close all; end function lsb_eks_Callback(hObject, eventdata, handles) ekstrak function mlsb_eks_Callback(hObject, eventdata, handles) extmlsb function LSB_Callback(hObject, eventdata, handles) sisip function MLSB_Callback(hObject, eventdata, handles) sismlsb function listbox2_Callback(hObject, eventdata, handles) function listbox2_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function pushbutton11_Callback(hObject, eventdata, handles) figure,plot(handles.nilai_x,handles.rumus1) handles.r=handles.nilai_x;

Listing Ekstaksi LSB

  function varargout = ekstrak(varargin) gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @ekstrak_OpeningFcn, ... 'gui_OutputFcn', @ekstrak_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

  function ekstrak_OpeningFcn(hObject, eventdata, handles, varargin) handles.output = hObject; guidata(hObject, handles); function varargout = ekstrak_OutputFcn(hObject, eventdata, handles) varargout{1} = handles.output; function edit1_Callback(hObject, eventdata, handles) function edit1_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function pushbutton1_Callback(hObject, eventdata, handles) [nama_file,nama_path] = uigetfile({'*.bmp';},'Buka Citra'); if ~isequal(nama_file,0) awal1=(fullfile(nama_path,nama_file)); handles.citra1=imread(awal1); guidata(hObject,handles); axes(handles.axes1); imshow(handles.citra1); ok=imfinfo(awal1); set(handles.edit1,'String',ok.Filename); end function pushbutton2_Callback(hObject, eventdata, handles) load('pqfile.mat', 'rr','cc'); [bbb1 kk1 zz1]=size(handles.citra1); jum1=bbb1*kk1*zz1; bar1=reshape(handles.citra1,jum1,1); p1=dec2bin(bar1); [b1 k1]=size(p1); x=1; q=1; for tt=1:b1 for dd=1:k1 if mod (dd,8)==0 && x<=rr && q<=cc pesan(x,q)= p1(tt,dd); q=q+1; if q==8 q=1; x=x+1; end end end end g=bin2dec(pesan); h=char(g); lol=transpose(h); guidata(hObject,handles); set(handles.listbox1,'String',lol); function pushbutton3_Callback(hObject, eventdata, handles) [file,path]=uiputfile('*.bmp','save'); Name=fullfile(path,file); imwrite(handles.formasi,Name); function pushbutton4_Callback(hObject, eventdata, handles) cla(handles.axes1,'reset'); set(handles.axes1,'xtick',[],'ytick',[],'Xcolor','b','Ycolor','b'); cla(handles.axes2,'reset'); set(handles.axes2,'xtick',[],'ytick',[],'Xcolor','b','Ycolor','b'); set(handles.listbox1,'String',''); set(handles.edit1,'String',''); set(handles.edit2,'String',''); function pushbutton5_Callback(hObject, eventdata, handles) close(gcbf) Menu_mahdi

  function listbox1_Callback(hObject, eventdata, handles) function listbox1_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit2_Callback(hObject, eventdata, handles) function edit2_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function menu_Callback(hObject, eventdata, handles) Menu_mahdi function embed_Callback(hObject, eventdata, handles) function ekstrak_Callback(hObject, eventdata, handles) function keluar_Callback(hObject, eventdata, handles) choice = questdlg('Exit?','confirm',... 'Yes','No','No'); switch choice case 'Yes' close all; end function LSB_eks_Callback(hObject, eventdata, handles) ekstrak function MLSB_eks_Callback(hObject, eventdata, handles) extmlsb function LSB_Callback(hObject, eventdata, handles) sisip function MLSB_Callback(hObject, eventdata, handles) sismlsb

Listing Ekstaksi LSB menurut Fungsi Persamaan Linear

  function varargout = extmlsb(varargin) gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @extmlsb_OpeningFcn, ... 'gui_OutputFcn', @extmlsb_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 function extmlsb_OpeningFcn(hObject, eventdata, handles, varargin) handles.output = hObject;

  guidata(hObject, handles); function varargout = extmlsb_OutputFcn(hObject, eventdata, handles) varargout{1} = handles.output; function edit1_Callback(hObject, eventdata, handles) function edit1_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function pushbutton1_Callback(hObject, eventdata, handles) [nama_file,nama_path] = uigetfile({'*.bmp';},'Buka Citra'); if ~isequal(nama_file,0) awal1=(fullfile(nama_path,nama_file)); handles.citra=imread(awal1); guidata(hObject,handles); axes(handles.axes1); imshow(handles.citra); ok=imfinfo(awal1); set(handles.edit1,'String',ok.Filename); end function pushbutton2_Callback(hObject, eventdata, handles) load('varmlsbfile.mat', 'rr', 'cc','m','b'); [bbb kk zz]=size(handles.citra); jum=bbb*kk*zz; lipat=bbb*3; bar=reshape(handles.citra,jum,1); p=dec2bin(bar); handles.p=p; x1=1; y1=1; a=1; semua=lipat*kk*8; skalar=8*kk; for yuyu=1:lipat pisah=(a/lipat)*jum; rumus=(m*yuyu+b)*8; if rumus <=skalar barisbaru=pisah*8; koory=barisbaru+rumus; hslbg=(koory/(skalar)); hslbg=floor(hslbg); hsl=mod(koory,skalar); hslak=hsl/8; oppp(yuyu)=round((kk*hslbg)+hslak); a=a+1; end end [ko l]=size(oppp); ss2=1; b1=1; k1=1; for a=1:l if b1<=rr && k1<=kk pesanmlsb(b1,k1)=p(oppp(a),8); k1=k1+1; if k1>=8 b1=b1+1; k1=1; end end end pesanmlsb g=bin2dec(pesanmlsb); h=char(g); lol=transpose(h); guidata(hObject,handles); set(handles.listbox1,'String',lol); function pushbutton3_Callback(hObject, eventdata, handles) [file,path]=uiputfile('*.bmp','save'); Name=fullfile(path,file); imwrite(handles.formasi,Name); function pushbutton4_Callback(hObject, eventdata, handles) cla(handles.axes1,'reset'); set(handles.axes1,'xtick',[],'ytick',[],'Xcolor','b','Ycolor','b'); cla(handles.axes2,'reset'); set(handles.axes2,'xtick',[],'ytick',[],'Xcolor','b','Ycolor','b'); set(handles.listbox1,'String',''); set(handles.edit1,'String',''); set(handles.edit2,'String',''); function pushbutton5_Callback(hObject, eventdata, handles) close(gcbf) Menu_mahdi function listbox1_Callback(hObject, eventdata, handles) function listbox1_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit2_Callback(hObject, eventdata, handles) function edit2_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function menu_Callback(hObject, eventdata, handles) Menu_mahdi function embed_Callback(hObject, eventdata, handles) function ekstrak_Callback(hObject, eventdata, handles) function keluar_Callback(hObject, eventdata, handles) choice = questdlg('Exit?','confirm',... 'Yes','No','No'); switch choice case 'Yes' close all; end function LSB_eks_Callback(hObject, eventdata, handles) ekstrak function MLSB_eks_Callback(hObject, eventdata, handles) extmlsb function LSB_Callback(hObject, eventdata, handles)

sisip function MLSB_Callback(hObject, eventdata, handles) sismlsb

Dokumen baru

Download (16 Halaman)
Gratis

Tags

Least Significant Bit Lsb Least Significant Bit 1 Lsb Metode Least Significant Bit Lsb Dan End Modified Least Significant Bit Dengan Least Significant Bit Least Significant Bit Least Signifcant Bit Lsb The Least Significant Bit Modified Least Significant Bit
Show more

Dokumen yang terkait

Analisis Perbandingan Metode Low Bit Coding Dan Least Significant Bit Untuk Digital Watermarking Pada File Wma
7
95
115
Steganografi Teks Menggunakan Pangram Dan Medium Citra Pada Enhanced Least Significant Bit
6
88
109
Analisis Ketahanan Watermarking Citra dengan Algoritma Modified Least Significant Bit (MLSB)
6
78
83
Analisis Kombinasi Algoritma Watermarking Modified Least Significant Bit Dengan Least Significant Bit +1
2
57
94
Analisis Perbandingan Least Significant Bit (LSB) dan Least Significant Bit (LSB) dengan Penyisipan menurut Fungsi Linear Pada teknik Steganografi
1
56
102
Implementasi Kriptografi Algoritma Elgamal Dengan Steganografi Teknik Least Significant Bit (LSB) Berdasarkan Penyisipan Menggunakan Fungsi Linier
4
81
114
Perancangan Perangkat Lunak Steganografi Audio Mp3 Pada Pengamanan Pesan Dengan Algoritma Least Significant Bit (LSB) Dengan Modifikasi Jarak Sisip
7
69
91
Implementasi Keamanan Teks Pada Citra Bitmap Dengan Kombinasi Algoritma Knapsack Dan Algoritma Least Significant Bit (LSB) Terhadap Modifikasi Nilai Brightness
1
80
84
Implementasi Steganografi Least Significant Bit (LSB) Dengan Modifikasi Vigenere Cipher Pada Citra Digital
8
78
79
Aplikasi keamanan informasi menggunakan teknik steganografi dengan metode Least Significant Bit (LSB) insertion dan RC4
31
169
221
Penyisipan Data Kedalam File Audio Menggunakan Metoda Least Significant Bit
0
0
5
STEGANOGRAFI PADA FRAME VIDEO STATIONER MENGGUNAKAN METODE LEAST SIGNIFICATION BIT (LSB) Steganography on Stationary Video with Least Significant Bit (LSB) Method
0
0
8
Pengamanan Data Menggunakan Kriptografi EC Signcryption dan Steganografi Least Significant Bit (LSB) Dini Triasanti
1
1
9
1 Steganografi Teks menggunakan Pangram dan Medium Citra pada Enhanced Least Significant Bit
0
0
32
BAB II DASAR TEORI 2.1. Watermarking - Analisis Kombinasi Algoritma Watermarking Modified Least Significant Bit Dengan Least Significant Bit +1
0
0
25
Show more