SPLREG

Scatterplot linear regression equation


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

Back to top

Description


SPLREG calculates the coefficients of a first-order linear regression equation which relates gray-level values in two image layers.
Back to top

Parameters


Name Type Caption Length Value range
FILE * String Input file name 1 - 192  
DBIC * Integer Input raster channel(s) 2 - 2 1 -
MASK Integer Area mask 0 - 4  
IMSTAT Float Image Statistics 0 - 5  
REPORT String Report mode 0 - 192 Quick links

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the PCIDSK image file containing image channels for which the linear regression equation is calculated.

DBIC

Specifies the two input image channels for which the linear regression equation is calculated.

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.

MASK

Specifies the window or bitmap that defines the area to be processed within the input raster.

If a single value is specified, that value represents the channel number of the bitmap segment in the input file. Only the pixels under the bitmap are processed; the rest of the image remains unchanged.

If four values are specified, they define the x,y offsets and x,y dimensions of a rectangular window identifying the area to process. Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.

If no value is specified, the entire channel is processed.

IMSTAT

When completed, SPLREG saves the coefficients of the linear regression equation, the residual Coefficient of Non-Determination (1 - R^2), the Correlation Coefficient (R) and the number of samples, in the IMSTAT output parameter.

The linear equation, which relates values in channel X to channel Y, is:

Y = A  +  B * X

where:

If the derived output function is applied to the input channel X, then the output is as simliar as possible to Y.

REPORT

Specifies where to direct the generated report.

Available options are:

Back to top

Details

SPLREG determines the coefficients for a first-order linear regression equation that relates gray-level values in two specified image channels, and saves the coefficient values, the Coefficient of Non-Determination (1 - R^2) and Correlation Coefficient (R) and the number of samples in the output parameters (A, B, 1 - R^2, R, number of samples). The equation specifies a straight line which would go through a scatterplot. The Coefficient of Non-Determination (1 - R^2) indicates the amount of variation in X that is not explained by the regression equation. If X and Y are perfectly correlated, 1 - R^2 = 0; if X and Y are totally uncorrelated, 1 - R^2 = 1.

The MASK parameter specifies the area within the input channel to be sampled for calculation of the linear regression equation. Only the area under the MASK is processed; the rest of the image is not used in the calculations.

Back to top

Example

Calculate coefficients for the equation relating the first two image channels in the file 'irvine.pix'.

EASI>FILE	=	"irvine.pix"	! input image file
EASI>DBIC	=	1,2	! input channels
EASI>MASK	=		! sample entire image
EASI>REPORT	=	"TERM"	! report is printed on terminal

EASI>RUN SPLREG

EASI>print "A = ", imstat[1]
EASI>print "B = ", imstat[2]
EASI>print "CND = ", imstat[3]
EASI>print "R = ", imstat[4]
EASI>print "Number Samples = ", imstat[5]

The report produced by this run is shown below:

SPLREG                                                          13:27 27May2019
Input file:  irvine.pix

Regression equation for channel 1 (X) and channel 2 (Y):

   Y = -11.3884547210186 + 0.5720667646682 * X

Correlation of Non-Determination (1-R^2):  0.0805241016376
Correlation Coefficient (R):  0.9588930588769
Number of samples:  262144

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