资源简介
曲线坐标提取,需导入图片,进行手动选取,还比较方便
代码片段和文件信息
function varargout = image2data(varargin)
% IMAGE2DATA M-file for image2data.fig
% IMAGE2DATA by itself creates a new IMAGE2DATA or raises the existing
% singleton*.
%
% H = IMAGE2DATA returns the handle to a new IMAGE2DATA or the handle to
% the existing singleton*.
%
% IMAGE2DATA(‘CALLBACK‘hobjecteventDatahandles...) calls the local
% function named CALLBACK in IMAGE2DATA.M with the given input arguments.
%
% IMAGE2DATA(‘Property‘‘Value‘...) creates a new IMAGE2DATA or raises the
% existing singleton*. Starting from the left property value pairs are
% applied to the GUI before image2data_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to image2data_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 image2data
% Last Modified by GUIDE v2.5 22-Dec-2010 10:54:55
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘ mfilename ...
‘gui_Singleton‘ gui_Singleton ...
‘gui_OpeningFcn‘ @image2data_OpeningFcn ...
‘gui_OutputFcn‘ @image2data_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 image2data is made visible.
function image2data_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 image2data (see VARARGIN)
% Choose default command line output for image2data
handles.output = hobject;
handles.cpx=0;
handles.cpy=0;% gloable variables for current position of mouse
handles.idata=zeros(22);% the key variable for obtaining curve data
himage=findobj(‘tag‘‘axes1‘);
axes(himage);
% h_temp=findobj(‘tag‘‘edit8‘);
% str_img=strcat(get(h_temp‘String‘)‘.jpg‘);
% image_temp=imread(str_img);
% imshow(image_temp);
% handles.ximage=size(image_temp2);
% handles.yimage=size(image_temp1);
% Update handles structure
guidata(hobject handles);
clc
% UIWAIT makes image2data wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = image2data_OutputFcn(hobject eventdata handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObjec
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 18073 2012-08-26 23:02 image2data.m
评论
共有 条评论