D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] tagging or sorting pictures by colour patches

 

On 6 Sep 2014, at 17:01, Adrian Midgley <amidgley@xxxxxxxxx> wrote:

> I see this chap had a look at a problem of similar nature
> 
> http://blog.endpoint.com/2011/04/determining-dominant-image-color.html
> 
> $ convert Waffle.jpg -scale 1x1\! -format '%[pixel:u]' info:-
> rgb(219,166,94)
> 
> That is aimed at giving a single dominant colour - which in the case
> of a runner might be skyblue or grass green or track red.  Excluding
> those either from the picture that was passed to the notional
> software, or the replies would probably work to a first approximation.
> 
> http://www.imagemagick.org/Usage/quantize/
> 
> looks like a place to start...
> 
> In my copious free time I shall apply myself a little to this.
> 

your use case might be better served with this technique  
http://en.wikipedia.org/wiki/Vectorization_%28image_tracing%29

I’m thinking inkscapes vectorisation will cut the image into coloured vectors - I 
assume they will be layered in the file thus you can then bitmap the layers and do 
your colour identification. 

This should give you a list of colours in the image - all you then need to work out 
is the total of colour in the vector which should = probability. once you screen out 
the predominant background colour and tones. 

> 
> On 31 August 2014 21:03, Adrian Midgley <amidgley@xxxxxxxxx> wrote:
>> Task:  Automagically label or report  a picture (JPEG) containing one
>> runner in a blue shirt and one runner in a pink shirt as [pink, blue]
>> 
>> Use case: making it easier for runners in parkruns to find their pictures.
>> 
>> eg https://www.flickr.com/photos/midgley/sets/72157646973176126
>> 
>> 
>> 
>> Exists???
>> 
>> --
>> Adrian Midgley   http://www.defoam.net/
> 
> 
> 
> -- 
> Adrian Midgley   http://www.defoam.net/
> 
> -- 
> The Mailing List for the Devon & Cornwall LUG
> http://mailman.dclug.org.uk/listinfo/list
> FAQ: http://www.dcglug.org.uk/listfaq


-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq