Yo here you go kemal

Dependencies:   TCS3200

Committer:
xalec
Date:
Sat Dec 05 06:19:45 2020 +0000
Revision:
0:0dd4a69da379
CS 435

Who changed what in which revision?

UserRevisionLine numberNew contents of line
xalec 0:0dd4a69da379 1 #ifndef RGB_STATS_HANDLER_H
xalec 0:0dd4a69da379 2 #define RGB_STATS_HANDLER_H
xalec 0:0dd4a69da379 3
xalec 0:0dd4a69da379 4 #include "rgbhlr.h"
xalec 0:0dd4a69da379 5 #include <vector>
xalec 0:0dd4a69da379 6
xalec 0:0dd4a69da379 7 //
xalec 0:0dd4a69da379 8 // A collection of methods encompassing statistical anaylsis for
xalec 0:0dd4a69da379 9 // live data readings of RGB values
xalec 0:0dd4a69da379 10 //
xalec 0:0dd4a69da379 11 namespace rgb_dws {
xalec 0:0dd4a69da379 12
xalec 0:0dd4a69da379 13 // Methods for RGB data
xalec 0:0dd4a69da379 14
xalec 0:0dd4a69da379 15 RGB samp_mean(std::vector<RGB> data);
xalec 0:0dd4a69da379 16 RGB median(const std::vector<RGB>& data);
xalec 0:0dd4a69da379 17 RGB mode(const std::vector<RGB>& data);
xalec 0:0dd4a69da379 18 RGBCalc variance(const std::vector<RGB>& data, double mean);
xalec 0:0dd4a69da379 19 RGBCalc samp_stand_dev(const std::vector<RGB>& data, double mean);
xalec 0:0dd4a69da379 20
xalec 0:0dd4a69da379 21 // Needed statistical computations:
xalec 0:0dd4a69da379 22 // Finding the sample mean
xalec 0:0dd4a69da379 23 // Finding median (only viable for individual color values)
xalec 0:0dd4a69da379 24 // Finding variance
xalec 0:0dd4a69da379 25 // Finding sample standard deviation
xalec 0:0dd4a69da379 26 // Partitioning distribution using quartiles (calculate quartiles)
xalec 0:0dd4a69da379 27 // Calculate IQR
xalec 0:0dd4a69da379 28 // Calculate Five Number Summary
xalec 0:0dd4a69da379 29 // Calculate outliers
xalec 0:0dd4a69da379 30 // For both the left and right of the distribution
xalec 0:0dd4a69da379 31 // Questions to ask:
xalec 0:0dd4a69da379 32 // Should we determine the overall average color? ANS: Yes
xalec 0:0dd4a69da379 33 // Should we determine the averages of red, green,
xalec 0:0dd4a69da379 34 // and blue? ANS: Yes
xalec 0:0dd4a69da379 35 // Should the RGB values be ordered in sep. arrays
xalec 0:0dd4a69da379 36 // of three? ANS: We will need to consider three distributions if thats the case
xalec 0:0dd4a69da379 37
xalec 0:0dd4a69da379 38 } // END OF NAMESPACE 'rgb_dws'
xalec 0:0dd4a69da379 39 #endif