CImage:SubBiasRef CImage:SubBiasCol

CImage:SubBiasVal


The SubBiasVal method subtracts a specified bias value image from the current image. The result replaces the current image.

Syntax

bResult = CImage:SubBiasVal( value, datatype=nil )

    value is the bias correction value and may be passed as a number or string.

    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 value correction to the image and updates the image header with the appropriate history and other keywords. The same bias value is applied to all pixels of the image. The data type of the image may also be changed as part of the correction, for example, to increase the precision of the bias removal procedure.

Example

The following script fragment loads an image and subtracts a bias value of 490.56. The output data type is changed to "float" to maintain precision of the correction process:

 

I = CImage:new()

-- create a new CImage

I:Open(sPath1)

-- load the image from file sPath

I:SubBiasVal(490.56,"float")

-- perform the operation on image I

I:Save()

 

I:delete()

 

Related Topics

CImage, SubBiasFrame, SubBiasRef