generative modeling for Rhino
I would like to Count and output the RGB Grid with a supplied image.
So the output would be:
numbers of Grids with value 0,0,255 (blue): 5
numbers of Grids with value 255,0,0 (red): 2
But i don't seem to get it working....hope someone could look into my script and point out whats wrong. Thanks
it would be easier if this bitmap has size 3x3 pixels (without any antialiasing etc, just pure bitmap).
then youll need some scripting -> iterate through all the pixels and if e.g pixel's hue <15 and >90 then add "red" to the strings/int list.
create list of strings
load bitmap from file path
get bitmap height
get bitmap width
count pixels -> (width*height) -> create a new int (pixelCount)
check every pixels color :
output string list