function varargout = untitled(varargin)
% UNTITLED MATLAB code for untitled.fig
% UNTITLED, by itself, creates a new UNTITLED or raises the existing
% singleton*.
%
% H = UNTITLED returns the handle to a new UNTITLED or the handle to
% the existing singleton*.
%
% UNTITLED('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in UNTITLED.M with the given input arguments.
%
% UNTITLED('Property','Value',...) creates a new UNTITLED or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before untitled_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to untitled_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 untitled
% Last Modified by GUIDE v2.5 02-Feb-2016 23:55:41
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @untitled_OpeningFcn, ...
'gui_OutputFcn', @untitled_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 untitled is made visible.
function untitled_OpeningFcn(hObject, eventdata, handles, varargin)
% 将背景图像载入Matlab
% 如果图像不在当前目录,必须使用完整路径
ha=axes('units','normalized','position',[0 0 1 1]);
uistack(ha,'down');
ii=imread('2.jpg');
%设置程序的背景图为beijing1.jpg
image(ii);
colormap gray
set(ha,'handlevisibility','off','visible','off');
% This function has no output args, see OutputFcn.
% % 将背景图像载入Matlab
% % 如果图像不在当前目录,必须使用完整路径
% backgroundImage =importdata('2.jpg');
% % 选择坐标系
% axes(handles.axes3);
% % 将图片添加到坐标系中,于是就成了背景了
% image(backgroundImage);
% % 将坐标系的坐标轴标签去掉
% axis off
% 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 untitled (see VARARGIN)
% Choose default command line output for untitled
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes untitled wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = untitled_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;
% --------------------------------------------------------------------
function Untitled_1_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_2_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_3_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_4_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_5_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_22_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_22 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_23_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_23 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_29_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_29 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------复古风------------------------------------------
function Untitled_32_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_32 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------素描------------------------------------------
function Untitled_33_Callback(hObject, eventdata, handles)
axes(handles.axes2);
I = handles.a;
info_size=size(I);
height=info_size(1);
width=info_size(2);
N=zeros(height,width);
g=zeros(height,width);
imggray=rgb2gray(I);
out=zeros(height,width);
spec=zeros(height,width,3);
for i=1:height
for j=1:width
N(i,j)=255-imggray(i,j);
end
end
for i=2:height-1
for j=2:width-1
sum=0;
sum=1*double(N(i-1,j-1))+2*double(N(i-1,j))+1*double(N(i-1,j+1));
sum=sum+2*double(N(i,j-1))+4*double(N(i,j))+2*double(N(i,j+1));
sum=sum+1*double(N(i+1,j-1))+2*double(N(i+1,j))+1*double(N(i+1,j+1));
sum=sum/16;
g(i,j)=sum;
end
end
for i=1:height
for j=1:width
b=double(g(i,j));
a=double(imggray(i,j));
temp=a+a*b/(256-b);
out(i,j)=uint8(min(temp,255));
end
end
imshow(out/255);
%******************************************
% hObject handle to Untitled_33 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% -------------------------------------------------------------------
function Untitled_34_Callback(hObject, eventdata, handles)
% axes(handles.axes2);
% I= handles.a;
% I =imguidedfilter(uint8(I)) ;
% G = imfilter(I,fspecial('gaussian',[3 3],100));
% opacity = 50;
% Dest = (I*(100 - opacity)+(I+2*G - 256)*opacity)/100;
% imshow(Dest);
% hObject handle to Untitled_34 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% ----------------------------倒影----------------------------------------
function Untitled_35_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_11 (se
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
MATLABgui界面设计.zip (15个子文件)
MATLABgui界面设计
fruit2.jpg 50KB
untitled.fig 52KB
face7.jpg 18KB
face.jpg 18KB
untitled.m 32KB
2.jpg 70KB
fog2.jpg 248KB
recg_result.jpg 28KB
face6.jpg 71KB
face4.jpg 28KB
face3.jpg 29KB
fruit.jpg 479KB
face2.jpg 48KB
fog.jpg 151KB
0.jpg 24KB
共 15 条
- 1
资源评论
- 竺清2023-04-26超级好,感谢分享
铭玥
- 粉丝: 2
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功