PixelValue¶
Get the value of a pixel.
Description¶
This application gives the value of a selected pixel. There are three ways to designate a pixel, with its index, its physical coordinate (in the physical space attached to the image), and with geographical coordinate system. Coordinates will be interpreted differently depending on which mode is chosen.
Parameters¶
Input Image -in image
Mandatory
Input image
X coordinate -coordx float
Mandatory
This will be the X coordinate interpreted depending on the chosen mode
Y coordinate -coordy float
Mandatory
This will be the Y coordinate interpreted depending on the chosen mode
Coordinate system used to designate the pixel -mode [index|physical|epsg]
Default value: index
Different modes can be selected, default mode is Index.
Index
This mode uses the given coordinates as index to locate the pixel.Image physical space
This mode interprets the given coordinates in the image physical space.EPSG coordinates
This mode interprets the given coordinates in the specified geographical coordinate system by the EPSG code.
EPSG coordinates options¶
EPSG code -mode.epsg.code int
This code is used to define a geographical coordinate system. If no system is specified, WGS84 (EPSG: 4326) is used by default.
Channels -cl string1 string2...
Displayed channels
Pixel Value -value string
Mandatory
Pixel radiometric value
Examples¶
From the command-line:
otbcli_PixelValue -in QB_Toulouse_Ortho_XS.tif -coordx 50 -coordy 100 -cl Channel1
From Python:
import otbApplication
app = otbApplication.Registry.CreateApplication("PixelValue")
app.SetParameterString("in", "QB_Toulouse_Ortho_XS.tif")
app.SetParameterFloat("coordx", 50)
app.SetParameterFloat("coordy", 100)
app.SetParameterStringList("cl", ['Channel1'])
app.ExecuteAndWriteOutput()