1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions 1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions
1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions
1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions 1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions
1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions   1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions 1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions 1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions
1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions 1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions
1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions 1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions
 
 

Flat Field Correction procedure for ISG LW-6.6-S-1394 Cameras.

11/30/2006

 Procedure for calculating and applying corrections in the camera 

 

Getting the Camera and application ready

Load the latest Firmware into the 6.6 Mpixel Camera.

Located on the FTP site under ISG\6MP Flat Field

 

FPGA = 30d

CPU = 628

Application = 5.00.031 or later

 

Load the latest driver which enable write block functionality (This driver is backward compatible and can be used for all ISG GUI’s)

 

Customers running the latest release of the ISG GUI (version .033 and beyond) and who receive an error message such as:  "1394Camera.dll does not support WriteQuadletBlock function" when starting the UI, need to update their camera driver.  Please download driver version 6.3.1 from the isgchips.com website.  Use the device manager to update to this driver, and reboot your computer before using the camera.

 

Reboot the computer to enable the latest Driver

 

Load the ISG GUI named “ISG LightWise” This GUI release should be used only for calculating and loading the correction date

 

 

Calculating/Loading Pixel Offset table and Bad Pixel table.

 

Both of these calculations have been combined into one function for ease of use for the user.

 

Start the application “ISG LightWise”. If you get a DLL error you will need to make sure you loaded the latest driver and reboot the computer.

 

Let the camera run for several minutes to get to operating temperature

 

Go to ROI tab in the ISG GUI and move the window to 0,0 and then expand window to full resolution so that the entire sensor is selected as the ROI window.  Hit the “Apply New Frame Size” button.

 

Using the menu for “Format 7 Color Code” select = 16-bit MONO

 

In the Display window (under Camera Menu) select “Stop Camera”

 

Cover Lens to block all light.

 

Go to Flat Field Correction tab in the ISG GUI

 

Under the “Offset Stage”

 

Select             Perform Offset Calibration  (Note: Please DO NOT do anything with “Gain Stage.”)

This will take about a minute.

 

This captures a dark frame and creates a bad pixel and offset correction file on the host PC.

 

After this completes the hour glass goes away. Check the num pixel replaced field. The number should be lass than 50,000. If it is much larger you may have had light get in while covering lens so repeat above procedure ensuring that the lens is completely covered.

 

Select Load Offset File. This loads the offset and bad pixel file into the camera (takes approx. 4 minutes)

 

You can now select “Start Camera” in the display viewer. This is a view of the camera with offset correction and pixel replacement applied. 

 

You will notice that under the “Flat Field Correction” tab in the ISG GUI there are three selectable buttons at the bottom.  Under the Mode control area the “PixCor” and “Offset” buttons will be selected.  You can deselect these to see the effect of the procedure.  Do not select the “Gain” button.

 

 

 

Here is the function straight from the ISG GUI for loading the offset file on the 6MP camera. It basically creates a memory buffer that is the size of the full image and writes the offset data file there. Then it transfers the data to the camera in 2K blocks to a register address (0x7CC8) that is dedicated to this purpose. If the block transfer is not available in the host code, the data can be written one 32bit word at a time, it will just be much slower.

 

#define ASYNC_BLOCK_SIZE 2048

#define MP_WFIFO_IN 0x7CC8

void CDialogFlatField::OnButtonLoadOffset()

{

char theOffsetExt[] = "Offset.raw";

char offsetfilename[200];

CString stringCopy;

LPTSTR datString;

int offsetFile;

int temp;

unsigned long *imageBuffer,*startBuffer;

unsigned long maxRange,readVal;

ULONG i,j;

 

maxRange = (myProjDialog->theMaxHeight *

myProjDialog->theMaxWidth)/ASYNC_BLOCK_SIZE;

m_progressOffset.SetRange( 0,(short)maxRange);

startBuffer = imageBuffer = (unsigned long

*)malloc(myProjDialog->theMaxWidth * myProjDialog->theMaxHeight *2);

stringCopy = myProjDialog->pathBuffer;

datString = stringCopy.GetBuffer(myProjDialog->dwPathSize);

 

strcpy(offsetfilename,datString);

strcat(offsetfilename,theOffsetExt);

 

offsetFile = open(offsetfilename, O_RDONLY | O_BINARY, 0666);

if (offsetFile == -1)

{

MessageBox( offsetfilename, "Image File not found", MB_OK);

return;

}

for (i = 0; i < myProjDialog->theMaxHeight ; i++)

{

temp = read(offsetFile,imageBuffer,myProjDialog->theMaxWidth);

imageBuffer += myProjDialog->theMaxWidth/4;

}

close (offsetFile);

imageBuffer = startBuffer;

BeginWaitCursor();

theCamera.WriteQuadlet(ISG_INIT_MEM_OFFSET,1);

for (i = 0,j=0; i < (myProjDialog->theMaxHeight *

myProjDialog->theMaxWidth) ; i+=ASYNC_BLOCK_SIZE,j++)

{

theCamera.WriteQuadletBlock(MP_WFIFO_IN,imageBuffer);

imageBuffer += ASYNC_BLOCK_SIZE/4;

theCamera.ReadQuadlet(VID_RDMA_ADDR,&readVal);

m_progressOffset.SetPos(j);

}

theCamera.WriteQuadlet(ISG_INIT_MEM_OFFSET,0);

this->OnSetActive();

EndWaitCursor();

 

}

 
   
 
1394 Camera, FireWire Camera, Smart Camera, Imaging Solutions