• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Similarity between integers in a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Similarity between integers in a list


  • Subject: Re: Similarity between integers in a list
  • From: Christopher Nebel <email@hidden>
  • Date: Tue, 18 May 2004 18:54:29 -0700

On May 18, 2004, at 4:01 PM, Martin Orpen wrote:

I'm working on a Photoshop script that tries to work out whether an RGB image is colourful or neutral.

The script gets RGB values from 6 (or more) randomly chosen pixels in the form:

Image 1
{{71, 94, 97}, {95, 96, 98}, {60, 68, 73}, {41, 49, 56}, {21, 23, 36}, {44, 47, 52}}

Image 2
{{89, 89, 89}, {82, 82, 82}, {77, 77, 77}, {48, 49, 49}, {48, 49, 50}, {66, 68, 68}}

I'd like to process each list so that I can differentiate between the images - image 1 being a conventional colour image where the lists show greater variation and image 2 being neutral and the pixel values tend to be nearly equal.

It's not really clear what you mean by "colourful". Do you mean that there are a lot of different colors? That the colors are all well away from 50% gray? That there are a lot of high-saturation-high-brightness (for lack of a better word, "colourful") colors? For instance, a black-to-white wipe would qualify as "colourful" under the first and second definitions, but not the third. A pure red image would qualify under the second and third definitions, but not the first. A pure black image would qualify under the first definition, but not the second or third. You see the problem?

Also, you've currently got everything expressed as RGB, but distance in RGB space isn't good at determining all color qualities. L*a*b* would make more sense for the first two definitions; HSB would make more sense for the third. (I'd be surprised if Photoshop couldn't do the conversion for you.)


--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Similarity between integers in a list
      • From: Martin Orpen <email@hidden>
References: 
 >Similarity between integers in a list (From: Martin Orpen <email@hidden>)

  • Prev by Date: Re: Question on AppleScript
  • Next by Date: Re: problem to display Tibetan
  • Previous by thread: Similarity between integers in a list
  • Next by thread: Re: Similarity between integers in a list
  • Index(es):
    • Date
    • Thread