30 #ifndef DIGIKAM_SHAPE_PREDICTOR_H
31 #define DIGIKAM_SHAPE_PREDICTOR_H
39 #include "digikam_opencv.h"
94 const std::vector<float>&
operator()(
const std::vector<float>& feature_pixel_values,
95 unsigned long& i)
const;
109 inline std::vector<T>
location(
const std::vector<T>& shape,
112 std::vector<T> temp(2);
113 temp[0] = shape[idx * 2 ];
114 temp[1] = shape[idx * 2 + 1];
122 const std::vector<float>& pt);
137 const std::vector<std::vector<float> >& pixel_coordinates,
138 std::vector<unsigned long>& anchor_idx,
139 std::vector<std::vector<float> >& deltas);
144 const std::vector<float>& to_shape);
159 bool pointContained(
const cv::Rect& rect,
const std::vector<float>& point);
180 const cv::Rect& rect,
181 const std::vector<float>& current_shape,
182 const std::vector<float>& reference_shape,
183 const std::vector<unsigned long>& reference_pixel_anchor_idx,
184 const std::vector<std::vector<float> >& reference_pixel_deltas,
185 std::vector<float>& feature_pixel_values);
199 const cv::Rect& rect)
const;
204 std::vector<std::vector<RedEye::RegressionTree> >
forests;
206 std::vector<std::vector<std::vector<float> > >
deltas;
Definition: fullobjectdetection.h:43
Definition: shapepredictor.h:190
unsigned long num_features() const
Definition: shapepredictor.cpp:345
std::vector< float > initial_shape
Definition: shapepredictor.h:203
std::vector< std::vector< unsigned long > > anchor_idx
Definition: shapepredictor.h:205
ShapePredictor()
Definition: shapepredictor.cpp:336
std::vector< std::vector< std::vector< float > > > deltas
Definition: shapepredictor.h:206
FullObjectDetection operator()(const cv::Mat &img, const cv::Rect &rect) const
Definition: shapepredictor.cpp:360
std::vector< std::vector< RedEye::RegressionTree > > forests
Definition: shapepredictor.h:204
unsigned long num_parts() const
Definition: shapepredictor.cpp:340
PointTransformAffine unnormalizingTform(const cv::Rect &rect)
Definition: shapepredictor.cpp:250
void extractFeaturePixelValues(const cv::Mat &img_, const cv::Rect &rect, const std::vector< float > ¤t_shape, const std::vector< float > &reference_shape, const std::vector< unsigned long > &reference_pixel_anchor_idx, const std::vector< std::vector< float > > &reference_pixel_deltas, std::vector< float > &feature_pixel_values)
Definition: shapepredictor.cpp:302
void createShapeRelativeEncoding(const std::vector< float > &shape, const std::vector< std::vector< float > > &pixel_coordinates, std::vector< unsigned long > &anchor_idx, std::vector< std::vector< float > > &deltas)
Definition: shapepredictor.cpp:169
unsigned long right_child(unsigned long idx)
Definition: shapepredictor.cpp:57
QDataStream & operator<<(QDataStream &dataStream, const SplitFeature &sp)
Definition: shapepredictor.cpp:38
unsigned long nearestShapePoint(const std::vector< float > &shape, const std::vector< float > &pt)
Definition: shapepredictor.cpp:144
std::vector< T > location(const std::vector< T > &shape, unsigned long idx)
Definition: shapepredictor.h:109
PointTransformAffine normalizingTform(const cv::Rect &rect)
Definition: shapepredictor.cpp:216
PointTransformAffine findTformBetweenShapes(const std::vector< float > &from_shape, const std::vector< float > &to_shape)
Definition: shapepredictor.cpp:186
unsigned long left_child(unsigned long idx)
Definition: shapepredictor.cpp:52
bool pointContained(const cv::Rect &rect, const std::vector< float > &point)
Definition: shapepredictor.cpp:283
QDataStream & operator>>(QDataStream &dataStream, SplitFeature &sp)
Definition: shapepredictor.cpp:45
Definition: datefolderview.cpp:43
Definition: shapepredictor.h:77
std::vector< SplitFeature > splits
Definition: shapepredictor.h:78
std::vector< std::vector< float > > leaf_values
Definition: shapepredictor.h:79
unsigned long num_leaves() const
Definition: shapepredictor.cpp:64
const std::vector< float > & operator()(const std::vector< float > &feature_pixel_values, unsigned long &i) const
Definition: shapepredictor.cpp:69
Definition: shapepredictor.h:53
unsigned long idx1
Definition: shapepredictor.h:54
float thresh
Definition: shapepredictor.h:56
unsigned long idx2
Definition: shapepredictor.h:55