Created
January 1, 2014 21:40
-
-
Save thecodejunkie/8211769 to your computer and use it in GitHub Desktop.
I want to be able to pass in what order the colors should be iterated, while maintaining the call to the histogram (i.e needs to be called with the right values)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var axisTotal = 0; | |
var stackedSumByColor = new int[128]; | |
for (var r = dimension.Min; r <= dimension.Max; r++) | |
{ | |
var sum = 0; | |
for (var g = dimension.Min; g <= dimension.Max; g++) | |
{ | |
for (var b = dimension.Min; b <= dimension.Max; b++) | |
{ | |
var count = | |
this.histogram[r, g, b]; | |
sum += count; | |
} | |
} | |
axisTotal += sum; | |
stackedSumByColor[r] = axisTotal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment