Path: news.mathworks.com!not-for-mail
From: "Talal Khan" <talaltk@mathwork.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: *HELP* Problem with videoinput, preview statement
Date: Tue, 15 Jan 2008 01:34:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 44
Message-ID: <fmh2ia$hro$1@fred.mathworks.com>
References: <fme5s2$kk9$1@fred.mathworks.com>
Reply-To: "Talal Khan" <talaltk@mathwork.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1200360842 18296 172.30.248.35 (15 Jan 2008 01:34:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 15 Jan 2008 01:34:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1244142
Xref: news.mathworks.com comp.soft-sys.matlab:445721


OK thanx. so basically your saying i have to update my 
matlab version along with the image acquisition toolbox, 
other wise the PREVIEW wont work. ill try doing that. 
although i think ill have to pay inorder to get the latest 
version. can i not just update it for free or something.

"Talal Khan" <talaltk@mathwork.com> wrote in message 
<fme5s2$kk9$1@fred.mathworks.com>...
> I use this piece of code and it works perfectly in the 
> matlab environment, however when i make an executable 
out 
> of it,it gives me an error saying
> ----------------------------------------------
> Function 'preview' is not defined for a first argument 
of 
> class 'videoinput'.
> ----------------------------------------------
> -------------
> MY CODE IS:
> ------------
> 
> vid = videoinput('winvideo');
> 
> preview(vid);
> 
> pause;
> 
> frame = getsnapshot(vid);
> 
> subplot(1,1,1);imshow
(frame,'InitialMagnification','fit');
> 
> %save file
>  saveas(gca,'TTT.jpeg')
>  delete(vid);
>  
>  closepreview;
> 
> -----------------------------------------------
> MATLAB VERSION 7.0.1.24704 (R14) Service Pack 1
> ------------------------------------------------
> Image Axquisition Toolbox  1.7 
> -------------------------------------------------