34 : m_down_scaling(down_scaling) {
35 if (image !=
nullptr) {
38 if (image->getWidth() != image->getHeight()) {
40 << image->getWidth() <<
" x " << image->getHeight();
42 if (image->getWidth() % 2 == 0) {
47 if (down_scaling != 1.0) {
48 int new_size = image->getWidth() * down_scaling;
49 new_size += (new_size % 2 == 0) ? 1 : 0;
55 auto psf_sum =
std::accumulate(new_image->getData().begin(), new_image->getData().end(), 0.);
56 for (
auto& pixel : new_image->getData()) {