// get stats getRawStatistics(area, mean, min, max, std, h); width = getWidth(); height = getHeight(); // Cumulative Histogram for (i=1;i< h.length;i++) { h[i] = h[i-1]+h[i]; } // Normalized Cumulative Histogram for (i=0;i< h.length;i++) { h[i] = round( ( (h[i] - h[0])/ ((width * height)-h[0])) * 255); } // Change pixel values for (x=0; x