RANDBIT

Generate random bitmap sample


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: References :: Related

Back to top

Description


Generates a bitmap mask that can be used for random sampling. A bitmap is generated with a specified bit density. The bitmap may be based on a subsample of an existing bitmap, or on a sample of the whole image space.
Back to top

Parameters


Name Type Caption Length Value range
FILE * String Input file name 1 - 192  
DBIB Integer Input bitmap segment 0 -    
DBOB Integer Output bitmap segment 0 -    
DENSITY * Float Random sampling density (%) 1 - 1 0 - 100
DBSN String Output bitmap segment name 0 - 192 Default: RANDMASK
DBSD String Output bitmap segment description 0 - 192  
MONITOR String Monitor mode 0 - 3 ON, OFF
Default: ON

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the GDB-supported file containing input bitmaps, and to which the output bitmaps will be written.

DBIB

Specifies the image bitmaps to serve as sample masks for the output bitmaps.

Duplicate segments are allowed.

Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.

DBOB

Specifies the output bitmap to receive the sample results.

The output bitmap may be the same as the input bitmap; if this parameter is not specified, new bitmap segments are created.

Note: If the input bitmap (DBIB) and output bitmap (DBOB) parameters are defaulted, one output bitmap with the specified DENSITY will be generated.

Duplicate bitmap segments are NOT allowed.

Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.

DENSITY

Specifies the density, in percentage, at which to sample the output bitmap mask.

If set to 100 (percent), the output bitmap will be 1 (all pixels on) everywhere the input bitmap is 1 (or everywhere, if there is no input bitmap). If set to 50, approximately half the output bits will be 1.

DBSN

Specifies a name (up to 8 characters) for the output bitmap segment. If this parameter is not specified, the default name RANDMASK is used.

Note: The segment name can be changed using MAS.

DBSD

Describes (in up to 64 characters) the contents or origins of the output neural network segment.

Note: The segment descriptor can be changed using MAS.

MONITOR

The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.

Available options are:

Back to top

Details

RANDBIT generates a mask to be used for random sampling. An output bitmap suitable for use with other "maskable" functions is generated, based on a specified sampling density (DENSITY) and an input bitmap mask (DBIB).

The input bitmap parameter (DBIB) specifies the input masks from which to compute a sub-sample space. If an input bitmap is not provided, the entire image space will be sampled.

Back to top

Example

Generate a sub-sample of the "Water1" training mask from irvine.pix. This can then be used to generate a signature, and the resulting classification can be compared to that generated by the original training mask.

EASI>file	=	"/demo/irvine.pix"
EASI>dbib	=	9
EASI>dbob	=	
EASI>density	=	50
EASI>dbsn	=
EASI>dbsd	=

EASI>RUN RANDBIT
Back to top

References

Law & Kelton, "Simulation Modelling and Analysis", P449.

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.