Re: Need text file w/ grayscale image brightness
- From: MikeT <no_thanks@xxxxxxxx>
- Date: Fri, 31 Mar 2006 10:10:10 -0600
rcoutts@xxxxxxxxxxx wrote:
I'm putting a figure together for a paper and need a simple image that
has a grayscale image next to a grid of numbers that represents to gray
level of each pixel (e.g., 00=black and FF=while). So, the grid would
look something like
23 23 25 23 32 38 29 39 38 29
39 29 39 29 33 29 29 38 29 39
12 13 14 16 23 23 43 56 38 29
28 38 10 29 39 23 83 36 32 10
:
:
where each number would be the intensity for either decimal (0,99) or
hex (0,FF).
The figure is for a sensory perception paper and I don't need to be
real scientific about its accuracy. I loaded the image into PhotoShop
and saved it in various text formats, such as RAW, EPS, and PDF, but
the grid of numbers didn't represent the grayscale like what I need --
is there a simple way to get what I'm after? I don't mind editing the
file, like to add spaces between the numbers, if that what it takes to
get what I need. I could use PhotoShop to record the pixel color by
hand and populate the grid manually by sampling with the eyedrop tool,
but I'm hoping to avoid such a tedious approach.
Thanks,
Rich
Here's one fairly easy way:
First, save as a binary PGM, using for example IrfanView.
Then, to get the hex text, you could use for instance HexEdit (even version 1.0):
http://www.expertcomsoft.com/
That tool has an option to "Edit > Copy As > Hex Text".
Just make sure you skip over the PGM header bytes at the start of the file. You may have to reformat the lines a bit to get exactly what you want, but this will be much easier than sampling each pixel in Photoshop.
MikeT
.
- References:
- Need text file w/ grayscale image brightness
- From: rcoutts
- Need text file w/ grayscale image brightness
- Prev by Date: Need text file w/ grayscale image brightness
- Next by Date: Re: Need text file w/ grayscale image brightness
- Previous by thread: Need text file w/ grayscale image brightness
- Next by thread: Re: Need text file w/ grayscale image brightness
- Index(es):
Relevant Pages
|
|