Hello Guest it is April 18, 2024, 02:06:34 AM

Author Topic: Video  (Read 9663 times)

0 Members and 1 Guest are viewing this topic.

Video
« on: December 31, 2008, 04:13:07 PM »
Hello,

I have been messing around with video plugins. In particular, I am interested in 3d Video Probes.

I found the AMCAP camera viewer source files in the DirectX 9.0 SDK. I have not yet figured out how to use many of those features in a Mach plugin. Having a template that starts with this, or a simpler viewer like PlayCap, would be useful.

Downloaded DX9SDK.exe (225MB) from

<http://www.microsoft.com/downloads/details.aspx?familyid=124552FF-8363-47FD-8F3B-36C226E04C85&displaylang=en>

This is a self unzipping file. The default for the unzip is a hidden directory. So I made a directory called DirectX9 and unzipped it there. These directories and files are probably what would be on an installation CD.

Easy to find and compile AMCAP and PLAYCAP and a few other capture related samples. No formal installation necessary. Just use the unzipped files.

On my second machine I ran Install.exe and it created another directory called DXSDK and copied most of the files from my temporary directory to that directory. Also did a lot of whatever Windows likes for a real install. So far, no visible benefit from doing the formal install.

Anybody know what benefits come with running the Install program?

Tom Hubin
thubin@earthlink.net
Re: Video
« Reply #1 on: January 09, 2009, 08:52:45 PM »
Hi Tom,

You should always use the installers.  In particular registry settings will not be made and COM components not registered if you just copy stuff to your system.

AMCap grabs an AVI stream.  That does not seem to be what you need.  There is a sample 'stillcap' in the 'editing' folder for DirectShow that gives single frames as BMP files.  How about this?

-James
Re: Video
« Reply #2 on: January 09, 2009, 11:25:11 PM »
AMCap grabs an AVI stream.  That does not seem to be what you need.  There is a sample 'stillcap' in the 'editing' folder for DirectShow that gives single frames as BMP files.  How about this?

Hello James,

Thanx for the suggestion about Stillcap.

StillCap documentation and source code comments do make some reference to "spying" on the camera activity. I will have to study this a bit. Do you have any idea how a Mach3 plugin would fetch a bitmap snapshot from a program similar to (i.e. with some necessary modifications) StillCap?

Or maybe how to modify StillCap to actually be a Mach plugin?

Some of the bells and whistles in AmCap are not in StillCap. This will be a problem for the 3d Video Probe.

For example, it is essential that the AGC be set for short enough time that the camera sees nothing but the laser. It is also necessary that the laser not saturate the video but otherwise comes close to saturating. This involves setting the AGC to manage the exposure time according to the peak detected or for the user to manually set the exposure to a brief period (e.g. 1ms).

A few other features will be needed fairly soon into the development. Some of these would be the ability to rotate the image at 0, 90, 180, and 270 degrees and possibly to mirror the image. This can be done after the image is captured but there may be driver settings that will handle that for me. 

Tom Hubin
thubin@earthlink.net
Re: Video
« Reply #3 on: January 12, 2009, 12:18:40 PM »
Hi Tom,

In order to adapt Stillcap to a plugin there are several issues.  One, you must repackage the code in a DLL.  The dialog window needs to have the Mach3 main window as its parent for things to go well.

If you do the conversion in steps it will be easier.  Put Stillcap into a DLL and call it from a simple windows app.  When that is working and you have control over the AGC then you can hook it up to a Mach3 plugin.  The DLL that you make can just be a library for the plugin, the effort won't be wasted.

Even if the drivers can do rotation I would'nt use that since your application then becomes very hardware specific.

Here is a free, open source image manipulation library.

http://freeimage.sourceforge.net/

-James
Re: Video
« Reply #4 on: January 21, 2009, 03:42:07 PM »
Hello,

A few days ago I attended Cabin Fever 2009 and the Mach Seminar on Plugins and other software. I brought up the issues with 3dVideo Probing and methods for doing this. Brian Barker, who led this seminar, suggested that the video could be run as a separate thread. I believe this is similar to what James Leonard has suggested to me.

I would like to start with the DirectX 9.0 StillCap sample and modify it to use Mach3 to execute Gcode, at least G01. I would also need a way to determine that motion has stopped so that I can take a snapshot and do the processing from within Stillcap.

Attached is the StillCap program from the DirectX 9.0 Samples.

I am using an old DOS version of PKzip so names are limited to 8 letters. StillCap.zip has all the files but three have shortened names.
Rename StillC~1.vcp to StillCap.vcproj, StillC~1.h to StillCapDlg.h, and StillC~1.cpp to StillCapDlg.cpp before compiling.

I don't think my old version of PKZip makes a directory named StillCap so please make such a directory then unzip into it.

I have also included StillCap.exe taken from the DirectX 9.0 samples bin/ directory. You should be able to execute that as-is to see what StillCap does.

Tom Hubin
thubin@earthlink.net
Re: Video
« Reply #5 on: May 30, 2009, 06:48:55 PM »
Where do I go to download the video plugin?
Re: Video
« Reply #6 on: May 30, 2009, 11:18:05 PM »
Where do I go to download the video plugin?

Hello Luslugger,

For a lot of info on 3d video probing hardware, plugin software, examples of results, theory of operation, setup etc., go to the mach3 forum titled "Video Probing".

"http://www.machsupport.com/forum/index.php/board,67.0.html"

For only the plugin download

http://www.machsupport.com/forum/index.php/topic,10958.msg74209.html#msg74209

Tom Hubin
thubin@earthlink.net