function varargout = toneCure(varargin)
%%
% TONECURE MATLAB code for toneCure.fig
% TONECURE, by itself, creates a new TONECURE or raises the existing
% singleton*.
%
% H = TONECURE returns the handle to a new TONECURE or the handle to
% the existing singleton*.
%
% TONECURE('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in TONECURE.M with the given input arguments.
%
% TONECURE('Property','Value',...) creates a new TONECURE or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before toneCure_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to toneCure_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 toneCure
% Last Modified by GUIDE v2.5 07-Jun-2022 17:29:29
% Begin initialization code - DO NOT EDIT
cur = cd;
addpath(genpath(cur));
warning off;
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @toneCure_OpeningFcn, ...
'gui_OutputFcn', @toneCure_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 toneCure is made visible.
function toneCure_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 toneCure (see VARARGIN)
% Choose default command line output for toneCure
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
cla(handles.axes2,'reset'); % 重置清空动态axes1的数据
cla(handles.axes3,'reset'); % 重置清空动态axes1的数据
cla(handles.axes4,'reset'); % 重置清空动态axes1的数据
clear global points; %%每次启动清空全局变量
global points; % 自定义数组
clear global Num;
global Num;
Num = 1;
points(1,1:2)=0.0;
points(2,1:2)=0.2;
points(3,1:2)=0.4;
points(4,1:2)=0.6;
points(5,1:2)=0.8;
points(6,1:2)=1;
% axes(handles.axes2);
%% y = P(1)*X^N + P(2)*X^(N-1) +...+ P(N)*X + P(N+1);
%% p是参数, N是指数位置
p1 = polyfit(points(:,1), points(:,2), 5); %% y = x + b;
x=0:0.01:1;
y = polyval(p1, x);
% hold on;
y2 = x ;
plot(x, y2, 'k-.', 'LineWidth', 1, 'parent', handles.axes2);
hold on;
plot(x, y, 'r-', points(:,1), points(:,2), 'b*', 'LineWidth', 1.25, 'parent', handles.axes2) ;
legend('y = x', 'y = f(x)', 'Location', 'northwest');
grid on;
global idx
idx=0;
guidata(hObject, handles);
% UIWAIT makes toneCure wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = toneCure_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 selection change in popupmenu1.
function popupmenu1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu1
%% 针对不同通道进行提取处理后的曲线工具
clear global Num;
global Num;
switch(get(handles.popupmenu1,'Value'))
case 1
Num =1;
case 2
Num =2;
case 3
Num =3;
case 4
Num =4;
case 5
Num = 5;
case 6
Num =6;
case 7
Num =7;
case 8
Num =8;
case 9
Num = 9;
case 10
Num =10;
case 11
Num =11;
case 12
Num =12;
end
guidata(hObject,handles );
% --- Executes during object creation, after setting all properties.
function popupmenu1_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu 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 edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (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 edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (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 selection change in popupmenu4.
function popupmenu4_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu4 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu4
%% 直方图显示选项
global DealIMG;
global ImgOri;
if (get(handles.popupmenu4,'Value') > 0)
switch(get(handles.popupmenu4,'Value'))
case 1
cla(handles.axes3,'reset');
axes(handles.axes3);
histogram(ImgOri);
hold on;
histogram(DealIMG);
grid on
legend('原图', '处理图')
case 2
cla(handles.axes3,'reset');
axes(handles.axes3);
histogram(ImgOri);
grid on
legend('原图');
case 3
cla(handles.axes3,'reset');
axes(handles.axes3);
histogram(DealIMG);
grid on
legend('处理图');
end
end
guidata(hObject,handles );
% --- Executes during object creation, after setting all properties.
function popupmenu4_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu 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
没有合适的资源?快使用搜索试试~ 我知道了~
【图像处理基础】 GUI图像曲线调整系统【含Matlab源码 1615期】.zip
共5个文件
jpg:2个
png:1个
m:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 152 浏览量
2024-06-20
16:31:20
上传
评论
收藏 423KB ZIP 举报
温馨提示
Matlab领域上传的代码均可运行,亲测可用,直接替换数据即可,适合小白; 1、代码压缩包内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主或扫描博客文章底部QQ名片; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作 图像处理、美颜、打靶、虹膜定位、图像去雨、LSD直线检测、角点检测、RGB检测、笔检测
资源推荐
资源详情
资源评论
收起资源包目录
【图像处理基础】 GUI图像曲线调整系统【含Matlab源码 1615期】.zip (5个子文件)
【图像处理基础】基于matlab GUI图像曲线调整系统【含Matlab源码 1615期】
ant.jpg 15KB
toneCure.fig 56KB
运行结果.jpg 129KB
Screenshots
image.png 265KB
toneCure.m 23KB
共 5 条
- 1
资源评论
Matlab领域
- 粉丝: 3w+
- 资源: 3023
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功