| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions
TePDIMIMatching Class Reference
Image matching algorithms.

Mutual Information image area matching ( only offset distortion is supported ). More...

`#include <TePDIMIMatching.hpp>`

Inheritance diagram for TePDIMIMatching:

List of all members.

## Public Member Functions

| TePDIMIMatching ()
| Default Constructor.
| ~TePDIMIMatching ()
| Default Destructor.
bool | CheckParameters (const TePDIParameters &parameters) const
| Checks if the supplied parameters fits the requirements of each PDI algorithm implementation.

## Protected Types

typedef TePDIMatrix< double > | ImgMatrixT
| A type definition for a image matrix.

## Protected Member Functions

bool | RunImplementation ()
| Runs the current algorithm implementation.
void | ResetState (const TePDIParameters &params)
| Reset the internal state to the initial state.
bool | checkTPs (const TeCoordPairVect &tpsvec) const
| Check tie-points indexes for repeated values.

## Static Protected Member Functions

static bool | loadImage (const TeThreadParameters &params)
| A thread entry point to load raster data into a simple matrix.
static void | matrix2Tiff (const ImgMatrixT &input_matrix, const std::string &out_file_name, const std::vector< TeCoord2D > &maxima_points)
| Save the output matrix to a geotiff file.
static void | raster2Tiff (const TePDITypes::TePDIRasterPtrType &input_raster_ptr, unsigned int raster_channel, const std::string &out_file_name, const std::vector< TeCoord2D > &maxima_points, const TeSharedPtr< TeCoordPairVect > &out_tie_points_ptr, unsigned int tie_points_space)
| Save the output matrix to a geotiff file.

## Detailed Description

Mutual Information image area matching ( only offset distortion is supported ).

Note:
  Better used for searching a small image inside a big image.

Author:
  Emiliano F. Castejon <castejon@dpi.inpe.br>
  Etore Marcari Junior <etore@dpi.inpe.br>

Note:
  The required parameters are:

Parameters:

  input_image1_ptr | (TePDITypes::TePDIRasterPtrType) - The input image 1.
  input_channel1 | ( unsigned int ) - Band to process from input_image1.
  input_image2_ptr | (TePDITypes::TePDIRasterPtrType) - The input image 2.
  input_channel2 | ( unsigned int ) - Band to process from input_image2.
  out_tie_points_ptr | ( TeSharedPtr< TeCoordPairVect > ) - The output tie- points where TeCoordPair.pt1 are input_image1 matricial indexes and TeCoordPair.pt2 are input_image2 matricial indexes.

Note:
  The Optional parameters are:

Parameters:

  input_box1 | ( TeBox ) - Box (image matrix coords) to process from input_image1 ( the entire image will be used if no box was supplied )
  input_box2 | ( TeBox ) - Box (image matrix coords) to process from input_image2 ( the entire image will be used if no box was supplied )
  enable_multi_thread | (int) - If present (any value) a multi-threaded processing will be used; Some TeDecoders do not support multi-thread so use it with cation (default: multi-thread disabled).
  pixel_x_relation | (double) - The pixel resolution relation pixel_x_relation = img1_pixel_res_x / img2_pixel_res_x (default=1.0);
  pixel_y_relation | (double) - The pixel resolution relation pixel_y_relation = img1_pixel_res_y / img2_pixel_res_y (default=1.0);
  max_size_opt | (unsigned int) - The maximum image box allowed size (size = pixels number = lines * columns); when the images pixels number exceed this value a downsample will be performed for optimization (default value=0 wich means optimization disabled).
  best_mi_ptr | (double*) - A pointer to an output double variable where to store the best found MI value.

Examples:

  TePDIMIMatching_test.cpp.

## Member Typedef Documentation

TePDIMatrix< double > TePDIMIMatching::ImgMatrixT`[protected]`

A type definition for a image matrix.

## Constructor & Destructor Documentation

TePDIMIMatching::TePDIMIMatching | ( |  | ) |

Default Constructor.

TePDIMIMatching::~TePDIMIMatching | ( |  | ) |

Default Destructor.

## Member Function Documentation

bool TePDIMIMatching::CheckParameters | ( | const TePDIParameters & | parameters | ) | const`[virtual]`

Checks if the supplied parameters fits the requirements of each PDI algorithm implementation.

Note:
  Error log messages must be generated. No exceptions generated.

Parameters:

  parameters | The parameters to be checked.

Returns:
  true if the parameters are OK. false if not.

Implements TePDIAlgorithm.

bool TePDIMIMatching::checkTPs | ( | const TeCoordPairVect & | tpsvec | ) | const`[protected]`

Check tie-points indexes for repeated values.

Parameters:

  maximas | Tie-points vector.

Returns:
  true if OK, false on errors.

bool TePDIMIMatching::loadImage | ( | const TeThreadParameters & | params | ) | `[static, protected]`

A thread entry point to load raster data into a simple matrix.

Parameters:

  params | The parameters needed for the thread execution.

Returns:
  true if OK, false on errors.

void TePDIMIMatching::matrix2Tiff | ( | const ImgMatrixT & | input_matrix,
|  | const std::string & | out_file_name,
|  | const std::vector< TeCoord2D > & | maxima_points
| ) |  | `[static, protected]`

Save the output matrix to a geotiff file.

Parameters:

  input_matrix | Input matrix.
  out_file_name | Output file name.
  maxima_points | The maxima points to be filled with 255

void TePDIMIMatching::raster2Tiff | ( | const TePDITypes::TePDIRasterPtrType & | input_raster_ptr,
|  | unsigned int | raster_channel,
|  | const std::string & | out_file_name,
|  | const std::vector< TeCoord2D > & | maxima_points,
|  | const TeSharedPtr< TeCoordPairVect > & | out_tie_points_ptr,
|  | unsigned int | tie_points_space
| ) |  | `[static, protected]`

Save the output matrix to a geotiff file.

Parameters:

  input_raster | Input raster.
  raster_channel | Raster channel.
  out_file_name | Output file name.
  maxima_points | The maxima points to be drawed.
  out_tie_points_ptr | The tie-points to be drawed.
  tie_points_space | The tie-points space (pt1 or pt2).

void TePDIMIMatching::ResetState | ( | const TePDIParameters & | params | ) | `[protected, virtual]`

Reset the internal state to the initial state.

Parameters:

  params | The new parameters referente at initial state.

Implements TePDIAlgorithm.

bool TePDIMIMatching::RunImplementation | ( |  | ) | `[protected, virtual]`

Runs the current algorithm implementation.

Returns:
  true if OK. false on error.

Implements TePDIAlgorithm.

The documentation for this class was generated from the following files:

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/image_processing/TePDIMIMatching.hpp
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/image_processing/TePDIMIMatching.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines