| Author |
Multithreading Package recommendation?
|
|
| Kamalika Barua 2007-08-28, 6:14 am |
| Hi
I need to run a separate program with my core program that
essentially logs images from an image acquisition device
(connected through USB) and processes it. The separate
program controls a simple LED circuit (flashing LEDs, no
DACs or microcontrollers or anything like that) via serial
port. There is a trigger initiated manually via MATLAB that
is to set off both operations - Image acquisition and
processing by MATLAB and simultaneously send signals to the
LED circuit. I can not cut down the steps due to the purpose
of the project/ experiment. Any suggestions for a
multithreading package that can be used here or any help on
this subject is much appreciated.
Thanks
Vivian
| |
| Mark Jones 2007-08-28, 7:21 pm |
| Kamalika Barua wrote:
> Hi
>
> I need to run a separate program with my core program that
> essentially logs images from an image acquisition device
> (connected through USB) and processes it. The separate
> program controls a simple LED circuit (flashing LEDs, no
> DACs or microcontrollers or anything like that) via serial
> port. There is a trigger initiated manually via MATLAB that
> is to set off both operations - Image acquisition and
> processing by MATLAB and simultaneously send signals to the
> LED circuit. I can not cut down the steps due to the purpose
> of the project/ experiment. Any suggestions for a
> multithreading package that can be used here or any help on
> this subject is much appreciated.
>
> Thanks
>
> Vivian
Hi Kamalika,
It may be possible to do what you want via the callbacks that are
available on your VIDEOINPUT object and with a MEX file. The C or C++
MEX file could operate the LED and could be called just like any other
MATLAB function from the callback function.
For more information on callbacks see:
http://www.mathworks.com/access/hel.../f6-115351.html
For more information on MEX files see:
http://www.mathworks.com/access/hel...rnal/f7667.html
Mark
| |
| Vivian Harvey 2007-08-30, 4:29 am |
| Mark Jones <mark.jones@mathworks.com> wrote in message
<46D42A19.3060206@mathworks.com>...
> Kamalika Barua wrote:
>
> Hi Kamalika,
>
> It may be possible to do what you want via the callbacks
that are
> available on your VIDEOINPUT object and with a MEX file.
The C or C++
> MEX file could operate the LED and could be called just
like any other
> MATLAB function from the callback function.
>
> For more information on callbacks see:
>
>
http://www.mathworks.com/access/hel.../f6-115351.html
>
> For more information on MEX files see:
>
>
http://www.mathworks.com/access/hel...rnal/f7667.html
>
> Mark
Thank you very much for your reply. Is this feature (using
events and callbacks while the image acquisition device is
running) available in MATLAB v7.2.0.232 (R2006a)? I am aware
that multithreading is possible in R2007a.
Kamalika
| |
| Vivian Harvey 2007-08-30, 4:29 am |
| My problem is actually, I want two functions to be executed
simultaneously while the video object runs. One is
datalogging the frames, another is controlling that external
circuit. The first link actually shows that one function
(while the object runs) can be executed and MATLAB can not
go to the next one before this callback function is fully
executed. Any ideas how to solve this?
|
|
|
|