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);
58 return BackgroundModel(background_level_map, background_variance_map, 1.0);
68 for (
int y=0;
y < image->getHeight();
y++) {
69 for (
int x=0;
x < image->getWidth();
x++) {
70 auto value = image->getValue(
x,
y);
72 variance += value * value;