mirror of
https://github.com/2martens/uni.git
synced 2026-05-06 11:26:25 +02:00
[CCV] Added ability to compute feature maps
Signed-off-by: Jim Martens <github@2martens>
This commit is contained in:
@ -96,6 +96,15 @@ void lab_pyramid::compute_dog(lab_pyramid center, lab_pyramid surround, int numb
|
||||
}
|
||||
}
|
||||
|
||||
void lab_pyramid::compute_feature_maps() {
|
||||
_cs_F_l = across_scale_addition(_cs_contrast_l);
|
||||
_sc_F_l = across_scale_addition(_sc_contrast_l);
|
||||
_cs_F_a = across_scale_addition(_cs_contrast_a);
|
||||
_sc_F_a = across_scale_addition(_sc_contrast_a);
|
||||
_cs_F_b = across_scale_addition(_cs_contrast_b);
|
||||
_sc_F_b = across_scale_addition(_sc_contrast_b);
|
||||
}
|
||||
|
||||
cv::Mat lab_pyramid::across_scale_addition(const std::vector<cv::Mat> &scale_images) {
|
||||
cv::Mat result = scale_images.front();
|
||||
cv::Size original_size = scale_images.front().size();
|
||||
|
||||
@ -16,6 +16,12 @@ private:
|
||||
static std::vector<cv::Mat> _sc_contrast_a;
|
||||
static std::vector<cv::Mat> _cs_contrast_b;
|
||||
static std::vector<cv::Mat> _sc_contrast_b;
|
||||
static cv::Mat _cs_F_l;
|
||||
static cv::Mat _sc_F_l;
|
||||
static cv::Mat _cs_F_a;
|
||||
static cv::Mat _cs_F_b;
|
||||
static cv::Mat _sc_F_a;
|
||||
static cv::Mat _sc_F_b;
|
||||
static int _number_of_layers;
|
||||
public:
|
||||
const static int COLOR_L = 0;
|
||||
@ -61,6 +67,12 @@ public:
|
||||
*/
|
||||
void static compute_dog(lab_pyramid center, lab_pyramid surround, int number_of_layers);
|
||||
|
||||
/**
|
||||
* Computes the feature maps.
|
||||
* Has to be called after compute_dog.
|
||||
*/
|
||||
void static compute_feature_maps();
|
||||
|
||||
/**
|
||||
* Takes the scale images, adds them up and returns the result.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user