FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
TemplateMatching.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <FAST/ProcessObject.hpp>
4 
5 namespace fast {
6 
7 class Image;
8 
13 class FAST_EXPORT TemplateMatching : public ProcessObject {
15  public:
16  enum class MatchingMetric {
17  NORMALIZED_CROSS_CORRELATION,
18  SUM_OF_SQUARED_DIFFERENCES,
19  SUM_OF_ABSOLUTE_DIFFERENCES,
20  };
26  void setRegionOfInterest(Vector2i center, Vector2i offset);
31  Vector2i getBestFitPixelPosition() const;
36  Vector2f getBestFitSubPixelPosition() const;
41  void setMatchingMetric(MatchingMetric type);
42  private:
44  void execute() override;
45 
46  MatchingMetric m_type = MatchingMetric::SUM_OF_ABSOLUTE_DIFFERENCES;
47  Vector2i m_center = Vector2i(-1, -1);
48  Vector2i m_offset;
49  Vector2i m_bestFitPosition;
50  std::shared_ptr<Image> outputScores;
51 
52 };
53 
54 }
fast
Definition: AffineTransformation.hpp:7
FAST_OBJECT
#define FAST_OBJECT(className)
Definition: Object.hpp:9
fast::TemplateMatching
Definition: TemplateMatching.hpp:13
ProcessObject.hpp
fast::TemplateMatching::MatchingMetric
MatchingMetric
Definition: TemplateMatching.hpp:16
fast::ProcessObject
Definition: ProcessObject.hpp:22