Project

General

Profile

Binned Read

A zip file containing a simple console application to capture binned images for a 128x1024 CCD is included in the ConsoleApplication.zip file on this web page.

The console application compiles using Microsoft Visual Studio and must link against the provided clcamiface.dll library installed with the MityViewer application.

The console application demonstrates capturing one or more frames from a fully binned array (1 line readout, all rows binned in the sensor) using a polled technique as well as using the Image Data Callback mechanism by setting the USE_CALLBACK defined macro to 0 or 1, respectively. The application will write the frames to a local comma separated value (CSV) file.

In addition, pseudo code that could be used for a sequence of API calls for binned read (for Sensor with 64 rows by 512 pixels) in a polled fashion is illustrated below.

{
   int CameraHandle;
   long int *lpData = new long [512];
   unsigned short MaxPixel;

   // read back 1 binned row of 512 pixels
   // 64 rows binned into a single row in the sensor: 63 x BINCODE_BIN, 1 BINCODE_SUM
   unsigned char BinCodes[ ] =
             { BINCODE_BIN, BINCODE_BIN, BINCODE_BIN, BINCODE_BIN, BINCODE_BIN,
               BINCODE_BIN, BINCODE_BIN, BINCODE_BIN, BINCODE_BIN, BINCODE_BIN,
               BINCODE_BIN, BINCODE_BIN, BINCODE_BIN, BINCODE_BIN, BINCODE_BIN,
   //                                  .............   
               BINCODE_BIN, BINCODE_BIN, BINCODE_BIN, BINCODE_BIN, BINCODE_SEND};

   // Set Binning Sequence --> set to sequence 0
   ClSetBinParam(CameraHandle, BinCodes,0);

   // Set the camera for a 10 ms exposure time  
   CLSetExposure(CameraHandle, 10);

   // Clear CCD once and start immediately start acquiring a single image
   CLClearCCD (CameraHandle, 1, 0);
   CLReadCCDBinned(CameraHandle,  lpData, &MaxPixel,1, 0);

   //Wait for completion
   CLWaitCompletion(CameraHandle, -1);

   //Process Image Data (application software)
   ProcessImage(lpData);

}

Go to top
Add picture from clipboard (Maximum size: 1 GB)