Radar Vegetation Index (rvi_fp ) — PolSARtools 0.10 documentation

Skip to main content
`Ctrl`+`K`

# Radar Vegetation Index (`rvi_fp` )

polsartools.rvi_fp(in_dir, win=1, fmt='tif', cog=False, ovr=[2, 4, 8, 16], comp=False, max_workers=None, block_size=(512, 512), progress_callback=None)

  Calculate Radar Vegetation Index (RVI) from full-pol SAR data.

  This function computes the Radar Vegetation Index (RVI) using full-polarimetric SAR data. RVI is one of the earliest and most widely used polarimetric vegetation indices, providing a measure of vegetation density and randomness of scattering.

  Examples

      >>> # Basic usage with default parameters
      >>> rvi_fp("/path/to/fullpol_data")

      >>> # Advanced usage with custom parameters
      >>> rvi_fp(
      ...     in_dir="/path/to/fullpol_data",
      ...     win=5,
      ...     fmt="tif",
      ...     cog=True,
      ...     block_size=(1024, 1024)
      ... )

  Parameters:

    - in_dir (str) – Path to the input folder containing full-pol T3 or C3 matrix files.

    - win (int, default=1) – Size of the spatial averaging window. Larger windows reduce speckle noise but decrease spatial resolution.

    - fmt ({'tif', 'bin'}, default='tif') – Output file format: - ‘tif’: GeoTIFF format with georeferencing information - ‘bin’: Raw binary format

    - cog (bool, default=False) – If True, creates a Cloud Optimized GeoTIFF (COG) with internal tiling and overviews for efficient web access.

    - ovr (list[int], default=[2, 4, 8, 16]) – Overview levels for COG creation. Each number represents the decimation factor for that overview level.

    - comp (bool, default=False) – If True, uses LZW compression for GeoTIFF outputs.

    - max_workers (int | None, default=None) – Maximum number of parallel processing workers. If None, uses CPU count - 1 workers.

    - block_size (tuple[int, int], default=(512, 512)) – Size of processing blocks (rows, cols) for parallel computation. Larger blocks use more memory but may be more efficient.

  Returns:

    Writes one output file to disk: - ‘rvifp.tif’ or ‘rvifp.bin’: RVI values

  Return type:

    None

The formulation of RVI is as follows:

\[\text{RVI}_{fp} = \frac{4 \times \lambda_3}{\lambda_1+\lambda_2+\lambda_3}\]

where, \(\lambda_1, \lambda_2\) and \(\lambda_3\) are the eigen values of coherency matrix (T3) in descending order (\(\lambda_1 > \lambda_2 > \lambda_3\)). Further details can be found in [[8]](#8)