#define MAX_ELEMENT_VALUE 255 // maximum value that an element // can have (e.g., 255 or 4096) #define BIN_WIDTH 1 // values spanned by each bin #define X 1920 // total number of X pixels #define X 1080 // total number of Y pixels struct pixel { unsigned int r, g, b; }; // compute the R,G, and B histograms for an image // parameters defined as pre-processor constants above void histogram(pixel** image, unsigned int* r_hist, unsigned int* g_hist, unsigned int* b_hist) { for (int x=0; x