ResetMargin

This is the ResetMargin application

Description

This application is similar to ExtractROI in the sense it extracts a Region of Interrest. However, the region outside of the ROI isn’t trimmed, but set to 0.

The filter set lines of index < threshold.y, and of index >= threshold.y to 0 The filter set columns of index < threshold.x, and of index >= threshold.x to 0

Parameters

Input image -in image Mandatory
Scalar Input image

Output Image -out image [dtype] Mandatory
Scalar Output image

threshold group

Top line index threshold -threshold.y.start int Default value: 0
Top line index threshold

Bottom line index threshold -threshold.y.end int Default value: 0
Bottom line index threshold


Column index threshold -threshold.x int Default value: 0
Column index threshold


Available RAM (MB) -ram int Default value: 256
Available memory for processing (in MB).

Examples

From the command-line:

otbcli_ResetMargin -in ResetMarginInput100x100.tiff -threshold.x 10 -threshold.y.start 12 -threshold.y.end 25 -out ResetMargin.tiff

From Python:

import otbApplication

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

app.SetParameterString("in", "ResetMarginInput100x100.tiff")
app.SetParameterInt("threshold.x", 10)
app.SetParameterInt("threshold.y.start", 12)
app.SetParameterInt("threshold.y.end", 25)
app.SetParameterString("out", "ResetMargin.tiff")

app.ExecuteAndWriteOutput()

Limitations

This application only works on scalar (and complex) images.