50 for (
size_t i=0; i<getDependency<DetectionImageConfig>().getExtensionsNb(); i++) {
63 weight_threshold, detection_image_coordinate_system, detection_image_gain,
64 detection_image_saturation, interpolation_gap);
65 detection_frame->setLabel(boost::filesystem::path(detection_image_path).stem().
string());
68 auto background_model = background_analyzer->analyzeBackground(detection_frame->getOriginalImage(), weight_image,
71 detection_frame->setBackgroundLevel(background_model.getLevelMap(), background_model.getMedianRms());
73 if (weight_image !=
nullptr) {
74 if (is_weight_absolute) {
75 detection_frame->setVarianceMap(weight_image);
78 auto bck_scaling_factor = background_model.getScalingFactor();
80 detection_frame->setVarianceMap(scaled_image);
81 detection_frame->setVarianceThreshold(detection_frame->getVarianceThreshold()*bck_scaling_factor);
85 detection_frame->setVarianceMap(background_model.getVarianceMap());
90 if (background_config.isBackgroundLevelAbsolute()) {
92 detection_image->getWidth(), detection_image->getHeight(), background_config.getBackgroundLevel());
94 detection_frame->setBackgroundLevel(background, background_model.getMedianRms());
101 if (background_config.isDetectionThresholdAbsolute()) {
102 detection_frame->setDetectionThreshold(background_config.getDetectionThreshold());
106 detection_frame->setMetadata(img_source->getMetadata());
108 detection_frame->setHduIndex(i);
112 m_frames.emplace_back(detection_frame);