XCLIB™ LIBRARY
Programming Library for PIXCI ® Imaging Boards
PIXCI® IMAGING POWER
The XCLIB Library empowers C/C++ and Windows, Linux, and DOS programmers to build applications using the PIXCI® series of frame grabbers and frame generators.
XCLIB supports all versions and options of the PIXCI® frame grabbers: 1
- The PIXCI® D † , D24 † , D32 † , D2X, D3X, D2XE, and D3XE for digital output (LVDS or TTL) area-scan and line-scan cameras with 8, 10, 12, 14, and other bit depths, in monochrome or color.
- The PIXCI® D2X or D2X1 for use with SILICON VIDEO® 2112 † , 2112C † , 1310 † , 1310C † , 1281M, and 1281C cameras.
- The PIXCI® SI, SI1, SI2, or SI4 for use with SILICON VIDEO® 10C6, 10M6, 5C10, 5M10, 9C10, 9M001, 9M001C † , 9T001C, HAS21, WGA-C and WGA-M cameras.
- The PIXCI® SI for use with SILICON VIDEO® 1C45, 1M45, 643M, 643C, and 15C5 cameras.
- The PIXCI® SI1, SI2, or SI4 for use with SILICON VIDEO® 643M and 643C cameras.
- The PIXCI® ELS2 for use with SILICON VIDEO® 022M cameras.
- The PIXCI® E8CAM for use with SILICON VIDEO®
2KS-C and 2KS-M
cameras. - The PIXCI® E1, E1DB, E4, E4DB, E4G2-2F, E4G2-4B, E4G2-F2B, E4TX2-2F, E4TX2-4B, E4TX2-F2B, E8, E8DB, e104x4-2f, e104x4-4b, e104x4-f2b, EB1, EB1G2, EB1-PoCL, EB1G2-PoCL, EB1mini, miniH2B, miniH2F, miniH2x4F, mf2280, mf2280D, EC1, ECB1, ECB1-34, ECB2, EL1, and EL1DB, for use with SILICON VIDEO® 10C-CL, 10M-CL, 20C-CL, 20M-CL, 1514CL, and 1820CL cameras.
- The PIXCI® CL1, CL2, CL3SD, E1, E1DB, E4, E4DB, E4G2-2F, E4G2-4B, E4G2-F2B, E4TX2-2F, E4TX2-4B, E4TX2-F2B, E8, E8DB, e104x4-2f, e104x4-4b, e104x4-f2b, EB1, EB1G2, EB1-PoCL, EB1G2-PoCL, EB1mini, miniH2B, miniH2F, miniH2x4F, mf2280, mf2280D, EC1, ECB1, ECB1-34, ECB2, EL1, and EL1DB, for Camera Link area-scan and line-scan cameras.
- The PIXCI® A † for analog output, monochrome, area-scan and line-scan cameras.
- The PIXCI® A110 for analog output area-scan cameras and other video sources, in monochrome.
- The PIXCI® A310 for analog output area-scan cameras, VGA, SVGA, SXGA, XGA and other video sources,
in monochrome or RGB component color. - The PIXCI® SV2 † , SV3 † , SV4 † , SV5, SV5A, SV5B, SV5L, SV7, and SV8 for NTSC, PAL, RS-170, and CCIR.
- The PIXCI® SV2 † , SV3 † , SV4 † , SV5, SV5L, and SV8 for S-Video.
XCLIB supports all versions and options of the PIXCI® frame generators: 1
- The PIXCI® EB1tg and EB1miniTg for Camera Link area-scan and line-scan video.
Multiple PIXCI® imaging boards 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 XCLIB and the PIXCI® frame grabbers, single frames or video sequences from standard RS-170, NTSC, PAL, or CCIR, from Camera Link, from LVDS/TTL, or from other nonstandard video sources can be captured, analyzed 3 , displayed, and archived 2 .
Or, with XCLIB and the PIXCI® frame generators, single frames or video sequences of Camera Link video can be created.
CONVENIENCE & COMPATIBILITY
XCLIB provides high level services, allowing concentration on the imaging application, rather than focusing on board level programming.
XCLIB automatically detects and manages all versions of the PIXCI® frame grabbers. Fundamental services, such as setting resolution, capturing, and accessing image data, are the same regardless of camera or version of frame grabber. Fundamental services are also consistent between frame grabbers and frame generators.
The XCLIB C/C++ libraries allows embedding control of PIXCI® frame grabbers or frame generators into user-written applications. Under Windows, the XCLIB DLL also enables access from third party applications, such as Visual Basic, VB.NET, C#.NET, Delphi, Java, LabView, Matlab, Python, and many others, supporting "calling" into DLLs. Under Linux, the XCLIB Shared Object (SO) also enables access from third party applications, such as LabView, Matlab, Python, Java, and many others supporting "calling" into Shared Objects (SO).
SOPHISTICATED SOLUTIONS
XCLIB allows user-written applications to apply the PIXCI® frame grabbers 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 upon EPIX® imaging solutions.
FEATURES
Flexible Video Formats -
Capture standard monochrome RS-170, CCIR, and RS-343 formats, composite color NTSC, PAL, S-Video, and S/VGA formats, RGB component color formats, as well as nonstandard analog and digital video formats. 3
Flexible Video Modes -
Set bits per pixel and color space; set number of pixels per line and lines per field, optionally subsampled. 5 Capture interlaced video as a single interlaced image; as two images, one per field; or as single image of selected field. Capture at video rate, or every "1 of N" frames.
Capture AOI of camera's image for reduced image size; tradeoff capture resolution versus number of frame buffers versus image memory. With 4 GiByte image memory, for example, resolution of 720x480 24 bit RGB yields (approx.) 4140 frame buffers, 1024x1024 16 bit monochrome yields 2048 frame buffers, and 2048x2048 8 bit Bayer yields 1024 frame buffers.
Image Memory -
Capture sequences of images at video (or decimated) rate, to the extent of available host computer memory. On i386 and x86-64 platforms, a "Forceful Allocation" technique allows reserving almost all computer memory (up to 4 GiByte on 32 bit machines) for image frame buffers, excepting memory required by the O.S. and BIOS.
Camera & Device Control -
Sense general purpose input signals, control general purpose output signals; transmit and receive serial configuration data.6
Image Data Access -
Read and write frame buffers with efficient block read and write. Read and write pixels sequentially within area of interest; with implicit handling of AOI boundaries or line interlacing. Direct access to pixels in shared DMA/frame buffer via pointer. 4
For color cameras, access pixel values as grey levels, RGB, BGR, YCrCb, or HSB (Hue, Saturation, Brightness), regardless of camera's or frame grabber's native color space. Access pixel values in the frame grabber's native color space (e.g. YCrCb for the PIXCI® SV2, SV3, SV4, SV5, SV7, SV8), or camera's native color space (e.g. raw Bayer data for Bayer output cameras).
Thin Design and Efficiency -
Video services support "no-wait" and "check for completion" modes. During frame capture the host computer's CPU is not busy transferring pixel data nor waiting for the next vertical blanking interval, but can proceed with concurrent processing.
Capture engine operates in background - via DMA & IRQ - for efficiency and low CPU overhead. Captured image data isn't copied, moved, or processed - until requested by application.
Does not create or use background threads.
Image data can be accessed in real time as it arrives from camera — line by line or pixel by pixel. 8
Video Capture Modes -
Capture single image. Capture image(s) in response to external trigger. Capture at video rate into alternate buffers ("Ping-Pong"), allowing analysis of one buffer while capturing into the other. Capture at video (or decimated) rate, into a sequence of buffers; capture into a circular queue (FIFO) of buffers, allowing image analysis or "video to disk" I/O to lag behind video capture. Capture into list of buffers — enqueued and dequeued by application. 9
Provides elapsed field/frame count; field/frame count and time stamp count of last capture and for each captured buffer. Time stamping performed in driver, during hardware's interrupt handling, for minimal latency and maximum accuracy.
Provides application notification via Events, Signals, or Callbacks of each field/frame.
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.
Extended Features -
Optional post-capture white balance, color space correction, bad pixel replacement, auto contrast enhancement, per-pixel gain and offset, and multi-tap camera's pixel order correction. 10
Simple import and export of images in lossless TIFF and BMP file formats.
Read image data as RGB24, RGB32, BGR24, or BGR32 — ready to be displayed via O.S. or desktop services.
Under Windows: Display of captured or modified images on the SVGA/HDMI, via a Windows Device Context. Render captured or modified image as a Device Independent Bitmap (Windows DIB). For PIXCI® SV2, SV3, SV4, SV5, SV7, SV8, stream live video to a suitable SVGA/HDMI card with Windows DirectDraw support. 11
DMA live image data directly to GPU or other memory space accessible from the PCI/PCIe bus. 12
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, particle tracking, and image load/save with additional file formats.
PXIPL simplifies development of user-written applications in applications such as image enhancement, archival, analysis, and measurement; event and motion study; document capture; particle analysis; visual inspection; machine vision and quality control.
The PXIPL functions are not restricted to processing images which were captured by EPIX® frame grabbers. Images from any source, residing in PC memory, can be any size and any number of colors, limited only by availability of PC memory, and the CPU word size. 13
Typical PXIPL functions provide a broad spectrum of operations, allowing a single function to do the work of many functions. For example, a convolution function accepts parameters describing the image buffer, the area of interest within the buffer, the convolution size N, and the N× N kernel coefficients. This single function allows convolving with a 3×3, 9×9, 31×31, or 99×99 kernel size, limited only by available PC memory.
XCLIB-Lite Version -
XCLIB is available in a reduced, economical, version with limited features - sufficient to support many, common, applications.
XCLIB-Lite may be used with multiple PIXCI® frame grabbers or frame generators, but allows selecting and operating only one frame grabber at a time. For PIXCI® E1DB, E4DB, E4G2-2F, E4TX2-2F, E8DB, e104x4-2f, miniH2B, mf2280D, E8CAM, ECB2, EL1DB, ELS2, SI2, or SV7 frame grabbers, or for PIXCI® E4G2-F2B, E4TX2-F2B, or e104x4-f2b frame grabbers, or for PIXCI® E4G2-4B, E4TX2-$B, e104x4-4b or SI4 frame grabbers, XCLIB-Lite allows operating only one functional half, or quarter, respectively, of a selected frame grabber.
XCLIB-Lite provides the same Simple C Functions (SCF) for snapping images, capturing sequences, and dual buffer (ping-pong) capture, and for reading and writing single or blocks of pixel values in RGB or monochrome; but does not provide the "structured" interface, bit depth conversions, optional color space conversions to HSB and YUV/YCrCb, nor allow reading or writing only a single color component of RGB. For Bayer pattern cameras, XCLIB-Lite does provide the same de-mosaicked, color corrected, white balanced, and gamma corrected ready-to-use RGB pixel data as XCLIB, but does not provide access to raw Bayer data.
XCLIB-Lite does not allow using more than 64 MiBytes of frame buffer memory, and does not provide direct (i.e. "pointer") access to frame buffers. XCLIB-Lite can't be used with the PXIPL Image Processing and Analysis Library.
For frame grabbers and cameras in trigger (i.e. async-reset, controlled) mode, with the frame grabber generating trigger signals via the so-called "PRIN(C)" and "EXSYNC", parameters along with related camera control parameters, XCLIB-Lite allows importing a video setup file specifying the exposure period, frame/line period, etc., but does not allow explicitly altering these parameters via function calls. However, for SILICON VIDEO® cameras XCLIB-Lite provides the same camera specific (SCF) functions and features as XCLIB.
XCLIB-Lite allows use of a video setup configuration file, but does not allow the file to be compiled into the application. XCLIB-Lite provides a subset of XCLIB's functions; applications written using XCLIB-Lite are upward compatible with XCLIB.
SAMPLE CODE
Frame buffer access examples.
pxd_PIXCIopen("", "NTSC", ""); // Use standard NTSC, or //pxd_PIXCIopen("", "CCIR", ""); // .. CCIR, or //pxd_PIXCIopen("", "", "VIDEO.FMT"); // .. customized format? // snap image into buffer 1 pxd_doSnap(0x1, 1, 0); // and wait for result // Access monochromatic data unsigned char buf[1024]; // size >= # pixels per AOI line unsigned long c = 0; int i, j, y; for (y = 0;; y++) { i = pxd_readuchar(0x1, 1, 0, y, -1, y+1, buf, sizeof(buf), "Grey"); if (i <= 0) // read next line of image break; // until there are no more for (j = 0; j < i; j++) // scan and .. if (buf[j] < 64) // .. test and count pixels c++; // .. with value less than 64 } // Access one line of RGB data pxd_readuchar(0x1, 1, 0, 0, -1, 1, buf, sizeof(buf), "RGB"); printf("Pixel at (0,20) is %d/%d/%d\\n", buf[20+0], buf[20+1], buf[20+2]); // Access one line of Red component of RGB data i = pxd_readuchar(0x1, 1, 0, 0, -1, 1, buf, sizeof(buf), "RofRGB"); for (j = 0, c = 0; j < i; j++) c += buf[j]; printf("Red component average is %f\\n", (double)count/i);
Image capture and HDMI/VGA display example (Windows only).
HDC hDC; RECT rect; pxd_PIXCIopen("", "RS-170", ""); // Use standard RS-170, or //pxd_PIXCIopen("", "NTSC", ""); // .. NTSC, or //pxd_PIXCIopen("", "NTSC/YC", ""); // .. NTSC S-VIDEO, or //pxd_PIXCIopen("", "CCIR", ""); // .. CCIR, or //pxd_PIXCIopen("", "PAL", ""); // .. PAL, or //pxd_PIXCIopen("", "PAL/YC", ""); // .. PAL S-VIDEO, or //pxd_PIXCIopen("", "", "VIDEO.FMT"); // .. 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 display modes pxd_doSnap(0x1, 1, 0); // snap image into buffer 1 pxd_renderStretchDIBits(0x1, 1, 0, 0, -1,-1,// specify frame buffer & AOI 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
Dual board image capture and save example.
pxd_doSnap(0x3, 2, 0); // snap image into buffer 2 of // board 0x1 and buffer 2 of // board 0x2. pxd_saveBmp(0x1,"IMAGE1.BMP",2, // save 256x128 AOI of buffer 2 of 0,0,256,128,0,0) // board 0x1 in .bmp format (in // DOS versions too!) pxd_saveBmp(0x2,"IMAGE2.BMP",2, // save full buffer 2 of board 0x2 0,0,-1,-1,0,0) // in .bmp format
Interactive sequence capture example.
int b; pxd_PIXCIopen("", "NTSC", ""); // Use standard NTSC, or //pxd_xcopen("", "CCIR", ""); // .. CCIR, or a saved //pxd_xcopen("", "", "VIDEO.FMT"); // .. nonstandard video? for (b = 1; b <= pxd_imageZdim(); b++) { // Run thru all buffers. printf("Key ENTER to capture buffer #%ld\\n", b); while (getchar() != '\\n') ; // Wait for user trigger pxd_doSnap(0x1, b, 0); // Capture into buffer 'b' } printf("All frame buffers captured.\\n");
Image capture and GTK display example (Linux only).
GtkWidget *gtkAreadisp_area = gtk_drawing_area_new(); GdkScreen gdkScreen = gdk_screen_get_default(); gint dispWidth = MIN(pxd_imageXdim(), (gint)gdk_screen_get_width(gdkScreen)); gint dispHeight = MIN(pxd_imageYdim(), (gint)gdk_screen_get_height(gdkScreen)); size_t rgbbufcnt = (dispWidth * ((pxd_imageCdim()==1)? 1: 3) * dispHeight); guchar *rgbbuf = malloc(rgbbufcnt * sizeof(uchar)); // pxd_doSnap(0x1, 1, 0); // snap image pxd_readuchar(0x1, 1, 0, 0, dispWidth, dispHeight, rgbbuf, rgbbufcnt, (pxd_imageCdim()==1)? "GREY": "RGB"); // read data gdk_draw_gray_image(gtkArea->window, gtkArea->style->fg_gc[GTK_STATE_NORMAL], 0, 0, dispWidth, dispHeight, GDK_RGB_DITHER_NONE, rgbbuf, dispWidth * (pxd_imageCdim()==1)? 1: 3); // draw free(rgbbuf);
FUNCTIONS
XCLIB TOPICS AND FUNCTIONS
Installation, Configuration, and Usage - Compile Time Introduction Library Installation Compiling Stack Heap Memory Allocation Hooks Compile Time Inclusions Common Types and Concepts Types Modifiers Call Back Types Usage Assumptions On Frame Buffers and Memory On the Semantics of Snap On Live Continuous Capture On Live/Snap Capture and CPU Efficiency On Reading or Writing Frame Buffers On Reading or Writing 1-D Rows & Columns, or 2-D Areas, of Pixels On Using Events or Signals for any of a Variety of Conditions On Frame Grabbers with Multiple Functional Units On Multiple Frame Grabbers On Multiple Identical Frame Grabbers On Serial Ports On Video Format Configuration On Video State ID's On Error Codes On Structures and Signatures Common Structures Coordinates, Images, and Image Window Structures Frame Grabber, Driver, and Video Format Configuration Structures Installation and Configuration - Run Time Driver Configuration Parameters Windows 95, 98, ME Environment Windows NT, 2000, XP, XP(x64), Vista 32/64-Bit, 7 32/64-Bit, 8/10/11 32/64-Bit Environment Tenberry DOS4GW DOS Extender Environment Linux 32 Bit & Intel i386 Environment Linux 64 Bit & Intel x86-64 Environment Linux 32 Bit & nVidia TK1 (ARM Cortex-A15) Environment Linux 32 Bit & Boundary Devices/ARM NITROGEN6/imx6 Linux 64 Bit & nVidia Nano, TX1, TX2, Xavier, Xavier NX (ARM Cortex-A57) Environment Activity Logging Camera Communication and Function Trace Configuration Fault Logging SCF Style Interface Set A/D Gain and Offset - pxd_setAdcGainOffset Set A/D Gains and Offsets - pxd_setAdcColorGainOffsets Get A/D Gain A - pxd_getAdcGainA Get A/D Gain B - pxd_getAdcGainB Get A/D Color Gains A - pxd_getAdcGainsA Get A/D Color Gains B - pxd_getAdcGainsB Get A/D Color Gains A - pxd_getAdcOffsetsA Get A/D Color Gains B - pxd_getAdcOffsetsB Get A/D Color Offsets A - pxd_getAdcOffsetA Get A/D Color Offsets B - pxd_getAdcOffsetB Buffer's Capture Field Count - pxd_buffersFieldCount Buffer's Capture General Purpose Input - pxd_buffersGPIn Buffer's Capture System Time - pxd_buffersSysTicks Buffer's Capture System Time - pxd_buffersSysTicksHi Camera Link CC Output Signal: Set - pxd_setCameraLinkCCOut Camera Link CC Output Signal: Get - pxd_getCameraLinkCCOut Last Captured Buffer: Buffer Number - pxd_capturedBuffer Last Captured Buffer: Field Count - pxd_capturedFieldCount Last Captured Buffer: System Time - pxd_capturedSysTicks Last Captured Buffer: System Time High - pxd_capturedSysTicksHi Current Capturing Buffer: Buffer Number - pxd_capturingBuffer Get PXIMAGE: Access Frame Grabber Frame Buffer - pxd_defineImage Get PXIMAGE3: Access Frame Grabber Frame Buffers - pxd_defineImage3 Get PXIMAGE: Access Frame Grabber Frame Buffer - pxd_definePximage Get PXIMAGE3: Access Frame Grabber Frame Buffers - pxd_definePximage3 Get PXIMAGE: Release Access to Frame Grabber Image Buffers - pxd_definePximageFree Get PXIMAGE3: Release Access to Frame Grabber Image Buffers - pxd_definePximage3Free Video Snap and Wait - pxd_doSnap Windows: Register Event upon Video Field - pxd_eventFieldCreate Windows: Unregister Event upon Video Field - pxd_eventFieldClose Windows: Register Event upon Captured Video Field - pxd_eventCapturedFieldCreate Windows: Unregister Event upon Captured Video Field - pxd_eventCapturedFieldClose Windows: Register Event upon General Purpose Trigger - pxd_eventGPTriggerCreate Windows: Unregister Event upon General Purpose Trigger - pxd_eventGPTriggerClose Windows: Register Event upon Fault - pxd_eventFaultCreate Windows: Unregister Event upon Fault - pxd_eventFaultClose Windows: Register Event upon Serial - pxd_eventSerialCreate Windows: Unregister Event upon Serial - pxd_eventSerialClose DOS: Register Callback upon Video Field - pxd_eventFieldCreate DOS: Unregister Callback upon Video Field - pxd_eventFieldClose DOS: Register Callback upon Captured Video Field - pxd_eventCapturedFieldCreate DOS: Unregister Callback upon Captured Video Field - pxd_eventCapturedFieldClose DOS: Register Callback upon General Purpose Trigger - pxd_eventGPTriggerCreate DOS: Unregister Callback upon General Purpose Trigger - pxd_eventGPTriggerClose DOS: Register Callback upon Fault - pxd_eventFaultCreate DOS: Unregister Callback upon Fault - pxd_eventFaultClose DOS: Register Callback upon Serial - pxd_eventSerialCreate DOS: Unregister Callback upon Serial - pxd_eventSerialClose Linux: Register Signal upon Video Field - pxd_eventFieldCreate Linux: Unregister Signal upon Video Field - pxd_eventFieldClose Linux: Register Signal upon Captured Video Field - pxd_eventCapturedFieldCreate Linux: Unregister Signal upon Captured Video Field - pxd_eventCapturedFieldClose Linux: Register Signal upon General Purpose Trigger - pxd_eventGPTriggerCreate Linux: Unregister Signal upon General Purpose Trigger - pxd_eventGPTriggerClose Linux: Register Signal upon Fault - pxd_eventFaultCreate Linux: Unregister Signal upon Fault - pxd_eventFaultClose Linux: Register Signal upon Serial - pxd_eventSerialCreate Linux: Unregister Signal upon Serial - pxd_eventSerialClose Set EXSYNC and PRIN Counter Values - pxd_setExsyncPrin Get EXSYNC Counter Value - pxd_getExsync Get PRIN Counter Value - pxd_getPrin Set EXSYNC and PRINC Mode Bits - pxd_setExsyncPrincMode Get EXSYNC Mode Bits - pxd_getExsyncMode Get PRINC Mode Bits - pxd_getPrincMode General Purpose Input Signal: Sense - pxd_getGPIn General Purpose Input Signal: Reset - pxd_setGPIn General Purpose Output Signal: Set - pxd_setGPOut General Purpose Output Signal: Get - pxd_getGPOut General Purpose Trigger Count: Sense - pxd_getGPTrigger Get Frame Buffer Image Aspect Ratio - pxd_imageAspectRatio Get Frame Buffer Image Bit Depth - pxd_imageBdim Get Frame Buffer Image Color Components - pxd_imageCdim Get Frame Buffer Image Field Dimension - pxd_imageIdim Get Frame Buffer Image Horizontal Dimension - pxd_imageXdim Get Frame Buffer Image Vertical Dimension - pxd_imageYdim Get Frame Buffer Image Count - pxd_imageZdim Set Bright White Balance - pxd_setImageBrightBalance Set Dark White Balance - pxd_setImageDarkBalance Read Pixel Values as Unsigned Char - pxd_readuchar Read Pixel Values as Unsigned Short - pxd_readushort Write Pixel Values as Unsigned Char - pxd_writeuchar Write Pixel Values as Unsigned Short - pxd_writeushort Get Frame Grabber Driver ID - pxd_infoDriverId Get Frame Grabber Include Files ID - pxd_infoIncludeId Get Frame Grabber Library ID - pxd_infoLibraryId Get Frame Grabber\'s Frame Buffer Size - pxd_infoMemsize Get Frame Grabber\'s Model - pxd_infoModel Get Frame Grabber\'s Submodel - pxd_infoSubmodel Get Frame Grabber Unit Count - pxd_infoUnits Get Frame Grabber Driver's System Time Units - pxd_infoSysTicksUnits Get Frame Grabber Driver's System Time - pxd_infoSysTicks Load Image: BMP Format - pxd_loadBmp Load Image: TIFF Format - pxd_loadTiff Save Image: BMP Format - pxd_saveBmp Save Image: PCX Format - pxd_savePcx Save Image: TARGA Format - pxd_saveTga Save Image: TIFF Format - pxd_saveTiff Load Frame Buffers - pxd_loadRawBuffers Save Frame Buffers - pxd_saveRawBuffers Errors: Translate Error Code to String - pxd_mesgErrorCode Errors: Check &Report Faults - pxd_mesgFault Errors: Check & Report Faults - pxd_mesgFault Errors: Check & Report Faults - pxd_mesgFaultText PIXCI® Frame Grabber: Open and Set Video Format Configuration - pxd_PIXCIopen PIXCI® Frame Grabber: Close - pxd_PIXCIclose Windows: Create Device Independent Bitmap (DIB) - pxd_renderDIBCreate Windows: Release Device Independent Bitmap (DIB) - pxd_renderDIBFree Windows: Direct Video Display, Init - pxd_renderDirectVideoInit Windows: Direct Video Display, Done - pxd_renderDirectVideoDone Windows: Direct Video Display, Start - pxd_renderDirectVideoLive Windows: Direct Video Display, Stop - pxd_renderDirectVideoUnLive Windows: Display Image Frame Buffer On Device Context - pxd_renderStretchDIBits Serial Port: Set Configuration - pxd_serialConfigure Serial Port: Read - pxd_serialRead Serial Port: Write - pxd_serialWrite Serial Port: Flush - pxd_serialFlush Camera Link Serial: Initialize - clSerialInit Camera Link Serial: Close - clSerialClose Camera Link Serial: Read - clSerialRead Camera Link Serial: Write - clSerialWrite Camera Link Serial: Read Available - clGetNumBytesAvail Camera Link Serial: Read Flush - clFlushPort Camera Link Serial: Error Text - clGetErrorText Camera Link Serial: Ports - clGetNumSerialPorts Camera Link Serial: Ports ID - clGetSerialPortIdentifier Camera Link Serial: Manufacturer ID - clGetManufacturerInfo Camera Link Serial: Get Baud Rates - clGetSupportedBaudRates Camera Link Serial: Set Baud Rate - clSetBaudRate Set Video Input Multiplexer - pxd_setVidMux Set Video Contrast and Brightness - pxd_setContrastBrightness Set Video Hue and Saturation - pxd_setHueSaturation Get Video Input Multiplexer - pxd_getVidMux Get Video Contrast - pxd_getContrast Get Video Brightness - pxd_getBrightness Get Video Hue - pxd_getHue Get Video U Saturation - pxd_getUGain Get Video V Saturation - pxd_getVGain Video Snap and Wait - pxd_doSnap Video Snap - pxd_goSnap Video Snap Pair - pxd_goSnapPair Video Live - pxd_goLive Video Live Pair Alternate - pxd_goLivePair Video Live Sequence - pxd_goLiveSeq Video UnLive - pxd_goUnLive Video Abort - pxd_goAbortLive Video Live Trigger - pxd_goLiveTrig Video Live Sequence Trigger - pxd_goLiveSeqTrig Video Queued Snap - pxd_quSnap Video Queued Live - pxd_quLive Video Initiated Status Check - pxd_goneLive Get Video Field Count - pxd_videoFieldCount Get Video Field Characteristic - pxd_videoFieldsPerFrame Get Video Field Characteristic - pxd_videoFieldsPerFrames Set Video Configuration as per Compiled Include - pxd_videoFormatAsIncluded Set Video Configuration as per Compiled Init - pxd_videoFormatAsIncludedInit Escape to Access Structured Interface Services - pxd_xclibEscape Escaped to Access Structured Interface Services - pxd_xclibEscaped Get SILICON VIDEO Camera Type - pxd_SILICONVIDEO_getCameraType Set SILICON VIDEO Exposure, Gain, and Offset - pxd_SILICONVIDEO_setExposureGainOffset Set SILICON VIDEO Exposure, Gains, and Offsets - pxd_SILICONVIDEO_setExposureColorGainOffsets Set SILICON VIDEO Exposure - pxd_SILICONVIDEO_setExposure Get SILICON VIDEO Exposure - pxd_SILICONVIDEO_getExposure Get SILICON VIDEO Gain A - pxd_SILICONVIDEO_getGainA Get SILICON VIDEO Gain B - pxd_SILICONVIDEO_getGainB Get SILICON VIDEO Color Gains A - pxd_SILICONVIDEO_getGainsA Get SILICON VIDEO Color Gains B - pxd_SILICONVIDEO_getGainsB Get SILICON VIDEO Color Offsets A - pxd_SILICONVIDEO_getOffsetsA Get SILICON VIDEO Color Offsets B - pxd_SILICONVIDEO_getOffsetsB Set SILICON VIDEO Resolution and Timing - pxd_SILICONVIDEO_setResolutionAndTiming Get SILICON VIDEO Subsample - pxd_SILICONVIDEO_getSubsample Get SILICON VIDEO Aoi Left Edge - pxd_SILICONVIDEO_getAoiLeft Get SILICON VIDEO Aoi Top Edge - pxd_SILICONVIDEO_getAoiTop Get SILICON VIDEO Aoi Width - pxd_SILICONVIDEO_getAoiTop Get SILICON VIDEO Aoi Height - pxd_SILICONVIDEO_getAoiTop Get SILICON VIDEO Scan Direction - pxd_SILICONVIDEO_getScanDirection Get SILICON VIDEO Pixel Clock Frequency - pxd_SILICONVIDEO_getPixelClock Get SILICON VIDEO Frame Period - pxd_SILICONVIDEO_getFramePeriod Set SILICON VIDEO Video And Trigger Modes - pxd_SILICONVIDEO_setVideoAndTriggerMode Set SILICON VIDEO Controlled Rates - pxd_SILICONVIDEO_setCtrlRates Get SILICON VIDEO Video Mode - pxd_SILICONVIDEO_getVideoMode Get SILICON VIDEO Controlled Frame Rate - pxd_SILICONVIDEO_getCtrlFrameRate Get SILICON VIDEO Controlled Exposure - pxd_SILICONVIDEO_getCtrlExposure Get SILICON VIDEO Controlled Video Mode - pxd_SILICONVIDEO_getCtrlVideoMode Get SILICON VIDEO Controlled Trigger Mode - pxd_SILICONVIDEO_getCtrlTriggerMode Set SILICON VIDEO AGC and AEC - pxd_SILICONVIDEO_setAxC Get SILICON VIDEO AGC A Gain - pxd_SILICONVIDEO_getAgcA Get SILICON VIDEO AGC B Gain - pxd_SILICONVIDEO_getAgcB Get SILICON VIDEO AEC Exposure - pxd_SILICONVIDEO_getAec Get SILICON VIDEO Min/Max Exposure - pxd_SILICONVIDEO_getMinMaxExposure Get SILICON VIDEO Min/Max Frame Period - pxd_SILICONVIDEO_getMinMaxFramePeriod Get SILICON VIDEO Min/Max Controlled Exposure - pxd_SILICONVIDEO_getMinMaxCtrlExposure Get SILICON VIDEO Min/Max Controlled Frame Rate - pxd_SILICONVIDEO_getMinMaxCtrlFrameRate Get SILICON VIDEO Min/Max Pixel Clock Frequency - pxd_SILICONVIDEO_getMinMaxPixelClock Get SILICON VIDEO Min/Max Gain A - pxd_SILICONVIDEO_getMinMaxGainA Get SILICON VIDEO Min/Max Gain B - pxd_SILICONVIDEO_getMinMaxGainB Get SILICON VIDEO Min/Max Offset A - pxd_SILICONVIDEO_getMinMaxOffsetA Get SILICON VIDEO Min/Max Offset B - pxd_SILICONVIDEO_getMinMaxOffsetB Get SILICON VIDEO Min/Max AOI Width - pxd_SILICONVIDEO_getMinMaxAoiWidth Get SILICON VIDEO Min/Max AOI Height - pxd_SILICONVIDEO_getMinMaxAoiHeight Get SILICON VIDEO Min/Max AGC A Gain - pxd_SILICONVIDEO_getMinMaxAgcA Get SILICON VIDEO Min/Max AGC B Gain - pxd_SILICONVIDEO_getMinMaxAgcB Get SILICON VIDEO Min/Max AEC Exposure - pxd_SILICONVIDEO_getMinMaxAec Get SILICON VIDEO Min/Max Resolution - pxd_SILICONVIDEO_getMinMaxResolution Export SILICON VIDEO Settings - pxd_SILICONVIDEO_exportSettings Import SILICON VIDEO Settings - pxd_SILICONVIDEO_importSettings SCF+ Style Interface PIXCI® Frame Grabber Library: Create Instance - pxe_XCLIBinstantiate PIXCI® Frame Grabber Library: Uncreate Instance - pxe_XCLIBuninstantiate PIXCI® Frame Grabber: Structured Open - xclib_open PIXCI® Frame Grabber: Structured Close - xclib_close Get Frame Grabber and Driver Information - ::pxdev.getDevInfo Get Extended Frame Grabber and Driver Information - ::xcdev.getDevInfo Obtain Last Logged Fault - ::pxdev.getFault Get Driver Parameters - ::xcdev.getDevParms Set Driver Parameters - ::xcdev.setDevParms Allocate Copy of Video State - ::pxlib.allocStateCopy Free Copy of Video State - ::pxlib.freeStateCopy Compare Pair of Video State Copies - ::pxlib.compareStateCopy Define Video State - ::pxlib.defineState Delete Video State - ::pxlib.deleteState Get Video State - ::pxlib.getState Get & Allocate Video State - ::pxlib.getAllocState Export Copy of Video State - ::pxlib.exportStateCopy Import Copy of Video State - ::pxlib.importStateCopy Import & Allocate Copy of Video State - ::pxlib.importAllocStateCopy Fixup Video State - ::xclib.fixxStateCopy Fill Video State - ::xclib.fillStateCopy Sign Video State - ::xclib.signStateCopy Set Default Configuration Copy of Video State - ::pxlib.initStateCopy Set Default Configuration & Allocate Copy of Video State - ::pxlib.initAllocStateCopy Declare Instance of Video Format Configuration Structures - xclib_DeclareVidStateStructs Initialize Instance of Video Format Configuration Structures - xclib_InitVidStateStructs Declare Instance of Video Format Configuration Structures - xclib_DeclareVidStateStructs2 Initialize Instance of Video Format Configuration Structures - xclib_InitVidStateStructs2 Obtain Pointer into Frame Grabber Memory - ::pxdev.getImap Free Pointer into Frame Grabber Memory - ::pxdev.freeImap Obtain pximage Access into Frame Grabber Memory - ::pxlib.initPximage Obtain pximage3 Access into Frame Grabber Memory - ::pxlib.initPximage3 Obtain Filtered pximage Access into Frame Grabber Memory - ::pxlib.initFilteredPximage Obtain Filtered pximage3 Access into Frame Grabber Memory - ::pxlib.initFilteredPximage3 Read/Write Frame Grabber Memory - ::pxdev.io Read/Write Frame Grabber Memory, Sparsely - ::pxdev.iosparse Get Live/Snap Status - ::xcdev.getLiveStatus Get Current Video Status - ::pxdev.getVidStatus Get Extended Video Status - ::xcdev.getVidStatus Get Current Video Status Value - ::pxdev.getVidStatusValue Get Current Buffer Status - ::pxlib.goingBufStatus Initiate Snap into Frame Buffer - ::xcdev.setSnapBuf Initiate Snap Pair into Frame Buffers - ::xcdev.setSnapPairBuf Initiate Continuous Capture into Frame Buffer - ::xcdev.setLiveBuf Initiate Continuous Alternate Capture into Frame Buffers - ::xcdev.setLivePairBuf Initiate Continuous Capture into Memory Space - ::setLivePhys Initiate Sequence Capture into Frame Buffers - ::setLiveSeqBuf Initiate Triggered Capture into Frame Buffer - ::setLiveTrigBuf Terminate Live/Snap into Frame Buffer - ::xcdev.setUnLive Abort Live/Snap into Frame Buffer - ::xcdev.setAbortLive Set Camera Configuration - ::xcdev.setCameraConfig Set Video Configuration - ::xcdev.setVideoConfig Adjust Video Configuration - ::xcdev.setVideoAdjust General Purpose Input Signal: Sense - ::xcdev.getGpin General Purpose Input Signal: Reset - ::xcdev.setGpin General Purpose Output Signal: Set - ::xcdev.setGpout General Purpose Output Signal: Get - ::xcdev.getGpout Device Control - ::pxdev.ioctl Load Frame Buffers as Stream - ::pxaux.bufferLoadStream Save Frame Buffers as Stream - ::pxaux.bufferSaveStream Errors: Translate Error Code to String - ::pxaux.errorCodeString Errors: Check & Report Faults - ::pxaux.faultMessageBox Errors: Check & Report Faults - ::pxaux.faultPrintf Load Image: BMP Format - ::pxaux.imageLoadBmp Load Image: TIFF Format - ::pxaux.imageLoadTiff Save Image: BMP Format - ::pxaux.imageSaveBmp Save Image: PCX Format - ::pxaux.imageSavePcx Save Image: TARGA Format - ::pxaux.imageSaveTga Save Image: TIFF Format - ::pxaux.imageSaveTiff Read Pixel Values as Unsigned Char - ::pxaux.imageReadUChar Read Pixel Values as Unsigned Short - ::pxaux.imageReadUShort Read Pixel Values as Unsigned Int - ::pxaux.imageReadUInt Write Pixel Values as Unsigned Char - ::pxaux.imageWriteUChar Write Pixel Values as Unsigned Short - ::pxaux.imageWriteUShort Write Pixel Values as Unsigned Int - ::pxaux.imageWriteUInt Windows: Make Device Independent Bitmap - ::pxaux.makeDIB Windows: Free Device Independent Bitmap - ::pxaux.freeDIB Windows: Display Image Frame Buffer On Device Context - ::pxaux.StretchDIBits Camera Control: SILICON VIDEO® 2112 - PXCam_SILICONVIDEO2112 Camera Control: SILICON VIDEO® 1310 - PXCam_SILICONVIDEO1310 Camera Control: SILICON VIDEO® 1281 - PXCam_SILICONVIDEO1281 Camera Control: SILICON VIDEO® 10C6/10M6 - PXCam_SILICONVIDEO9M001 Camera Control: SILICON VIDEO® 10C-CL/10M-CL - PXCam_SILICONVIDEO9M001 Camera Control: SILICON VIDEO® 15C5 - PXCam_SILICONVIDEO9M001 Camera Control: SILICON VIDEO® 5M10/5C10 - PXCam_SILICONVIDEO9M001 Camera Control: SILICON VIDEO® 9C10 - PXCam_SILICONVIDEO9M001 Camera Control: SILICON VIDEO® 9M001 - PXCam_SILICONVIDEO9M001 Camera Control: SILICON VIDEO® 9T001 - PXCam_SILICONVIDEO9M001 Camera Control: SILICON VIDEO® 642 - PXCam_SILICONVIDEO642 Camera Control: SILICON VIDEO® 643 - PXCam_SILICONVIDEO643 Camera Control: SILICON VIDEO® WGA - PXCam_SILICONVIDEO032 Camera Control: SILICON VIDEO® HAS21 - PXCam_SILICONVIDEOHAS2 Camera Control: SILICON VIDEO® 1C15/1M45 - PXCam_SILICONVIDEO1CM45 Camera Control: SILICON VIDEO® 20C-CL/20M-CL - PXCam_SILICONVIDEO20MCL Camera Control: SILICON VIDEO® 1820CL - PXCam_SILICONVIDEO1820CL Camera Control: SILICON VIDEO® 1514CL - PXCam_SILICONVIDEO1820CL Device Independent Image Access Interface PXIMAGE: Image and Pixel Specifications - Struct pximage PXIMAGE: Set & Get Area of Interest Window - pximage::xwind PXIMAGE: Get Advice, Errors, Info & Options - pximage::aeiou PXIMAGE: Set to Access Sequential Pixels - pximage::ioset PXIMAGE: Read Sequential Pixels - pximage::ioread PXIMAGE: Write Sequential Pixels - pximage::iorite PXIMAGE: Wait for Sequential Access Completion - pximage::iowait PXIMAGE: Obtain Sequential Access Pixel Count - pximage::iolen PXIMAGE: Set to Access Non-Sequential Pixels - pximage::bxts PXIMAGE: Prepare for Non-Sequential Pixel Access - pximage::bxtp PXIMAGE: Access Non-Sequential Pixels - pximage::bxta PXIMAGE: Wait for Non-Sequential Access Completion - pximage::bxtw PXIMAGE: Set to Obtain Pointer to Pixels - pximage::imapset PXIMAGE: Obtain Pointer to Pixels - pximage::imap PXIMAGE: Release Pointer to Pixels - pximage::imapr Deprecated Functions Application Notes Conversion of Application Programs from XCOBJ Using a Serial (RS-232) Configurable Camera with the PIXCI® CL1, CL2, CL3SD, D, D24, D32, D2X, D3X, D2XE, D3XE, E1, E1DB, E4, E4DB, E4G2-2F, E4G2-4B, E4G2-F2B, E4TX2-2F, E4TX2-4B, E4TX2-F2B, E8, E8CAM, E8DB, e104x4-2f, e104x4-4b, e104x4-f2b, EB1, EB1G2, EB1-PoCL, EB1G2-PoCL, EB1mini, miniH2B, miniH2F, miniH2x4F, mf2280, mf2280D, EC1, ECB1, ECB1-34, ECB2, EL1, EL1DB, ELS2, SI, SI1, SI2, or SI4 Initialization of RS-232 or Camera Link Serial Configured Cameras Initialization of Camera Link Serial, I²C, or SPI Configured Cameras Adjustments to RS-232 or Camera Link Serial Configured Cameras Adjustments to I²C or SPI Configured Cameras Using a Video Format Configuration Exported by XCAP Capture Directly into Memory Space of Other Devices PIXCI® SV4, SV5, SV5A, SV5B, SV5L, SV7, SV8 and DirectDraw PIXCI® and StreamStor Adjusting White Balance of a Bayer Output Camera with the PIXCI® Frame Grabber Processing Images from a Bayer Output Camera with the PIXCI® CL, D, E, or SI Series Using a Power over Camera Link (PoCL) Camera with the PIXCI® E4, E4DB, E8, E8DB, EB1-PoCL, EB1G2-PoCL Release Notes Distribution Contents Index
The pxe_ variations for each pxd_ function, an alternate API for use with multiple PIXCI® imaging boards, are not listed. They are not included with XCLIB-Lite.
SPECIFICATIONS
IMAGING BOARD:
Any PIXCI® series frame grabber or frame generator.
Up to eight (under 32 bit O.S.) or sixteen (under 64 bit O.S.) identical, or four non-identical, PIXCI® frame grabbers or generators can be controlled. 14
ENVIRONMENT:
- Watcom C/C++ V11.0 32 bit in F model. For Tenberry (Rational) DOS extender, 80386 or better.
- Windows 95, 98, ME – 32 bit DLL, for any compiler or Windows application.
- Windows NT (V4.0), 2000, XP, Vista, 7, 8, 10 32-Bit – 32 bit DLL, for any compiler or Windows application.
- Windows XP, Vista, 7, 8, 10, 11 64-Bit – 32 & 64 bit DLLs, for any compiler or Windows application. 15
- Linux (kernel V2.6, V3.x, V4.x, V5.x, or V6.x) on Intel i386.
- Linux (kernel V2.6, V3.x, V4.x, V5.x, or V6.x) on Intel x86-64, for 32 or 64 bit applications. 16
- Linux (kernel V3.x, V4.x, V5.x, or V6.x) on nVidia TK1 ARM/Cortex-A15.
- Linux (kernel V4.x, V5.x, or V6.x) on Boundary Devices NITROGEN6 ARM/imx6.
- Linux (kernel V3.x, V4.x, V5.x, or V6.x) on nVidia TX1/TX2 ARM/Cortex-A57.
- Linux (kernel V4.x V5.x, or V6.x) on nVidia Nano/Orin/Xavier ARM/Cortex-A57.
XCLIB-Lite only available for Windows & Linux. PIXCI® SV2 and SV3 are not supported under 64 bit systems. PIXCI® frame grabbers using the PCI32 or PCI64 bus are not supported on ARM systems.
Other environments available on request.
LICENSING:
Licensing permits royalty free inclusion of library routines into applications using EPIX® PIXCI® series frame grabbers or frame generators.
SOFTWARE INCLUDES:
As required by environment: Object code libraries (.lib), Dynamic Link Library (.dll), Object code archive (.a), Windows drivers (.vxd or .sys) provided with XCAP software. Linux drivers (.o or .ko, alternately binary-blob with .c wrappers allowing recompilation on end-user's chosen kernel) provided with XCAP software.
C prototype files (.h).
Python wrappers (Linux only, not w. XCLIB-Lite).
Example C/C++ programs demonstrating typically used PIXCI® frame grabber features, with Windows (GDI), DOS (stdio), or Linux (stdio & Gnome) interface (.c/.cpp).
Example Visual Basic, VB.NET, C#.NET, Python, programs. Example LabView VI driver.
XCLIB function declaration files for Visual Basic, VB.NET, C#.NET, LabView, Matlab.
Reference Manual (.htm, .pdf).
PRICING
- Software may require upgrade to operate future versions or options of PIXCI® frame grabbers or generators.
- XCLIB provides access to pixel data so that the application can perform analysis. The optional PXIPL library provides pre-written analysis routines.
- Support for various video formats is dependent upon the particular camera and PIXCI® frame grabber used.
- The pointer to DMA buffer is not available for PIXCI® frame grabbers with on-board frame buffers: CL3SD, SI2.
- Support for varying resolution is dependent upon the particular camera and PIXCI® frame grabber used.
- Support for general purpose input and output signals is dependent upon the particular PIXCI® frame grabber used.
- Support for serial communication available with Camera Link frame grabbers and generators.
- Subject to PCI/PCIe bus latency and bus data width.
- Enqueue-capture-dequeue capture modes not available for older PIXCI® frame grabbers: SV2, SV3, D, D24, D32, CL3SD (all EOL).
- Post-capture corrections available for selected cameras and frame grabbers.
- Support for live video via DirectDraw is dependent upon the native color space of the particular PIXCI® frame grabber used, and on the capabilities of the SVGA/HDMI card used.
- Requires use of "structured" functions. Not available for PIXCI® frame grabbers with on-board frame buffers: PIXCI® CL3SD, SI2.
- The size of a single image may not exceed 2 32-1 bytes.
- Each functional half of a PIXCI® E1DB, E4DB, E4G2-2F, E4TX2-2F, E8CAM, E8DB, e104x4-2f, miniH2B, mf2280D, EL1DB, ELS2, SI2, or SV7; or each functional third of a PIXCI® E4G2-F2B, E4TX2-F2B or e104x4-f2b; or each functional quarter of a PIXCI® E4G2-4B, E4TX2-4B, e104x4-4b, or SI4, counts as one board.
- Under Windows 64 bit, 32 bit applications are limited to 4 GB of frame buffer memory.
- Under Linux on x86-64, 32 bit applications are limited to 4 GB of frame buffer memory.