I am looking for a script that will automate the sorting of photos based on key type. That is to say, a script that looks at the histogram of a photo, determines weather it is hi, low, or average key, and then saves a jpg to an appropriate folder. Opening the file and saving it into appropriate folders is no problem. I’m a little lost on how to determine the key type. It’s easy by eye, but how to quantify that into a scriptable thing… I’ve played with a script that i found on this site that averages the histogram and converts it to a percentage. I think hard coded what percentage i wanted it to consider low key, high key and average… It works, but its not very fast, nor is it as discriminatory as i would like. Maybe i should be extracting the median value instead of taking an average? I’m just not sure how to proceed…
Does anyone have a script like this? or any idea how to write one?