ddt 1.4.0
 
Loading...
Searching...
No Matches
imageStats.hpp
Go to the documentation of this file.
1
10
11#ifndef IMAGESTATS_HPP_
12#define IMAGESTATS_HPP_
13
14//#include <algorithm>
15//#include <cctype>
16#include <list>
17#include <vector>
18
19//#include <sys/stat.h>
20
21#include <cpl.h>
22
23// namespace ddt {
24
29
33typedef struct CplStatistics {
37 double min_val;
41 double max_val;
45 double mean_val;
49 double rms_val;
57 double median_val;
59
60const size_t MAX_HIST_LENGTH = 10000;
61
67double MaxPixelCplImage(const cpl_image* const image);
68
78double MaxPixelCplImageWindow(const cpl_image* const image, const int llx,
79 const int lly, const int urx, const int ury);
80
86double MinPixelCplImage(const cpl_image* const image);
87
97double MinPixelCplImageWindow(const cpl_image* const image, const int llx,
98 const int lly, const int urx, const int ury);
99
105double MeanPixelCplImage(const cpl_image* const image);
106
112double MedianPixelCplImage(const cpl_image* const image);
113
123double MeanPixelCplImageWindow(const cpl_image* const image, const int llx,
124 const int lly, const int urx, const int ury);
125
131double RmsValueCplImage(const cpl_image* const image);
132
143double RmsValueCplImageWindow(const cpl_image* const image, const int llx,
144 const int lly, const int urx, const int ury);
145
152cpl_stats* StatsCplImage(const cpl_image* const image);
153
164cpl_stats* StatsCplImageWindow(const cpl_image* const image, const int llx,
165 const int lly, const int urx, const int ury);
166
173double RmsValueCplStats(const cpl_stats* const stats_cpl);
174
182CplStatistics* StatisticsCplImage(const cpl_image* const image);
183
195CplStatistics* StatisticsCplImageWindow(const cpl_image* const image,
196 const int llx, const int lly,
197 const int urx, const int ury);
198
206CplStatistics* StatisticsCplStats(const cpl_stats* const stats_cpl);
207
217bool FwhmValuesCplImage(const cpl_image* const image, const int x_pos,
218 const int y_pos, double* const fwhm_x,
219 double* const fwhm_y);
220
227cpl_apertures* AperturesCplImage(const cpl_image* const image,
228 const double sigma);
229
236bool AperturesCplImageDump(const char* const file_name,
237 const cpl_apertures* const apertures);
238
246bool MinMaxPixelsCplImage(const cpl_image* const image, double* const min,
247 double* const max);
248
258bool MedianMinMaxPixelsCplImage(const cpl_image* const image, double* const min,
259 double* const max,
260 const double kernel_size = 5);
261
267void CheckForNanValues(cpl_image* const image);
268
277double PixelValueCplImage(const cpl_image* const image, const int x_pos,
278 const int y_pos, int* const is_rejected);
279
287void GetHistogram(const cpl_image* const image, const int64_t min_value,
288 const int64_t max_value, std::vector<int>& distribution);
289
299void GetHistogramBins(const cpl_image* const image, const int64_t min_value,
300 const int64_t max_value, std::vector<int>& distribution);
301
311void GetCutValuesPercentage(const cpl_image* const image,
312 const double percentage, double* const min_value,
313 double* const max_value);
314
330bool GetIQEValues(const cpl_image* const sub_image, double* const x_axis_angle,
331 double* const background, double* const peak_above_background,
332 double* const fwhm_x, double* const fwhm_y,
333 double* const object_coord_x, double* const object_coord_y);
334
344bool MinMaxInvalidCheck(const cpl_image* const image, double* const min,
345 double* const max);
346
354double SigmaCplImage(const cpl_image* const image, double* const sigma);
355
367double SigmaCplImageWindow(const cpl_image* const image, const int llx,
368 const int lly, const int urx, const int ury,
369 double* const sigma);
370//} // namespace ddt
371
372#endif /* IMAGESTATS_HPP_ */
bool MedianMinMaxPixelsCplImage(const cpl_image *const image, double *const min, double *const max, const double kernel_size=5)
Definition imageStats.cpp:373
void CheckForNanValues(cpl_image *const image)
Definition imageStats.cpp:425
bool FwhmValuesCplImage(const cpl_image *const image, const int x_pos, const int y_pos, double *const fwhm_x, double *const fwhm_y)
Definition imageStats.cpp:266
CplStatistics * StatisticsCplStats(const cpl_stats *const stats_cpl)
Definition imageStats.cpp:240
double SigmaCplImage(const cpl_image *const image, double *const sigma)
Definition imageStats.cpp:719
void GetHistogram(const cpl_image *const image, const int64_t min_value, const int64_t max_value, std::vector< int > &distribution)
Definition imageStats.cpp:456
double MeanPixelCplImageWindow(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury)
Definition imageStats.cpp:98
void GetCutValuesPercentage(const cpl_image *const image, const double percentage, double *const min_value, double *const max_value)
Definition imageStats.cpp:541
CplStatistics * StatisticsCplImageWindow(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury)
Definition imageStats.cpp:222
void GetHistogramBins(const cpl_image *const image, const int64_t min_value, const int64_t max_value, std::vector< int > &distribution)
Definition imageStats.cpp:489
double PixelValueCplImage(const cpl_image *const image, const int x_pos, const int y_pos, int *const is_rejected)
Definition imageStats.cpp:449
double SigmaCplImageWindow(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury, double *const sigma)
Definition imageStats.cpp:723
bool MinMaxInvalidCheck(const cpl_image *const image, double *const min, double *const max)
Definition imageStats.cpp:669
CplStatistics * StatisticsCplImage(const cpl_image *const image)
Definition imageStats.cpp:203
double MinPixelCplImageWindow(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury)
Definition imageStats.cpp:66
double MaxPixelCplImage(const cpl_image *const image)
Definition imageStats.cpp:30
double MedianPixelCplImage(const cpl_image *const image)
Definition imageStats.cpp:76
double RmsValueCplStats(const cpl_stats *const stats_cpl)
Definition imageStats.cpp:182
double RmsValueCplImageWindow(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury)
Definition imageStats.cpp:131
double MinPixelCplImage(const cpl_image *const image)
Definition imageStats.cpp:53
const size_t MAX_HIST_LENGTH
Definition imageStats.hpp:60
bool MinMaxPixelsCplImage(const cpl_image *const image, double *const min, double *const max)
Definition imageStats.cpp:317
cpl_apertures * AperturesCplImage(const cpl_image *const image, const double sigma)
Definition imageStats.cpp:285
double RmsValueCplImage(const cpl_image *const image)
Definition imageStats.cpp:108
double MaxPixelCplImageWindow(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury)
Definition imageStats.cpp:43
cpl_stats * StatsCplImage(const cpl_image *const image)
Definition imageStats.cpp:152
cpl_stats * StatsCplImageWindow(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury)
Definition imageStats.cpp:168
bool GetIQEValues(const cpl_image *const sub_image, double *const x_axis_angle, double *const background, double *const peak_above_background, double *const fwhm_x, double *const fwhm_y, double *const object_coord_x, double *const object_coord_y)
Definition imageStats.cpp:622
double MeanPixelCplImage(const cpl_image *const image)
Definition imageStats.cpp:85
bool AperturesCplImageDump(const char *const file_name, const cpl_apertures *const apertures)
Definition imageStats.cpp:296
Definition imageStats.hpp:33
double median_val
Definition imageStats.hpp:57
double max_val
Definition imageStats.hpp:41
int pix_num
Definition imageStats.hpp:53
double rms_val
Definition imageStats.hpp:49
double mean_val
Definition imageStats.hpp:45
double min_val
Definition imageStats.hpp:37