Code covered by the BSD License  

Highlights from
GUI for denoising video signals with Kalman filter

image thumbnail

GUI for denoising video signals with Kalman filter

by

 

filter grayscale video signals(avi || Webcam) with 1st Order Estimation & Kalman filter .

final_project(varargin)
function varargout = final_project(varargin)
% GUI for denoising video signals


% july, 7 , 2012
%KHMOU Youssef
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @final_project_OpeningFcn, ...
                   'gui_OutputFcn',  @final_project_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 final_project is made visible.
function final_project_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   unrecognized PropertyName/PropertyValue pairs from the
%            command line (see VARARGIN)

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

% Update handles structure
guidata(hObject, handles);

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


% --- Outputs from this function are returned to the command line.
function varargout = final_project_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 Record.
function Record_Callback(hObject, eventdata, handles)
% hObject    handle to Record (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

global original_video
NumFrames=str2double(get(handles.Frames,'String'));
vid=videoinput('winvideo',1,'YUY2_320x240');
set(vid,'ReturnedColorSpace','grayscale');
set(vid,'FramesPerTrigger',NumFrames);
set(vid,'FrameGrabInterval',3);
start(vid);
pause(8);
original_video=getdata(vid,NumFrames,'double');
original_video=squeeze(original_video);
axes(handles.axes2);
playVideo(original_video);
delete(vid);
clear vid;



% --- Executes on button press in open_avi_file.
function open_avi_file_Callback(hObject, eventdata, handles)
% hObject    handle to open_avi_file (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global original_video
[f,p]=uigetfile('*.avi');
filename=strcat(p,f);
info=aviinfo(filename);
video_name=info.Filename;
width=info.Width;
height=info.Height;
length=info.NumFrames;
set(handles.video_name_show,'String',video_name);
dim=strcat(int2str(width),'x',int2str(height),'@',int2str(length));
set(handles.Dim_show,'String',dim);

original_video=convertAvi2matrix(filename);
axes(handles.axes2);
playVideo(original_video)




% --- Executes on button press in add_noise.
function add_noise_Callback(hObject, eventdata, handles)
% hObject    handle to add_noise (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global r original_video

mean=str2double(get(handles.mean,'String'));
variance = str2double(get(handles.variance,'String'));
axes(handles.axes1);
r=imnoise(original_video,'Gaussian',mean,variance);
playVideo(r);
title(strcat(' ',' variance=',num2str(variance),'&',' mean=',num2str(mean)));


function variance_Callback(hObject, eventdata, handles)
% hObject    handle to variance (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 variance as text
%        str2double(get(hObject,'String')) returns contents of variance as a double


% --- Executes during object creation, after setting all properties.
function variance_CreateFcn(hObject, eventdata, handles)
% hObject    handle to variance (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


function mean_Callback(hObject, eventdata, handles)
% hObject    handle to mean (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 mean as text
%        str2double(get(hObject,'String')) returns contents of mean as a double


% --- Executes during object creation, after setting all properties.
function mean_CreateFcn(hObject, eventdata, handles)
% hObject    handle to mean (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


% --------------------------------------------------------------------
function Help_Callback(hObject, eventdata, handles)
% hObject    handle to Help (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --------------------------------------------------------------------
function Untitled_1_Callback(hObject, eventdata, handles)
% hObject    handle to about (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --------------------------------------------------------------------
function about_Callback(hObject, eventdata, handles)
% hObject    handle to about (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)



function gif_filename_Callback(hObject, eventdata, handles)
% hObject    handle to gif_filename (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 gif_filename as text
%        str2double(get(hObject,'String')) returns contents of gif_filename as a double


% --- Executes during object creation, after setting all properties.
function gif_filename_CreateFcn(hObject, eventdata, handles)
% hObject    handle to gif_filename (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 generate.
function generate_Callback(hObject, eventdata, handles)
% hObject    handle to generate (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

global X 
%n1=size(X,1);
%n2=size(X,2);
%n3=size(X,3);
%assembly=double(zeros(2*n1,n2,n3));
%assembly(1:n1,:,:)=r;
%assembly(n1+1:end,:,:)=X;

filename=get(handles.gif_filename,'String');
Create_gray_Gif_Image(X,filename);



function file_name_image_Callback(hObject, eventdata, handles)
% hObject    handle to file_name_image (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 file_name_image as text
%        str2double(get(hObject,'String')) returns contents of file_name_image as a double


% --- Executes during object creation, after setting all properties.
function file_name_image_CreateFcn(hObject, eventdata, handles)
% hObject    handle to file_name_image (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 generate_image.
function generate_image_Callback(hObject, eventdata, handles)
% hObject    handle to generate_image (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global r X
filename_image=get(handles.file_name_image,'String');
image1=r(:,:,end/2);
image2=X(:,:,end/2);
assembly=[image1 image2];
imwrite(assembly,filename_image);



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


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

global X r option P K

option= str2double(get(handles.option,'String'));
[X,P,K] = KALMANFILTER_gui(r,option);
axes(handles.axes2);
playVideo(X);

function edit5_Callback(hObject, eventdata, handles)
% hObject    handle to edit5 (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 edit5 as text
%        str2double(get(hObject,'String')) returns contents of edit5 as a double


% --- Executes during object creation, after setting all properties.
function edit5_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit5 (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



function option_Callback(hObject, eventdata, handles)
% hObject    handle to option (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 option as text
%        str2double(get(hObject,'String')) returns contents of option as a double


% --- Executes during object creation, after setting all properties.
function option_CreateFcn(hObject, eventdata, handles)
% hObject    handle to option (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 replay_original.
function replay_original_Callback(hObject, eventdata, handles)
% hObject    handle to replay_original (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global original_video
axes(handles.axes2);
playVideo(original_video);

% --- Executes on button press in replay_Noisy.
function replay_Noisy_Callback(hObject, eventdata, handles)
% hObject    handle to replay_Noisy (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global r
axes(handles.axes1);
playVideo(r);


% --- Executes on button press in replay_Filtered.
function replay_Filtered_Callback(hObject, eventdata, handles)
% hObject    handle to replay_Filtered (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global X
axes(handles.axes2);
playVideo(X);


% --- Executes on button press in Mean_square_error.
function Mean_square_error_Callback(hObject, eventdata, handles)
% hObject    handle to Mean_square_error (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global original_video X
axes(handles.axes1);
mse=eval_MSE(X,original_video);
plot(mse,'LineWidth',2);
grid on;
xlabel('Number of Frames');
ylabel('Amplitude');
title(' MSE (original video,filtered video)');
y=max(mse)-0.02;
x=size(X,3)/2-size(X,3)/4;
text(x,y,strcat('Mean MSE=',num2str(mean(mse))),'FontSize',15);

% --- Executes on button press in Peak_signal_to_noise_ratio.
function Peak_signal_to_noise_ratio_Callback(hObject, eventdata, handles)
% hObject    handle to Peak_signal_to_noise_ratio (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global X original_video
axes(handles.axes2);

psnr=eval_PSNR(X,original_video);
plot(psnr,'LineWidth',2);
grid on;
xlabel(' Number of frames ');
ylabel(' Denoising amplitude in Decibels');
title (' PSNR(original video,filtered video ');
y=max(psnr)-2;
x=size(X,3)/2;
text(x,y,strcat('Mean psnr=',num2str(mean(psnr))),'FontSize',15);

% --- Executes on button press in covariance_error.
function covariance_error_Callback(hObject, eventdata, handles)
% hObject    handle to covariance_error (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global P
axes(handles.axes1);
plot(P,'r','LineWidth',2);
grid on;
xlabel(' Number of frames ');
ylabel(' Amplitude ');
title (' Mean of covariance error matrix');
y=max(P).*(1-max(P)/2);
x=size(P,3);
text(x,y,strcat('Final value=',num2str(max(P))),'FontSize',15);
% --- Executes on button press in gain_K.
function gain_K_Callback(hObject, eventdata, handles)
% hObject    handle to gain_K (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global K
axes(handles.axes2);
plot(K,'r','LineWidth',2);
grid on;
xlabel(' Number of frames ');
ylabel(' Amplitude ');
title (' Mean of Matrix Gain');
y=max(K)-0.2;
x=size(K,3)/2;
text(x,y,strcat('Final value=',num2str(max(K))),'FontSize',15);

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




function edit6_Callback(hObject, eventdata, handles)
% hObject    handle to edit6 (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 edit6 as text
%        str2double(get(hObject,'String')) returns contents of edit6 as a double


% --- Executes during object creation, after setting all properties.
function edit6_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit6 (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 Cross_correlation_execute.
function Cross_correlation_execute_Callback(hObject, eventdata, handles)
% hObject    handle to Cross_correlation_execute (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global X r time
time=str2double(get(handles.get_time_index,'String'));
F=X(:,:,time)-r(:,:,time);
F=corr2d(F);
axes(handles.axes2);
surf(F);
colormap jet;
shading interp;
xlabel(' width');
ylabel(' height');
title('Cross correlation of the eliminated Noise');
axes(handles.axes6)
surf(corr2d(X(:,:,time)));
colormap jet;
shading interp;
axis off;
title(' Filtered Sample');
axes(handles.axes7);
surf(corr2d(r(:,:,time)));
colormap jet;
shading interp;
axis off;
title(' Noisy Sample');
function get_time_index_Callback(hObject, eventdata, handles)
% hObject    handle to get_time_index (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 get_time_index as text
%        str2double(get(hObject,'String')) returns contents of get_time_index as a double


% --- Executes during object creation, after setting all properties.
function get_time_index_CreateFcn(hObject, eventdata, handles)
% hObject    handle to get_time_index (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 histogram.
function histogram_Callback(hObject, eventdata, handles)
% hObject    handle to histogram (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

global  X r
time=str2double(get(handles.get_time_index,'String'));
[y1,x1]=imhist(X(:,:,time));

[y2,x2]=imhist(r(:,:,time));

axes(handles.axes2);
area(x1,y1,'LineWidth',2);
colormap jet;
grid on;
a=max(x1)/7;
b=max(y1);
text(a,b,strcat('Histogram of the Filtered Sample , index=',int2str(time)),'FontSize',12);
axes(handles.axes1);
area(x2,y2,'LineWidth',2);
colormap jet;
grid on;
c=max(x2)/7;
d=max(y2);
text(c,d,strcat('Histogram of the Noisy Sample , index=',int2str(time)),'FontSize',12);



function coordinate_y_Callback(hObject, eventdata, handles)
% hObject    handle to coordinate_y (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 coordinate_y as text
%        str2double(get(hObject,'String')) returns contents of coordinate_y as a double


% --- Executes during object creation, after setting all properties.
function coordinate_y_CreateFcn(hObject, eventdata, handles)
% hObject    handle to coordinate_y (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



function coordinate_x_Callback(hObject, eventdata, handles)
% hObject    handle to coordinate_x (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 coordinate_x as text
%        str2double(get(hObject,'String')) returns contents of coordinate_x as a double


% --- Executes during object creation, after setting all properties.
function coordinate_x_CreateFcn(hObject, eventdata, handles)
% hObject    handle to coordinate_x (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 pixel_evaluate.
function pixel_evaluate_Callback(hObject, eventdata, handles)
% hObject    handle to pixel_evaluate (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

global X r

x=str2double(get(handles.coordinate_x,'String'));
y=str2double(get(handles.coordinate_y,'String'));

noisypixel=squeeze(r(y,x,:));
filteredpixel=squeeze(X(y,x,:));

axes(handles.axes1);

plot(noisypixel,'r','LineWidth',2);
grid on;
hold on
plot(filteredpixel,'b','LineWidth',2);
legend('Noisy Pixel','Filtered Pixel');
hold off;



function Info_Callback(hObject, eventdata, handles)
% hObject    handle to Info (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 Info as text
%        str2double(get(hObject,'String')) returns contents of Info as a double


% --- Executes during object creation, after setting all properties.
function Info_CreateFcn(hObject, eventdata, handles)
% hObject    handle to Info (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



function video_name_show_Callback(hObject, eventdata, handles)
% hObject    handle to video_name_show (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 video_name_show as text
%        str2double(get(hObject,'String')) returns contents of video_name_show as a double



% --- Executes during object creation, after setting all properties.
function video_name_show_CreateFcn(hObject, eventdata, handles)
% hObject    handle to video_name_show (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






function Dim_show_Callback(hObject, eventdata, handles)
% hObject    handle to Dim_show (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 Dim_show as text
%        str2double(get(hObject,'String')) returns contents of Dim_show as a double


% --- Executes during object creation, after setting all properties.
function Dim_show_CreateFcn(hObject, eventdata, handles)
% hObject    handle to Dim_show (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



function Frames_Callback(hObject, eventdata, handles)
% hObject    handle to Frames (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 Frames as text
%        str2double(get(hObject,'String')) returns contents of Frames as a double


% --- Executes during object creation, after setting all properties.
function Frames_CreateFcn(hObject, eventdata, handles)
% hObject    handle to Frames (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


Contact us