I am looking to isolate “brown” colors by rgb values. Not just 1 brown color, but the wide spectrum of colors that are perceived as brown – tan, suede, dirt, etc.
Any ideas on how to do this? I’m thinking that maybe if Red is less than 128, and Green is between 70 and 138, and blue is less than 128, than it appears brown. Something along those lines.
A really simple heuristic would be something like, in pythony pseudocode
The tune parameters 1 through 3 until it works nicely. Perhaps replace
if absolute_value(red - green) > parameter_2:withif absolute_value(red - green*parameter_2b) > parameter_2a:so that more greeny or reddy ones are selected depending onparameter_2b. Perhaps changemaximum_ofto something else. etc. etc.