From: Zubia on
there is an external function of load image an in my GUI there is a button of load image and axis...i want that if i press that button a dialog appear to select an image and after selecting it will appear on axis

THIS IS EXTERNAL FUNC
function image1=loadimage
% dialog for opening fingerprint files
%Honors Project 2001~2002
%wuzhili 99050056
%comp sci HKBU
%last update 19/April/2002

[imagefile1 , pathname]= uigetfile('*.bmp;*.BMP;*.tif;*.TIF;*.jpg','Open An Fingerprint image');
if imagefile1 ~= 0
cd(pathname);
image1=readimage(char(imagefile1));
image1=255-double(image1);

end;

this is call back behind button
function image1=loadimage
% dialog for opening fingerprint files
%Honors Project 2001~2002
%wuzhili 99050056
%comp sci HKBU
%last update 19/April/2002

[imagefile1 , pathname]= uigetfile('*.bmp;*.BMP;*.tif;*.TIF;*.jpg','Open An Fingerprint image');
if imagefile1 ~= 0
cd(pathname);
image1=readimage(char(imagefile1));
image1=255-double(image1);

end;



this is call back behind button
function pushbutton15_Callback(hObject, eventdata, handles)

[image1]=loadimage;



but itz not working
tell me wat to do
its urgent plzzzzzzzzzz help
From: Walter Roberson on
Zubia wrote:
> there is an external function of load image an in my GUI there is a
> button of load image and axis...i want that if i press that button a
> dialog appear to select an image and after selecting it will appear on axis

> this is call back behind button
> function pushbutton15_Callback(hObject, eventdata, handles)
>
> [image1]=loadimage;

You load the image into an array, but you fail to display the image. See the
documentation for image() and imagesc()
From: Zubia on
Walter Roberson <roberson(a)hushmail.com> wrote in message <i2d1oq$a24$1(a)canopus.cc.umanitoba.ca>...
> Zubia wrote:
> > there is an external function of load image an in my GUI there is a
> > button of load image and axis...i want that if i press that button a
> > dialog appear to select an image and after selecting it will appear on axis
>
> > this is call back behind button
> > function pushbutton15_Callback(hObject, eventdata, handles)
> >
> > [image1]=loadimage;
>
> You load the image into an array, but you fail to display the image. See the
> documentation for image() and imagesc()


I tried alott butt i cant get solution plzz can u write the code here
From: Walter Roberson on
Zubia wrote:
> Walter Roberson <roberson(a)hushmail.com> wrote in message
> <i2d1oq$a24$1(a)canopus.cc.umanitoba.ca>...
>> Zubia wrote:
>> > there is an external function of load image an in my GUI there is a
>> > button of load image and axis...i want that if i press that button a
>> > dialog appear to select an image and after selecting it will appear
>> on axis
>>
>> > this is call back behind button
>> > function pushbutton15_Callback(hObject, eventdata, handles)
>> > > [image1]=loadimage;
>>
>> You load the image into an array, but you fail to display the image.
>> See the documentation for image() and imagesc()
>
>
> I tried alott butt i cant get solution plzz can u write the code here

image(image1);


If that doesn't work, then you will need to post more of your code: in
particular, we would need to see the commands that create the pushbutton and
that set up the callback for it.
From: Zubia on
Walter Roberson <roberson(a)hushmail.com> wrote in message <i2d2tr$bp6$1(a)canopus.cc.umanitoba.ca>...
> Zubia wrote:
> > Walter Roberson <roberson(a)hushmail.com> wrote in message
> > <i2d1oq$a24$1(a)canopus.cc.umanitoba.ca>...
> >> Zubia wrote:
> >> > there is an external function of load image an in my GUI there is a
> >> > button of load image and axis...i want that if i press that button a
> >> > dialog appear to select an image and after selecting it will appear
> >> on axis
> >>
> >> > this is call back behind button
> >> > function pushbutton15_Callback(hObject, eventdata, handles)
> >> > > [image1]=loadimage;
> >>
> >> You load the image into an array, but you fail to display the image.
> >> See the documentation for image() and imagesc()
> >
> >
> > I tried alott butt i cant get solution plzz can u write the code here
>

> image(image1);
>
>
> If that doesn't work, then you will need to post more of your code: in
> particular, we would need to see the commands that create the pushbutton and
> that set up the callback for it.


THIS IS MY .M FILE

function varargout = main(varargin)
% MAIN M-file for main.fig
% MAIN, by itself, creates a new MAIN or raises the existing
% singleton*.
%
% H = MAIN returns the handle to a new MAIN or the handle to
% the existing singleton*.
%
% MAIN('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in MAIN.M with the given input arguments.
%
% MAIN('Property','Value',...) creates a new MAIN or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before main_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to main_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

% Copyright 2002-2003 The MathWorks, Inc.

% Edit the above text to modify the response to help main

% Last Modified by GUIDE v2.5 17-Jul-2010 01:25:15

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @main_OpeningFcn, ...
'gui_OutputFcn', @main_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 main is made visible.
function main_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 main (see VARARGIN)

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

% Update handles structure
guidata(hObject, handles);

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


% --- Outputs from this function are returned to the command line.
function varargout = main_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 during object creation, after setting all properties.
function axes2_CreateFcn(hObject, eventdata, handles)
% hObject handle to axes2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
axes (hObject)
imshow('mg.jpg')
% Hint: place code in OpeningFcn to populate axes2





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 pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton6 (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 pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton7 (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 pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton8 (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 pushbutton9.
function pushbutton9_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton9 (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 pushbutton10.
function pushbutton10_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton10 (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 pushbutton11.
function pushbutton11_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton11 (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 pushbutton13.
function pushbutton13_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton13 (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 pushbutton14.
function pushbutton14_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton14 (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 pushbutton15.
function pushbutton15_Callback(hObject, eventdata, handles)

[image1]=loadimage;

%[filename, pathname] = ...
% uigetfile({'*.m;*.mdl;*.mat;*.tif;*.TIF;*.*'},'File Selector');

% subplot(axes8);
% imagesc(image1);
%colormap(gray);



% hObject handle to pushbutton15 (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 pushbutton16.
function pushbutton16_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton16 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% axes(handles.axes4);
% I=imread('C:\MATLAB7\work\db\102_2.TIF');
% imshow(I);
%set(handles.axes4,'MinorTick','on');
% handles structure with handles and user data (see GUIDATA)


% --- Executes on button press in pushbutton17.
function pushbutton17_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton17 (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 pushbutton18.
function pushbutton18_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton18 (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 pushbutton19.
function pushbutton19_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton19 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)




% --- Executes during object creation, after setting all properties.

% hObject handle to text1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called




% --- Executes during object creation, after setting all properties.



this is my function for button 15

function image1=loadimage
% dialog for opening fingerprint files
%Honors Project 2001~2002
%wuzhili 99050056
%comp sci HKBU
%last update 19/April/2002

[imagefile1 , pathname]= uigetfile('*.bmp;*.BMP;*.tif;*.TIF;*.jpg','Open An Fingerprint image');
if imagefile1 ~= 0
cd(pathname);
image1=readimage(char(imagefile1));
image1=255-double(image1);

end;

how to attach my .fig file here?
 |  Next  |  Last
Pages: 1 2 3 4
Prev: targets for neural network
Next: solutions book