Possible to Automate?

Ask a Question related to Adobe Photoshop Mac CS, CS2 & CS3, Design and Development.

  1. #1

    Default Possible to Automate?

    Hi,
    In Photoshop one can manually:
    Open a graphic (say jpeg or gif, possibly png)
    Click on the Eyedropper Tool
    Select a point or area
    Click on the foreground/background icon and obtain the RGB, hexa, HSB, etc values for the point/area selected.

    Problem is, we need to do this for thousands, hundreds of thousands of images, for not necessarily the whole of the image(s) but a major part of it. (Some sort of sampling would work.)

    Is there a way to automate this?

    We have images of Fabrics and need to categorize them by color.
    So for example say we have a Fabric that has "Red" & "White" stripes.
    We need to classify that Fabric as "Red" and "White" so people can search the database for Red or White.
    Certainly depending upon the lighting, the scanner, camera that created the image, any given "Reddish" pixel might have a slightly different value than the one (or group) next to it.

    OK, so we set up a classification range, system that says in essence "if the RGB (or hexa, or HSB, or Lab, or whatever) value is between such and such and such then classify as "Red"

    Ideally we would like to get a report of the analysis along these lines, a histograph (not drawn but the data):
    255,000,000 occurred 30% of the time
    102,051,204 occurred 20% of the time
    etc. etc.

    I realize PS cannot do the number crunching end (or can it?) so as to report frequencies, but can we automate the process?
    A. It automatically reads in a file (as it does with say batch processing for format conversion) - as opposed to manually opening and selecting an image
    B. select all or several pixels/areas - as opposed to manually selecting w the eyedropper tool
    C. spit out a text file or such reporting the values it found - as opposed to user manually noting the values (on paper or typing into database)

    We could then read in the text file to some sort of number crunching routine to come up with the "color(s)"

    Alternatively, can anyone give me a hand in picking apart jpeg and/or gif files to read the color values for the pixels?

    See this web page for barebones outline What is Blue? <http://www.blueorbwise.net/project1/whatisblue/index.html>

    Thanks for the help.
    Michael_Wilking@adobeforums.com Guest

  2. Similar Questions and Discussions

    1. Automate OCR using Plugin
      I've been reading up on some posts and noticed that it was possible to access OCR processes via AVCommands? Can someone please ellaborate on which...
    2. Preflight Automate
      Hi All, There is lot of Preflighting options in Acrobat 8. Is their any way to automate this using Acrobat SDK? or any other method. Please...
    3. Automate PDFpages
      How can I automate an Acrobat document so that it runs (displays) the pages automatically - that is to say, changes a page to the next one in the...
    4. automate web login
      Greetings, I used CPAN (libwww-perl) docs as my main reference and generated the following script (trying 'content' as well as...
    5. Automate visio with ASP.NET
      Hi, Is it possible to automate visio with ASP.NET? I am able to do that for .NET windows application. Whereas the same code for ASP.NET does not...
  3. #2

    Default Re: Possible to Automate?

    This can be done with an AppleScript. It's very complicated, but possible, and I can explain it briefly. AS can access the histograms, and from there do some math to get the average values. It can work from all the pixels in the image, from a selection, or sampled color (whatever the foreground is set to). Unfortunately, working from selections or color samples would involve manual intervention. Selections could only be automated if each file had the exact same pixel dimensions, and you can get away with selecting the same area on every file. AS can also easily save any info to a text file (or to a database, but that's over my head).

    I would post this in the scripting forum if you want to explore it further.

    Carl.
    Carl_Stawicki@adobeforums.com Guest

  4. #3

    Default Re: Possible to Automate?

    Hi Carl,

    Thanks for the ideas.

    Found this:
    ImageJ <http://rsb.info.nih.gov/ij/index.html>
    It is free.
    Seems quite powerfull.
    Does everything, has plug-ins do almost anything one would want.

    Yet, it does not give a simple pixel by pixel listing of RGB values, or a frequency distribution, that I could find (which I could do, if I could get at the numbers to crunch, so no big deal).

    But, going to see if I can get a plug-in going on my own - at least most of the work has been done, the tools for a plug-in are there.
    Michael_Wilking@adobeforums.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139