scale__ ( Image : ImageScaled : Mult, Add : )

Scale the gray values of an image.

The operator scale__ scals the input images (Image) by the following transformation: g' := g * Mult + Add If an overflow or an underflow occurs the values are clipped.


Parameters

Image (input_object)
image(-array) -> object : byte / int1 / int2 / int4 / real / direction / cyclic / complex
Images, of which gray values are to be scaled.

ImageScaled (output_object)
image(-array) -> object : byte / int1 / int2 / int4 / real / direction / cyclic / complex
Images containing the result.

Mult (input_control)
number -> real / integer
Scale factor
Default value: 0.01
Suggested values: 0.001, 0.003, 0.005, 0.008, 0.01, 0.02, 0.03, 0.05, 0.08, 0.1, 0.5, 1.0
Range of values: -255.0 <= Mult <= 255.0
Minimum increment: 0.001
Recommended increment: 0.1

Add (input_control)
number -> real / integer
Offset
Default value: 0
Suggested values: 0, 10, 50, 100, 200, 500
Range of values: -512.0 <= Add <= 512.0
Minimum increment: 0.01
Recommended increment: 1.0


Example
/* Complement of the gray values:  */
scale__(Bild:Invert:-1.0,255.0:).

Result

The operator add__ returns the value TRUE if the parameters are correct. The behavior in case of empty input (no input images available) is set via the operator set_system(::'no_object_result',<Result>:) Otherwise an exception treatment is carried out.


Possible Predecessors

min_max__


Alternatives

mult__, add__, sub__


See also

min_max__



Copyright © 1996-1997 MVTec Software GmbH