Newsgroups: comp.ai.neural-nets
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!gatech!news.sprintlink.net!pipex!uknet!newsfeed.ed.ac.uk!ainews!thomasg
From: thomasg@aisb.ed.ac.uk (Thomas Grove)
Subject: Re: Using scanned photos
Message-ID: <D9nG8p.G5y@aisb.ed.ac.uk>
Sender: news@aisb.ed.ac.uk (Network News Administrator)
Organization: Dept AI, Edinburgh University, Scotland
X-Newsreader: TIN [version 1.2 PL2]
References: <3q5i0h$hsb@mozo.cc.purdue.edu>
Date: Sun, 4 Jun 1995 13:02:48 GMT
Lines: 44

Jamie DeCoster (jamie@psyclops) wrote:
:   Hello everyone!

: I was interested in using a neural network to categorize a set of scanned
: photographs.  I was wondering if anyone else has tried this, and exactly
: how they went about converting the scanned graphic file into a set of
: values which a neural network would read.  It would seem that a set of
: numbers indicating the luminance values of cells would be simplest, but
: I don't know how to go from a .pcx, .gif, .whatever file to this format.


Hopefully someone will correct me if I'm wrong, but to convert from
a pcx file (or similar colour table based format) to a simple 8-bit
grey scale you need to 

1) find the RGB values for each colour in the image. In an (8-bit) pcx 
file these are stored in a 768 byte block after the header (I think- you
should be able to find pcx format info quite easily).

2) Then, given the RGB value, you can find the intensity with

	I = R * 0.35 + G * 0.45 + B * 0.2

Where the coefficients represent the relative importance  of each 
component  (blue being the one to which the eye is least sensitive).

Alternatively, almost any image processing software will be able to 
do this.


: Any help whatsoever would be appresciated.  Please email all responses
: (my news network doesn't always work) to:

: jamie@psych.purdue.edu

: Thanks a lot!

: --===Jamie

: --
: |   Jamie DeCoster                              Office phone:  317 494-6892   |
: |   2186 Psychological Sciences Bldg.             Home phone:  317 567-2145   |
: |   Purdue University                                                         |
: |   West Lafayette, IN  47907-1364                   JAMIE@PSYCH.PURDUE.EDU   |
