ddt 1.2.1
Loading...
Searching...
No Matches
imageStats.hpp
Go to the documentation of this file.
1
20#ifndef IMAGESTATS_HPP_
21#define IMAGESTATS_HPP_
22
23//#include <algorithm>
24//#include <cctype>
25#include <list>
26#include <vector>
27
28//#include <sys/stat.h>
29
30#include <cpl.h>
31
32// namespace ddt {
33
42typedef struct CplStatistics {
46 double min_val;
50 double max_val;
54 double mean_val;
58 double rms_val;
66 double median_val;
68
69const size_t MAX_HIST_LENGTH = 10000;
70
76double MaxPixelCplImage(const cpl_image* const image);
77
87double MaxPixelCplImageWindow(const cpl_image* const image, const int llx,
88 const int lly, const int urx, const int ury);
89
95double MinPixelCplImage(const cpl_image* const image);
96
106double MinPixelCplImageWindow(const cpl_image* const image, const int llx,
107 const int lly, const int urx, const int ury);
108
114double MeanPixelCplImage(const cpl_image* const image);
115
121double MedianPixelCplImage(const cpl_image* const image);
122
132double MeanPixelCplImageWindow(const cpl_image* const image, const int llx,
133 const int lly, const int urx, const int ury);
134
140double RmsValueCplImage(const cpl_image* const image);
141
152double RmsValueCplImageWindow(const cpl_image* const image, const int llx,
153 const int lly, const int urx, const int ury);
154
161cpl_stats* StatsCplImage(const cpl_image* const image);
162
173cpl_stats* StatsCplImageWindow(const cpl_image* const image, const int llx,
174 const int lly, const int urx, const int ury);
175
182double RmsValueCplStats(const cpl_stats* const stats_cpl);
183
191CplStatistics* StatisticsCplImage(const cpl_image* const image);
192
204CplStatistics* StatisticsCplImageWindow(const cpl_image* const image,
205 const int llx, const int lly,
206 const int urx, const int ury);
207
215CplStatistics* StatisticsCplStats(const cpl_stats* const stats_cpl);
216
226bool FwhmValuesCplImage(const cpl_image* const image, const int x_pos,
227 const int y_pos, double* const fwhm_x,
228 double* const fwhm_y);
229
236cpl_apertures* AperturesCplImage(const cpl_image* const image,
237 const double sigma);
238
245bool AperturesCplImageDump(const char* const file_name,
246 const cpl_apertures* const apertures);
247
255bool MinMaxPixelsCplImage(const cpl_image* const image, double* const min,
256 double* const max);
257
267bool MedianMinMaxPixelsCplImage(const cpl_image* const image, double* const min,
268 double* const max,
269 const double kernel_size = 5);
270
276void CheckForNanValues(cpl_image* const image);
277
286double PixelValueCplImage(const cpl_image* const image, const int x_pos,
287 const int y_pos, int* const is_rejected);
288
296void GetHistogram(const cpl_image* const image, const int64_t min_value,
297 const int64_t max_value, std::vector<int>& distribution);
298
308void GetHistogramBins(const cpl_image* const image, const int64_t min_value,
309 const int64_t max_value, std::vector<int>& distribution);
310
320void GetCutValuesPercentage(const cpl_image* const image,
321 const double percentage, double* const min_value,
322 double* const max_value);
323
339bool GetIQEValues(const cpl_image* const sub_image, double* const x_axis_angle,
340 double* const background, double* const peak_above_background,
341 double* const fwhm_x, double* const fwhm_y,
342 double* const object_coord_x, double* const object_coord_y);
343
353bool MinMaxInvalidCheck(const cpl_image* const image, double* const min,
354 double* const max);
355
363double SigmaCplImage(const cpl_image* const image, double* const sigma);
364
376double SigmaCplImageWindow(const cpl_image* const image, const int llx,
377 const int lly, const int urx, const int ury,
378 double* const sigma);
379//} // namespace ddt
380
381#endif /* IMAGESTATS_HPP_ */
382
bool MedianMinMaxPixelsCplImage(const cpl_image *const image, double *const min, double *const max, const double kernel_size=5)
Definition imageStats.cpp:382
void CheckForNanValues(cpl_image *const image)
Definition imageStats.cpp:434
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:275
CplStatistics * StatisticsCplStats(const cpl_stats *const stats_cpl)
Definition imageStats.cpp:249
double SigmaCplImage(const cpl_image *const image, double *const sigma)
Definition imageStats.cpp:728
void GetHistogram(const cpl_image *const image, const int64_t min_value, const int64_t max_value, std::vector< int > &distribution)
Definition imageStats.cpp:465
double MeanPixelCplImageWindow(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury)
Definition imageStats.cpp:107
void GetCutValuesPercentage(const cpl_image *const image, const double percentage, double *const min_value, double *const max_value)
Definition imageStats.cpp:550
CplStatistics * StatisticsCplImageWindow(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury)
Definition imageStats.cpp:231
void GetHistogramBins(const cpl_image *const image, const int64_t min_value, const int64_t max_value, std::vector< int > &distribution)
Definition imageStats.cpp:498
double PixelValueCplImage(const cpl_image *const image, const int x_pos, const int y_pos, int *const is_rejected)
Definition imageStats.cpp:458
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:732
bool MinMaxInvalidCheck(const cpl_image *const image, double *const min, double *const max)
Definition imageStats.cpp:678
CplStatistics * StatisticsCplImage(const cpl_image *const image)
Definition imageStats.cpp:212
double MinPixelCplImageWindow(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury)
Definition imageStats.cpp:75
double MaxPixelCplImage(const cpl_image *const image)
Definition imageStats.cpp:39
double MedianPixelCplImage(const cpl_image *const image)
Definition imageStats.cpp:85
double RmsValueCplStats(const cpl_stats *const stats_cpl)
Definition imageStats.cpp:191
struct CplStatistics CplStatistics
double RmsValueCplImageWindow(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury)
Definition imageStats.cpp:140
double MinPixelCplImage(const cpl_image *const image)
Definition imageStats.cpp:62
const size_t MAX_HIST_LENGTH
Definition imageStats.hpp:69
bool MinMaxPixelsCplImage(const cpl_image *const image, double *const min, double *const max)
Definition imageStats.cpp:326
cpl_apertures * AperturesCplImage(const cpl_image *const image, const double sigma)
Definition imageStats.cpp:294
double RmsValueCplImage(const cpl_image *const image)
Definition imageStats.cpp:117
double MaxPixelCplImageWindow(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury)
Definition imageStats.cpp:52
cpl_stats * StatsCplImage(const cpl_image *const image)
Definition imageStats.cpp:161
cpl_stats * StatsCplImageWindow(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury)
Definition imageStats.cpp:177
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:631
double MeanPixelCplImage(const cpl_image *const image)
Definition imageStats.cpp:94
bool AperturesCplImageDump(const char *const file_name, const cpl_apertures *const apertures)
Definition imageStats.cpp:305
Definition imageStats.hpp:42
double median_val
Definition imageStats.hpp:66
double max_val
Definition imageStats.hpp:50
int pix_num
Definition imageStats.hpp:62
double rms_val
Definition imageStats.hpp:58
double mean_val
Definition imageStats.hpp:54
double min_val
Definition imageStats.hpp:46