SlideShare a Scribd company logo
1 of 12
Download to read offline
HỌC VIỆN CÔNG NGHỆ BƯU CHÍNH VIỄN THÔNG
                   KHOA: VIỄN THÔNG 2
               NGÀNH: ĐIỆN TỬ - VIỄN THÔNG




Môn : XỬ LÍ HÌNH ẢNH




Đề Tài : Tách ảnh đen trang ra thành 2 mặt phẳng LSB và MSB

                                               GVHD : Ts Nguyễn Thanh Bình
                                                       LỚP     : L11CQVT-N
                                                              SVTH : Nhóm 9
Danh sách sinh viên thực hiện :


Nguyễn Thành Tài : Nhóm Trưởng
Lí Trấn Đông
Huỳnh Bảo Phú
Lê Hồng Thành
Nguyễn Hoàng Duy Minh
Hồ Minh Quân
Tách ảnh trắng đen ra hai phần LSB và MSB


Ảnh gốc :




ảnh kết quả :
                MSB                       LSB
Để chạy chương trình ta thực hiện các bước sau :



Bước 1 : copy file bit_plane_32 ra một thư mục khác

Bước 2 : nhấn double clich vào files trên sau khi cài đạt xong

Bước 3 : chay file bit_plane_32.exe

Bước 4 : xuất hiện hộp thoại




Bước 5 : nhấn vào open chọn đường dẫn của files hình ành




Bước 6 : nhấn vào nút lsb để xem mặt phẳng ảnh - sau do ành sẽ xuất hiện :
Bước 7 : nhấn vào nút msb để xem mặt phẳng ảnh – sau đó ảnh xuất hiện




                     Code để chương trình chạy :
function varargout = bit(varargin)
% BIT MATLAB code for bit.fig
%    BIT, by itself, creates a new BIT or raises the existing
%    singleton*.
%
%    H = BIT returns the handle to a new BIT or the handle to
%    the existing singleton*.
%
%    BIT('CALLBACK',hObject,eventData,handles,...) calls the local
%    function named CALLBACK in BIT.M with the given input arguments.
%
%    BIT('Property','Value',...) creates a new BIT or raises the
%    existing singleton*. Starting from the left, property value pairs are
%    applied to the GUI before bit_OpeningFcn gets called. An
%      unrecognized property name or invalid value makes property application
%      stop. All inputs are passed to bit_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 bit


% Last Modified by GUIDE v2.5 15-Oct-2012 19:47:14


% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',         mfilename, ...
             'gui_Singleton', gui_Singleton, ...
             'gui_OpeningFcn', @bit_OpeningFcn, ...
             'gui_OutputFcn', @bit_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




% --- Executes just before bit is made visible.
function bit_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 bit (see VARARGIN)


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


% Update handles structure
guidata(hObject, handles);


% UIWAIT makes bit wait for user response (see UIRESUME)
% uiwait(handles.figure1);




% --- Outputs from this function are returned to the command line.
function varargout = bit_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;




% --- Executes on button press in open.
function open_Callback(hObject, eventdata, handles)
% hObject      handle to open (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles      structure with handles and user data (see GUIDATA)
[filename, pathname, filterindex]=uigetfile( ...
  {'*.jpg','JPEG — Joint Photographic Experts Group (*.jpg)'; ...
  '*.png','PNG — Portable Network Graphics (*.png)'; ...
  '*.bmp','BMP — Windows Bitmap (*.bmp)';...
   '*.*','All file (*.*)'}, ...
   'Open picture');
link = strcat(pathname,filename);
set(handles.edit_link,'String',link);




% --- Executes on button press in source.
function source_Callback(hObject, eventdata, handles)
% hObject      handle to source (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
link = get(handles.edit_link,'String');
image_rgb = imread(link);
figure(1);
imshow(image_rgb);




% --- Executes on button press in gray.
function gray_Callback(hObject, eventdata, handles)
% hObject    handle to gray (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
link = get(handles.edit_link,'String');
image_rgb = imread(link);
image_gray = rgb2gray(image_rgb);
figure(1);
imshow(image_gray);




% --- Executes on button press in lsb.
function lsb_Callback(hObject, eventdata, handles)
% hObject    handle to lsb (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
link = get(handles.edit_link,'String');
image_rgb = imread(link);
image_gray = rgb2gray(image_rgb);
image_bit_lsb = bitget(image_gray,1);
figure(1);
imshow(image_bit_lsb,[]);




% --- Executes on button press in msb.
function msb_Callback(hObject, eventdata, handles)
% hObject    handle to msb (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
link = get(handles.edit_link,'String');
image_rgb = imread(link);
image_gray = rgb2gray(image_rgb);
image_bit_msb = bitget(image_gray,8);
figure(1);
imshow(image_bit_msb,[]);




function edit_link_Callback(hObject, eventdata, handles)
% hObject    handle to edit_link (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit_link as text
%       str2double(get(hObject,'String')) returns contents of edit_link as a double




% --- Executes during object creation, after setting all properties.
function edit_link_CreateFcn(hObject, eventdata, handles)
% hObject     handle to edit_link (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles     empty - handles not created until after all CreateFcns called


% Hint: edit controls usually have a white background on Windows.
%      See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end




% --- Executes on button press in lsb_msb.
function lsb_msb_Callback(hObject, eventdata, handles)
% hObject     handle to lsb_msb (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles     structure with handles and user data (see GUIDATA)
link = get(handles.edit_link,'String');
image_rgb = imread(link);
image_gray = rgb2gray(image_rgb);
image_bit_lsb = bitget(image_gray,1);
image_bit_msb = bitget(image_gray,8);
lsb_msb=image_bit_msb + image_bit_lsb;
figure(1);
imshow(lsb_msb,[]);

More Related Content

Viewers also liked

Chuong 7.2 bai giai
Chuong 7.2   bai giaiChuong 7.2   bai giai
Chuong 7.2 bai giaithanhyu
 
Chuong 6.1 duong day dai
Chuong 6.1 duong day daiChuong 6.1 duong day dai
Chuong 6.1 duong day daithanhyu
 
Chuong 5.2 m4 c bai giai
Chuong 5.2 m4 c bai giaiChuong 5.2 m4 c bai giai
Chuong 5.2 m4 c bai giaithanhyu
 
Chuong2 mach xac lap dieu hoa
Chuong2  mach xac lap dieu hoaChuong2  mach xac lap dieu hoa
Chuong2 mach xac lap dieu hoathanhyu
 
Chuong 5.1 mang 4 cuc
Chuong 5.1 mang 4 cucChuong 5.1 mang 4 cuc
Chuong 5.1 mang 4 cucthanhyu
 
Chuong 7.1 mach loc dien
Chuong 7.1 mach loc dienChuong 7.1 mach loc dien
Chuong 7.1 mach loc dienthanhyu
 
Chuong 3.1 qua trinh qua do
Chuong 3.1 qua trinh qua doChuong 3.1 qua trinh qua do
Chuong 3.1 qua trinh qua dothanhyu
 
Chuong 4.1 tin hieu va pho
Chuong 4.1 tin hieu va phoChuong 4.1 tin hieu va pho
Chuong 4.1 tin hieu va phothanhyu
 

Viewers also liked (8)

Chuong 7.2 bai giai
Chuong 7.2   bai giaiChuong 7.2   bai giai
Chuong 7.2 bai giai
 
Chuong 6.1 duong day dai
Chuong 6.1 duong day daiChuong 6.1 duong day dai
Chuong 6.1 duong day dai
 
Chuong 5.2 m4 c bai giai
Chuong 5.2 m4 c bai giaiChuong 5.2 m4 c bai giai
Chuong 5.2 m4 c bai giai
 
Chuong2 mach xac lap dieu hoa
Chuong2  mach xac lap dieu hoaChuong2  mach xac lap dieu hoa
Chuong2 mach xac lap dieu hoa
 
Chuong 5.1 mang 4 cuc
Chuong 5.1 mang 4 cucChuong 5.1 mang 4 cuc
Chuong 5.1 mang 4 cuc
 
Chuong 7.1 mach loc dien
Chuong 7.1 mach loc dienChuong 7.1 mach loc dien
Chuong 7.1 mach loc dien
 
Chuong 3.1 qua trinh qua do
Chuong 3.1 qua trinh qua doChuong 3.1 qua trinh qua do
Chuong 3.1 qua trinh qua do
 
Chuong 4.1 tin hieu va pho
Chuong 4.1 tin hieu va phoChuong 4.1 tin hieu va pho
Chuong 4.1 tin hieu va pho
 

Similar to Báo cáo nhóm 9

Actividad #7 codigo detección de errores (yango colmenares)
Actividad #7 codigo detección de errores (yango colmenares)Actividad #7 codigo detección de errores (yango colmenares)
Actividad #7 codigo detección de errores (yango colmenares)Yango Alexander Colmenares
 
intro_gui
intro_guiintro_gui
intro_guifilipb2
 
Digital Signal Processing
Digital Signal ProcessingDigital Signal Processing
Digital Signal ProcessingAssignmentpedia
 
TRAFFIC CODE MATLAB Function varargouttraffic code
TRAFFIC CODE MATLAB Function varargouttraffic codeTRAFFIC CODE MATLAB Function varargouttraffic code
TRAFFIC CODE MATLAB Function varargouttraffic codeYograj Ghodekar
 
ITT 2014 - Chris Eidhof - Practical Concurrent Programming
ITT 2014 - Chris Eidhof - Practical Concurrent ProgrammingITT 2014 - Chris Eidhof - Practical Concurrent Programming
ITT 2014 - Chris Eidhof - Practical Concurrent ProgrammingIstanbul Tech Talks
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlabAman Gupta
 
matlab.code.has.docx
matlab.code.has.docxmatlab.code.has.docx
matlab.code.has.docxssuserfe37cb
 
How to develop a Graphical User Interface (GUI) in Scilab
How to develop a Graphical User Interface (GUI) in ScilabHow to develop a Graphical User Interface (GUI) in Scilab
How to develop a Graphical User Interface (GUI) in ScilabScilab
 
Lhy tutorial gui(1)
Lhy tutorial gui(1)Lhy tutorial gui(1)
Lhy tutorial gui(1)Brijesh Naik
 
asmt7~$sc_210_-_assignment_7_fall_15.docasmt7cosc_210_-_as.docx
asmt7~$sc_210_-_assignment_7_fall_15.docasmt7cosc_210_-_as.docxasmt7~$sc_210_-_assignment_7_fall_15.docasmt7cosc_210_-_as.docx
asmt7~$sc_210_-_assignment_7_fall_15.docasmt7cosc_210_-_as.docxfredharris32
 
PyCon SG x Jublia - Building a simple-to-use Database Management tool
PyCon SG x Jublia - Building a simple-to-use Database Management toolPyCon SG x Jublia - Building a simple-to-use Database Management tool
PyCon SG x Jublia - Building a simple-to-use Database Management toolCrea Very
 
Virtual Method Table and accident prevention
Virtual Method Table and accident preventionVirtual Method Table and accident prevention
Virtual Method Table and accident preventionAndrey Karpov
 
PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...
PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...
PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...Andrey Karpov
 
Java 8 lambda expressions
Java 8 lambda expressionsJava 8 lambda expressions
Java 8 lambda expressionsLogan Chien
 
React Native custom components
React Native custom componentsReact Native custom components
React Native custom componentsJeremy Grancher
 
Basics of image processing using MATLAB
Basics of image processing using MATLABBasics of image processing using MATLAB
Basics of image processing using MATLABMohsin Siddique
 
MicroManager_MATLAB_Implementation
MicroManager_MATLAB_ImplementationMicroManager_MATLAB_Implementation
MicroManager_MATLAB_ImplementationPhilip Mohun
 

Similar to Báo cáo nhóm 9 (20)

Actividad #7 codigo detección de errores (yango colmenares)
Actividad #7 codigo detección de errores (yango colmenares)Actividad #7 codigo detección de errores (yango colmenares)
Actividad #7 codigo detección de errores (yango colmenares)
 
intro_gui
intro_guiintro_gui
intro_gui
 
Digital Signal Processing
Digital Signal ProcessingDigital Signal Processing
Digital Signal Processing
 
TRAFFIC CODE MATLAB Function varargouttraffic code
TRAFFIC CODE MATLAB Function varargouttraffic codeTRAFFIC CODE MATLAB Function varargouttraffic code
TRAFFIC CODE MATLAB Function varargouttraffic code
 
ITT 2014 - Chris Eidhof - Practical Concurrent Programming
ITT 2014 - Chris Eidhof - Practical Concurrent ProgrammingITT 2014 - Chris Eidhof - Practical Concurrent Programming
ITT 2014 - Chris Eidhof - Practical Concurrent Programming
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
 
An introduction to MATLAB
An introduction to MATLABAn introduction to MATLAB
An introduction to MATLAB
 
matlab.code.has.docx
matlab.code.has.docxmatlab.code.has.docx
matlab.code.has.docx
 
How to develop a Graphical User Interface (GUI) in Scilab
How to develop a Graphical User Interface (GUI) in ScilabHow to develop a Graphical User Interface (GUI) in Scilab
How to develop a Graphical User Interface (GUI) in Scilab
 
Lhy tutorial gui(1)
Lhy tutorial gui(1)Lhy tutorial gui(1)
Lhy tutorial gui(1)
 
asmt7~$sc_210_-_assignment_7_fall_15.docasmt7cosc_210_-_as.docx
asmt7~$sc_210_-_assignment_7_fall_15.docasmt7cosc_210_-_as.docxasmt7~$sc_210_-_assignment_7_fall_15.docasmt7cosc_210_-_as.docx
asmt7~$sc_210_-_assignment_7_fall_15.docasmt7cosc_210_-_as.docx
 
PyCon SG x Jublia - Building a simple-to-use Database Management tool
PyCon SG x Jublia - Building a simple-to-use Database Management toolPyCon SG x Jublia - Building a simple-to-use Database Management tool
PyCon SG x Jublia - Building a simple-to-use Database Management tool
 
Virtual Method Table and accident prevention
Virtual Method Table and accident preventionVirtual Method Table and accident prevention
Virtual Method Table and accident prevention
 
PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...
PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...
PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...
 
Java 8 lambda expressions
Java 8 lambda expressionsJava 8 lambda expressions
Java 8 lambda expressions
 
Lecture 11 compiler ii
Lecture 11 compiler iiLecture 11 compiler ii
Lecture 11 compiler ii
 
React Native custom components
React Native custom componentsReact Native custom components
React Native custom components
 
Basics of image processing using MATLAB
Basics of image processing using MATLABBasics of image processing using MATLAB
Basics of image processing using MATLAB
 
CPP Homework Help
CPP Homework HelpCPP Homework Help
CPP Homework Help
 
MicroManager_MATLAB_Implementation
MicroManager_MATLAB_ImplementationMicroManager_MATLAB_Implementation
MicroManager_MATLAB_Implementation
 

Báo cáo nhóm 9

  • 1. HỌC VIỆN CÔNG NGHỆ BƯU CHÍNH VIỄN THÔNG KHOA: VIỄN THÔNG 2 NGÀNH: ĐIỆN TỬ - VIỄN THÔNG Môn : XỬ LÍ HÌNH ẢNH Đề Tài : Tách ảnh đen trang ra thành 2 mặt phẳng LSB và MSB GVHD : Ts Nguyễn Thanh Bình LỚP : L11CQVT-N SVTH : Nhóm 9
  • 2. Danh sách sinh viên thực hiện : Nguyễn Thành Tài : Nhóm Trưởng Lí Trấn Đông Huỳnh Bảo Phú Lê Hồng Thành Nguyễn Hoàng Duy Minh Hồ Minh Quân
  • 3. Tách ảnh trắng đen ra hai phần LSB và MSB Ảnh gốc : ảnh kết quả : MSB LSB
  • 4. Để chạy chương trình ta thực hiện các bước sau : Bước 1 : copy file bit_plane_32 ra một thư mục khác Bước 2 : nhấn double clich vào files trên sau khi cài đạt xong Bước 3 : chay file bit_plane_32.exe Bước 4 : xuất hiện hộp thoại Bước 5 : nhấn vào open chọn đường dẫn của files hình ành Bước 6 : nhấn vào nút lsb để xem mặt phẳng ảnh - sau do ành sẽ xuất hiện :
  • 5. Bước 7 : nhấn vào nút msb để xem mặt phẳng ảnh – sau đó ảnh xuất hiện Code để chương trình chạy : function varargout = bit(varargin) % BIT MATLAB code for bit.fig % BIT, by itself, creates a new BIT or raises the existing % singleton*. % % H = BIT returns the handle to a new BIT or the handle to % the existing singleton*. % % BIT('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in BIT.M with the given input arguments. % % BIT('Property','Value',...) creates a new BIT or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before bit_OpeningFcn gets called. An
  • 6. % unrecognized property name or invalid value makes property application % stop. All inputs are passed to bit_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 bit % Last Modified by GUIDE v2.5 15-Oct-2012 19:47:14 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @bit_OpeningFcn, ... 'gui_OutputFcn', @bit_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
  • 7. gui_mainfcn(gui_State, varargin{:}); end % End initialization code - DO NOT EDIT % --- Executes just before bit is made visible. function bit_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 bit (see VARARGIN) % Choose default command line output for bit handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes bit wait for user response (see UIRESUME) % uiwait(handles.figure1); % --- Outputs from this function are returned to the command line. function varargout = bit_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hObject handle to figure
  • 8. % 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; % --- Executes on button press in open. function open_Callback(hObject, eventdata, handles) % hObject handle to open (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [filename, pathname, filterindex]=uigetfile( ... {'*.jpg','JPEG — Joint Photographic Experts Group (*.jpg)'; ... '*.png','PNG — Portable Network Graphics (*.png)'; ... '*.bmp','BMP — Windows Bitmap (*.bmp)';... '*.*','All file (*.*)'}, ... 'Open picture'); link = strcat(pathname,filename); set(handles.edit_link,'String',link); % --- Executes on button press in source. function source_Callback(hObject, eventdata, handles) % hObject handle to source (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB
  • 9. % handles structure with handles and user data (see GUIDATA) link = get(handles.edit_link,'String'); image_rgb = imread(link); figure(1); imshow(image_rgb); % --- Executes on button press in gray. function gray_Callback(hObject, eventdata, handles) % hObject handle to gray (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) link = get(handles.edit_link,'String'); image_rgb = imread(link); image_gray = rgb2gray(image_rgb); figure(1); imshow(image_gray); % --- Executes on button press in lsb. function lsb_Callback(hObject, eventdata, handles) % hObject handle to lsb (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) link = get(handles.edit_link,'String');
  • 10. image_rgb = imread(link); image_gray = rgb2gray(image_rgb); image_bit_lsb = bitget(image_gray,1); figure(1); imshow(image_bit_lsb,[]); % --- Executes on button press in msb. function msb_Callback(hObject, eventdata, handles) % hObject handle to msb (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) link = get(handles.edit_link,'String'); image_rgb = imread(link); image_gray = rgb2gray(image_rgb); image_bit_msb = bitget(image_gray,8); figure(1); imshow(image_bit_msb,[]); function edit_link_Callback(hObject, eventdata, handles) % hObject handle to edit_link (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
  • 11. % Hints: get(hObject,'String') returns contents of edit_link as text % str2double(get(hObject,'String')) returns contents of edit_link as a double % --- Executes during object creation, after setting all properties. function edit_link_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_link (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in lsb_msb. function lsb_msb_Callback(hObject, eventdata, handles) % hObject handle to lsb_msb (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) link = get(handles.edit_link,'String'); image_rgb = imread(link); image_gray = rgb2gray(image_rgb); image_bit_lsb = bitget(image_gray,1);
  • 12. image_bit_msb = bitget(image_gray,8); lsb_msb=image_bit_msb + image_bit_lsb; figure(1); imshow(lsb_msb,[]);