Installation for Video By The Pixel:
Getting the environment set up can be the hardest part. The Pixels have to make
the journey from the camera to an array into your software. There are many layers
that it will have to pass through to help isolate your software from the details
of any particular camera. There are a couple of files that have to be in the right
place for this to work.
You may not have to read this page. The files you need are not that unusual
(except the WDM>VDIG)
and should be installed on most machines. Try this applet,
if it works you are done installing. Oh well nothing ever works the first time,
better read on.
These are the elements of the installation.
- Video Input -- USB Camera, Firewire Camera or Video Card with composite
or Svideo input)
- Video Driver-- Software that translates from the proprietary specifics of
a particular video source into commonly used video fuctions. You have to get
this software from your the makers of your video hardware. "WDM"
drivers translate from proprietary video hardware into the video functions
used by "Direct Show" on a PC. A "VDIG" is a video driver
that translates from proprietary video hardware into the video functions used
by "Quicktime" and are very common on Apple Computers and rather
rare for a PC. We are using the Quicktime so on a PC you will usually have
to first translate using the common "WDM" drivers that came with
your video input device and then translate again with and additional driver
which acts as a WDM-VDIG translator (http://www.vdig.com/WinVDIG/index.html
or http://www.abstractplane.com.au/
). This is the piece that is a bit unusual and unlikely that you have on your
machine. It is usually this is just a .qtx that is installed in your Windows/System32/
directory.
- QuickTime for Java Classes--You have to have the QTJAVA.zip (should be downloaded
automatically with each install of Quicktime but occasionally requires a custom
install or reinstall
of Quicktime to be sure they come over. Be sure that you have a Java
JRE installed first so that the Quicktime Installer will have place to
put the QTJava.zip file. The correct place for the file is .../jre/lib/ext/qtjava.zip.
One problem might be that you have more than one Java JRE installed on your
machine. If things are not working, you might do the quick and dirty thing
of a search for every "ext" folder on your machine and place a copy
of QTJava.zip in each one.
- Video by the Pixel Classes -- These are the classes that I have created
to make it easier to use the QTJava classes to get live video and specifically
to access the pixels within that video. These classes are contained within
a file called vbp.jar. This file must be placed in your classpath. Usually
that is as easy as placing it in the same folder as your classes. Sometimes
you have to explicitly set the classpath when you compile and run your java
(see IDE's below).
- Your Classes -- Finally there are your classes which will be either applications
or applet that usually contain a repeat loop that goes through all the rows
and columns of the frame.
Here is a recap of the layers of sofware necessary to get at the pixels and
test applications for along the way.
| Mac |
PC |
| Video Input (might come with a little test app) |
Video Input (might come with a little test app) |
| VDIG (test with HackTV) |
WDM Driver (test with Amcap) |
| QTJava classes |
WDM-VDIG Driver (test with HackTv) |
|
VideoByThePixel classes (test with simpleApp or simpleApplet)
|
QTJava classes |
| Your code |
VideoByThePixel classes (test with simpleApp or simpleApplet) |
| |
Your code |
Using in an Applet
As you probably know browsers only allow applets to
operate in a limited sandbox. Among the things applets are not usually allowed
to do is look through a video camera attached to a computer. You will get a
security violation when your applet instantiates the PixelSource class. In order
to get past the sandbox you have to sign
your applet and ask for permission but this is rather a huge pain. This
is what you would have to do for distribution but just for local development
(in a 1.4 JRE) you might just change the java.policy file (do a search) for
your JRE by adding these lines. Of course you would have to be sure that
grant codeBase "http://localhost/*" {
permission java.security.AllPermission;
};
grant codeBase "file:///C:/YOURFOLDERS/-" {
permission java.security.AllPermission;
};