HOM

Homogeneous classification


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

Back to top

Description


HOM classifies homogeneous areas on an image channel, where areas are defined by an input theme channel. Output pixel values are the MEAN or MODE of input pixel values in each homogeneous area.
Back to top

Parameters


Name Type Caption Length Value range
FILE * String Input file name 1 - 192  
DBIC * Integer Input image channel to be classified 1 - 1  
DBTC * Integer Input theme channel 1 - 1  
OTYP String Output type 0 - 4 MEAN | MODE
Default: MEAN
DBOC * Integer Output homogeneous channel 1 - 1  
HOMTHRES Float Percentage threshold 0 - 1 Default: 0.0
NCVALUE Integer Value for unclassified area 0 - 1 Default: 0

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of PCIDSK image file containing homogeneous areas to be classified.

DBIC

Specifies the input raster channel to classify for defined homogeneous areas.

The input channel must NOT be the same as the input theme channel (DBTC) or the output channel (DBOC).

DBTC

Specifies the input theme channel that defines the homogeneous areas of interest.

The input theme channel must NOT be the same as the input image channel (DBIC) or the output channel (DBOC).

OTYP

Specifies the output type of imagery.

Supported values are:

DBOC

Specifies the output raster channel to receive the output imagery.

The output channel must NOT be the same as the input image channel (DBIC) or the input theme channel (DBTC).

HOMTHRES

Specifies the real value threshold representing the minimum acceptable percentage of pixels.

If the OTYP parameter is "MEAN", this parameter is ignored.

NCVALUE

Specifies a gray-level value to be used for the unclassified area.

If the OTYP parameter is "MEAN", this parameter is ignored.

Back to top

Details

HOM classifies all pixels in an input image channel (DBIC) using an input theme channel (DBTC) to define the homogeneous areas of interest; up to 2048 areas may be processed.

The output image channel (DBOC) results are determined by the OTYP (Output Type) parameter. If the output type is "MEAN", the mean (or average) gray-level of the input image pixels for a defined homogeneous area will be output to the corresponding pixels in the output channel.

If the output type is "MODE", the mode (or most common gray level) in a defined homogeneous area will be used as output, only if the percentage of pixels occupied by that value exceeds a user-specified percentage threshold (HOMTHRES). Otherwise, the area in the output channel is assigned a user-specified value (NCVALUE) indicating that the area is unclassified.

If the output type is "MEAN", the HOMTHRES and NCVALUE parameters are ignored.

Back to top

Examples

Create an empty file (HOMTEST.PIX) with 16 pixels per line, 16 lines, and 4 channels.

EASI>FILE = "HOMTEST.PIX"
EASI>DBSZ = 16,16
EASI>DBNC = 4

EASI>RUN CIM
Classify the homogeneous areas defined in channel 2, using the image data in channel 1, based on the MEAN value for each homogeneous area and print window. For example, for all pixels where the value is 1 in channel 2, a value of 123 is written to channel 3, because the mean gray level in channel 1 for theme class 1 is 123. This is calculated as follows:
(15*1 + 14*2 + 14*255 + 13*254) / 56 = 123.48
EASI>FILE = "HOMTEST.PIX" 
EASI>DBIC = 1
EASI>DBTC = 2
EASI>OTYP = "MEAN"
EASI>DBOC = 3

EASI>RUN HOM

EASI>DBIC = 3
EASI>DBIW = 

EASI>RUN NUM
IM:[WILSON]HOMTEST.PIX;1         [S  4PIC    16P    16L] 6-SEP-92
 3: HOM  Homo. classifier, DBIC=1 DBTC=2 OTYP=MEAN 09:13 6-SEP-92

Offset: (    0,    0)  Size: (   16,   16)

                                         1   1   1   1   1   1   1
     1   2   3   4   5   6   7   8   9   0   1   2   3   4   5   6
  +---------------------------------------------------------------
 1|  0 123 123 122 123 122 122 121 119 119 117 113 113 104  89  11
 2|  0   0 123 123 122 123 122 122 121 119 119 117 113 113 104  89
 3|123   0   0 123 123 122 123 122 122 121 119 119 117 113 113 104
 4|123 123   0   0 123 123 122 123 122 122 121 119 119 117 113 113
 5|122 123 123   0   0 123 123 122 123 122 122 121 119 119 117 113
 6|123 122 123 123   0   0 123 123 122 123 122 122 121 119 119 117
 7|122 123 122 123 123   0   0 123 123 122 123 122 122 121 119 119
 8|122 122 123 122 123 123   0   0 123 123 122 123 122 122 121 119
 9|121 122 122 123 122 123 123   0   0 123 123 122 123 122 122 121
10|119 121 122 122 123 122 123 123   0   0 123 123 122 123 122 122
11|119 119 121 122 122 123 122 123 123   0   0 123 123 122 123 122
12|117 119 119 121 122 122 123 122 123 123   0   0 123 123 122 123
13|113 117 119 119 121 122 122 123 122 123 123   0   0 123 123 122
14|113 113 117 119 119 121 122 122 123 122 123 123   0   0 123 123
15|104 113 113 117 119 119 121 122 122 123 122 123 123   0   0 123
16| 89 104 113 113 117 119 119 121 122 122 123 122 123 123   0   0

Classify the homogeneous areas defined in channel 2, using image data in channel 1, based on the MODE value for each homogeneous area and print window. For example, for all pixels where the value is 1 in channel 2, a value of 1 is written to channel 4, because the most commonly occurring gray level in channel 1 for theme class 1 is 255. There are 15 occurrences of 1 in channel 1 for class 1.

EASI>FILE = "HOMTEST.PIX" 
EASI>DBIC = 1
EASI>DBTC = 2
EASI>OTYP = "MODE"
EASI>DBOC = 4
EASI>HOMTHRES = 0.0
EASI>NCVALUE = 0

EASI>RUN HOM

EASI>DBIC = 4
EASI>DBIW = 

EASI>RUN NUM

IM:[WILSON]HOMTEST.PIX;1         [S  4PIC    16P    16L] 6-SEP-92
 4: HOM  Homo. classifier, DBIC=1 DBTC=2 OTYP=MODE 09:16 6-SEP-92

Offset: (    0,    0)  Size: (   16,   16)
                                                               
                                         1   1   1   1   1   1   1
     1   2   3   4   5   6   7   8   9   0   1   2   3   4   5   6
  +---------------------------------------------------------------
 1|  0   1   1   2   3   4   4   5   6   6   7   8   8  10  10  11
 2|  0   0   1   1   2   3   4   4   5   6   6   7   8   8  10  10
 3|  1   0   0   1   1   2   3   4   4   5   6   6   7   8   8  10
 4|  1   1   0   0   1   1   2   3   4   4   5   6   6   7   8   8
 5|  2   1   1   0   0   1   1   2   3   4   4   5   6   6   7   8
 6|  3   2   1   1   0   0   1   1   2   3   4   4   5   6   6   7
 7|  4   3   2   1   1   0   0   1   1   2   3   4   4   5   6   6
 8|  4   4   3   2   1   1   0   0   1   1   2   3   4   4   5   6
 9|  5   4   4   3   2   1   1   0   0   1   1   2   3   4   4   5
10|  6   5   4   4   3   2   1   1   0   0   1   1   2   3   4   4
11|  6   6   5   4   4   3   2   1   1   0   0   1   1   2   3   4
12|  7   6   6   5   4   4   3   2   1   1   0   0   1   1   2   3
13|  8   7   6   6   5   4   4   3   2   1   1   0   0   1   1   2
14|  8   8   7   6   6   5   4   4   3   2   1   1   0   0   1   1
15| 10   8   8   7   6   6   5   4   4   3   2   1   1   0   0   1
16| 10  10   8   8   7   6   6   5   4   4   3   2   1   1   0   0

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