vrcore  0.45
visuReal Messkern
 All Classes Files Functions Variables
CombinationsValidator.h
1 #pragma once
2 
3 
46  {
47  private:
48 
49  ContourVector &validatedContours_;
50  const ContourVector &contours_;
51  const RoiRect &rRoi_;
52  const CCITransformer *lpTransform_;
53 
54 /* int getVerticalMaxValue (int fact, Contour &contour);
55  int getVerticalMinValue (int fact, Contour &contour);
56 */
57  //meins:
58  double imCenter[2];//des Orig-bilds, also das Bild der Kam-Null, aequivalent: z-Achse.
59  double focalF;
60  double pixelSize;
61  //?? const size_t nrOfRoisRight;
62  /*Kamera-Null im Buegelsystem:*/
63  double nullCamB[3];
64  double approxGlassCenter[3]; //Kam1-Koords
65  double approxGlassCenterB[3];
66  double approxGlassRad;
67 
75  bool getMinMaxLengthAng( std::vector<double>& min,
76  std::vector<double>& max,
77  std::vector<double>& length, const cv::Mat angle);
79  std::vector<std::vector< bool> > combinations;
81  std::vector<double> relResiduals;
82  //alt: std::vector< double> residuals;
83  // std::vector<Mat> coordsInSplineSpace;
84  std::vector<double> maxDists;
86  std::vector<cv::Mat> coordsInSplineSpace;
87  //alt: std::vector<std::vector< double> > appCoeffs;
88 
100 //Vektor von Zeigern auf je eine! Kontur
101  std::vector< cv::Vec3d >** alignedContoursVec;
102 
103 //Vektor von Zeigern auf je eine! Kontur
104  std::vector< cv::Vec3d >* interpolatedContours;
105 //#endif
106 
107 /*Reserve:
108  int cutStraightParts ( std::vector< std::vector< cv::Vec3d >* >& contourPieces, const std::vector< cv::Vec3d >& contour);
109  int cutBackForth ( std::vector< std::vector< cv::Vec3d >*>& cutContours, const std::vector< cv::Vec3d >& contour);
110 */
111 
112  int approxPol (cv::Mat& coeffs, const std::vector< cv::Vec3d >& halfContour);
113 
124  int alignToClampSys ( std::vector< cv::Vec3d >**& alignedContours
125  , const ContourVector& contours);
126 
127  void contour3dToCMat( cv::Mat& xy, const std::vector<cv::Vec3d >* cont ) const;
128  void contourMToContour3d( std::vector<cv::Vec3d >& cont , const cv::Mat* xy ) const;
131  int evalInterpolation ( std::vector< cv::Vec3d >& interpContour_B
132  , const double interval[2], const cv::Vec3d polCoeffs);
133 
134  int interpolationToIm (Contour& interpContourIm, std::vector< cv::Vec3d > const interpContour_B);
135 
136 
137  int filterHorizAndVerts( std::vector<bool>& markVec
138  , const size_t nrAligned
139  , std::vector< cv::Vec3d >*& alignedContours);
141  size_t getMax(std::vector< cv::Vec3d >* vec, const size_t i) const;
143  std::vector< cv::Point > F__R;
144  //std::vector< cv::Point > F__L;
146  bool constructorSubstitute ();
147  void validateApproximations();
148 
149  public:
150  CombinationsValidator (ContourVector &validatedContours, const ContourVector &contours, const RoiRect &rRoi, const CCITransformer *lpTransform);
152 
153  void operator ()();
154 
155  };
156 
Definition: CombinationsValidator.h:45