More on metadata: image files

Hello, this is my first post although I’ve been keeping the eye on the developments since day -1 :slight_smile:
But let’s get to the topic. This is, of course, beyond the scope of anything at this time but I could not contain myself:P
One day I was trying to find an image that was suitable for the purpose. Let’s say I was looking for a photograph that had sea on it. So I after some time I found myself still digging through folders and trying to remember where those single images were stored. They always come in series: trip here, vacation there and they usually have images of different things.
So I was thinking what if image files had extra attributes, think of flickr tags for example. But in a manner that would not require user interaction dureing creation. Imagine, one would type “blue” in the “find image by color” box and would be presented with bunch of images that are most likely the ones with sea or sky on them. Or by defining both “blue” and “green” one would get some nice countryside pictures regardless of their location.
This coulb be done analyzing images pixel by pixel, counting the RGB(HLS, CMYK) values and stacking them into nice human readable categories like blue, green and brown. These colors would be predefined and would contain each a range of those RGB values. So eventually the attributes would look like: "green:30%(of total pixels), blue:40%, gray:5% &c. Some application or daemon would of course be busy counting all those pixels upon creation of the file.
Then a query would ask the file system which images have at least X% blue and return them in a window as thumbnails or something.

I remember seeing a screenshot of something similar, where the user inputs a vague representation of what they’re looking for - a red blob with grey below and blue above - and the system came up with a bunch of pictures of red London buses. I wonder however if this is too complex for something like Tracker to handle - the image in question was of a separate application not tied into the file manager, like Picasa.

The best way to implement this would be as part of an image file plugin for the index feeder. The hardest part would be the analyzing stage. What colors should it report? Should all those colors always be mentioned? Can a pixel contribute to more than one color percentage? Should its contribution to the pink percentage depend on “how pink” it is?

Then there’s the question of how to query these attributes. Is there any way BFS could be extended with support for plugins that know how to use certain attributes when searching? This would let you do a regular search and see the result in Tracker. A simpler approach would be to store the percentage of each color in a separate attribute, but this would add lots of attributes and you would have to specify a number when searching (COLOR-PERCENTAGE:BLUE > 30). Without any of these approaches, there would have to be a search tool, like the original post suggests. The sad part about this is that the tool would have to do a broad BFS search returning all files with the colors attribute set, and then look at every single file’s attribute to see if it matches the query. All in all this is probably the most appropriate approach, allthough for a number of reasons it would be more elegant if the BFS search engine could find the correct files directly.