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, pixel_type=nil )

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

bullet.gif    The optional pixel_type specifies the output pixel type as a number or string.

bullet.gif    On success, this method returns true.

bullet.gif    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 pixel 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 loads an image and subtracts a bias value of 490.56. The output pixel type is changed to "float" to maintain precision of the correction process:

I = new_image()

-- 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 class, SubBiasFrame, SubBiasRef


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.