Rank: 235437 based on 0 downloads (last 30 days) and 0 file submitted
photo

Gilles

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Gilles View all
Updated File Comments Rating
11 Jul 2013 IMAGEVIEWER A GUI for viewing and interactively exploring image files. Author: Jiro Doke

In order to use interactive pan and zoom with the matlab preview fcn of live video data, I added the Update Preview Function. Each time preview receives a video frame, it calls the update preview window function that I specified, which can process the data before displaying (see this example : http://www.mathworks.fr/fr/help/imaq/previewing-data.html#f11-76693).

However, this example uses the setappdata function to configure this application-defined data to a function handle to the update preview window function. I don't know how I define the arguments (using matlab classes) of the update preview window function because it passes an Event Attribute.

10 Jul 2013 IMAGEVIEWER A GUI for viewing and interactively exploring image files. Author: Jiro Doke

Jiro,
Thank you ! ImageViewer is an excellent GUI implemented using matlab classes !
I try to use interactive panning and zooming with the matlab preview fcn of live video data.
I coded that :

% --- Executes on button press in Preview.
function PreviewFcn(varargin)
camobj = obj.camobj;
vidRes = get(camobj, 'VideoResolution');

imWidth = vidRes(1);
imHeight = vidRes(2);
nBands = get(camobj, 'NumberOfBands');

% create an empty image container and show it on axPreview
iH = image(zeros(imHeight,imWidth, nBands), 'parent', obj.handles.ImageAxes);
preview(camobj, iH);
end

Zoom seems to work on live video data, but pan doesn't work.
Could you help me?

10 Jul 2013 IMAGEVIEWER A GUI for viewing and interactively exploring image files. Author: Jiro Doke

10 Jul 2013 IMAGEVIEWER A GUI for viewing and interactively exploring image files. Author: Jiro Doke

Contact us