SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
BackgroundConvolution.cpp
Go to the documentation of this file.
1
17/*
18 * BackgroundConvolution.cpp
19 *
20 * Created on: Oct 12, 2016
21 * Author: mschefer
22 */
23
28#include <ElementsKernel/Logging.h>
29
30namespace SourceXtractor {
31
33
49
51 double total = 0;
52
53 for (int y = 0; y < m_convolution_filter->getHeight(); y++) {
54 for (int x = 0; x < m_convolution_filter->getWidth(); x++) {
55 total += m_convolution_filter->getValue(x, y);
56 }
57 }
58
59 for (int y = 0; y < m_convolution_filter->getHeight(); y++) {
60 for (int x = 0; x < m_convolution_filter->getWidth(); x++) {
61 m_convolution_filter->setValue(x, y, m_convolution_filter->getValue(x, y) / total);
62 }
63 }
64
65}
66
67
68}
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
void debug(const std::string &logMessage)
static Logging getLogger(const std::string &name="")
std::shared_ptr< DetectionImage > processImage(std::shared_ptr< DetectionImage > image, std::shared_ptr< DetectionImage > variance, SeFloat threshold) const
std::shared_ptr< VectorImage< SeFloat > > m_convolution_filter
static std::shared_ptr< BufferedImage< T > > create(std::shared_ptr< const ImageSource > source, std::shared_ptr< TileManager > tile_manager=TileManager::getInstance())
static Elements::Logging logger
SeFloat32 SeFloat
Definition Types.h:32