Matlab area

Páginas: 5 (1029 palabras) Publicado: 7 de abril de 2011
function varargout = arroz(varargin)
% ARROZ M-file for arroz.fig
% ARROZ, by itself, creates a new ARROZ or raises the existing
% singleton*.
%
% H = ARROZ returns the handle to a new ARROZ or the handle to
% the existing singleton*.
%
% ARROZ('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in ARROZ.M with the given inputarguments.
%
% ARROZ('Property','Value',...) creates a new ARROZ or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before arroz_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to arroz_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 arroz

% Last Modified by GUIDE v2.5 26-Mar-2011 10:40:47

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @arroz_OpeningFcn, ...
'gui_OutputFcn', @arroz_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 arroz is made visible.
function arroz_OpeningFcn(hObject, eventdata, handles, varargin)

handles.rice=imread('rice.bmp'); % Load image data
image(rice); % Display image
axes1(handles.rice)

% 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 arroz (see VARARGIN)

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

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes arroz wait for userresponse (see UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = arroz_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 userdata (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

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

% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Ejemplo basico de procesamiento de imagenes
%
close all
clear all

%Despliegue en pantalla de la imagen boton
figure

axes1(handles.rice)
imshow(handles.rice,[])
title('Arroces')
xlabel('j');
ylabel('i');
pause

% Despliegue del perfil de una linea boton
disp('Marque con el mouse una linea en la imagen...')
improfile
title('Tonos de gris de la linea marcada')
pause

% Despliegue de los tonos de gris en 3D boton
figure
mesh(double(handles.rice))...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Matlab Área de trabajo
  • matlab
  • matlab
  • Matlab
  • Matlab
  • matlab
  • MATLAB
  • MATLAB

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS