What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Sort photos by color


cmbyates

New Member
Messages
3
Likes
2
I am trying to find software or a tool or plug in that allows a large folder of images to be sorted by color/hue. The closest thing I have found is Google Picasa but you can only do one color at a time and it only has a few choices. Thanks, Cindy
 

Tom Mann

Guru
Messages
7,223
Likes
4,343
The problem is that there is no generally accepted definition for "the color of a photo". Is it the average of all colors in the photo? The most commonly occurring hue? Is it the "white balance"? Is the colors of some important area in the photo such as whether the skin tones are warm or cool? The color of the white paper around the edge of a print? etc. etc.

If you could describe what you are looking for in more quantitative terms, we could go from there.

Tom M
 

Tom Mann

Guru
Messages
7,223
Likes
4,343
One would think this would be easy, but the problem is that even with a definitive statement of exactly what you want, ie, like you just provided, there still are many, many ambiguities.

For example, here's one of my own photos. Would you classify "the primary hue" of this photo as blue or orange/red?

xxx-D7B_6909_LR_jpg-1200x900px-xnv_698px_for_web.jpg

Some of the best photos have strong color contrasts like this and are quite common. For example, it took me only seconds to find this example.

I think that examples like this illustrates why, if you Google keywords like {sort photos by color}, one finds that very few people (other than Picasa) have attempted to provide an automated way to do so. In fact, even Picasa's tool is not really a "sort by color" tool, but rather a "search for color" tool. Although it may sound like I may be parsing words, it turns out that it is easier to write an algorithm that simply looks for whether or not a particular hue occupies a significant fraction of all the pixels in a photo compared to attempting to say if one picture is "more red" than another and then putting the results in order.

Sorry I couldn't be more encouraging.

Cheers,

Tom M
 

thebestcpu

Guru
Messages
2,994
Likes
2,760
thanks Tom. btw for my purposes, i'd go with blue on the one above.

I am not aware of a plugin that exactly does what you want. You might want to check out the Adobe Scripts Forums to see what they have.

You would have to be pretty specific in defining what you want through e.g. it would be pretty straighfoward to use the Color Selection Tool, make a selection one at a time of the primary and secondary colors and have the data analysis command give you a pixel count for each created selection.

However, using that approach the dominant color would come out as Cyan. Using the HSL or HSB model the hue range for Cyan is 180 +/- 30 degrees. All the sky in Tom Mann's image comes in right about 207 degrees.

So even this analysis may not give you exactly what you want if you would want that image defined as "Blue." Interesting project though.

John Wheeler
 

Paul MR

The Script Master
Messages
382
Likes
206
I wrote a script to find the colour of a picture a couple of years ago, but it includes a script from http://chir.ag/projects/ntc/
You need permission to use his code, the guy I wrote the script for got his permission.

P.S. the nearest colour for your picture Tom was Cyan
 
Last edited:

Tom Mann

Guru
Messages
7,223
Likes
4,343
What mathematical decision criteria / approach did it use? I remember seeing one that cropped out everything xcept the center 1/3rd of the image and then averaged the hues (module 360) of the remaining pixels. Might it have been that one?
 
Last edited:

Paul MR

The Script Master
Messages
382
Likes
206
It has been a few years since I wrote the code and have had another look at it, it isn't going to work as is as it was written for block colour.
I suppose the nearest you could get is an average using the Filter-Blur-Average then get the value from that?
 

Tom Mann

Guru
Messages
7,223
Likes
4,343
Yup, I just looked at the link you provided and see that it only names the color, but doesn't do the front-end decision making mathematics.

re: "...I suppose the nearest you could get is an average using the Filter-Blur-Average then get the value from that?..."

Unfortunately, that's only one of the many, many different possibilities for deciding on what is "the" color for photos which almost always are composed of multiple colors.

T
 

rudolphdavis

New Member
Messages
1
Likes
1
I have the same question. I'm searching for a software like that.. I have huge library of image - 800 thousand around 300 GB.. Picasa is not useful in a case like this, I have many white pictures with something writtenin green/blue or.. etc.. I can't filter them with black & white feature. It would be useful if Picasa included the same filter options as on google - drawing, sketch, line drawing, photo, clip art , etc and more colors + multiple colors, etc... Also search similar images would be nice, NOT duplicates.

There was some German software with good feature where you could search by all selected colors.. But it was impossible to delete the pictures, and latest version was released in 2011.. It was very buggy software..
 

Top