SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
CoreThresholdPartitionStep.cpp
Go to the documentation of this file.
1
25
27
28namespace SourceXtractor {
29
31 m_snr_level(snr_level), m_min_pixel_count(min_pixel_count) {
32}
33
35 long int n_snr_level(0);
36
37 // get the SNR image
38 const auto snr_image = source->getProperty<DetectionFrameImages>().getLockedImage(LayerSignalToNoiseMap);
39
40 // go over all pixels
41 for (auto pixel_coord : source->getProperty<PixelCoordinateList>().getCoordinateList())
42 // enhance the counter if the SNR is above the level
43 if (snr_image->getValue(pixel_coord.m_x, pixel_coord.m_y) >= m_snr_level)
44 n_snr_level += 1;
45
46 // check whether the pixel # is above the threshold
49 sources.emplace_back(std::move(source));
50 }
51 return sources;
52}
53
54} // SEImplementation namespace
55
std::vector< std::unique_ptr< SourceInterface > > partition(std::unique_ptr< SourceInterface > source) const override
CoreThresholdPartitionStep(double snr_level, unsigned int min_pixel_count)
Constructor.
T move(T... args)
@ LayerSignalToNoiseMap
Definition Frame.h:42