ObjectsRadiometricStatistics

Compute features attributes of a vector dataset over an image.

Description

This application computes radiometric and shapes attributes on a vector dataset, using an image. The results are stored in the attribute table. Shape attributes are : number of pixels, flatness, roundness, elongation, perimeter. Radiometric attributes are for each band of the input image : mean, standard-deviation, median, variance, kurtosis, skewness.

Parameters

Input vector dataset -in filename [dtype] Mandatory
Input vector dataset providing segmentation.

Input reference image -im image Mandatory
Input image used to compute radiometric attributes.

ID field -field string Default value: label
Name of the field containing object IDs.

Background value -background int Default value: 0
Background value. Needs to be different of any object ID.

Examples

From the command-line:

otbcli_ObjectsRadiometricStatistics -in segmentation.shp -im image_XS.tif -field label -background 0

From Python:

import otbApplication

app = otbApplication.Registry.CreateApplication("ObjectsRadiometricStatistics")

app.SetParameterString("in", "segmentation.shp")
app.SetParameterString("im", "image_XS.tif")
app.SetParameterString("field", "label")
app.SetParameterInt("background", 0)

app.ExecuteAndWriteOutput()

See also

For now, support of input dataset with multiple layers having different projection reference system is limited.