Re: How to display live Video in IDL [message #45842] |
Tue, 11 October 2005 14:39 |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
Mark Hadfield wrote:
> Rick Towler wrote:
>
>> About the best you can use the win API's GetActiveWindow() function to
>> get a handle to the active window. If you create the window in IDL
>> then immediately call a function to get the handle then you should be
>> fine 99.9% of the time :)
>
>
> Those sound like good odds to me! But I'm curious: what is likely to
> happen in the other 0.1%?
Well, say you run this IDL program and then click on your email client
to check for the latest gossip on comp.lang.idl-pvwave at just the right
moment after IDL has created the window but before the program has
called the DLM to make the GetActiveWindow() call. Now you'll get a
handle to your email client window, not your new IDL window, and is this
case it would most likely bring IDL down.
I use this in my directInput dlm and to be honest, I haven't had a
problem. But I'm pretty sure that at least theoretically this is an issue.
-Rick
|
|
|
Re: How to display live Video in IDL [message #45843 is a reply to message #45842] |
Tue, 11 October 2005 14:03  |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
Rick Towler wrote:
> About the best you can use the win API's GetActiveWindow() function to
> get a handle to the active window. If you create the window in IDL then
> immediately call a function to get the handle then you should be fine
> 99.9% of the time :)
Those sound like good odds to me! But I'm curious: what is likely to
happen in the other 0.1%?
--
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
|
|
|
Re: How to display live Video in IDL [message #45846 is a reply to message #45843] |
Tue, 11 October 2005 10:22  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
Marc Reinig wrote:
> Alternatively, can I get a
> Windows handle to a window created by IDL so I can blit directly there?
About the best you can use the win API's GetActiveWindow() function to
get a handle to the active window. If you create the window in IDL then
immediately call a function to get the handle then you should be fine
99.9% of the time :)
-Rick
|
|
|
Re: How to display live Video in IDL [message #45849 is a reply to message #45846] |
Tue, 11 October 2005 06:39  |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
Marc Reinig wrote:
> I would like to display a video stream from a camera in IDL, as part of my
> application. Does IDL have facilities for that? Alternatively, can I get a
> Windows handle to a window created by IDL so I can blit directly there?
>
Hi,
If your camera API provides easy interface with IDL via a DLM that you
can code up (this is beginning to look like alphabet soup!) then yes. I
have done this kind of thing with the SCION frame grabber. After you
have your DLM set up, you can simply call for a new image ala newImage =
MyDLM_GetImage() or some such call. Then use object graphics to render
the image to screen (which I think is faster for images than direct
graphics). I never achieved full frame rate video display, but it was
fast enough for my purposes.
I'll bet there are faster/better ways to do this but I found it pretty
easy to manage.
I have no idea about passing an IDL graphics window to MS Windows - but
isn't there some kind of ActiveX thing for IDL connection to Windows?
Cheers,
Ben
|
|
|