CImage:DivFlatNorm CImage:SubBiasRef

CImage:SubBiasFrame


The SubBiasFrame method subtracts a bias frame image from the current image. The result replaces the current image.

Syntax

bResult = CImage:SubBiasFrame( Bias, datatype=nil )

    Bias is the CImage containing the bias frame.

    The optional datatype specifies the output data type as a number or string.

    On success, this method returns true.

    On failure, false. is returned.

Remarks

This method applies a bias frame correction to the image and updates the image header with the appropriate history and other keywords. The data type of the image may be changed as part of the correction, for example, to increase the precision of the bias removal procedure. Mira automatically handles mixing different data types between the source image and the bias frame.

Example

The following script fragment loads an image and subtracts a bias frame. The output data type is changed to "float" to maintain precision of the correction process. In practice you might maintain the Bias frame in memory across a loop to process many images:

 

I = CImage:new()

-- create a new CImage

I:Open( sPath )

-- load the image from file sPath

Bias = CImage:new()

-- create a new CImage

Bias:Open( sBiasPath )

-- load the bias frame from file sBiasPath

I:SubBiasFrame(Bias,"float")

-- perform the operation on image I

I:Save()

 

I:delete()

 

Bias:delete()

 

Related Topics

CImage, SubBiasVal, SubBiasRef