Path: news.mathworks.com!not-for-mail
From: Dave Tarkowski <dave.tarkowski@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: *HELP* Problem with videoinput, preview statement
Date: Tue, 15 Jan 2008 07:10:20 -0500
Organization: The MathWorks, Inc.
Lines: 45
Message-ID: <fmi7rc$4pe$2@fred.mathworks.com>
References: <fme5s2$kk9$1@fred.mathworks.com> <fmh2ia$hro$1@fred.mathworks.com> <fmh5nf$q8k$2@aioe.org> <fmh80l$pb7$1@fred.mathworks.com>
NNTP-Posting-Host: tarkowskid.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1200399020 4910 172.31.57.200 (15 Jan 2008 12:10:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 15 Jan 2008 12:10:20 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
In-Reply-To: <fmh80l$pb7$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:445782


Talal Khan wrote:
> dpb <none@non.net> wrote in message 
> <fmh5nf$q8k$2@aioe.org>...
>> Talal Khan wrote:
>>> 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.
>> ...
>>
>> You can't do much of anything other than patches of 
> current version "for 
>> free or something" from TMW... :)
>>
>> --
> nice...ill get the new matlab from somewhere as long as 
> the PREVIEW works on that...btw can u give me some advice 
> how i should modify my code so that it works when i make 
> it into an executable. ...you already told me that i have 
> to use a user defined image handle....then it will work 
> when its a .exe file.... as in show me the code for it
> 
> Talal Khan
> 

Talal,

The help for PREVIEW in the newer versions of MATLAB has an example of 
using an image handle.  The code is basically this:

% Create an image object of the same size as your video.
hImage = image(zeros(480,640,3));

% Start the preview.
preview(vid, hImage);

You should also see the reply by Vihang for a utility on MATLAB Central 
that will allow you to achieve similar functionality in the version of 
MATLAB that you are using.

-Dave