SFSTextureExtraction¶
Computes Structural Feature Set textures on every pixel of the input image selected channel
Description¶
Structural Feature Set [1] are based on the histograms of the pixels in multiple directions of the image. The SFSTextureExtraction application computes the 6 following features: SFS’Length, SFS’Width, SFS’PSI, SFS’W-Mean, SFS’Ratio and SFS’SD (Standard Deviation). The texture indices are computed from the neighborhood of each pixel. It is possible to change the length of the calculation line (spatial threshold), as well as the maximum difference between a pixel of the line and the pixel at the center of the neighborhood (spectral threshold) [2].
This application has several output images and supports “multi-writing”. Instead of computing and writing each image independently, the streamed image blocks are written in a synchronous way for each output. The output images will be computed strip by strip, using the available RAM to compute the strip size, and a user defined streaming mode can be specified using the streaming extended filenames (type, mode and value). Note that multi-writing can be disabled using the multi-write extended filename option: &multiwrite=false, in this case the output images will be written one by one. Note that multi-writing is not supported for MPI writers.
Parameters¶
Input Image -in image
Mandatory
The input image to compute the features on.
Selected Channel -channel int
Default value: 1
The selected channel index
Texture feature parameters¶
This group of parameters allows one to define SFS texture parameters. The available texture features are SFS’Length, SFS’Width, SFS’PSI, SFS’W-Mean, SFS’Ratio and SFS’SD. They are provided in this exact order in the output image.
Spectral Threshold -parameters.spethre float
Default value: 50
Spectral Threshold
Spatial Threshold -parameters.spathre int
Default value: 100
Spatial Threshold
Number of Direction -parameters.nbdir int
Default value: 20
Number of Direction
Alpha -parameters.alpha float
Default value: 1
Alpha
Ratio Maximum Consideration Number -parameters.maxcons int
Default value: 5
Ratio Maximum Consideration Number
Feature Output Image -out image [dtype]
Mandatory
Output image containing the SFS texture features.
Available RAM (MB) -ram int
Default value: 256
Available memory for processing (in MB).
Examples¶
From the command-line:
otbcli_SFSTextureExtraction -in qb_RoadExtract.tif -channel 1 -parameters.spethre 50.0 -parameters.spathre 100 -out SFSTextures.tif
From Python:
import otbApplication
app = otbApplication.Registry.CreateApplication("SFSTextureExtraction")
app.SetParameterString("in", "qb_RoadExtract.tif")
app.SetParameterInt("channel", 1)
app.SetParameterFloat("parameters.spethre", 50.0)
app.SetParameterInt("parameters.spathre", 100)
app.SetParameterString("out", "SFSTextures.tif")
app.ExecuteAndWriteOutput()