Extract ROI
Brief Description
Extract a ROI defined by the user.
Tags
Image Manipulation
Long Description
This application extracts a Region Of Interest with user parameters. There are four mode of extraction. The standard mode allows the user to enter one point (upper left corner of the region to extract) and a size. The extent mode needs two points (upper left corner and lower right) and the radius mode need the center of the region and the radius : it will extract the rectangle containing the circle defined and limited by the image dimension. The fit mode needs a reference image or vector and the dimension of the extracted region will be the same as the extent of the reference. Different units are available such as pixel, image physical space or longitude and latitude.
Parameters
Input Image (in): Image to be processed.
Output Image (out): Region of interest from the input image
Extraction mode (mode):
Standard (standard): In standard mode extraction is done with 2 parameters : the upper left corner and the size of the region, decomposed in X and Y coordinates.
Fit (fit): In fit mode, extract is made from a reference : image or vector dataset.
Reference image (mode.fit.im): Reference image to define the ROI
Reference vector (mode.fit.vect): The extent of the input vector file is computed and then gives a region of interest that will be extracted.
Extent (extent): In extent mode, the ROI is defined by two points, the upper left corner and the lower right corner, decomposed in 2 coordinates : X and Y. The unit for those coordinates can be set.
X coordinate of the Upper left corner (mode.extent.ulx): X coordinate of upper left corner point.
Y coordinate of Upper Left corner point. (mode.extent.uly): Y coordinate of upper left corner point.
X coordinate of Lower Right corner point. (mode.extent.lrx): X coordinate of lower right corner point.
Y coordinate of Lower Right corner point. (mode.extent.lry): Y coordinate of lower right corner point.
Unit (mode.extent.unit):
Pixel (pxl): The unit for the parameters coordinates will be the pixel, meaning the index of the two points.
Image physical space (phy): The unit for the parameters coordinates will be the physical measure of the image.
Longitude and latitude (lonlat): The unit for the parameters coordinates will be the longitude and the latitude.
Radius (radius): In radius mode, the ROI is defined by a point and a radius. The unit of those two parameters can be chosen independently.
Radius (mode.radius.r): This is the radius parameter of the radius mode.
Radius unit (mode.radius.unitr):
Pixel (pxl): The unit of the radius will be the pixel.
Image physical space (phy): The unit of the radius will be the physical measure of the image.
X coordinate of the center (mode.radius.cx): This is the center coordinate of the radius mode, it will be either an ordinate or a latitude.
Y coordinate of the center (mode.radius.cy):
Center unit (mode.radius.unitc):
Pixel (pxl): The unit for the center coordinates will be the pixel
Image physical space (phy): The unit for the center coordinates will be the physical measure of the image.
Lon/Lat (lonlat): The unit for the center coordinates will be the longitude and the latitude.
Start X (startx): ROI start x position.
Start Y (starty): ROI start y position.
Size X (sizex): size along x in pixels.
Size Y (sizey): size along y in pixels.
Output Image channels (cl): Channels to write in the output image.
Elevation management (elev): This group of parameters allows managing elevation values. Supported formats are SRTM, DTED or any geotiff. DownloadSRTMTiles application could be a useful tool to list/download tiles related to a product.
DEM directory (elev.dem): This parameter allows selecting a directory containing Digital Elevation Model files. Note that this directory should contain only DEM files. Unexpected behaviour might occurs if other images are found in this directory.
Geoid File (elev.geoid): Use a geoid grid to get the height above the ellipsoid in case there is no DEM available, no coverage for some points or pixels with no_data in the DEM tiles. A version of the geoid can be found on the OTB website(https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb-data/blob/master/Input/DEM/egm96.grd).
Default elevation (elev.default): This parameter allows setting the default height above ellipsoid when there is no DEM available, no coverage for some points or pixels with no_data in the DEM tiles, and no geoid file has been set. This is also used by some application as an average elevation value.
Available RAM (Mb) (ram): Available memory for processing (in MB)
Load otb application from xml file (inxml): Load otb application from xml file
Save otb application to xml file (outxml): Save otb application to xml file
Limitations
None
Authors
OTB-Team
See also
Example of use
in: VegetationIndex.hd
mode: extent
mode.extent.ulx: 40
mode.extent.uly: 40
mode.extent.lrx: 150
mode.extent.lry: 150
out: ExtractROI.tif
otbcli_ExtractROI -in VegetationIndex.hd -mode extent -mode.extent.ulx 40 -mode.extent.uly 40 -mode.extent.lrx 150 -mode.extent.lry 150 -out ExtractROI.tif