|
|
||||||||||
![]() |
XCLIB™ LIBRARY | |||||||||
Features Sample Code Functions Specs |
Programming Library for PIXCIŽ Imaging Boards![]()
PIXCIŽ IMAGING POWERThe XCLIB Library empowers C/C++ and Windows, DOS, and Linux programmers to control the PIXCIŽ series of imaging boards. XCLIB supports all versions and options of the PIXCIŽ imaging boards: 1
Multiple PIXCIŽ frame grabbers 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Ž imaging boards, single frames or video sequences from standard RS-170, NTSC, PAL, or CCIR or nonstandard video sources can be captured, analyzed2, displayed, and archived3. CONVENIENCE & COMPATIBILITYXCLIB provides high level services, allowing concentration on the imaging application, rather than focusing on board level programming. XCLIB automatically detects and manages different versions of the PIXCIŽ imaging boards and their intended cameras. Fundamental services, such as setting resolution, capturing, and accessing image data, are the same regardless of camera or version of imaging board. The XCLIB C/C++ libraries allow embedding control of PIXCIŽ imaging boards into user-written applications. Under Windows, the XCLIB DLL also enables access from existing Windows applications, such as Visual Basic, Delphi, LabView, and many others, which support "calling" into DLLs. SOPHISTICATED SOLUTIONSXCLIB 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 upon EPIXŽ imaging solutions.
Frame buffer access examples. pxd_PIXCIopen("", "NTSC", ""); // Use standard NTSC, or
//pxd_PIXCIopen("", "CCIR", ""); // .. CCIR, or
//pxd_PIXCIopen("", "", "VIDEO.FMT"); // .. customized format?
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 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 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 buffers captured.\\n");
Live video to S/VGA with graphics overlay example (Windows only). pxd_PIXCIopen("", "NTSC/YC", ""); // Use standard S-Video, or
//pxd_PIXCIopen("", "PAL", ""); // .. PAL
pxd_renderDirectVideoInit(1, hWnd); // init direct video to S/VGA
pxd_renderDirectVideoLive(1, 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
XCLIB TOPICS AND FUNCTIONSInstallation, 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 Imaging Boards with Multiple Functional Units On Multiple Imaging Boards On Multiple Identical Imaging Boards On Video Format Configuration On Video State ID's On Error Codes On Structures and Signatures Common Structures Coordinates, Images, and Image Window Structures Imaging Board, 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, Vista(x64) Environment Tenberry DOS4GW DOS Extender Environment Linux 32 Bit & Intel i386 Environment Linux 64 Bit & Intel x86-64 Environment SCF Style Interface Buffer's Capture Field Count Buffer's Capture General Purpose Input Buffer's Capture System Time Buffer's Capture System Time Last Captured Buffer: Buffer Number Last Captured Buffer: Field Count Last Captured Buffer: System Time Get PXIMAGE: Access Imaging Board Frame Buffer Get PXIMAGE3: Access Imaging Board Frame Buffers Get PXIMAGE: Release Access to Imaging Board Frame Buffers Get PXIMAGE3: Release Access to Imaging Board Frame Buffers Video Snap and Wait Windows: Register Event upon Video Field Windows: Unregister Event upon Video Field Windows: Register Event upon Captured Video Field Windows: Unregister Event upon Captured Video Field Windows: Register Event upon General Purpose Trigger Windows: Unregister Event upon General Purpose Trigger DOS: Register Callback upon Video Field DOS: Unregister Callback upon Video Field DOS: Register Callback upon Captured Video Field DOS: Unregister Callback upon Captured Video Field DOS: Register Callback upon General Purpose Trigger DOS: Unregister Callback upon General Purpose Trigger Linux: Register Signal upon Video Field Linux: Unregister Signal upon Video Field Linux: Register Signal upon Captured Video Field Linux: Unregister Signal upon Captured Video Field Linux: Register Signal upon General Purpose Trigger Linux: Unregister Signal upon General Purpose Trigger General Purpose Input Signal: Sense General Purpose Input Signal: Reset General Purpose Output Signal: Set General Purpose Output Signal: Get General Purpose Trigger Count: Sense Video Snap Video Snap Pair Video Live Video Live Pair Alternate Video Live Sequence Video UnLive Video Abort Video Live Trigger Video Live Sequence Trigger Video Initiated Status Check Get Frame Buffer Image Aspect Ratio Get Frame Buffer Image Bit Depth Get Frame Buffer Image Color Components Get Frame Buffer Image Field Dimension Get Frame Buffer Image Horizontal Dimension Get Frame Buffer Image Vertical Dimension Get Frame Buffer Image Count Get Imaging Board Driver ID Get Imaging Board Include Files ID Get Imaging Board Library ID Get Imaging Board's Frame Buffer Size Get Imaging Board's Model Get Imaging Board's Submodel Get Imaging Board Unit Count Load Image: BMP Format Load Image: TIFF Format Save Image: BMP Format Save Image: PCX Format Save Image: TARGA Format Save Image: TIFF Format Load Frame Buffers Save Frame Buffers Errors: Translate Error Code to String Errors: Check & Report Faults PIXCIŽ Imaging Board: Open and Set Video Format Configuration PIXCIŽ Imaging Board: Close Read Pixel Values as Unsigned Char Read Pixel Values as Unsigned Short Write Pixel Values as Unsigned Char Write Pixel Values as Unsigned Short Windows: Create Device Independent Bitmap (DIB) Windows: Release Device Independent Bitmap (DIB) Windows: Direct Video Display, Init Windows: Direct Video Display, Done Windows: Direct Video Display, Start Windows: Direct Video Display, Stop Windows: Display Image Frame Buffer On Device Context Serial Port: Set Configuration Serial Port: Read Serial Port: Write Camera Link Serial: Initialize Camera Link Serial: Close Camera Link Serial: Read Camera Link Serial: Write Camera Link Serial: Read Available Camera Link Serial: Read Flush Camera Link Serial: Error Text Camera Link Serial: Ports Camera Link Serial: Ports ID Camera Link Serial: Manufacturer ID Camera Link Serial: Get Baud Rates Camera Link Serial: Set Baud Rate Set EXSYNC and PRIN Values Get EXSYNC Value Get PRIN Value Set EXSYNC and PRINC Modes Get EXSYNC Mode Get PRINC Mode Set Video Input Multiplexer Set Video Contrast and Brightness Set Video Hue and Saturation Get Video Input Multiplexer Get Video Contrast Get Video Brightness Get Video Hue Get Video U Saturation Get Video V Saturation Set Bright White Balance Set Dark White Balance Get Video Field Count Get Video Field Characteristic Get Video Field Characteristic Set Video Configuration as per Compiled Include Set SV2112 Exposure and Gain Get SV2112 Exposure Get SV2112 Gain Set SV2112 Resolution and Timing Get SV2112 Decimation Get SV2112 Aoi Top Edge Get SV2112 Aoi Left Edge Get SV2112 Pixel Clock Frequency Get SV2112 Scan Direction Set SV2112 Video And Trigger Modes Set SV2112 Controlled Exposure And Frame Rate Get SV2112 Video Mode Get SV2112 Controlled Video Mode Get SV2112 Controlled Trigger Mode Get SV2112 Controlled Frame Rate Get SV2112 Controlled Exposure Set SV1310 Exposure, Gain, and Offset Get SV1310 Exposure Get SV1310 Gain Get SV1310 Offset Set SV1310 Color Specific Gain Get SV1310 Color Specific Gain Set SV1310 Resolution and Timing Get SV1310 Subsample Get SV1310 Aoi Top Edge Get SV1310 Aoi Left Edge Get SV1310 Pixel Clock Frequency Get SV1310 Readout Direction Get SV1310 Frame Period Set SV1310 Video And Trigger Modes Set SV1310 Controlled Frame Rate Get SV1310 Video Mode Get SV1310 Controlled Video Mode Get SV1310 Controlled Trigger Mode Get SV1310 Controlled Frame Rate Get SV1310 Controlled Exposure Set SV1281 Exposure, Gain, and Offset Get SV1281 Exposure Get SV1281 Gain Get SV1281 Offset Set SV1281 Resolution and Timing Get SV1281 Aoi Top Edge Get SV1281 Aoi Left Edge Get SV1281 Pixel Clock Frequency Set SV1281 Video And Trigger Modes Set SV1281 Controlled Frame Rate Get SV1281 Video Mode Get SV1281 Controlled Video Mode Get SV1281 Controlled Trigger Mode Get SV1281 Controlled Frame Rate Set SV9M001/SV9T001/SV5C10/SV5M10 Exposure and Gain Set SV9T001 Exposure and Digital Gain Get SV9M001/SV9T001/SV5C10/SV5M10 Exposure Get SV9M001/SV9T001/SV5C10/SV5M10 Gain Get SV9T001 Digital Gain Set SV9M001/SV9T001/SV5C10/SV5M10 Resolution and Timing Get SV9M001/SV9T001/SV5C10/SV5M10 Aoi Top Edge Get SV9M001/SV9T001/SV5C10/SV5M10 Aoi Left Edge Get SV9M001/SV5C10/SV5M10 Scan Direction Get SV9M001/SV9T001/SV5C10/SV5M10 Subsample Get SV9M001/SV9T001/SV5C10/SV5M10 Pixel Clock Frequency Set SV9M001/SV9T001/SV5C10/SV5M10 Video And Trigger Modes Set SV9M001/SV9T001/SV5C10/SV5M10 Controlled Exposure And Frame Rate Get SV9M001/SV9T001/SV5C10/SV5M10 Video Mode Get SV9M001/SV9T001/SV5C10/SV5M10 Controlled Video Mode Get SV9M001/SV9T001/SV5C10/SV5M10 Controlled Trigger Mode Get SV9M001/SV9T001/SV5C10/SV5M10 Controlled Frame Rate Set SV642 Exposure and Gain Get SV642 Exposure Get SV642 Gain Get SV642 Gain Range Set SV642 Resolution and Timing Get SV642 Aoi Top Edge Get SV642 Aoi Left Edge Get SV642 Pixel Clock Frequency Set SV642 Video And Trigger Modes Set SV642 Controlled Exposure And Frame Rate Get SV642 Video Mode Get SV642 Controlled Video Mode Get SV642 Controlled Trigger Mode Get SV642 Controlled Frame Rate Structured Style Interface PIXCIŽ Imaging Board: Structured Open PIXCIŽ Imaging Board: Structured Close Get Imaging Board and Driver Information Get Extended Imaging Board and Driver Information Obtain Last Logged Fault Get Driver Parameters Set Driver Parameters Allocate Copy of Video State Free Copy of Video State Compare Pair of Video State Copies Define Video State Delete Video State Get Video State Export Copy of Video State Import Copy of Video State Fixup Video State Fill Video State Sign Video State Set Default Configuration Copy of Video State Declare Instance of Video Format Configuration Structures Initialize Instance of Video Format Configuration Structures Obtain Pointer into Imaging Board Memory Free Pointer into Imaging Board Memory Obtain pximage Access into Imaging Board Memory Obtain pximage3 Access into Imaging Board Memory Obtain Filtered pximage Access into Imaging Board Memory Obtain Filtered pximage3 Access into Imaging Board Memory Read/Write Imaging Board Memory Read/Write Imaging Board Memory, Sparsely Get Live/Snap Status Get Current Video Status Get Extended Video Status Get Current Video Status Value Get Current Buffer Status Initiate Snap into Frame Buffer Initiate Snap Pair into Frame Buffers Initiate Continuous Capture into Frame Buffer Initiate Continuous Alternate Capture into Frame Buffers Initiate Continuous Capture into Memory Space Initiate Sequence Capture into Frame Buffers Initiate Triggered Capture into Frame Buffer Terminate Live/Snap into Frame Buffer Abort Live/Snap into Frame Buffer Set Camera Configuration Set Video Configuration Adjust Video Configuration General Purpose Input Signal: Sense General Purpose Input Signal: Reset General Purpose Output Signal: Set General Purpose Output Signal: Get Device Control Load Frame Buffers as Stream Save Frame Buffers as Stream Errors: Translate Error Code to String Errors: Check & Report Faults Load Image: BMP Format Load Image: TIFF Format Save Image: BMP Format Save Image: PCX Format Save Image: TARGA Format Save Image: TIFF Format Read Pixel Values as Unsigned Char Read Pixel Values as Unsigned Short Read Pixel Values as Unsigned Int Write Pixel Values as Unsigned Char Write Pixel Values as Unsigned Short Write Pixel Values as Unsigned Int Windows: Make Device Independent Bitmap Windows: Free Device Independent Bitmap Windows: Display Image Frame Buffer On Device Context Camera Control: SILICON VIDEOŽ 2112 Camera Control: SILICON VIDEOŽ 1310 Camera Control: SILICON VIDEOŽ 1281 Camera Control: SILICON VIDEOŽ 9M001 Camera Control: SILICON VIDEOŽ 9T001 Camera Control: SILICON VIDEOŽ 5M10/5C10 Camera Control: SILICON VIDEOŽ 642 Device Independent Image Access Interface PXIMAGE: Image and Pixel Specifications PXIMAGE: Set & Get Area of Interest Window PXIMAGE: Get Advice, Errors, Info & Options PXIMAGE: Set to Access Sequential Pixels PXIMAGE: Read Sequential Pixels PXIMAGE: Write Sequential Pixels PXIMAGE: Wait for Sequential Access Completion PXIMAGE: Obtain Sequential Access Pixel Count PXIMAGE: Set to Access Non-Sequential Pixels PXIMAGE: Prepare for Non-Sequential Pixel Access PXIMAGE: Access Non-Sequential Pixels PXIMAGE: Wait for Non-Sequential Access Completion PXIMAGE: Set to Obtain Pointer to Pixels PXIMAGE: Obtain Pointer to Pixels PXIMAGE: Release Pointer to Pixels 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, E1, E1DB, E4, E4DB, EC1, EL1, EL1DB, SI, or SI4 Initialization of RS-232 or Camera Link Serial Configured Cameras Initialization of Camera Link Serial or I^2C Configured Cameras Adjustments to RS-232 or Camera Link Serial Configured Cameras Adjustments to I^2C Configured Cameras Using a Video Format Configuration Exported by XCAP Capture into Devices PIXCIŽ SV4 SV5, SV5A, or SV5B and DirectDraw PIXCIŽ and StreamStor Adjusting White Balance of a Bayer Output Camera with the PIXCIŽ Imaging Board Processing Images from a Bayer Output Camera with the PIXCIŽ CL, D, or E Series Release Notes Distribution Contents Index . SCF function included with XCLIB-Lite. IMAGING BOARD:Any PIXCIŽ series imaging board. Up to eight identical, or four non-identical, PIXCIŽ imaging boards can be controlled.8 ENVIRONMENT:
XCLIB-Lite only available for Windows 95, 98, ME, NT, 2000, XP, Vista (32 bit). Other environments available on request. LICENSING:Licensing permits royalty free inclusion of library routines into programs using EPIXŽ PIXCIŽ series imaging boards. SOFTWARE INCLUDES:As required by environment: Object code libraries (.lib), Dynamic Link Library (.dll), Object code archive (.a), Windows 95, 98, ME Driver (.vxd), Windows NT, 2K, XP, Vista, XP(x64), Vista(x64) Driver (.sys), and/or Linux driver (.o, .ko). C prototype files (.h). Example C/C++ programs demonstrating typically used PIXCIŽ imaging board features, with Windows (GDI), DOS (stdio) , or Linux (stdio & Gnome) interface (.c/.cpp). Example Visual Basic and VB.NET programs. Utility program to convert C prototype files (.h) to Visual Basic declarations. HTML manual. Printed manual(not w. XCLIB-Lite). † These older products of the PIXCIŽ boards are no longer in production, but still supported by XCLIB.
| |||||||||
| Modified: 29-Apr-2008 |
Specifications and prices subject to change without notice. EPIXŽ imaging products are made in the USA. EPIX, SILICON VIDEO, and PIXCI are registered trademarks of EPIX, Inc. 4MIP, SVIP, XCIP, XCAP, 4MEG VIDEO, 1MEG VIDEO, SILICON VIDEO MUX, QUICK SET VIDEO, 12-7 MUX, IMAGE MEMORY EXPANSION, COC40, COC402, CL3SD, 4MOBJ, SVOBJ, XCOBJ, XCLIB, PXIPL, and XCLIBIPL are trademarks of EPIX, Inc. Other brand, product, and company names are trademarks or registered trademarks of their respective owners. Copyright Š 2008 EPIX, Inc. All rights reserved. |