These are the Linux/Unix files when extracted relative to the Saphira
$SAPHIRA/path | Description |
colbert/ptzsys.so | Shared object library for Saphira/Colbert |
/ptzdemo.act | Colbert demo of PTZ software |
devices/ptzsys/ptzdoc.c | Shared library source file |
/makefile | Library makefile |
PTZ with Saphira
The Saphira
Table of Saphira PTZ System Functions
void sfPTZCamInit(void) | Initialize the camera and reset to center |
void sfPTZCamPan(int deg) | Pan to an absolute position |
void sfPTZCamTilt(int deg) | Tilt to an absolute position |
void sfPTZCamPanTilt(int pan, int tilt) | Pan and tilt to an absolute position |
void sfPTZCamZoom(int val) | Zoom to 0 (longest) - 1023 (closest) |
PTZ with Colbert
To use the PTZ System software with your Saphira clients and interactively through the Colbert command window, load the shared PTZ System object library into the Colbert interpreter that comes with Saphira versions 6.1 and later. With Linux/Unix systems, the shared library is called ptzsys.so; it's called ptzsys.dll for use with Windows95/98 and WindowsNT. They are kept in the $(SAPHIRA)/colbert directory of Saphira.
To use the Saphira commands listed in the Table above from the Colbert command line or from within a Saphira client program, first start up the Saphira client. Then, either draw down the Saphira File menu and select to load the shared library, or give the Colbert direct command:
> load ptzsys.dll
or
> load ptzsys.so
The following is ptzdemo.act example Colbert program that exercises the PTZ camera. To run it, simply load it from the Saphira colbert/ directory. It automatically loads the ptzsys.so (or .dll) library of commands and starts itself.
/* First load the basic PTZ functions */ load ptzsys;
act PTZDemo()
{
if (!sfIsConnected){ /* Are we connected? */ sfMessage("Connect with Pioneer. I'll do the rest..."); waitfor(sfIsConnected);
}
sfMessage("Starting up the camera ..."); sfPTZCamInit();
wait 20;
sfMessage("Pan clockwise ..."); sfPTZCamPan(95);
wait 20;
sfMessage("Pan
6