algorithmic modeling for Rhino
Hi all,
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
...etc.
But i don't seem to get it working....hope someone could look into my script and point out whats wrong. Thanks
Tags:
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.
pseudocode :
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
Welcome to
Grasshopper
© 2025 Created by Scott Davidson.
Powered by