EPIX, Inc. Home Page
XCOBJ Library

Programming Library for PIXCI® Imaging Boards

  • Quick & Easy Access to PIXCI® Imaging Boards.
  • C/C++ Library for 32 bit DOS Programs.
  • DLL for 32 bit Windows 95 Applications.
  • DLL for 32 bit Windows NT Applications.
  • High Level Functions Avoid I/O Port Pokes.
  • RS-170, NTSC, or S-Video Formats.
  • CCIR, PAL, or S-Video Formats.
  • Custom Area-Scan or Line-Scan Formats.
  • Analog or Digital Video Interfaces.
  • Image Sequence Capture.
  • Triggered Image Capture.
  • Image display on S/VGA.

The XCOBJ Library empowers C/C++ and Windows programmers to control the PIXCI® series of imaging boards.

XCOBJ supports the following versions and options of the PIXCI® series:(1)

Up to eight PIXCI® imaging boards, of the same version and with the same options, can be operated selectively or simultaneously; allowing parallel control for multi-camera vision of a single event or object, or selective control for capturing multiple, independent, events or objects.

Through the unique flexibility of XCOBJ and the PIXCI® imaging boards, single frames or video sequences of standard or nonstandard video sources can be captured, analyzed, displayed, and archived.(2)


XCOBJ provides high level services, allowing programmers to concentrate on the imaging application, rather than focusing on board level programming and I/O ports. For virtually all applications, board level programming can be ignored!

XCOBJ automatically recognizes different versions and options of the PIXCI® imaging cards, providing consistent access to features, and hiding hardware details and differences. Fundamental services, such as setting resolution, capturing, and accessing image data, are compatible with "C" libraries for other EPIX® imaging board families; allowing easy porting and reuse of application programs.

The XCOBJ C/C++ libraries of object code allow embedding PIXCI® control into user-written applications. Under Windows, the XCOBJ DLL also enables access from existing Windows applications which support "hooks" into DLLs.

XCOBJ allows user-written programs to apply the PIXCI® imaging boards to applications such as image enhancement, archival, analysis and measurement; event and motion study; document capture; cine-loop and ultrasound image capture; particle analysis; visual inspection; machine vision and quality control. Join the scientists and engineers in medical, industrial, and research environments who rely on EPIX® for imaging solutions.


Flexible Video Formats -
Capture standard monochrome RS-170 and CCIR formats, composite color NTSC and PAL formats, color S-VIDEO formats, and nonstandard video formats.(2)

Flexible Video Modes -
Set the number of pixels per line, subsampling of pixels in the line, lines per field, and subsampling of lines within the field.(3) Capture interlaced video as a single interlaced image; as two images, one per field; or as a single image of the odd or even field. Supports video rate selection of capture image buffers.

Tradeoff capture resolution against number of buffers. With 4 Mbyte image memory, for example, resolution of 512x240x8 yields 34 image buffers, 752x480x8 yields 11 image buffers, and 2048x1020x8 yields 2 image buffers.

Camera & Device Control -
Sense external input signals, control external output signals. Obtain elapsed field time.

Capture sequences of images at video rate, or sub-video rate. Capture images in response to external trigger.

Image Access -
Read and write image buffers with efficient block read and write, or with convenient single pixel read and write. Read and write pixels sequentially within area of interest, without concern for AOI boundaries or line interlacing. Direct access to image memory with "C" pointer.

For color cameras, access pixels as grey levels, RGB, or HSB (Hue, Saturation, Brightness), regardless of the PIXCI® imaging board's native gamut. Pixels may also be accessed in the board's native gamut (YCrCb for the PIXCI® SV2, SV3, SV4).

Extended Features -
Built-in functions provide easy import and export of images in TIF and BMP file formats, and exporting in PCX format.

Under Windows: Built-in services provide display of captured or modified images on the S/VGA, in all or part of, one or more windows.

Live Video -
For the PIXCI® SV2, SV3, SV4: With a suitable S/VGA card and DirectDraw support, built-in services allow displaying live video, with overlays, in all or part of a window,(4) without the programmer using the DirectDraw API/SDK.

Easy Programming -
All basic features are available via Simple C Functions (SCF); easy to use subroutines don't require familiarity with "C" structures, pointers, etc. An example source program demonstrates use of SCF subroutines. Additionally, an extended "structured" and "object oriented" interface provides complete control of video formats, resolutions, features and options.

High Level Services -
Services such as image buffer access are "logically correct", providing interlaced data in "world view order", and independent of camera scanning or internal memory configurations.

Many XCOBJ services support "no-wait" and "check for completion" modes. During frame capture the PC is not locked into waiting for the next vertical blanking interval, but can proceed with concurrent processing.

Image Processing & Analysis -
The optional PXIPL Image Processing and Analysis Library, provides a wide selection of pre-written imaging routines.

The major categories include: processing, enhancements, graphic lines and shapes, text overlay, printing, morphology, filters and edge detectors, transforms, convolutions, sequence integration and averaging, image printing, image copy and resizing, single image and image pair normalizations, blob analysis, histograms and moments, image load and save, calibration, correlation, subpixel accuracy measurements, and particle tracking.

Sequence Capture -
Capture sequences of images at video rate, or sub-video rate, to the extent of available PC memory. Under Windows 95/98/NT, special "Memory Reservoir" feature allows reserving all PC memory, excepting 16 or 24 Mbytes, for required by Windows.

Frame buffer access examples
pxd_xcopen("NTSC", 0);			    // Use standard NTSC, or
//pxd_xcopen("CCIR", 0);		    // .. CCIR, or
//pxd_xcopen("VIDEO.FMT", 0);		    // .. customized format?
pxd_snap('s', 1L, 0, 0, 0);		    // snap image into buffer 1

// Using easy, buffered, sequential, access
unsigned char	buf[512];		    // any convenient size
unsigned long	count = 0;
int	 i, j;
pxd_iopencolor(0,0L,0,0,256,256,'r',"Grey");// open access to read
					    // grey scale, 256x256 AOI
while (i = pxd_ioc(0, buf, sizeof(buf)))    // read one or more lines
    for (j = 0; j < i; j++)		    // scan and ..
	if (buf[j] < 64)		    // .. test and count pixels
	    count++;			    // .. with value less than 64

// Using direct memory access
// (assumes monochrome images)
unsigned long adrs, size, l;
unsigned char _far p;			    // not _far in Win 95 & others
adrs = pxvid_xyadrs(pxd_defimage(1L,0,0,-1,-1),0,0); // adrs of pixel 0, 0
size = (long)pxd_xdim()*pxd_ydim()*(pxd_ylace()+1);  // size of buffer 1
while (size) {
    p = pxdrv_imap(adrs, &l);		    // get pointer, max access size
    l = min(size, l); size -= l;	    // housekeeping
    while (l--) 			    // scan and ..
	if (*p++ < 64)			    // .. test and count pixels
	    count++;			    // .. with value less than 64

Image capture and VGA display example (Windows only)
HDC  hDC; RECT rect;

pxd_xcopen("RS-170", 0);		    // Use standard RS-170, or
//pxd_xcopen("NTSC", 0);		    // .. NTSC, or
//pxd_xcopen("NTSC/YC", 0);		    // .. NTSC S-VIDEO, or
//pxd_xcopen("CCIR", 0);		    // .. CCIR, or
//pxd_xcopen("PAL", 0); 		    // .. PAL, or
//pxd_xcopen("PAL/YC", 0);		    // .. PAL S-VIDEO, or
//pxd_xcopen("VIDEO.FMT", 0);		    // .. customized formats
					    //	  & resolution?

hDC = GetDC(hWnd);			    // get handle to window
GetClientRect(hWnd, &rect);		    // get size of window
rect.right++; rect.bottom++;		    // inclusive->exclusive
SetStretchBltMode(hDC,STRETCH_DELETESCANS); // set window modes
pxd_snap('s', 1L, 0, 0, 0);		    // snap image into buffer 1
pxd_StretchDIBits(1L, 0, 0, -1, -1,	    // specify image buffer & AOI
	    0, 0, hDC,			    // specify window
	    rect.right/4, rect.bottom/4,    // window upper left corner
	    rect.right/2, rect.bottom/2,    // window size
	    0); 			    // display!
ReleaseDC(hWnd, hDC);			    // release handle

Image capture and save example
pxd_snap('s', 2L, 0, 0, 0);		  // snap image into buffer 2
pxd_bmpsave("IMAGE.BMP",2L,0,0,256,128);  // save 256x128 AOI to file
					  // ..in .bmp format (available
					  // In DOS versions too!)

pxd_snap('s', 1L, 0, 0, 0);		  // snap image into buffer 1
pxd_pxcsave("IMAGE.PCX",1L,0,0,-1,-1);	  // save full AOI to file
					  // In .pcx format

Interactive sequence capture example
long	b;
pxd_xcopen("NTSC", 0);			  // Use standard NTSC, or
//pxd_xcopen("CCIR", 0);		  // .. CCIR, or
//pxd_xcopen("VIDEO.FMT", 0);		  // .. nonstandard video?
for (b = 1; b <= pxd_imbufs(); b++) {	  // Run thru all buffers.
    pxd_video('z', b);			  // Capture into buffer 'b'
    printf("Key ENTER to capture buffer #%ld\\n", b);
    while (getchar() != '\\n') ;	   // Wait for user trigger
pxd_video('s', 1);			  // stop capturing
printf("All buffers captured.\\n");

Live video to S/VGA with graphics overlay example (Windows only)
pxd_xcopen("NTSC/YC", 0);		  // Use standard S-Video, or
//pxd_xcopen("PAL", 0); 		  // .. PAL
pxd_DirectVideoInit(hWnd);		  // init direct video to S/VGA
pxd_DirectVideo('v',0,0,0,0,hWnd,	  // display live video on S/VGA
	    0,0,INT_MAX,INT_MAX,	  // location & extent in window
	    RGB(0,0,189),RGB(0,0,189));   // color keyed to allow graphic
hDC = GetDC(hWnd)			  // overlays over live video
RECT rect;
SetRect(&rect, 20, 20, 40, 40); 	  // any standard GDI/MFC calls
DrawFocusRect(hDC, &rect);		  // can be used to draw graphics
ReleaseDC(hWnd, hDC);			  // OVER the live video





Any PIXCI® series imaging board.


Standard versions support:

Other versions available on request.


Licensing permits royalty free inclusion of library routines into programs using EPIX PIXCI® series imaging boards.


As required by chosen environment: Object code libraries (.LIB), Dynamic Link Library (.DLL), DOS Driver (.SYS), Win 95 Driver (.VXD), and/or Win NT Driver (.SYS).

C prototype files (.H).

Example C programs demonstrating typically used PIXCI® features, with Windows (GDI) or DOS (STDIO) interface (.C).

Utility program to convert video format specifications exported by previous versions of XCIP or XCAP.

Utility program to convert video C prototype files (.H) to Visual Basic declarations.

Printed manual(s).

  1. Software may require upgrade to operate future versions or options of PIXCI® imaging boards.
  2. Support for different video formats is dependent upon the particular PIXCI® imaging board used.
  3. Support for varying resolution is dependent upon the particular PIXCI® imaging board used.
  4. Support for live video is dependent upon the native color gamut of the particular PIXCI® imaging board used, and on the capabilities of the S/VGA card used.

Back to EPIX Products

Back to the EPIX home page

Image Processing Products For Research and Industry