46 std::sort(image_copy->getData().begin(), image_copy->getData().end());
49 auto background_level = image_copy->getData()[image_copy->getData().size()/2];
54 auto background_variance =
getVariance(subtracted_image);
56 bck_model_logger.debug() <<
"bg: " << background_level <<
" var: " << background_variance;
66 Accessor accessor(image, Accessor::TOP_LEFT, 256, 1);
70 for (
int y = 0; y < accessor.getHeight(); y++) {
71 for (
int x = 0; x < accessor.getWidth(); x++) {
72 auto value = accessor.getValue(x, y);
74 variance += value * value;