/* Declare pointers for images. */
float *ip[3], *ipproc, *ipbias, *ipflat, *ipraw ; [1]
int nx, ny, i;
/* Access input images. */
imgIn( "bias,flat,raw", &nx, &ny, ip, istat ); [2]
ipbias = ip[0];
ipflat = ip[1];
ipraw = ip[2];
/* Create a new output image by copying the raw input image. */
imgOut( "raw", "proc", &ipproc, istat );
/* Debias and flatfield data. */
for( i=0; i <nx*ny; i++ ) {
*ipproc++ = ( *ipraw++ - *ipbias++ ) / *ipflat++;
}
/* Free all the images.*/
imgFree( "*", istat );
The following notes refer to the numbered statements:
IMG Simple Image Data Access