Stretch and calculate stats on demand

This commit is contained in:
2022-04-06 15:49:58 +02:00
parent 2ff1b993a1
commit 023a616fa0
7 changed files with 63 additions and 37 deletions
+3 -3
View File
@@ -35,6 +35,7 @@ class RawImage
{
protected:
cv::Mat m_img;
bool m_stats;
double m_mean;
double m_stdDev;
double m_median;
@@ -58,7 +59,7 @@ public:
RawImage(cv::Mat &img);
RawImage(const RawImage &d);
RawImage(const QImage &img);
bool imageStats(double *mean, double *stdDev, double *median, double *min, double *max) const;
bool imageStats(double *mean, double *stdDev, double *median, double *min, double *max, double *mad);
void calcStats();
void rect(int &x, int &y, int w, int h, std::vector<double> &r) const;
int findPeaks(double background, double distance, std::vector<Peak> &peaks) const;
@@ -68,10 +69,9 @@ public:
uint32_t height() const;
uint32_t size() const;
ImgType type() const;
uint32_t norm() const;
void* data();
const void* data() const;
float stretchFactor() const;
double MAD() const;
};
#endif // RAWIMAGE_H