4.10.9 Pixel Value

Get the value of a pixel.

Detailed description

Get the value of a pixel.
Pay attention, index starts at 0.

Parameters

This section describes in details the parameters available for this application. Table 4.170, page 835 presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is PixelValue.





Parameter key

Parameter type

Parameter description




in

Input image

Input Image

coordx

Int

Col index

coordy

Int

Line index

cl

List

Channels

value

String

Pixel Value

inxml

XML input parameters file

Load otb application from xml file

outxml

XML output parameters file

Save otb application to xml file











Table 4.170: Parameters table for Pixel Value.

Example

To run this example in command-line, use the following:

otbcli_PixelValue -in QB_Toulouse_Ortho_XS.tif -coordx 50 -coordy 100 -cl Channel1

To run this example from Python, use the following code snippet:

#!/usr/bin/python 
 
# Import the otb applications package 
import otbApplication 
 
# The following line creates an instance of the PixelValue application 
PixelValue = otbApplication.Registry.CreateApplication("PixelValue") 
 
# The following lines set all the application parameters: 
PixelValue.SetParameterString("in", "QB_Toulouse_Ortho_XS.tif") 
 
PixelValue.SetParameterInt("coordx", 50) 
 
PixelValue.SetParameterInt("coordy", 100) 
 
# The following line execute the application 
PixelValue.ExecuteAndWriteOutput()

Limitations

None

Authors

This application has been written by OTB-Team.