RAW2CHIP

Automatic Chip Extraction


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

Back to top

Description


RAW2CHIP performs automatic chip extraction from a raw image and ground control point (GCP) segment to a chip database. It creates chips around each of the GCPs.
Back to top

Parameters


Name Type Caption Length Value range
FILE * String Input file name 1 - 192 1 - 3
DBIC * Integer Input raster channels 1 - 3  
DBGC Integer Input GCP segment 0 - 1  
BACKVAL Integer Background data value 0 - 3  
MMSEG Integer Math model segment 0 - 1  
RESAMPLE String Resampling mode 0 - 6 NEAREST, BILINEAR, CUBIC
Default: CUBIC
CHIPFILE * String Chip database file name 1 - 192  
CHIPSENS String Sensor origin of chips 0 - 16  
CHIPDATE String Chip acquisition date 0 - 21  
CHIPSIZE Integer Size of chips (pixel, line) 0 - 2 64,64 - 256,256
Default: 64,64

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the PCIDSK file that contains the raw input image for processing.

DBIC

Specifies the input raster channels that contains the Ground Control Points.

DBGC

Specifies the Ground Control Point segment or layer number in the input raw image from which to extract chips.

If empty, this parameter uses the last segment in the input file.

BACKVAL

Specifies the background, or no-data value, of the input file.

If empty, all pixels are considered as valid data. Selected chips contain no background pixels.

In some cases, chips must be rejected; for example, if the center of a chip is located on a background value, or if a chip contains more than 50 percent background value.

MMSEG

Specifies the math model segment or layer that contains a math model (any type) for the input image. This value is used as the approximate position of the image for creating the chips.

If empty, this parameter uses the last math model segment in the input file.

RESAMPLE

Specifies the type of resampling method that is used.

Resampling extracts and interpolates the gray levels from the original pixel locations to corrected locations.

Three resampling modes are supported.

The default value is CUBIC.

CHIPFILE

Specifies the name of the chip database in which to store extracted chips. If the specified file already exists, new chips are appended to it; otherwise, a new .cdb file is created.

CHIPSENS

Specifies the sensor origin of the newly created chips; for example "Spot".

This is a free-format sensor name that is used elsewhere to identify chips to match with other features. The sensor name is limited to 16 characters.

CHIPDATE

Specifies the acquisition date of the geocoded file.

A regular expression for chip dates (ddmmmyyyy) is acceptable. This information may be used elsewhere to identify chips matching a specific time period.

CHIPSIZE

Specifies the size of each extracted chip, in pixels x lines. The minimum chip size is 64x64; this is the default value. The maximum chip size is 256x256.

Back to top

Details

RAW2CHIP automatically extracts chips from raw image files containing Ground Control Point (GCP) segments and stores them in a chip database.

The function collects information from the GCPs (XYZ, ID, pixel and line location, and projection system) and the raw image that corresponds to a feature, and outputs to a chip database that contains chips for all the GCPs in the specified segment.

Back to top

Example

Extract a set of chips from Spotleft.pix with the GCPs stored in segment 3. Save the extracted chips in spot_example.cdb.

EASI> FILE	=	"Spotleft.pix"
EASI> DBIC	=	1
EASI> DBGC	=	3
EASI> BACKVAL	=	0
EASI> MMSEG	=	4
EASI> RESAMPLE	=	"CUBIC"
EASI> CHIPFILE	=	"spot_example.cdb"
EASI> CHIPSENS	=	"SPOT"
EASI> CHIPDATE	=	"31DEC2005"
EASI> CHIPSIZE	=	64, 64

EASI> r RAW2CHIP

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