All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TiePointsLocator.h
Go to the documentation of this file.
1 /* Copyright (C) 2001-2009 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/rp/TiePointsLocator.h
22  \brief TiePointsLocator locator.
23  */
24 
25 #ifndef __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATOR_H
26 #define __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATOR_H
27 
28 #include "Algorithm.h"
29 #include "Matrix.h"
30 #include "../raster/Raster.h"
31 #include "../raster/Interpolator.h"
32 #include "../geometry/GeometricTransformation.h"
33 #include "../geometry/GTParameters.h"
34 #include "../sam/rtree.h"
35 #include "../common/progress/TaskProgress.h"
36 
37 #include <vector>
38 #include <set>
39 #include <string>
40 #include <list>
41 
42 #include <boost/thread.hpp>
43 #include <boost/shared_ptr.hpp>
44 
45 namespace te
46 {
47  namespace rp
48  {
49  /*!
50  \class TiePointsLocator
51  \brief Tie points locator.
52  \details Designed to find tie-points inside raster areas.
53  */
55  {
56  public:
57 
58  /*!
59  \class InputParameters
60  \brief TiePointsLocator input parameters
61  */
63  {
64  public:
65 
66  /**
67  * \name Global parameters
68  */
69  /**@{*/
70 
71  /*! \enum The strategy used to locate tie points.*/
73  {
74  InvalidStrategyT = 0, /*!< Invalid strategy. */
75  MoravecStrategyT = 1, /*!< Modified Moravec Interest Operator based image area matching - Reference: Extration of GCP chips from GeoCover using Modified Moravec Interest Operator (MMIO) algorithm, The United States Geological Survey. */
76  SurfStrategyT = 2 /*!< SURF based image area matching - Reference: SURF: Speeded Up Robust Features, Herbert Bay. */
77  };
78 
79  InteresPointsLocationStrategyType m_interesPointsLocationStrategy; //!< The strategy used to locate interest points (default:SurfStrategyT).
80 
81  te::rst::Raster const* m_inRaster1Ptr; //!< Input raster 1.
82 
83  te::rst::Raster const* m_inMaskRaster1Ptr; //!< Optional one band input mask raster 1 (tie-points will not be generated inside mask image areas marked with zeroes).
84 
85  std::vector< unsigned int > m_inRaster1Bands; //!< Bands to be used from the input raster 1.
86 
87  unsigned int m_raster1TargetAreaLineStart; //!< The first line of the raster 1 target area to process (default:0 - The entire raster will be considered).
88 
89  unsigned int m_raster1TargetAreaColStart; //!< The first column of the raster 2 target area to process (default:0 - The entire raster will be considered).
90 
91  unsigned int m_raster1TargetAreaWidth; //!< The raster 1 target area width (default:0 - The entire raster will be considered).
92 
93  unsigned int m_raster1TargetAreaHeight; //!< The raster 1 target area height (default:0 - The entire raster will be considered).
94 
95  te::rst::Raster const* m_inRaster2Ptr; //!< Input raster 2.
96 
97  te::rst::Raster const* m_inMaskRaster2Ptr; //!< Optional one band input mask raster 2 (tie-points will not be generated inside mask image areas marked with zeroes).
98 
99  std::vector< unsigned int > m_inRaster2Bands; //!< Bands to be used from the input raster 2.
100 
101  unsigned int m_raster2TargetAreaLineStart; //!< The first line of the raster 2 target area to process (default:0 - The entire raster will be considered).
102 
103  unsigned int m_raster2TargetAreaColStart; //!< The first column of the raster 2 target area to process (default:0 - The entire raster will be considered).
104 
105  unsigned int m_raster2TargetAreaWidth; //!< The raster 2 target area width (default:0 - The entire raster will be considered).
106 
107  unsigned int m_raster2TargetAreaHeight; //!< The raster 2 target area height (default:0 - The entire raster will be considered).
108 
109  bool m_enableMultiThread; //!< Enable/Disable the use of multi-threads (default:true).
110 
111  bool m_enableProgress; //!< Enable/Disable the progress interface (default:false).
112 
113  unsigned int m_maxTiePoints; //!< The maximum number of tie-points to generate (default=0 - Automatically found).
114 
115  double m_pixelSizeXRelation; //!< The pixel resolution relation m_pixelSizeXRelation = raster1_pixel_res_x / raster2_pixel_res_x (default=1.0).
116 
117  double m_pixelSizeYRelation; //!< The pixel resolution relation m_pixelSizeYRelation = raster1_pixel_res_y / raster2_pixel_res_y (default=1.0).
118 
119  std::string m_geomTransfName; //!< The name of the geometric transformation used to ensure tie-points consistency (see each te::gm::GTFactory inherited classes to find each factory key/name, default:Affine).
120 
121  double m_geomTransfMaxError; //!< The maximum allowed transformation error (pixel units, default:2).
122 
123  unsigned int m_maxR1ToR2Offset; //!< The maximum offset (pixels units) between a raster 1 point end the respective raster 2 point (default:0 - no offset restriction).
124 
125  bool m_enableGeometryFilter; //!< Enable/disable the geometry filter/outliers remotion (default:true).
126 
127  double m_geometryFilterAssurance; //!< Geometry assurance (the error-free selection percent assurance) - valid range (0-1) - default:0.1 - Use 0-zero to let this number be automatically found.
128 
129  double m_rastersRescaleFactor; //!< Global rescale factor to apply to all input rasters (default:1, valid range: non-zero positive values).
130 
131  te::rst::Interpolator::Method m_interpMethod; //!< The raster interpolator method (default:NearestNeighbor).
132 
133  //@}
134 
135  /**
136  * \name Moravec parameters
137  */
138  /**@{*/
139 
140  unsigned int m_moravecCorrelationWindowWidth; //!< The correlation window width used to correlate points between the images (minimum 3, default: 11).
141 
142  unsigned int m_moravecWindowWidth; //!< The Moravec window width used to locate canditate tie-points (minimum 3, default: 5 ).
143 
144  unsigned int m_moravecGaussianFilterIterations; //!< The number of noise Gaussin iterations, when applicable (used to remove image noise, zero will disable the Gaussian Filter, default:1).
145 
146  double m_moravecMinAbsCorrelation; //!< The minimum acceptable absolute correlation value when matching features (when applicable), default:0.5, valid range: [0,1].
147 
148  //@}
149 
150  /**
151  * \name SURF parameters
152  */
153  /**@{*/
154 
155  unsigned int m_surfScalesNumber; //!< The number of sub-sampling scales to generate, when applicable (default:4, minimum:3).
156 
157  unsigned int m_surfOctavesNumber; //!< The number of octaves to generate, when applicable (default: 3, minimum:1).
158 
159  double m_surfMaxNormEuclideanDist; //!< The maximum acceptable euclidean distance when matching features (when applicable), default:0.5, valid range: [0,1].
160 
161  //@}
162 
163  InputParameters();
164 
166 
167  ~InputParameters();
168 
169  //overload
170  void reset() throw( te::rp::Exception );
171 
172  //overload
173  const InputParameters& operator=( const InputParameters& params );
174 
175  //overload
176  AbstractParameters* clone() const;
177  };
178 
179  /*!
180  \class OutputParameters
181  \brief TiePointsLocator output parameters
182  */
184  {
185  public:
186 
187  std::vector< te::gm::GTParameters::TiePoint > m_tiePoints; //!< The generated tie-pionts (te::gm::GTParameters::TiePoint::first are raster 1 line/column indexes, te::gm::GTParameters::TiePoint::second are raster 2 line/column indexes).
188 
189  std::auto_ptr< te::gm::GeometricTransformation > m_transformationPtr; //!< The generated geometric transformation with the base mininum required tie-points set ( depending on the tie-points, a valid transformation may not exist, in this case, this pointer will be null).
190 
192 
194 
195  ~OutputParameters();
196 
197  //overload
198  void reset() throw( te::rp::Exception );
199 
200  //overload
201  const OutputParameters& operator=( const OutputParameters& params );
202 
203  //overload
204  AbstractParameters* clone() const;
205  };
206 
208 
209  ~TiePointsLocator();
210 
211  //overload
212  bool execute( AlgorithmOutputParameters& outputParams ) throw( te::rp::Exception );
213 
214  //overload
215  void reset() throw( te::rp::Exception );
216 
217  //overload
218  bool initialize( const AlgorithmInputParameters& inputParams ) throw( te::rp::Exception );
219 
220  bool isInitialized() const;
221 
222  protected:
223 
224  /*!
225  \typedef FloatsMatrix
226  \brief A matrix do store float values.
227  */
228  typedef te::rp::Matrix< float > FloatsMatrix;
229 
230  /*!
231  \typedef DoublesMatrix
232  \brief A matrix do store double values.
233  */
234  typedef te::rp::Matrix< double > DoublesMatrix;
235 
236  /*!
237  \typedef UCharsMatrix
238  \brief A matrix do store unsigned char values.
239  */
240  typedef te::rp::Matrix< unsigned char > UCharsMatrix;
241 
242  /*! Interest point type */
244  {
245  public :
246  unsigned int m_x; //!< Point X coord.
247 
248  unsigned int m_y; //!< Point Y coord.
249 
250  float m_feature1; //!< Interest point feature 1 value.
251 
252  float m_feature2; //!< Interest point feature 2 value.
253 
254  float m_feature3; //!< Interest point feature 3 value.
255 
257  : m_x( 0 ), m_y( 0 ), m_feature1( 0 ), m_feature2( 0 ),
258  m_feature3( 0 )
259  {
260  };
261 
262  InterestPointT( const InterestPointT& other )
263  {
264  operator=( other );
265  };
266 
268 
269  bool operator<( const InterestPointT& other ) const
270  {
271  return ( m_feature1 < other.m_feature1 );
272  };
273 
274  const InterestPointT& operator=( const InterestPointT& other )
275  {
276  m_x = other.m_x;
277  m_y = other.m_y;
278  m_feature1 = other.m_feature1;
279  m_feature2 = other.m_feature2;
280  m_feature3 = other.m_feature3;
281  return other;
282  };
283  };
284 
285  /*! Interest points set container type
286  */
287  typedef std::multiset< InterestPointT > InterestPointsSetT;
288 
289  /*! Interest points list container type
290  */
291  typedef std::list< InterestPointT > InterestPointsListT;
292 
293  /*! Matched Interest point type */
295  {
296  public :
297 
298  InterestPointT m_point1; //!< Interest point 1
299 
300  InterestPointT m_point2; //!< Interest point 2
301 
302  float m_feature; //!< Matched interest feature.
303 
305 
307  {
308  operator=( other );
309  };
310 
312  const InterestPointT& point2, const float& feature ) :
313  m_point1( point1 ), m_point2( point2 ),
314  m_feature( feature ) {};
315 
317 
318  bool operator<( const MatchedInterestPointsT& other ) const
319  {
320  return ( m_feature < other.m_feature );
321  };
322 
324  {
325  m_point1 = other.m_point1;
326  m_point2 = other.m_point2;
327  m_feature = other.m_feature;
328  return other;
329  };
330  };
331 
332  /*! Matched interest points container type
333  */
334  typedef std::multiset< MatchedInterestPointsT > MatchedInterestPointsSetT;
335 
336  /*!
337  \brief The parameters passed to the moravecLocatorThreadEntry method.
338  */
340  {
341  public :
342 
343  bool* m_returnValuePtr; //! Thread return value pointer.
344 
345  unsigned int m_moravecWindowWidth; //!< The Moravec window width used to locate canditate tie-points (minimum 11, default: 11 ).
346 
347  unsigned int m_maxInterestPointsPerRasterLinesBlock; //!< The maximum number of points to find for each raster lines block.
348 
349  FloatsMatrix const* m_rasterDataPtr; //!< The loaded raster data.
350 
351  UCharsMatrix const* m_maskRasterDataPtr; //!< The loaded mask raster data pointer (or zero if no mask is avaliable).
352 
353  InterestPointsSetT* m_interestPointsPtr; //!< A pointer to a valid interest points container.
354 
355  boost::mutex* m_rastaDataAccessMutexPtr; //!< A pointer to a valid mutex to controle raster data access.
356 
357  boost::mutex* m_interestPointsAccessMutexPtr; //!< A pointer to a valid mutex to control the output interest points container access.
358 
359  unsigned int m_maxRasterLinesBlockMaxSize; //!< The maximum lines number of each raster block to process.
360 
361  unsigned int* m_nextRasterLinesBlockToProcessValuePtr; //!< A pointer to a valid counter to control the blocks processing sequence.
362 
364 
366  };
367 
368 
369  /*!
370  \brief The parameters passed to the surfLocatorThreadEntry method.
371  */
373  {
374  public :
375 
376  bool* m_returnValuePtr; //! Thread return value pointer.
377 
378  unsigned int m_scalesNumber; //!< The number of sub-samples scales to generate (minimum:3).
379 
380  unsigned int m_octavesNumber; //!< The number of octaves to generate (minimum:1).
381 
382  unsigned int m_maxInterestPointsPerRasterLinesBlock; //!< The maximum number of points to find for each raster lines block for each scale.
383 
384  FloatsMatrix const* m_integralRasterDataPtr; //!< The integral image raster data.
385 
386  UCharsMatrix const* m_maskRasterDataPtr; //!< The loaded mask raster data pointer (or zero if no mask is avaliable).
387 
388  InterestPointsSetT* m_interestPointsPtr; //!< A pointer to a valid interest points container.
389 
390  boost::mutex* m_rastaDataAccessMutexPtr; //!< A pointer to a valid mutex to controle raster data access.
391 
392  boost::mutex* m_interestPointsAccessMutexPtr; //!< A pointer to a valid mutex to control the output interest points container access.
393 
394  unsigned int m_maxRasterLinesBlockMaxSize; //!< The maximum lines number of each raster block to process.
395 
396  unsigned int* m_nextRasterLinesBlockToProcessValuePtr; //!< A pointer to a valid counter to control the blocks processing sequence.
397 
399 
401  };
402 
403  /*!
404  \brief The parameters passed to the matchCorrelationEuclideanThreadEntry method.
405  */
407  {
408  public :
409 
411 
413 
415 
417 
419 
421 
422  boost::mutex* m_syncMutexPtr;
423 
424  unsigned int m_maxPt1ToPt2Distance; //!< Zero (disabled) or the maximum distance between a point from set 1 to a point from set 1 (points beyond this distance will not be correlated and will have zero as correlation value).
425 
427 
429  };
430 
431  /*!
432  \brief The parameters passed to the executeMatchingByEuclideanDistThreadEntry method.
433  */
435  {
436  public :
437 
439 
441 
443 
445 
447 
449 
450  boost::mutex* m_syncMutexPtr;
451 
452  unsigned int m_maxPt1ToPt2Distance; //!< Zero (disabled) or the maximum distance between a point from set 1 to a point from set 1 (points beyond this distance will not be correlated and will have zero as correlation value).
453 
455 
457  };
458 
459  TiePointsLocator::InputParameters m_inputParameters; //!< TiePointsLocator input execution parameters.
460 // TiePointsLocator::OutputParameters* m_outputParametersPtr; //!< TiePointsLocator input execution parameters.
461 
462  bool m_isInitialized; //!< Tells if this instance is initialized.
463 
464 
465  /*!
466  \brief Executes the Moravec algorithm using the supplied parameters.
467 
468  \param raster1XRescFact The X axis rescale factor to be aplied into raster 1.
469 
470  \param raster1YRescFact The Y axis rescale factor to be aplied into raster 1.
471 
472  \param raster2XRescFact The X axis rescale factor to be aplied into raster 2.
473 
474  \param raster2YRescFact The Y axis rescale factor to be aplied into raster 2.
475 
476  \param progressPtr A pointer to the progress instance or a NULL pointer if it is not used.
477 
478  \param raster1Data The raster 1 loaded data.
479 
480  \param maskRaster1Data The mask raster 1 loaded data.
481 
482  \param outParamsPtr Output parameters pointer.
483 
484  \param tiePointsWeights Ouptut tie-points weights.
485 
486  \return true if OK, false on errors.
487  */
488  bool executeMoravec(
489  const double raster1XRescFact,
490  const double raster1YRescFact,
491  const double raster2XRescFact,
492  const double raster2YRescFact,
493  te::common::TaskProgress* progressPtr,
495  std::vector< double >& tiePointsWeights )
496  throw( te::rp::Exception );
497 
498  /*!
499  \brief Executes the SURF algorithm using the supplied parameters.
500 
501  \param raster1XRescFact The X axis rescale factor to be aplied into raster 1.
502 
503  \param raster1YRescFact The Y axis rescale factor to be aplied into raster 1.
504 
505  \param raster2XRescFact The X axis rescale factor to be aplied into raster 2.
506 
507  \param raster2YRescFact The Y axis rescale factor to be aplied into raster 2.
508 
509  \param progressPtr A pointer to the progress instance or a NULL pointer if it is not used.
510 
511  \param raster1Data The raster 1 loaded data.
512 
513  \param maskRaster1Data The mask raster 1 loaded data.
514 
515  \param outParamsPtr Output parameters pointer.
516 
517  \param tiePointsWeights Ouptut tie-points weights.
518 
519  \return true if OK, false on errors.
520  */
521  bool executeSurf(
522  const double raster1XRescFact,
523  const double raster1YRescFact,
524  const double raster2XRescFact,
525  const double raster2YRescFact,
526  te::common::TaskProgress* progressPtr,
528  std::vector< double >& tiePointsWeights )
529  throw( te::rp::Exception );
530 
531  /*!
532  \brief Load rasters data (normalized between 0 and 1).
533 
534  \param rasterPtr Input raster pointer.
535 
536  \param rasterBands Input raster bands.
537 
538  \param maskRasterPtr The related input mask raster pointer (or zero, if no mask raster is avaliable).
539 
540  \param maskRasterBand The input mask raster band to use.
541 
542  \param rasterTargetAreaLineStart The raster target area initial line.
543 
544  \param rasterTargetAreaColStart The raster target area initial column.
545 
546  \param rasterTargetAreaWidth The raster target area width.
547 
548  \param rasterTargetAreaHeight The raster target area height.
549 
550  \param rescaleFactorX Scale factor to be applied on the loaded data.
551 
552  \param rescaleFactorY Scale factor to be applied on the loaded data.
553 
554  \param rasterInterpMethod The interpolation used when loading the input raster.
555 
556  \param maxMemPercentUsage The maximum amount (percent) of memory to use for the loaded data [0,100].
557 
558  \param loadedRasterData The loaded raster data.
559 
560  \param loadedMaskRasterData The loaded mask raster data.
561 
562  \return true if ok, false on errors.
563  */
564  static bool loadRasterData(
565  te::rst::Raster const* rasterPtr,
566  const std::vector< unsigned int >& rasterBands,
567  te::rst::Raster const* maskRasterPtr,
568  const unsigned int maskRasterBand,
569  const unsigned int rasterTargetAreaLineStart,
570  const unsigned int rasterTargetAreaColStart,
571  const unsigned int rasterTargetAreaWidth,
572  const unsigned int rasterTargetAreaHeight,
573  const double rescaleFactorX,
574  const double rescaleFactorY,
575  const te::rst::Interpolator::Method rasterInterpMethod,
576  const unsigned char maxMemPercentUsage,
577  std::vector< boost::shared_ptr< FloatsMatrix > >& loadedRasterData,
578  UCharsMatrix& loadedMaskRasterData );
579 
580  /*!
581  \brief Moravec interest points locator.
582 
583  \param rasterData The loaded raster data.
584 
585  \param maskRasterDataPtr The loaded mask raster data pointer (or zero if no mask is avaliable).
586 
587  \param moravecWindowWidth Moravec window width.
588 
589  \param maxInterestPoints The maximum number of interest points to find over raster 1.
590 
591  \param enableMultiThread Enable/disable multi-thread.
592 
593  \param interestPoints The found interest points (coords related to rasterData lines/cols).
594 
595  \note InterestPointT::m_feature1 will be sum of differences between the Moravec filter response of each pixel and its neighborhoods (always a positive value).
596 
597  \return true if ok, false on errors.
598  */
599  static bool locateMoravecInterestPoints(
600  const FloatsMatrix& rasterData,
601  UCharsMatrix const* maskRasterDataPtr,
602  const unsigned int moravecWindowWidth,
603  const unsigned int maxInterestPoints,
604  const unsigned int enableMultiThread,
605  InterestPointsSetT& interestPoints );
606 
607  /*!
608  \brief SURF interest points locator.
609 
610  \param integralRasterData Integral image raster data.
611 
612  \param maskRasterDataPtr The loaded mask raster data pointer (or zero if no mask is avaliable).
613 
614  \param interestPoints The found interest points (coords related to rasterData lines/cols).
615 
616  \return true if ok, false on errors.
617 
618  \note InterestPointT::m_feature1 will be sum of differences between the hessian matrix determinant each pixel and its neighborhoods (always a positive value).
619 
620  \note InterestPointT::m_feature2 will be used filter width (pixels).
621 
622  \note InterestPointT::m_feature3 will 1 if the laplacian sign is positive, or zero if negative.
623  */
624  bool locateSurfInterestPoints(
625  const FloatsMatrix& integralRasterData,
626  UCharsMatrix const* maskRasterDataPtr,
627  InterestPointsSetT& interestPoints ) const;
628 
629  /*!
630  \brief Movavec locator thread entry.
631 
632  \param paramsPtr A pointer to the thread parameters.
633  */
634  static void locateMoravecInterestPointsThreadEntry(MoravecLocatorThreadParams* paramsPtr);
635 
636  /*!
637  \brief Surf locator thread entry.
638 
639  \param paramsPtr A pointer to the thread parameters.
640  */
641  static void locateSurfInterestPointsThreadEntry(SurfLocatorThreadParams* paramsPtr);
642 
643  /*!
644  \brief RoolUp a buffer of lines.
645 
646  \param bufferPtr Buffer pointer.
647 
648  \param bufferLinesNumber Buffer lines number.
649  */
650  template< typename BufferElementT >
651  static void roolUpBuffer( BufferElementT** bufferPtr,
652  const unsigned int& bufferLinesNumber )
653  {
654  assert( bufferPtr );
655  assert( bufferLinesNumber );
656 
657  unsigned int idx = 0;
658  BufferElementT* auxLinePtr = bufferPtr[ 0 ];
659  const unsigned int lastLineIdx = bufferLinesNumber - 1;
660 
661  for( idx = 0 ; idx < lastLineIdx ; ++idx )
662  {
663  bufferPtr[ idx ] = bufferPtr[ idx + 1 ];
664  }
665 
666  bufferPtr[ lastLineIdx ] = auxLinePtr;
667  };
668 
669  /*!
670  \brief Fill a buffer with zeroes.
671 
672  \param bufferPtr Buffer pointer.
673 
674  \param bufferLinesNumber Buffer lines number.
675 
676  \param bufferColsNumber Buffer columns number.
677  */
678  template< typename BufferElementT >
679  static void zeroFillBuffer( BufferElementT** bufferPtr,
680  const unsigned int& bufferLinesNumber, const unsigned int&
681  bufferColsNumber )
682  {
683  BufferElementT* linePtr = 0;
684  unsigned int col = 0;
685  for( unsigned int line = 0 ; line < bufferLinesNumber ; ++line )
686  {
687  linePtr = bufferPtr[ line ];
688  for( col = 0 ; col < bufferColsNumber ; ++col )
689  {
690  linePtr[ col ] = 0;
691  }
692  }
693  };
694 
695  /*!
696  \brief Moravec interest points locator.
697 
698  \param rasterData The loaded raster data.
699 
700  \param interestPoints The found raster 1 interest points (coords related to rasterData lines/cols).
701 
702  \param tifFileName Tif file name.
703  */
704  static void createTifFromMatrix(
705  const DoublesMatrix& rasterData,
706  const InterestPointsSetT& interestPoints,
707  const std::string& tifFileName );
708 
709  /*!
710  \brief Gaussian Filter.
711 
712  \param inputData The input data.
713 
714  \param outputData The output data.
715 
716  \param iterationsNumber The number of filter iterations.
717 
718  \return true if ok, false on errors.
719  */
720  static bool applyGaussianFilter(
721  const DoublesMatrix& inputData,
722  DoublesMatrix& outputData,
723  const unsigned int iterationsNumber );
724 
725  /*!
726  \brief Mean Filter.
727 
728  \param inputData The input data.
729 
730  \param outputData The output data.
731 
732  \param iterationsNumber The number of filter iterations.
733 
734  \return true if ok, false on errors.
735  */
736  static bool applyMeanFilter(
737  const FloatsMatrix& inputData,
738  FloatsMatrix& outputData,
739  const unsigned int iterationsNumber );
740 
741  /*!
742  \brief Create an integral image.
743 
744  \param inputData The input data.
745 
746  \param outputData The output data.
747 
748  \note The entry of an integral image IΣ(x) at a location x = (x, y) represents the sum of all pixels in the input image I of a rectangular region formed by the point x and the origi.
749 
750  \return true if ok, false on errors.
751  */
752  static bool createIntegralImage(
753  const FloatsMatrix& inputData,
754  FloatsMatrix& outputData );
755 
756  /*!
757  \brief Generate correlation features ( normalized - unit vector ) matrix for the given interes points.
758 
759  \param interestPoints The interest points (coords related to rasterData lines/cols).
760 
761  \param correlationWindowWidth The correlation window width used to correlate points between the images.
762 
763  \param rasterData The loaded raster data.
764 
765  \param features The generated features matrix (one feature per line, one feature per interes point).
766 
767  \param validInteresPoints The valid interest pionts related to each feature inside the features matrix (some interest points may be invalid and are removed).
768 
769  \return true if ok, false on errors.
770  */
771  static bool generateCorrelationFeatures(
772  const InterestPointsSetT& interestPoints,
773  const unsigned int correlationWindowWidth,
774  const FloatsMatrix& rasterData,
775  FloatsMatrix& features,
776  InterestPointsSetT& validInteresPoints );
777 
778  /*!
779  \brief Generate a Surf features matrix for the given interes points.
780 
781  \param interestPoints The interest points (coords related to rasterData lines/cols).
782 
783  \param integralRasterData The integral raster data.
784 
785  \param validInterestPoints The valid interest points.
786 
787  \param features The generated features matrix (one feature per line, one feature per interest point).
788 
789  \return true if ok, false on errors.
790  */
791  static bool generateSurfFeatures(
792  const InterestPointsSetT& interestPoints,
793  const FloatsMatrix& integralRasterData,
794  InterestPointsSetT& validInterestPoints,
795  FloatsMatrix& features );
796 
797  /*!
798  \brief Save the generated features to tif files.
799 
800  \param features The features to be saved.
801 
802  \param validInteresPoints The interest pionts related to each feature inside the features matrix.
803 
804  \param fileNameStart The output file name beginning.
805  */
806  static void features2Tiff(
807  const DoublesMatrix& features,
808  const InterestPointsSetT& interestPoints,
809  const std::string& fileNameBeginning );
810 
811  /*!
812  \brief Match each feature using correlation.
813 
814  \param featuresSet1 Features set 1.
815 
816  \param featuresSet2 Features set 2.
817 
818  \param interestPointsSet1 The interest pionts set 1.
819 
820  \param interestPointsSet2 The interest pionts set 2.
821 
822  \param maxPt1ToPt2PixelDistance Zero (disabled) or the maximum distance (pixels) between a point from set 1 to a point from set 1 (points beyond this distance will not be correlated and will have zero as correlation value).
823 
824  \param enableMultiThread Enable/disable the use of threads.
825 
826  \param minAllowedAbsCorrelation The minimum acceptable absolute correlation value when matching features (when applicable).
827 
828  \param matchedPoints The matched points.
829 
830  \note Each matched point feature value ( MatchedInterestPoint::m_feature ) will be set to the absolute value of the correlation between then.
831  */
832  static bool executeMatchingByCorrelation(
833  const FloatsMatrix& featuresSet1,
834  const FloatsMatrix& featuresSet2,
835  const InterestPointsSetT& interestPointsSet1,
836  const InterestPointsSetT& interestPointsSet2,
837  const unsigned int maxPt1ToPt2PixelDistance,
838  const unsigned int enableMultiThread,
839  const double minAllowedAbsCorrelation,
840  MatchedInterestPointsSetT& matchedPoints );
841 
842  /*!
843  \brief Correlation/Euclidean match thread entry.
844 
845  \param paramsPtr A pointer to the thread parameters.
846  */
847  static void executeMatchingByCorrelationThreadEntry(
848  ExecuteMatchingByCorrelationThreadEntryParams* paramsPtr);
849 
850  /*!
851  \brief Match each feature using eucliean distance.
852 
853  \param featuresSet1 Features set 1.
854 
855  \param featuresSet2 Features set 2.
856 
857  \param interestPointsSet1 The interest pionts set 1.
858 
859  \param interestPointsSet2 The interest pionts set 2.
860 
861  \param maxPt1ToPt2PixelDistance Zero (disabled) or the maximum distance (pixels) between a point from set 1 to a point from set 1 (points beyond this distance will not be correlated and will have zero as correlation value).
862 
863  \param maxEuclideanDist //!< The maximum acceptable euclidean distance when matching features.
864 
865  \param enableMultiThread Enable/disable the use of threads.
866 
867  \param matchedPoints The matched points.
868 
869  \note Each matched point feature value ( MatchedInterestPoint::m_feature ) will be set to the inverse normalized distance in the range (0,1].
870  */
871  static bool executeMatchingByEuclideanDist(
872  const FloatsMatrix& featuresSet1,
873  const FloatsMatrix& featuresSet2,
874  const InterestPointsSetT& interestPointsSet1,
875  const InterestPointsSetT& interestPointsSet2,
876  const unsigned int maxPt1ToPt2PixelDistance,
877  const double maxEuclideanDist,
878  const unsigned int enableMultiThread,
879  MatchedInterestPointsSetT& matchedPoints );
880 
881 
882  /*!
883  \brief Correlation/Euclidean match thread entry.
884 
885  \param paramsPtr A pointer to the thread parameters.
886  */
887  static void executeMatchingByEuclideanDistThreadEntry(
888  ExecuteMatchingByEuclideanDistThreadEntryParams* paramsPtr);
889 
890  /*!
891  \brief Print the given matrix to std::out.
892 
893  \param matrix The given matrix.
894  */
895  template < typename ElementT >
896  static void printMatrix( const te::rp::Matrix< ElementT >& matrix )
897  {
898  std::cout << std::endl;
899 
900  for( unsigned int line = 0 ; line < matrix.getLinesNumber() ; ++line )
901  {
902  std::cout << std::endl << "[";
903 
904  for( unsigned int col = 0 ; col < matrix.getColumnsNumber() ; ++col )
905  {
906  std::cout << " ";
907  std::cout << matrix( line, col );
908  }
909 
910  std::cout << "]";
911  }
912 
913  std::cout << std::endl;
914  }
915 
916  /*!
917  \brief Print the given buffer to std::out.
918 
919  \param buffer Buffer pointer.
920 
921  \param nLines Number of lines.
922 
923  \param nCols Number of columns.
924  */
925  static void printBuffer( double** buffer, const unsigned int nLines,
926  const unsigned int nCols );
927 
928  /*!
929  \brief Return a sum of all pixels inside a box over the given integral image buffer.
930 
931  \param bufferPtr Buffer pointer.
932 
933  \param upperLeftX Box upper left X.
934 
935  \param upperLeftY Box upper left Y.
936 
937  \param lowerRightX Box lower right X.
938 
939  \param lowerRightY Box lower right X.
940  */
941  template< typename BufferType >
942  inline static float getIntegralBoxSum( BufferType& buffer,
943  const unsigned int& upperLeftX, const unsigned int& upperLeftY,
944  const unsigned int& lowerRightX, const unsigned int& lowerRightY )
945  {
946  return buffer[ lowerRightY ][ lowerRightX ]
947  - ( ( upperLeftY ) ? buffer[ upperLeftY - 1 ][ lowerRightX ] : 0 )
948  - ( ( upperLeftX ) ? buffer[ lowerRightY ][ upperLeftX - 1 ] : 0 )
949  + ( ( ( upperLeftX != 0 ) && ( upperLeftY != 0 ) ) ? buffer[ upperLeftY - 1 ][ upperLeftX - 1 ] : 0 );
950  };
951 
952  /*!
953  \brief Return a SURF box filter Dxx derivative centered over the given position from the given integral image buffer.
954 
955  \param bufferPtr Buffer pointer.
956 
957  \param centerX Center X.
958 
959  \param centerY Center Y.
960 
961  \param lobeWidth Filter lobe width.
962 
963  \param lobeRadius Filter lobe radius.
964  */
965  inline static float getSurfDyyDerivative( float** bufferPtr,
966  const unsigned int& centerX, const unsigned int& centerY,
967  const unsigned int& lobeWidth, const unsigned int& lobeRadius )
968  {
969  return
970  getIntegralBoxSum(
971  bufferPtr,
972  ( centerX + 1 - lobeWidth ),
973  ( centerY - lobeWidth - lobeRadius ),
974  ( centerX + lobeWidth - 1 ),
975  ( centerY + lobeWidth + lobeRadius ) )
976  - ( 3.0f *
977  getIntegralBoxSum(
978  bufferPtr,
979  ( centerX + 1 - lobeWidth ),
980  ( centerY - lobeRadius ),
981  ( centerX + lobeWidth - 1 ),
982  ( centerY + lobeRadius ) ) );
983  };
984 
985  /*!
986  \brief Return a SURF box filter Dyy derivative centered over the given position from the given integral image buffer.
987 
988  \param bufferPtr Buffer pointer.
989 
990  \param centerX Center X.
991 
992  \param centerY Center Y.
993 
994  \param lobeWidth Filter lobe width.
995 
996  \param lobeRadius Filter lobe radius.
997  */
998  inline static float getSurfDxxDerivative( float** bufferPtr,
999  const unsigned int& centerX, const unsigned int& centerY,
1000  const unsigned int& lobeWidth, const unsigned int& lobeRadius )
1001  {
1002  return
1003  getIntegralBoxSum(
1004  bufferPtr,
1005  ( centerX - lobeWidth - lobeRadius ),
1006  ( centerY + 1 - lobeWidth ),
1007  ( centerX + lobeWidth + lobeRadius ),
1008  ( centerY + lobeWidth - 1 ) )
1009  - 3.0f *
1010  getIntegralBoxSum(
1011  bufferPtr,
1012  ( centerX - lobeRadius ),
1013  ( centerY + 1 - lobeWidth ),
1014  ( centerX + lobeRadius ),
1015  ( centerY + lobeWidth - 1 ) );
1016  };
1017 
1018  /*!
1019  \brief Return a SURF box filter Dxy derivative centered over the given position from the given integral image buffer.
1020 
1021  \param bufferPtr Buffer pointer.
1022 
1023  \param centerX Center X.
1024 
1025  \param centerY Center Y.
1026 
1027  \param lobeWidth Filter lobe width.
1028  */
1029  inline static float getSurfDxyDerivative( float** bufferPtr,
1030  const unsigned int& centerX, const unsigned int& centerY,
1031  const unsigned int& lobeWidth )
1032  {
1033  return
1034  // upper-left filter lobe
1035  getIntegralBoxSum(
1036  bufferPtr,
1037  ( centerX - lobeWidth ),
1038  ( centerY - lobeWidth ),
1039  ( centerX - 1 ),
1040  ( centerY - 1 ) )
1041  +
1042  // lower-right filter lobe
1043  getIntegralBoxSum(
1044  bufferPtr,
1045  ( centerX + 1 ),
1046  ( centerY + 1 ),
1047  ( centerX + lobeWidth ),
1048  ( centerY + lobeWidth ) )
1049  -
1050  // upper-right filter lobe
1051  getIntegralBoxSum(
1052  bufferPtr,
1053  ( centerX + 1 ),
1054  ( centerY - lobeWidth ),
1055  ( centerX + lobeWidth ),
1056  ( centerY - 1 ) )
1057  -
1058  // lower-left filter lobe
1059  getIntegralBoxSum(
1060  bufferPtr,
1061  ( centerX - lobeWidth ),
1062  ( centerY + 1 ),
1063  ( centerX - 1 ),
1064  ( centerY + lobeWidth ) );
1065  };
1066 
1067  /*!
1068  \brief Return a Haar X intesity vector for the window centered at the given point.
1069 
1070  \param buffer Integral image buffer.
1071 
1072  \param centerX Center X.
1073 
1074  \param centerY Center Y.
1075 
1076  \param radius Window radius.
1077  */
1078  template< typename BufferType >
1079  inline static float getHaarXVectorIntensity( BufferType& buffer,
1080  const unsigned int& centerX, const unsigned int& centerY,
1081  const unsigned int& radius )
1082  {
1083  return
1084  getIntegralBoxSum(
1085  buffer,
1086  ( centerX + 1 ),
1087  ( centerY - radius ),
1088  ( centerX + radius ),
1089  ( centerY + radius ) )
1090  -
1091  getIntegralBoxSum(
1092  buffer,
1093  ( centerX - radius ),
1094  ( centerY - radius ),
1095  ( centerX - 1 ),
1096  ( centerY + radius ) );
1097  };
1098 
1099  /*!
1100  \brief Return a Haar Y intesity vector for the window centered at the given point.
1101 
1102  \param buffer Integral image buffer.
1103 
1104  \param centerX Center X.
1105 
1106  \param centerY Center Y.
1107 
1108  \param radius Window radius.
1109  */
1110  template< typename BufferType >
1111  inline static float getHaarYVectorIntensity( BufferType& buffer,
1112  const unsigned int& centerX, const unsigned int& centerY,
1113  const unsigned int& radius )
1114  {
1115  return
1116  getIntegralBoxSum(
1117  buffer,
1118  ( centerX - radius ),
1119  ( centerY - radius ),
1120  ( centerX + radius ),
1121  ( centerY - 1 ) )
1122  -
1123  getIntegralBoxSum(
1124  buffer,
1125  ( centerX - radius ),
1126  ( centerY + 1 ),
1127  ( centerX + radius ),
1128  ( centerY + radius ) );
1129  };
1130 
1131  /*!
1132  \brief Return the surf octave filter step size (width).
1133 
1134  \param octaveIndex Octave index (starting from zero).
1135  */
1136  inline static unsigned int getSurfOctaveFilterStepSize( const unsigned int& octaveIndex )
1137  {
1138  return (unsigned int)std::pow( 2.0, (double)(octaveIndex + 1) );
1139  };
1140 
1141  /*!
1142  \brief Return the surf octave base filter size (width).
1143 
1144  \param octaveIndex Octave index (starting from zero).
1145  */
1146  inline static unsigned int getSurfOctaveBaseFilterSize( const unsigned int& octaveIndex )
1147  {
1148  return 3 + ( 3 * getSurfOctaveFilterStepSize( octaveIndex ) );
1149  };
1150 
1151  /*!
1152  \brief Return the surf octave filter size (width).
1153 
1154  \param octaveIndex Octave index (starting from zero).
1155 
1156  \param scaleIndex Scale index (starting from zero).
1157  */
1158  inline static unsigned int getSurfFilterSize( const unsigned int& octaveIndex,
1159  const unsigned int& scaleIndex )
1160  {
1161  return getSurfOctaveBaseFilterSize( octaveIndex ) +
1162  ( 3 * ( getSurfOctaveFilterStepSize( octaveIndex ) * scaleIndex ) );
1163  };
1164 
1165  };
1166 
1167  } // end namespace rp
1168 } // end namespace te
1169 
1170 #endif
1171 
static float getSurfDyyDerivative(float **bufferPtr, const unsigned int &centerX, const unsigned int &centerY, const unsigned int &lobeWidth, const unsigned int &lobeRadius)
Return a SURF box filter Dxx derivative centered over the given position from the given integral imag...
boost::mutex * m_interestPointsAccessMutexPtr
A pointer to a valid mutex to control the output interest points container access.
double m_moravecMinAbsCorrelation
The minimum acceptable absolute correlation value when matching features (when applicable), default:0.5, valid range: [0,1].
unsigned int m_moravecGaussianFilterIterations
The number of noise Gaussin iterations, when applicable (used to remove image noise, zero will disable the Gaussian Filter, default:1).
Generic template matrix.
unsigned int m_moravecCorrelationWindowWidth
The correlation window width used to correlate points between the images (minimum 3...
unsigned int m_maxInterestPointsPerRasterLinesBlock
The maximum number of points to find for each raster lines block.
te::rst::Interpolator::Method m_interpMethod
The raster interpolator method (default:NearestNeighbor).
std::list< InterestPointT > InterestPointsListT
bool m_enableProgress
Enable/Disable the progress interface (default:false).
static unsigned int getSurfFilterSize(const unsigned int &octaveIndex, const unsigned int &scaleIndex)
Return the surf octave filter size (width).
std::vector< te::gm::GTParameters::TiePoint > m_tiePoints
The generated tie-pionts (te::gm::GTParameters::TiePoint::first are raster 1 line/column indexes...
unsigned int m_maxInterestPointsPerRasterLinesBlock
The maximum number of points to find for each raster lines block for each scale.
static unsigned int getSurfOctaveFilterStepSize(const unsigned int &octaveIndex)
Return the surf octave filter step size (width).
static float getIntegralBoxSum(BufferType &buffer, const unsigned int &upperLeftX, const unsigned int &upperLeftY, const unsigned int &lowerRightX, const unsigned int &lowerRightY)
Return a sum of all pixels inside a box over the given integral image buffer.
Tie points locator.
static float getSurfDxxDerivative(float **bufferPtr, const unsigned int &centerX, const unsigned int &centerY, const unsigned int &lobeWidth, const unsigned int &lobeRadius)
Return a SURF box filter Dyy derivative centered over the given position from the given integral imag...
InterestPointsSetT * m_interestPointsPtr
A pointer to a valid interest points container.
te::rst::Raster const * m_inMaskRaster2Ptr
Optional one band input mask raster 2 (tie-points will not be generated inside mask image areas marke...
boost::mutex * m_rastaDataAccessMutexPtr
A pointer to a valid mutex to controle raster data access.
unsigned int m_moravecWindowWidth
The Moravec window width used to locate canditate tie-points (minimum 3, default: 5 )...
Raster Processing algorithm base interface class.
unsigned int m_raster2TargetAreaWidth
The raster 2 target area width (default:0 - The entire raster will be considered).
std::auto_ptr< te::gm::GeometricTransformation > m_transformationPtr
The generated geometric transformation with the base mininum required tie-points set ( depending on t...
unsigned int * m_nextRasterLinesBlockToProcessValuePtr
A pointer to a valid counter to control the blocks processing sequence.
std::vector< unsigned int > m_inRaster1Bands
Bands to be used from the input raster 1.
FloatsMatrix const * m_integralRasterDataPtr
The integral image raster data.
MatchedInterestPointsT(const MatchedInterestPointsT &other)
bool m_enableGeometryFilter
Enable/disable the geometry filter/outliers remotion (default:true).
unsigned int m_raster2TargetAreaColStart
The first column of the raster 2 target area to process (default:0 - The entire raster will be consid...
float m_feature3
Interest point feature 3 value.
unsigned int getLinesNumber() const
The number of current matrix lines.
Definition: Matrix.h:665
unsigned int m_maxPt1ToPt2Distance
Zero (disabled) or the maximum distance between a point from set 1 to a point from set 1 (points beyo...
static float getHaarYVectorIntensity(BufferType &buffer, const unsigned int &centerX, const unsigned int &centerY, const unsigned int &radius)
Return a Haar Y intesity vector for the window centered at the given point.
InterestPointsSetT * m_interestPointsPtr
A pointer to a valid interest points container.
unsigned int m_scalesNumber
Thread return value pointer.
unsigned int m_maxPt1ToPt2Distance
Zero (disabled) or the maximum distance between a point from set 1 to a point from set 1 (points beyo...
unsigned int m_maxRasterLinesBlockMaxSize
The maximum lines number of each raster block to process.
Raster Processing algorithm base interface.
Definition: Algorithm.h:42
UCharsMatrix const * m_maskRasterDataPtr
The loaded mask raster data pointer (or zero if no mask is avaliable).
The parameters passed to the executeMatchingByEuclideanDistThreadEntry method.
double m_geomTransfMaxError
The maximum allowed transformation error (pixel units, default:2).
Method
Allowed interpolation methods.
Definition: Interpolator.h:58
std::multiset< InterestPointT > InterestPointsSetT
boost::mutex * m_rastaDataAccessMutexPtr
A pointer to a valid mutex to controle raster data access.
double m_pixelSizeXRelation
The pixel resolution relation m_pixelSizeXRelation = raster1_pixel_res_x / raster2_pixel_res_x (defau...
TiePointsLocator input parameters.
static void zeroFillBuffer(BufferElementT **bufferPtr, const unsigned int &bufferLinesNumber, const unsigned int &bufferColsNumber)
Fill a buffer with zeroes.
unsigned int m_maxR1ToR2Offset
The maximum offset (pixels units) between a raster 1 point end the respective raster 2 point (default...
unsigned int m_raster2TargetAreaLineStart
The first line of the raster 2 target area to process (default:0 - The entire raster will be consider...
MatchedInterestPointsT(const InterestPointT &point1, const InterestPointT &point2, const float &feature)
unsigned int m_raster1TargetAreaLineStart
The first line of the raster 1 target area to process (default:0 - The entire raster will be consider...
unsigned int m_surfOctavesNumber
The number of octaves to generate, when applicable (default: 3, minimum:1).
float m_feature2
Interest point feature 2 value.
unsigned int m_raster2TargetAreaHeight
The raster 2 target area height (default:0 - The entire raster will be considered).
unsigned int m_octavesNumber
The number of octaves to generate (minimum:1).
unsigned int m_moravecWindowWidth
Thread return value pointer.
std::string m_geomTransfName
The name of the geometric transformation used to ensure tie-points consistency (see each te::gm::GTFa...
static float getHaarXVectorIntensity(BufferType &buffer, const unsigned int &centerX, const unsigned int &centerY, const unsigned int &radius)
Return a Haar X intesity vector for the window centered at the given point.
InteresPointsLocationStrategyType m_interesPointsLocationStrategy
The strategy used to locate interest points (default:SurfStrategyT).
boost::mutex * m_interestPointsAccessMutexPtr
A pointer to a valid mutex to control the output interest points container access.
bool operator<(const MatchedInterestPointsT &other) const
static void roolUpBuffer(BufferElementT **bufferPtr, const unsigned int &bufferLinesNumber)
RoolUp a buffer of lines.
std::vector< unsigned int > m_inRaster2Bands
Bands to be used from the input raster 2.
The parameters passed to the matchCorrelationEuclideanThreadEntry method.
A generic template matrix.
Definition: Matrix.h:50
double m_geometryFilterAssurance
Geometry assurance (the error-free selection percent assurance) - valid range (0-1) - default:0...
The parameters passed to the surfLocatorThreadEntry method.
float m_feature1
Interest point feature 1 value.
unsigned int getColumnsNumber() const
The number of current matrix columns.
Definition: Matrix.h:672
double m_pixelSizeYRelation
The pixel resolution relation m_pixelSizeYRelation = raster1_pixel_res_y / raster2_pixel_res_y (defau...
double m_surfMaxNormEuclideanDist
The maximum acceptable euclidean distance when matching features (when applicable), default:0.5, valid range: [0,1].
InterestPointT(const InterestPointT &other)
te::rst::Raster const * m_inMaskRaster1Ptr
Optional one band input mask raster 1 (tie-points will not be generated inside mask image areas marke...
Raster Processing algorithm output parameters base interface.
An abstract class for raster data strucutures.
Definition: Raster.h:70
This class can be used to inform the progress of a task.
Definition: TaskProgress.h:53
unsigned int m_raster1TargetAreaColStart
The first column of the raster 2 target area to process (default:0 - The entire raster will be consid...
unsigned int m_maxRasterLinesBlockMaxSize
The maximum lines number of each raster block to process.
static float getSurfDxyDerivative(float **bufferPtr, const unsigned int &centerX, const unsigned int &centerY, const unsigned int &lobeWidth)
Return a SURF box filter Dxy derivative centered over the given position from the given integral imag...
unsigned int m_raster1TargetAreaWidth
The raster 1 target area width (default:0 - The entire raster will be considered).
UCharsMatrix const * m_maskRasterDataPtr
The loaded mask raster data pointer (or zero if no mask is avaliable).
te::rst::Raster const * m_inRaster1Ptr
Input raster 1.
bool m_enableMultiThread
Enable/Disable the use of multi-threads (default:true).
const MatchedInterestPointsT & operator=(const MatchedInterestPointsT &other)
unsigned int m_maxTiePoints
The maximum number of tie-points to generate (default=0 - Automatically found).
static void printMatrix(const te::rp::Matrix< ElementT > &matrix)
Print the given matrix to std::out.
bool operator<(const InterestPointT &other) const
unsigned int m_surfScalesNumber
The number of sub-sampling scales to generate, when applicable (default:4, minimum:3).
unsigned int m_raster1TargetAreaHeight
The raster 1 target area height (default:0 - The entire raster will be considered).
double m_rastersRescaleFactor
Global rescale factor to apply to all input rasters (default:1, valid range: non-zero positive values...
te::rst::Raster const * m_inRaster2Ptr
Input raster 2.
const InterestPointT & operator=(const InterestPointT &other)
std::multiset< MatchedInterestPointsT > MatchedInterestPointsSetT
static unsigned int getSurfOctaveBaseFilterSize(const unsigned int &octaveIndex)
Return the surf octave base filter size (width).
The parameters passed to the moravecLocatorThreadEntry method.
FloatsMatrix const * m_rasterDataPtr
The loaded raster data.
unsigned int * m_nextRasterLinesBlockToProcessValuePtr
A pointer to a valid counter to control the blocks processing sequence.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:91
TiePointsLocator::InputParameters m_inputParameters
TiePointsLocator input execution parameters.
Raster Processing algorithm input parameters base interface.
bool m_isInitialized
Tells if this instance is initialized.
TiePointsLocator output parameters.