Re: How do you get the greyscale values out of a colour image into a text file?

Posted by Jerry Sedgewick-2 on
URL: http://confocal-microscopy-list.275.s1.nabble.com/remote-instrumentation-for-microscopic-imaging-tp2316409p2322266.html

Is the file in the Raw format, such as those generated by Nikon and
Canon consumer cameras? Or did you mean that the person was asking about
the original (unaltered or raw) file?

If it is the Nikon or Canon Raw format, then it was derived from a
mosaic chip and colors will have to be assigned to each pixel through
some kind of conversion "engine." Photoshop uses its own Adobe Camera
Raw (ACR) engine in all the CS versions (as I recall). If the lighting
for the study was consistent, and if the study occurred over more than
one imaging session, then the settings in Adobe Camera Raw should be set
similarly for the experiment, or the colors will have to be adjusted by
using a reference standard (such as a neutral gray card, Macbeth color
chart, or some consistent part of the specimen that is white or gray).
If the colors are not assigned or adjusted to a standard, then the
colors will be inconsistent from session to session.

Canon and Nikon both have proprietary engines in which colors are
generated at each x, y position. These can also be used, but make sure
the gamma is set to 1, and, again, adjust colors based upon reference
standards if images were taken at more than one session.

Before opening the image in Photoshop, the Color Settings in the menu
(Preferences>Color Settings) are changed from the RGB default setting
(sRGB....). A "CIE 1931 D65" setting is chosen because this keeps the
gamma at 1 (no alteration of post-ACR values). This color setting can be
downloaded from quickphotoshop.com, but make sure to click on Book:
Supplemental Info (not Download). Photoshop changes the gamma when using
any of the other color settings. Gamma is a reference to the adjustment
of pixel values destined for display on a computer monitor in which the
Greek symbol gamma is the exponent in a math formula.

Once in Photoshop, in the menu, under Windows, choose Channels
(Windows>Channels). In the Channels palette, click on the upper right
arrowhead and choose Split Channels from the drop down list. This will
separate the red, green and blue channels for subsequent measurement.

In the distant past, I believe I used Image J to generate pixel values
at each x, y position, but maybe it was MatLab or MetaMorph. Maybe
another person on the list can add that information.

Cheers!



Michelle Peckham wrote:

> A little bit off the topic, but
>
> Someone here was asking me about analysing a ‘RAW’ file for colour
> information, and the simplest way to do what she wants would be to
> extract the grey scale values out for the red, green and blue
> channels, and analyse them in a spread sheet.
>
> Does anyone know how to do this?
>
> Michelle


--
Jerry (Gerald) Sedgewick
Program Director, Biomedical Image Processing Lab (BIPL)
Department of Neuroscience, University of Minnesota
312 Church St. SE, 1-205 Hasselmo Hall
Minneapolis, MN  55455
(612) 624-6607
[hidden email]
http://www.bipl.umn.edu
Author: "Scientific Imaging with Photoshop: Methods, Measurement and Output."

Rawlight.com (dba Sedgewick Initiatives)
965 Cromwell Avenue
Saint Paul, MN  55114
[hidden email]
(651) 308-1466
http://www.quickphotoshop.com
http://www.heartFROMstone.com
http://www.rawlight.com




--- Get FREE High Speed Internet from USFamily.Net! -- http://www.usfamily.net/mkt-freepromo.html ---