|
|
Home | Alpha Telephone | Domain Names | Web Hosting | Get Traffic | xrEvidence | xrSoccer United States Patent
Automatic color and grain sorting of materials A system for automatically color and grain sorting materials includes a pair of color cameras positioned to view the top and bottom faces, respectively, of each part. A computer analyzes the data from the top and bottom cameras, and also controls the voltage on the input line to each camera. Camera controllers accept analog data from the camera heads and digitize it so that the information can be passed to the computer for analysis. A white target inserted into the field of view of each camera allows the computer to collect the data needed to do "shading compensation" on the collected color image data. Three basic categories of algorithms are used in the sorting system in accordance with the present invention: (1) training algorithms used to teach the system to identify the color and grain classes that are to be used during the sorting process, (2) real-time operation algorithms which perform the color and grain sorts with parts moving through the system at the desired throughput rate, and (3) utility algorithms which allow operators to display images, perform system tests, etc. In the training and sorting algorithms, the computer produces a black/white histogram of a part face based on the data analysis, and applies a character mark algorithm to the black/white histogram to find a threshold value for eliminating the effects of character marks from the color and grain classification and sorting of the part.
Primary Examiner: Trammell; James P. Assistant Examiner: Shah; Kamini S. Attorney, Agent or Firm: What is claimed is: 1. Apparatus for the automatic color sorting of a part having top and bottom faces to be color and grain sorted, comprising: a materials conveyor for moving the part; top and bottom color cameras positioned to view the top and bottom faces, respectively, of the part, said top and bottom cameras defining fields of view through which the top and bottom faces pass and outputting color image data representing the colors of the top and bottom faces; top and bottom light sources positioned to illuminate the top and bottom faces, respectively, of the part; a power supply providing power to said top and bottom light sources; and computer means for analyzing the data from said top and bottom camera, said computer means including color sorting means for performing color sorting in real time with parts moving on said conveyor past said top and bottom cameras, said color sorting means including means for computing a black/white histogram of a part face based on the data analysis, and means for applying a character mark algorithm to the black/white histogram to find a threshold value for eliminating the effects of character marks from a part face for use in the color sorting of the part faces. 2. The apparatus of claim 1, further comprising first and second cooling enclosures enclosing said top and bottom cameras, respectively. 3. The apparatus of claim 1, further comprising: a single input line electrically connecting said switching power supply to said computer means, said input line controlling the amount of power supplied to each of said top and bottom light sources; and voltage control means for permitting said computer means to control the voltage of said input line. 4. The apparatus of claim 3, wherein said voltage control means comprises a digital to analog converter. 5. The apparatus of claim 1, further comprising an air-conditioned dust free enclosure enclosing said computer means and power supply. 6. The apparatus of claim 1, further comprising top and bottom fiber optic light lines, light emitted by said top and bottom light sources being sent through said top and bottom fiber optic light lines, respectively, to illuminate the top and bottom faces. 7. The apparatus of claim 1, wherein each of said top and bottom light sources comprises at least two quartz tungsten halogen lamps. 8. The apparatus of claim 7, further comprising a plurality of fiber optic light lines optically connected to respective ones of said lamps, light emitted by said lamps being sent through said respective fiber optic light lines to illuminate the top and bottom faces, respectively. 9. The apparatus of claim 1, said apparatus further comprising first and second camera controllers interposed between said top and bottom cameras, respectively, and said computer means, said first and second camera controllers accepting analog data from said top and bottom cameras, respectively, and digitizing it for analysis by said computer means. 10. The apparatus of claim 9, wherein each of said first and second camera controllers each includes a single analog to digital converter, said apparatus further comprising a blue filter used on each of said top and bottom cameras. 11. The apparatus of claim 9, wherein each of said first and second camera controllers includes three separate analog to digital converters, each of said analog to digital converters having its own offset and gain. 12. The apparatus of claim 9, further comprising first and second targets selectively insertable into the fields of view of said top and bottom cameras, respectively, through which the part passes, said first and second targets being substantially identical to each other and having a reflectivity chosen based upon the reflectivity of the part; and wherein said first and second camera controllers include means for performing a rough analog shading correction prior to analog to digital conversion of the data, based on data collected from said top and bottom cameras while viewing said first and second targets, and for performing a fine analog shading correction following analog to digital conversion of the collected data. 13. The apparatus of claim 1, further comprising direct memory access computer interface means for directly transferring the data from said top and bottom cameras to said computer means. 14. The apparatus of claim 13, further comprising a first sensor for determining when a part is about to enter the field of view of said top and bottom cameras; and a second sensor for determining the number of pixels on each of said top and bottom cameras which must be read. 15. The apparatus of claim 14, wherein said first sensor is an optical sensor and said second sensor is an ultrasonic sensor. 16. The apparatus of claim 1, further comprising high speed processing board means for processing the data from said top and bottom cameras and direct memory access computer interface means for transferring the processed data from said interface means to said computer means. 17. The apparatus of claim 1, further comprising first and second targets insertable into said fields of view of said top and bottom cameras, respectively, outside which the part passes. 18. The apparatus of claim 1, wherein said top and bottom light sources each have a smooth spectral energy distribution from about 400 to about 700 nm and a substantially stable spectral energy distribution function across its lifetime, and are of a type that does not have spectral lines of the type present in the light output by most fluorescent bulbs. 19. The apparatus of claim 1, wherein said apparatus is also for the grain sorting of a part, and wherein said computer means further includes training means for teaching said computer means to identify color classes to be used during sorting, training means for teaching said computer means to identify grain classes to be used during sorting, and grain sorting means for performing sorting means for performing color and grain sorting in real time with parts moving on said conveyor past said top and bottom cameras, grain sorting in real time with parts moving on said conveyor past said top and bottom cameras, and utility means for allowing an operator to display images and perform system tests. 20. The apparatus of claim 19, wherein said color cameras have red, green, and blue channels; and wherein said color class identification training means includes: means for applying a shading compensation algorithm to a color image of a training sample collected by one of said cameras to produce a shading compensated color image; means for using the shading compensated color image to average the red, green, and blue channel values to form a black and white image; means for applying a preselected threshold to the black and white image to find and remove background pixels in the black and white image from further consideration; means for using the shading compensated color image to compute a three-dimensional color histogram for the training sample, ignoring any background pixels; means for using the black and white image to compute the black/white histogram for the training sample, again ignoring any background pixels; means for applying a character mark detection algorithm to the black/white histogram to find a threshold value for eliminating the effect of character marks; means for removing character mark pixels from the three-dimensional color histogram using the threshold value for eliminating the effects of character marks from a training sample; means for normalizing the three-dimensional color histogram to convert it to an estimated probability function of the training sample; means for adding the estimated probability function of the training sample to a running sum of three-dimensional estimated probability functions for the color class; means for also adding the estimated probability function of the training sample to a running sum for all color classes; means for applying a color mapping algorithm to the running sum for all color classes to produce a color lookup table; means for using the color lookup table to map the estimated probability function for each training sample into a first reduced measurement vector; means for using the color lookup table to map each running sum of three-dimensional estimated probability functions for a color class into a second reduced measurement vector; means for determining a single prototype for each color class based on the second reduced measurement vector; and means for estimating a threshold for each color class by examining the first reduced measurement vector for all the color classes and selecting the threshold that gives the minimum probability of error. 21. The apparatus of claim 19, wherein said color cameras have red, green, and blue channels; and wherein said color class identification training means includes: means for applying a shading compensation algorithm to a color image of a training sample collected by one of said cameras to produce a shading compensated color image; means for using the shading compensated color image to average the red, green, and blue channel values to form a black and white image; means for applying a preselected threshold to the black and white image to find and removing background pixels in the black and white image from further consideration; means for using the shading compensated color image to compute a three-dimensional color histogram for the training sample, ignoring any background pixels; means for using the black and white image to compute a black/white histogram for the training sample, again ignoring any background pixels; means for applying a character mark detection algorithm to the black/white histogram to find a threshold value for eliminating the effect of character marks from a training sample; means for removing character mark pixels from the three-dimensional color histogram using the threshold value for eliminating the effects of character marks from a training sample; means for normalizing the three-dimensional color histogram to convert it to an estimated probability function of the training sample; means for adding the estimated probability function of the training sample to a running sum of three-dimensional estimated probability functions for the color class; means for also adding the estimated probability function of the training sample to a running sum for all color classes; means for applying a color mapping algorithm to the running sum for all color classes to produce a color lookup table; means for using the color lookup table to map the estimated probability function for each training sample into a reduced measurement vector; means for using the color lookup table to map each estimated probability function into a reduced measurement vector; and means for estimating the threshold for each color class by examining all of the training samples for all the color classes and selecting the threshold that gives the best results. 22. The apparatus of claim 19, wherein said color class identification training means further includes color mapping means for reducing the size of a measurement vector needed to represent one of the faces of one of the parts and for removing colors that might be character marks from the training samples. 23. The apparatus of claim 19, wherein said color class identification training means includes means for producing a color lookup table and means for determining a prototype for each color class using the lookup table; and wherein said color sorting means further includes: means for shade compensating a color image of a training sample collected by one of said cameras to remove non-uniformities in light and in sensing element sensitivities across the filed of view; means for averaging the red, green, and blue components of each color pixel in the shade compensated color image to create a black and white image; means for applying a threshold to the black and white image to remove background pixels in the black and white image from consideration; means for computing a reduced measurement vector of the part face using the color lookup table produced by said color class identification training means; means for removing character mark pixels from the reduced measurement vector using the threshold value for eliminating the effects of character marks from a part face; means for normalizing the reduced measurement vector to form a normalized reduced measurement vector of the part face; means for removing character mark colors from each of the prototypes; means for forming a new set of modified prototypes with the effects of character marks removed from consideration; means for computing the distance of the normalized reduced measurement vector of the part face from each of the prototypes; and means for assigning a color class to the part face based on said distance. 24. The apparatus of claim 19, wherein said color class identification training means includes means for producing a color lookup table and means for determining a prototype for each color class using the lookup table; and wherein said color sorting means further includes: means for shade compensating a color image of a part face collected by one of said cameras to remove non-uniformities in light and in sensing element sensitivities across the filed of view; means for averaging the red, green, and blue components of each color pixel in the shade compensated color image to create a black and white image; means for applying a threshold to the black and white image to remove background pixels in the black and white image from consideration; means for computing a reduced measurement vector of the part face using the color lookup table produced by said color class identification training means; means for removing character mark pixels from the reduced measurement vector using the threshold value for eliminating the effects of character marks from a part face; means for normalizing the reduced measurement vector to form a normalized reduced measurement vector of the part face; means for removing character mark colors from each training sample to create a modified measurement vector for each training sample; means for normalizing the modified measurement vector for each training sample; means for computing the distance value of the normalized reduced measurement vector of the part face from the normalized reduced measurement vector for each training sample; means for finding the k smallest of the distance values; means for finding the color class label that occurs the most often in the training vectors with the k smallest distances; and means for assigning the part face to a color class based on the smallest distance. 25. The apparatus of claim 19, wherein said color sorting means further includes color mapping means for reducing the size of a measurement vector needed to represent one of the faces of one of the parts and wherein said means for applying a character mark algorithm also functions to remove colors that might be character marks from the two reduced measurement vectors used to represent the color of each part face. 26. The apparatus of claim 19, wherein said color cameras have red, green, and blue channels; and wherein said grain class identification training means includes: means for applying a shading compensation algorithm to a color image of a training sample collected by one of said cameras to remove non-uniformities in lighting and in camera sensing element sensitivities across the field of view to produce a shading compensated color image; means for using the shading compensated color image to average the red, green, and blue channel values to form a black and white image; means for applying a preselected threshold to the black and white image to find and remove background pixels in the black and white image from further consideration; means for using the black and white image to compute a black/white histogram for the part face, ignoring any background pixels; means for applying a character mark algorithm to the black/white histogram to find a threshold value for eliminating the effects of character marks from a training sample; means for removing character mark pixels from the black/white histogram using the threshold value for eliminating the effects of character marks from a training sample; means for removing character mark areas from further consideration by labeling them as background pixels in the black and white image; means for computing a normalizing factor; means for applying an equal probability quantizing algorithm to the black and white image of the part, the black/white histogram, the normalizing factor, and the number of gray levels that are to appear in a requantized version of the black and white image to obtain the requantized version of the black and white image; means for applying edge detectors respectively most sensitive to the vertical, horizontal, right diagonal, and left diagonal edges to the requantized version of the black and white image to obtain gradient images which record the absolute values of, respectively, the vertical, horizontal, right diagonal, and left diagonal edges; means for averaging the left and right diagonal gradient images to find a single gradient image that indicates the number of diagonal edges present in either the right or left diagonal dimensions; means for creating an edge histogram and normalizing it; means for finding a class prototype for each color class; and means for estimating a threshold for each color class by examining the normalized edge histogram for all the training samples for all the color classes and selecting the threshold that gives the minimum probability of error. 27. The apparatus of claim 19, wherein said color cameras have red, green, and blue channels; and wherein said grain class identification training means includes: means for applying a shading compensation algorithm to a color image of a training sample collected by one of said cameras to remove non-uniformities in lighting and in camera sensing element sensitivities across the field of view to produce a shading compensated color image; means for using the shading compensated color image to average the red, green, and blue channel values to form a black and white image; means for applying a preselected threshold to the black and white image to find and remove background pixels in the black and white image from further consideration; means for using the black and white image to compute a black/white histogram for the part face, ignoring any background pixels; means for applying a character mark algorithm to the black/white histogram to find a threshold value for eliminating the effects of character marks from a training sample; means for removing character mark pixels from the black/white histogram using the threshold value for eliminating the effects of character marks from a training sample; means for removing character mark areas from further consideration by labeling them as background pixels in the black and white image; means for computing a normalizing factor; means for applying an equal probability quantizing algorithm to the black and white image of the part, the black/white histogram, the normalizing factor, and the number of gray levels that are to appear in a requantized version of the black and white image to obtain the requantized version of the black and white image; means for applying edge detectors respectively most sensitive to the vertical, horizontal, right diagonal, and left diagonal edges to the requantized version of the black and white image to obtain gradient images which record the absolute values of, respectively, the vertical, horizontal, right diagonal, and left diagonal edges; means for averaging the left and right diagonal gradient images to find a single gradient image that indicates the number of diagonal edges present in either the right or left diagonal dimensions; means for creating an edge histogram and normalizing it; and means for estimating a threshold for each grain class by examining the normalized edge histogram for all the training samples for all the grain classes and selecting the threshold that gives the best results. 28. The apparatus of claim 19, wherein said grain class training identification means includes means for determining a prototype for each grain class; and wherein said grain sorting means includes: means for removing character mark pixels from the black/white histogram of the best part face; means for removing character mark areas from further consideration by labeling them as background pixels in the black and white image of the best part face; means for computing a normalizing factor; means for applying an equal probability quantizing algorithm to the black and white image of the best part face, the black/white histogram of the black and white image of the best part face, the normalizing factor, and the number of gray levels that are to appear in a requantized version of the black and white image to obtain the requantized version of the black and white image; means for applying edge detectors respectively most sensitive to the vertical, horizontal, right diagonal, and left diagonal edges to the requantized version of the black and white image to obtain gradient images which record the absolute values of, respectively, the vertical, horizontal, right diagonal, and left diagonal edges; means for averaging the left and right diagonal gradient images to find a single gradient image that indicates the number of diagonal edges present in either the right or left diagonal dimensions; means for creating an edge histogram and normalizing it; means for computing the distance of the normalized edge histogram from each of the prototypes; and means for assigning a grain pattern class to the part face based on the distance. 29. The apparatus of claim 19, wherein said grain class training identification means includes means for determining a prototype for each grain class; and wherein said grain sorting means includes: means for removing character mark pixels from the black/white histogram of the best part face; means for removing character mark areas from further consideration by labeling them as background pixels in the black and white image of the best part face; means for computing a normalizing factor; means for applying an equal probability quantizing algorithm to the black and white image of the best part face, the black/white histogram of the black and white image of the best part face, the normalizing factor, and the number of gray levels that are to appear in a requantized version of the black and white image to obtain the requantized version of the black and white image; means for applying edge detectors respectively most sensitive to the vertical, horizontal, right diagonal, and left diagonal edges to the requantized version of the black and white image to obtain gradient images which record the absolute values of, respectively, the vertical, horizontal, right diagonal, and left diagonal edges; means for averaging the left and right diagonal gradient images to find a single gradient image that indicates the number of diagonal edges present in either the right or left diagonal dimensions; creating an edge histogram and normalizing it; means for computing the distance of the normalized edge histogram from each of the training samples; means for finding the grain class label that occurs the most often in the training vectors with the k smallest distances; and means for assigning the part face to a grain class based on the smallest distance. 30. The apparatus of claim 1, wherein said color cameras have red, green, and blue channels; and wherein said computer means includes normalizing means for executing a normalizing algorithm to normalize variations in sensitivity between said top and bottom cameras, said normalizing means including: means for applying a shading correction algorithm to color images of color samples collected from said top and bottom cameras; means for computing the values of matrices representing the relative red, green and blue responses of said top and bottom cameras based on the shading corrected color component images collected from said top and bottom cameras; means for creating two-dimensional plots of the relative red, green, and blue responses of said top and bottom cameras to all of the color targets, with the horizontal axes of the plots representing the output gray level value for the red, green, and blue channels of one of said top and bottom cameras and the vertical axes of the plots representing the output gray level value for the red, green, and blue channels of the other of said top and bottom cameras; means for terminating execution of the normalizing algorithm, if the function y=x is the function that best fits the points on all three of the red, green, and blue plots; means for estimating the degree of polynomial function that appears to best fit the relative response data; means for terminating execution of the normalizing algorithm, if the function y=x is not the function that best fits the points on all three of the red, green, and blue plots; means for defining a function for each graph that fits the data, using a least squares fitting program; and means for creating three lookup tables that map the output of one of said top and bottom cameras into the output of the other of said top and bottom cameras. 31. A method of automatically color sorting a part having opposite top and bottom faces to be color sorted, comprising the steps of: providing top and bottom color cameras positioned to view the top and bottom faces, respectively, of a part, the top and bottom cameras defining fields of view through which the top and bottom faces pass; illuminating the fields of view; moving the part past the top and bottom cameras so that the top and bottom faces pass through the fields of view of the top and bottom cameras; using the top and bottom cameras to output color image data representing the colors of the top and bottom faces; computing black/white histograms of each of the top and bottom faces based on the color image data output by the cameras; applying a character mark algorithm to the black/white histograms of each of the top and bottom faces to produce a threshold value for eliminating the effects of character marks from a part face for use in the color sorting of each of the top and bottom faces; eliminating the effects of character mark from the data from the top and bottom cameras using the threshold value produced by the character mark algorithm for eliminating the effects of character marks from a part face; determining the color class of the top and bottom faces based on the data from the top and bottom cameras; and determining which of the top and bottom faces is the better looking based on the determination of the color class of the top and bottom faces. 32. The method of claim 31, further comprising cooling the top and bottom cameras to maintain them at a substantially constant temperature. 33. The method of claim 31, further comprising controlling the amount of power supplied to each of the light sources by controlling the amount of voltage on the input line from the power supply to the light sources. 34. The method of claim 33, wherein said step of controlling the amount of power comprises placing a target in the field of view of one of the top and bottom cameras, averaging the picture elements of the camera that cover an area of the target, comparing the average to a standard, and if necessary adjusting the voltage applied to the input line based on the comparison. 35. The method of claim 31, wherein said illuminating step comprises sending light emitted by top and bottom light sources through fiber optic light lines to illuminate the top and bottom faces. 36. The method of claim 31 wherein said illuminating step comprises using light sources having a smooth spectral energy distribution from about 400 to about 700 nm and a substantially stable spectral energy distribution function across its lifetime, and being of a type that do not have spectral lines of the type present in the light output by fluorescent bulbs. 37. The method of claim 31, further comprising the step of digitizing the data from the top and bottom cameras prior to said step of determining the color class of the top and bottom faces. 38. The method of claim 37, further comprising filtering light entering the top and bottom cameras using blue filters. 39. The method of claim 37, further comprising the steps of performing a rough analog shading correction prior to said digitizing step and performing a fine analog shading correction following said digitizing step. 40. The method of claim 31, further comprising the steps of determining when a part is about to enter the field of view of said top and bottom cameras; and determining the number of pixels on each of said top and bottom cameras which must be read. 41. A method of automatically color sorting a part having opposite top and bottom faces to be color sorted, comprising the steps of: providing a color sorting system including: top and bottom color cameras positioned to view the top and bottom faces, respectively, of a part and for outputting color image data representing the colors of the top and bottom faces; and processing means for processing the data from the top and bottom cameras; training the system to identify a plurality of color classes that are to be used during color sorting; collecting a color image of the part face using the cameras; computing black/white histograms of each of the top and bottom faces based on the color image data output by the cameras; applying a character mark algorithm to the black/white histograms of each of the top and bottom faces to produce a threshold value for eliminating the effects of character marks from a part face for use in the color sorting of each of the top and bottom faces; eliminating the effects of character marks from the data from the top and bottom cameras using the threshold value for eliminating the effects of character marks from a part face; and performing color sorting with parts moving through the system using the data from the top and bottom cameras, based on the color classes identified during said training step. 42. The method of claim 41, wherein said step of teaching the system to identify the color classes includes removing the effects of varying intensities among the color classes from the output of edge detectors, using an equal probability quantizing algorithm. 43. The method of claim 41, wherein the color cameras have red, green, and blue channels and wherein said color class training step includes: collecting a color image of a training sample using the cameras; applying a shading compensation algorithm to the color image of the training sample to produce a shading compensated color image of the training sample; using the shading compensated color image to average the red, green, and blue channel values to form a black and white image; applying a preselected threshold to the black and white image to find and remove background pixels in the black and white image from further consideration; using the shading compensated color image to compute a three-dimensional color histogram for the training sample, ignoring any background pixels found in said step of applying a preselected threshold; using the black and white image to compute a black/white histogram for the training sample, again ignoring any background pixels found in said step of applying a preselected threshold; applying a character mark detection algorithm to the black/white histogram to find a threshold value for eliminating the effects of character marks from a training sample; removing character mark pixels from the three-dimensional color histogram using the threshold value for eliminating the effects of character marks from a training sample; normalizing the three-dimensional color histogram to convert it to an estimated probability function of the training sample; adding the estimated probability function of the training sample to a running sum of three-dimensional estimated probability functions for the color class; also adding the estimated probability function of the training sample to a running sum for all color classes; repeating the above steps for additional training samples; applying a color mapping algorithm to the running sum for all color classes to produce a color lookup table; using the color lookup table to map the estimated probability function for each training sample into a first reduced measurement vector; using the color lookup table to map each running sum of three-dimensional estimated probability functions for a color class into a second reduced measurement vector; determining a single prototype for each color class based on the second reduced measurement vector; and for each color class estimating a threshold by examining the first reduced measurement vector for all the color classes and selecting the threshold that gives the minimum probability of error. 44. The method of claim 43, wherein said step of applying a shading correction algorithm includes collecting a selected number of lines of color image data from one of the cameras while a lens cap is on the cameras, computing the average response for each pixel in each channel of data, removing the lens cap and scanning the selected number of lines of color image data off the white target, computing the average response for each pixel in each channel of data, and applying the steps of a standard shading correction algorithm to the color imagery as it is being collected. 45. The method of claim 41, wherein the color cameras have red, green, and blue channels and wherein said color class training step includes: collecting a color image of a training sample using the cameras; applying a shading compensation algorithm to the color image of the training sample to produce a shading compensated color image of the training sample; using the shading compensated color image to average the red, green, and blue channel values to form a black and white image; applying a preselected threshold to the black and white image to find and remove background pixels in the black and white image from further consideration; using the shading compensated color image to compute a three-dimensional color histogram for the training sample, ignoring any background pixels found in said step of applying a preselected threshold; using the black and white image to compute a black/white histogram for the training sample, again ignoring any background pixels found in said step of applying a preselected threshold; applying a character mark detection algorithm to the black/white histogram to find a threshold value for eliminating the effects of character marks from a training sample; removing character mark pixels from the three-dimensional color histogram using the threshold value for eliminating the effects of character marks from a training sample; normalizing the three-dimensional color histogram to convert it to an estimated probability function of the training sample; adding the estimated probability function of the training sample to a running sum of three-dimensional estimated probability functions for the color class; also adding the estimated probability function of the training sample to a running sum for all color classes; repeating the above steps for additional training samples; applying a color mapping algorithm to the running sum for all color classes to produce a color lookup table; using the color lookup table to map the estimated probability function for each training sample into a reduced measurement vector; using the color lookup table to map each estimated probability function into a reduced measurement vector; and for each color class, estimating the threshold by examining all of the training samples for all the color classes and selecting the threshold that gives the best results. 46. The method of claim 45, wherein said step of applying a shading correction algorithm includes collecting a selected number of lines of color image data from one of the cameras while a lens cap is on the cameras, computing the average response for each pixel in each channel of data, removing the lens cap and scanning the selected number of lines of color image data off the white target, computing the average response for each pixel in each channel of data, and applying the steps of a standard shading correction algorithm to the color imagery as it is being collected. 47. The method of claim 41, wherein said color class training identification step includes producing a color lookup table and determining a prototype for each color class; and wherein said color sorting step further includes: after said step of collecting a color image of the part face using the cameras, shade compensating the color image of the part face to remove non-uniformities in light and in sensing element sensitivities across the field of view; averaging the red, green, and blue components of each color pixel in the shade compensated color image to create a black and white image; applying a threshold to the black and white image to remove background pixels in the black and white image from consideration; computing a reduced measurement vector of the part face using the color lookup table computed in said color class identification training step; performing said step of eliminating the effects of character marks from the data from the top and bottom cameras by removing character mark pixels from the reduced measurement vector of the part face using the threshold value for eliminating the effects of character marks from a part face; normalized the reduced measurement vector to form the normalized reduced measurement vector of the part face; removing character mark colors from each of the prototypes; forming a new set of modified prototypes with the effects of character marks removed from consideration; computing the distance of the normalized reduced measurement vector of the part face from each of the prototypes; and assigning a color class to the part face based on the distance. 48. The method of claim 47, further comprising the steps of using information about the class label of the color class to which the face has been assigned, a distance measure, and the clear area of the part face to determine which of the two faces of a part is the best face. 49. The method of claim 41, wherein said color class training identification step includes producing a color lookup table; and wherein said color sorting step further includes: shade compensating the color image of the part face to remove non-uniformities in light and in sensing element sensitivities across the filed of view; averaging the red, green, and blue components of each color pixel in the shade compensated color image to create a black and white image; applying a threshold to the black and white image to remove background pixels in the black and white image from consideration; computing a reduced measurement vector of the part face using the color lookup table computed in said color class identification training step; performing said step of eliminating the effects of character marks from the data from the top and bottom cameras by removing character mark pixels from the reduced measurement vector of the part face using the threshold value for eliminating the effects of character marks from a part face; normalizing the reduced measurement vector of the part face to create a normalized reduced measurement vector of the part face; removing character mark colors from each training sample to create a modified measurement vector for each training sample; normalizing the modified measurement vector for each training sample to create a normalized measurement vector for each training sample; computing the distance value of the normalized reduced measurement vector of the part face from the normalized reduced measurement vector for each training sample; finding the k smallest of the distance values; finding the color class label that occurs the most often in the training vectors with the k smallest distances; and assigning the part face to a color class based on the smallest distance. 50. The method of claim 49, further comprising the steps of using information about the class label of the color class to which the face has been assigned, a distance measure, and the clear area of the part face to determine which of the two faces of a part is the best face. 51. The method of claim 41, wherein said method also includes grain sorting of the part and said method further includes: training the system to identify the grain classes that are to be used during grain sorting; and performing grain sorting on the parts which have been color sorted; and wherein the color cameras have red, green, and blue channels and wherein said grain class training step includes: collecting a color image of a training sample using the cameras; applying a shading compensation algorithm to the color image of the training sample to remove non-uniformities in lighting and in camera sensing element sensitivities across the field of view to produce a shading compensated color image of the training sample; using the shading compensated color image to average the red, green, and blue channel values to form a black and white image; applying a preselected threshold to the black and white image, removing background pixels in the black and white image from further consideration; using the black and white image to compute a black/white histogram for the part face, ignoring any background pixels; applying a character mark algorithm to the black/white histogram to find a threshold value for eliminating the effects of character marks from a training sample; removing character mark pixels from the black/white histogram using the threshold value for eliminating the effects of character marks from a training sample; removing character mark areas from further consideration by labeling them as background pixels in the black and white image; computing a normalizing factor; applying an equal probability quantizing algorithm to the black and white image of the part, the black/white histogram, the normalizing factor, and the number of gray levels that are to appear in a requantized version of the black and white image to obtain the requantized version of the black and white image; applying edge detectors respectively most sensitive to the vertical, horizontal, right diagonal, and left diagonal edges to the requantized version of the black and white image to obtain gradient images which record the absolute values of, respectively, the vertical, horizontal, right diagonal, and left diagonal edges; averaging the left and right diagonal gradient images to find a single gradient image that indicates the number of diagonal edges present in either the right or left diagonal dimensions; creating an edge histogram and normalizing it; finding a class prototype for each color class; and for each color class estimating a threshold by examining the normalized edge histogram for all the training samples for all the color classes and selecting the threshold that gives the minimum probability of error. 52. The method of claim 41, wherein said method also includes grain sorting of the part and said method further includes: training the system to identify the grain classes that are to be used during grain sorting; and performing grain sorting on the parts which have been color sorted; and wherein the color cameras have red, green, and blue channels and wherein said grain class training step includes: collecting a color image of a training sample using the cameras; applying the shading compensation algorithm to the color image of the training sample to remove non-uniformities in lighting and in camera sensing element sensitivities across the field of view to produce a shading compensated color image of the training sample; using the shading compensated color image to average the red, green, and blue channel values to form a black and white image; applying a preselected threshold to the black and white image, to find and remove background pixels in the black and white image from further consideration; using the black and white image to compute a black/white histogram for the part face, ignoring any background pixels; applying a character mark algorithm to the black/white histogram to find a threshold value for eliminating the effects of character marks; removing character mark pixels from the black/white histogram using the threshold value for eliminating the effects of character marks; removing character mark areas from further consideration by labeling them as background pixels in the black and white image; computing a normalizing factor; applying an equal probability quantizing algorithm to the black and white image of the part, the black/white histogram, the normalizing factor, and the number of gray levels that are to appear in a requantized black and white image to obtain the requantized version of the black and white image; applying edge detectors respectively most sensitive to the vertical, horizontal, right diagonal, and left diagonal edges to the requantized version of the black and white image to obtain gradient images which record the absolute values of, respectively, the vertical, horizontal, right diagonal, and left diagonal edges; averaging the left and right diagonal gradient images to find a single gradient image that indicates the number of diagonal edges present in either the right or left diagonal dimensions; creating an edge histogram and normalizing it; and estimating a threshold for each grain class by examining the normalized edge histogram for all the training samples for all the grain classes and selecting the threshold that gives the best results. 53. The method of claim 41, wherein said method also includes grain sorting in said method further includes: training the system to identify the grain classes that are to be used during grain sorting; and performing grain sorting on the parts which have been color sorted; and wherein said grain sorting step includes: removing character mark pixels from the black/white histogram of the best part face; removing character mark areas from further consideration by labeling them as background pixels in the black and white image of the best part face; computing a normalizing factor; applying an equal probability quantizing algorithm to the black and white image of the best part face, the black/white histogram of the black and white image of the best part face, the normalizing factor, and the number of gray levels that are to appear in a requantized black and white image to obtain the requantized version of the black and white image; applying edge detectors respectively most sensitive to the vertical, horizontal, right diagonal, and left diagonal edges to the requantized version of the black and white image to obtain the gradient images which record the absolute values of, respectively, the vertical, horizontal, right diagonal, and left diagonal edges; averaging the left and right diagonal gradient images to find a single gradient image that indicates the number of diagonal edges present in either the right or left diagonal dimensions; creating an edge histogram and normalizing it; computing the distance of the normalized edge histogram from each of the prototypes; and assigning a grain pattern class to the part face based on the distance. 54. The method of claim 41, wherein said method also includes grain sorting of the part and said method further includes: training the system to identify the grain classes that are to be used during grain sorting; and performing grain sorting on the parts which have been color sorted; and wherein said grain sorting step includes: removing character mark pixels from the black/white histogram of the best part face; removing character mark areas from further consideration by labeling them as background pixels in the black and white image of the best part face; computing a normalizing factor; applying an equal probability quantizing algorithm to the black and white image of the best part face, the black/white histogram of the black and white image of the best part face, the normalizing factor, and the number of gray levels that are to appear in a requantized black and white image to obtain the requantized version of the black and white image; applying edge detectors respectively most sensitive to the vertical, horizontal, right diagonal, and left diagonal edges to the requantized version of the black and white image to obtain gradient images which record the absolute values of, respectively, the vertical, horizontal, right diagonal, and left diagonal edges; averaging the left and right diagonal gradient images to find a single gradient image that indicates the number of diagonal edges present in either the right or left diagonal dimensions; creating an edge histogram and normalizing it; computing the distance of the normalized edge histogram from the training sample; finding the k smallest of the distance values; finding the grain class label that occurs the most often in the training vectors with the k smallest distances; and assigning the part face to a grain class based on the smallest distance. 55. The method of claim 41, wherein said training step is carried out using a plurality of color samples, said method further including the step of normalizing variations in sensitivity between the top and bottom cameras, said normalizing step including: for each color sample, scanning the color sample to collect a color image of the sample from both cameras; applying a shading correction algorithm to the color images from both cameras to produce shading corrected color images, and computing the values of matrices representing the relative red, green and blue responses of the two cameras based on the shading corrected color images collected from both cameras; creating a two-dimensional plot of the relative red responses of the two cameras to all of the color targets, with the horizontal axis of the two-dimensional plot representing the output gray level value for the red channel of the first camera and the vertical axis of the two-dimensional plot representing the output gray level value for the red channel of the second camera; creating a two-dimensional plot of the relative green responses of the two cameras to all of the color targets, with the horizontal axis of the two-dimensional plot representing the output gray level value for the green channel of the first camera and the vertical axis of the two-dimensional plot representing the output gray level value for the green channel of the second camera; creating a two-dimensional plot of the relative blue responses of the two cameras to all of the color targets, with the horizontal axis of the two-dimensional plot representing the output gray level value for the blue channel of the first camera and the vertical axis of the two-dimensional plot representing the output gray level value for the blue channel of the second camera; determining if the function y=x is the function that best fits the points on all three of the red, green, and blue plots; if y=x provides the best fit, terminating execution of the normalizing algorithm, as adjustment in either camera output is unneeded; if y=x does not provide the best fit, estimating the degree of polynomial function that appears to best fit the relative response data; defining a function for each graph that fits the data, using a least squares fitting program; and creating three lookup tables that map the output of the first camera into the output of the second camera. BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to the automatic color and/or grain sorting of materials. The materials which can be sorted by this method include any man-made or natural materials which may vary in color or surface grain structure from one part to another due to natural causes or inconsistences in manufacturing processes. Examples of materials which can be sorted by use of this invention include finished and unfinished hardwood and softwood parts; wood veneers; the hides of animals; birds and reptiles and products made from these hides; ceramic tiles; man-made wood products with and without painted, imprinted, or embossed grain structure; metal and plastic parts with and without painted, imprinted, embossed or molded grain structure; woven and knittend textile products either natural, bleached, dyed, or printed; carpet; and bricks. 2. Related Art One application of color and grain sorting of materials is in the manufacture of solid hardwood furniture and cabinets which require rough parts that have relatively large dimensions, e.g., door fronts, table tops, etc. These rough parts are typically referred to as panels. Panels are manufactured by edge gluing hardwood parts together where each part is typically of the same length as the panel but is significantly narrower. For the panel to be aesthetically pleasing each of the parts used to create it must have approximately the same color and, to a lesser extent approximately the same grain pattern. To create uniform colored panels requires that the rough parts be color sorted. Currently, this color and grain sorting must be done by hand. This process is somewhat labor intensive and prone to error. Since panels that do not meet manufacturing quality standards must either be remanufactured to create some other component or thrown into the hopper to be burned for fuel, good quality control is essential. The color and grain sorting of edge glued panel parts can be conceptually divided into three basic operations. First, since each part has two faces, the color class of each face must be determined. Second, using the information about the color class of each face, a decision must be made as to which of the two part faces is the better looking. The "best" face will be the face that appears in the "front" panel face, i.e., in a door front or a table top. Finally, the grain class of the better face must be determined so that the complete color and grain sort can be made. In many applications only a color sort is required. A grain sort is usually only needed for demanding applications such as the export market for Europe. The color sorting process is complicated by a number of factors. These factors usually result from the heterogeneity of the wood material. A part is not one color but a distribution of colors. There is a low frequency variation in color along the length and width of the piece. This situation is further complicated by a high frequency variation in the grain pattern appearing on a part face. There is further the variation in color from one hardwood species to another. Clearly, the sorting process must vary with hardwood species, i.e., there will be different color classes for each hardwood species. The sorting process may also vary with the product being manufactured, i.e., there might be tighter color quality standards for a high priced item than a low priced item. Complications also arise given variations in product quality. While the parts to be color sorted should be free of any unwanted wood features, they arc typically not all clear wood. The parts used to make lower quality products may contain areas of mineral streak, small worm holes, and solid knots. Manufacturers refer to such features as character marks. Allowing these character features to appear in parts can markedly affect the number of parts that can be cut from a given volume of lumber. The more character marks that are allowed the greater the part yield. Because of this fact any color sorting system must be able to handle parts with character marks. When a part face contains such marks, the color class of the face is assigned based on the color characteristics of clear wood areas it contains. Also, the variation that is acceptable across a panel face is usually product quality dependent. In very high quality hardwood tables, chairs, cabinets, etc., the variation in color across the panel must be slight while in lower quality products the variation can be much higher. In view of the above considerations, together with the variability in wood color with species, any color matching system must provide a mechanism for easily altering the number and types of classes that the system will handle. That is, the system needs to provide the capability of handling a variety of species and provide a mechanism to conveniently switch from one species to another. The system needs to be able to ignore character marks that have been left in part faces while performing the color match. The system needs to have some adjustable parameters that allows a manufacturer to adjust the color uniformity of the sort. High quality products need to have parts sorted into a class in such a way that there is very little color variation from one part to another, while lower quality, less expensive products can be sorted in such a way as to allow a good deal of variation from one part to the next within a color class. To provide flexibility in the manufacturing process, a color sorting device should allow the manufacturer to easily change the priorities of the color classes. If a particular color is badly needed to complete the day's production schedule, any part that can reasonably be sorted into this color class should be so sorted. Finally, wood colors can vary significantly from one part to another. If a part does not reasonably belong to any color class that a sorting system has been taught to recognize, this part should not be assigned to any of these classes but rather should be sorted into an out class. The grain sorting component of the system needs to have similar flexibility. Since the grain patterns vary significantly with hardwood species, the system must provide the capability to easily switch back and forth among species. As is the case with color sorting the grain sorting operation should not be affected by the presence of character marks. The system needs some parameters that allow the manufacturer to control the uniformity of the grain sort. As is the case with color sorting the quality of the grain match on a sort depends on the quality and price of the item being produced. Also, grain patterns vary significantly from one part to another. If a part has a grain pattern that does not reasonably belong to any of the grain patterns the system has been taught to recognize, it should be sorted into an out class so that plant employees can make the decision as to what to do with the part. There are a number of color sorting systems on the market and seemingly only one of these systems has the additional capability to do some type of grain sorting. However, existing color matching systems do not provide either the capability to accurately sort hardwood parts into the number of classes that need be considered, nor is the grain matching capability of the only existing system that can perform this function capable of meeting the demands of the hardwood industry. One of the difficulties in designing a color matching system is the way color is perceived by the human eye. The way humans perceive color was extensively studied in the late 1920's and early 1930's by the German Commission Internationale de l'Eclairage (C.I.E.). Based on an extensive series of studies that were conducted the C.I.E. [CIE74] proposed the Trichromatic Theory of Color Perception. This theory states that human color vision is based only on the perception of three colors, red, green and blue. Thus any color that is perceived can be described as a mixture of these three fundamental colors, i.e., where C is a color, r is the amount of red, R, present, g is the amount of green, G, present, and b is the amount of blue, B, present. The above equation (1) leads very naturally to the concept of a three dimensional color space, where any color C represents a point, (r, g, b) in this color space (see FIG. 10). While the above is conceptually very straight forward, the complete characterization of color is a bit more complex. First the color of any material is determined by the spectral makeup of light that is reflected from its surface. A material preferentially absorbs certain wavelengths of incident light while reflecting others, e.g., a material that is red in color reflects a large proportion of light in the visible red part of the electromagnetic spectrum, i.e., 600 to 700 nanometers (nm) while reflecting less light in the green (500 to 600 nm) and blue (400 to 500 nm) parts of the spectrum. Since a materials color is based on the preferential absorption and reflectance of incident light, the spectral characteristics of the incident light can alter the human perception of materials color. If, for example, a blue light, i.e., one that produces only visible light in the 400 to 500 nm range, is used to illuminate the red material discussed above, this material will appear black to the human observer. Therefore to accurately measure the color characteristics of a material, one must specify the spectral characteristics of the light source used to illuminate the surface of the material under consideration, and the spectral characteristics of the sensor. For the C.I.E. the challenge was to define a meaningful standard(s) for the light source to be used and to define the spectral characteristics of the human visual system. While the C.I.E. actually created several standard light sources, the most obvious choice for a standard is afternoon sunlight. To appreciate this standard one must understand the physics of incandescent sources of light. A source of radiate energy may be characterized by its spectral energy distribution which specifies the time rate of energy the source emits per unit wavelength interval. The total power emitted by a radiant source, given by the integral of the spectral energy distribution, is called the radiant flux of the source. A body that exists at an elevated temperature radiates electromagnetic energy. The amount of energy radiated is related to its temperature. A blackbody is an idealized type of heat radiator whose radiant flux is the maximum obtainable at any wavelength for a body at a fixed temperature. The spectral energy distribution of a blackbody is given by Planck's law. The key parameter which specifies the distribution of emitted light energy of a blackbody is the temperature of the body given in degrees Kelvin. Consequently a way of describing the characteristics of a light source is to compare the spectral energy distribution of this light source with that of a blackbody. The idea is to find the temperature which gives a blackbody irradiator a spectral energy distribution as close as possible to that of the light. If this temperature is T in degrees Kelvin then the light is said to have an effective color temperature of T. The C.I.E. standard source S.sub.A is a tungsten filament bulb whose effective color temperature is 2854.degree. K. Standard source S.sub.B approximates afternoon sunlight between 400 to 700 nm and has an effective color temperature of 6700.degree. K. Standard source S.sub.C approximates light from an overcast sky between 400 to 700 nm and has an effective color temperature of 4900.degree. K. The C.I.E. specification for its standard narrow field observer, i.e., sensor, is given by the spectral distribution curves shown in FIG. 2. These curves were experimentally obtained. The experiments involved having observers attempt to match a number of monochromatic colors with the monochromatic primaries red (700 nm), green (546.1 nm), and blue (435.8 nm). The monochromatic colors using the experiments have wavelengths across the visible spectrum. At any one wavelength the values given by the curves represent the relative amounts of red, green, and blue needed to match the monochromatic color of that wavelength. These curves define the axes of the three-dimensional color space discussed above. To see this let C(.lambda.) denote the spectrum of visible wavelengths, .lambda., of the color C, let R(.lambda.) denote the red human response curve of FIG. 11, let G(.lambda.) denote the green human response curve of FIG. 11, let B(.lambda.) denote the blue human response curve of FIG. 11, and, finally let I(.lambda.) denote the spectral characteristics of the illumination source. Then, roughly speaking, the color coordinates (r, g, b) for C(.lambda.) are given by The negative values for the red curve from wavelengths 435.8 nm to 546.1 nm shown in FIG. 11 result because the experimental values were adjusted so that the distribution of coefficients for the monochromatic red, green and blue would all be equal for white. The color white is by definition an equal mixture of all colors. Hence the motivation for wanting the coefficients for the monochromatic red, green, and blue all be equal for white. The presence of I(.lambda.) in the above equations mathematically defines the importance of the spectral characteristics of the illumination source in the measurement of color. Of course, it is not just enough to arrive at a method for measuring color, i.e., defining the (r, g, b) point it represents in RGB space, but it is also desirable to be about to judge the relative similarity or dissimilarity of two colors in a manner that is consistent with human judgments. The C.I.E. also performed experiments on this aspect of the color matching problem. The goal of these experiments was to define a metric, m, on the color space such that if a color C.sub.1 is perceived by a standard observer to be more like color C.sub.2 than color C.sub.3 then Defining such a norm across the spectrum of hues the human perceives proved to be a challenging task, one that they were not able to successfully complete. Even though the very important metric m eluded the C.I.E. investigators, the work that they did accomplish forms the basis for modern color measuring/color matching work. Based on the C.I.E. work three things are very clear. To be able to match the color of objects one must: 1. Control the spectral characteristics of the detector. As with the illumination source, the spectral characteristics of the detector must be constant over the time interval measurements are being made. Theoretically, the best detector would be one that matches the spectral characteristics of a standard human observer. 2. Control the spectral characteristics of the illumination source. These spectral characteristics must not change over the time interval over which the measurements are being made, or incorrect measurements will result. Theoretically, the best source to use would be one that matches afternoon sun light on a clear day. 3. Use the three-dimensional color space as the means to represent color, i.e., the measurements needed to identify a color are the triplet (r, g, b). 4. A metric needs to be defined on the three-dimensional color space so that the relative similarity of any two colors can be gauged. With regard to the sensor, ideally one would like to have a sensor that has the same spectral characteristics as the human eye. However, practical considerations must take precedence. These considerations lead to the selection of a sensor that does not exactly match the spectral characteristics of the standard human observer as defined by C.I.E. To use the C.I.E. standard observer seemingly requires the use of a spectrophotometer. This device measures the spectral reflectance characteristics of a material measured at, typically, a small circular spot on the materials surface. The result is a vector valued measurement, M, where each element is the gauged reflectance value for some interval of wavelengths, .DELTA..lambda..sub.i. The dot product of the vector M with vector representations for R(.lambda.), G(.lambda.), and B(.lambda.) can be taken to yield the triple (r, g, b), i.e., the color space coordinate for the color. This approach has some advantages. First the color measurement made has some basis in human perception. Second, spectrophotometers typically are well calibrated so that there is good agreement from one instrument to another. Unfortunately, this approach also has a number of disadvantages. Spectrophotometers are expensive. They make measurements rather slowly. This last fact combined with the fact that the color of wood varies continuously across its surface means that employing a spectrophotometer on a wood color matching problem would take a good bit of time. Given the measurement vector M, finding (r, g, b) is rather computationally expensive. These considerations seemingly suggest that this sensing technology is inappropriate for the color matching of edge glued panel parts. An alternate approach is to use solid state color camera technology. The output of a color camera is (r, g, b). Therefore, no additional processing is required to get the desired measurement. Color cameras are relatively inexpensive. They can generate data very quickly. Hence, a rough part can be sampled at literally thousands of locations to determine the variations in part color across and down the length of the part. Typically, the output of a color camera is digitized so that 8 bits of information is available in each of the red, green and blue color channels. As such these cameras can sense well over 16 million colors. All the above considerations suggest that this technology seems appropriate for this problem. Unfortunately, this technology also has some problems associated with it. Solid state charge coupled devices (CCD) cameras have varying sensitivity from one sensing element to another. This means that two spots on a part that have the same color can have different (r, g, b) values as measured by the camera. If any of the points on a part's face that have the same color are to have the same measured (r, g b), then the lighting must be perfectly uniform across the part face. Achieving this uniformity is physically impossible to accomplish given today's state of lighting technology. Hence, a way around these problems must be found. Another problem involves the fact that color cameras are not calibrated by the manufacturer. Two different cameras can give different color measurements when both are looking at the same part under identical lighting conditions. This fact is of concern here because one of the objectives of a color and grain sorting system is to determine which of a part's two faces is the better to use in a panel. The reason for this is that to meet throughput requires two cameras must be used, one imaging each part face. Therefore, a solution to this problem must be found. Theoretically, the best standard light source to use in the measurement of color is the C.I.E. standard source S.sub.B that approximates the light of the afternoon sun. Unfortunately, the only light sources capable of generating a 6700.degree. K effective color temperature are arc lamps. These lamps are expensive to buy. Consequently, for at least this application, prudence demands that one look at light sources that have lower color temperatures. The requirements for a useful light sources arc that (1) it have smooth spectral energy distribution from 400 to 700 nm, (2) that it not have the spectral lines that are present in the light output of most fluorescent bulbs, (3) that its spectral energy distribution function not change significantly across a bulb's lifetime, and (4) that it be relatively inexpensive. The first requirement suggests that some type of incandescent source be used. The second requirement rules out the most inexpensive incandescent technology available, i.e., the normal light bulb, as well as special incandescent bulbs used in color photography that have relatively high color temperatures. Seemingly the best light source for meeting all the above requirements are quartz tungsten halogen bulbs. This is probably the reason the C.I.E. has one standard source based on this technology even though this standard source does not correspond to any naturally occurring lighting situation. It is important to note that the amount of power produced by an incandescent bulb is directly related Lo the amount of electrical power dissipated across its filament. The amount of light emitted by a normal light bulb will typically drop by 20 percent during the course of its lifetime. This happens because the intense heat on the filament causes atoms of tungsten to be thrown off the filament. Over time this causes the filament to gradually become thinner. The thinner the filament the more resistance it shows to electrical current. This increased resistance lowers the power that is dissipated across the filament which, in turn, reduces the amount of light emitted by the bulb. This same phenomenon holds for the special photo light bulbs used in color photography. The amount of light emitted by a quartz tungsten halogen bulb, on the other hand, only drops by about 2 percent over the course of its lifetime. The reason for this is the halogen cycle. The halogen in the bulb causes tungsten atoms that are thrown off the filament to reunite with the filament. This, in turn, markedly reduces filament thinning. These bulbs operate at very high temperatures, so high in fact that the filament enclosure must be made of clear quartz rather than glass. As the above should suggest, there is more to selecting a light source than picking the type of bulb that should be used. There is also the question of providing electrical power. Since spectral energy distribution of any incandescent technology varies with the amount of electrical energy dissipated across the light producing agent, one must carefully control the electrical power that is supplied in order to effectively control the spectral energy distribution. In particular, alternating current sources should not be used to power any incandescent light source since this produces a 120 cycle per second noise on any images produced. Direct current supplies must be used if one is to have any hope of keeping the spectral energy distribution of the source constant over time. Therefore the target lighting technology that seems appropriate is quartz tungsten halogen. However, there remain two problems left unaddressed by the prior art: (1) selection of the appropriate quartz tungsten halogen bulb, in view of the fact that many are available at different color temperatures; and (2) the supply of constant electrical energy across a bulb's filament. The prior art also does not successfully address the problem of part surface color representation. As discussed above, any color can be represented by a point (r, g, b) in three-dimensional color space. Hence, the storage requirement for one color is exactly three numbers, to be precise three integers, because the output of the selected color sensor is digitized for input into a computer. Unfortunately, as was discussed above, the face of an edge glued panel part is not one color but many colors, e.g., the color of early wood, the color of the late wood, and variations on these colors that occur across and down the face. Since many colors are involved, the perceived color of a part face seemingly depends on the distribution of colors appearing on the face. This distribution is seemingly best represented by the probability function P=[p(r, g, b)] where (r, g, b) is any color in color space. For any color (r, g, b) in color space, p(r, g, b) gives the probability with which that color occurs on the part face. While this representation appears to be the most mathematically sound way of representing the color of a part's face, this representation is computer memory intensive. To understand this, it should be noted that the information coming out of color camera is usually digitized such that there is an 8 bit binary number that represents the value of r, an 8 bit binary number that represents the value of g, and an 8 bit binary number that represents the value of b. Therefore, the number of elements in color space is 256.times.256.times.256, or over 16 million elements. Using the above representation to characterize the distribution of colors of a part face requires that a number be assigned to each element, each color, in the three-dimensional color space. Stated another way, the measurement vector used to make the part face color classification is a measure vector that has over 16 million components. This representation requires that a very large number of values be stored in computer memory, far too much information for an inexpensive system to store and/or process. Hence, another problem that must be solved is to find a way to reduce the dimensionality of the measurement vector used to characterize the color information on a part's face. Experimentation has shown that a full eight bits from each of the red, green, and blue color channels are not needed to perform color sorts of hardwood. Rather, only six bits are needed. Therefore a straightforward way to reduce the measurement vector is to reduce the full color space from 256.times.256.times.256 to 64.times.64.times.64. While this reduces the size of the measurement vector from over 16 million elements to one of just over 262,000, a further reduction is still needed. One other possibility is based upon the observation that the color variations in a hardwood species make up only a small part of the 64.times.64.times.64 full color space, a marked reduction can be had by only considering those colors the parts will possess. Experiments show that this allows a very significant reduction. Using this approach one can reduce the measurement vector size from over 262,000 elements to one containing only 10,000 to 12,000 elements. However, further reductions are needed if real-time processing is to be possible with inexpensive computing systems, i.e., personal computers. As discussed above, the C.I.E. made an attempt to find a metric defined on color space that would be able to mimic human judgments of color similarity; and this proved to be a very difficult task. One of the complications was that the C.I.E. group tried to define a metric that would work for any two colors in color space. Given this desire, the experimental data collected indicated that any metric that would mimic human judgment of similarity would have to be a rather mathematically complex function. These findings should not be surprising. In order to develop a viable edge glued panel part color matching system, a viable color metric must be found that has a simple mathematical definition, that can be quickly computed, and that can, at least partially, mimic human judgments in selected sectors of color space. Defining this metric then is another problem that is not solved by the prior art, and must be addressed. As was observed above, the colors present in a hardwood species represent only a very small part of color space. Hence, while the C.I.E. studies suggest that developing a general metric is a difficult problem, finding one that works on a very restricted subset of colors might not be difficult. To gain insight into what such a metric or norm should look like, it should be recalled that a description of the color of a hardwood part face seemingly can best be done by defining the distribution of colors present. Let P.sub.1 =[p.sub.1 (r, g,b)] be the distribution of colors on one part face and let P.sub.2 =[p.sub.2 (r, g. b)] be the distribution of colors present on another part face. The metric needed must indicate how similar these two distributions are. Since for purposes of this discussion both these distributions represent discrete, quantized functions, a natural set of metrics to examine are the l.sub.p norms used in functional analysis, G. Simmons, Introduction to Topology and Modern Analysis (McGraw-Hill, New York 1963). Let X=[x(n)] be a function (vector) containing N, n=1, . . . , N, elements in its domain of definition. Then a l.sub.p norm has the form ##EQU1## Hence for P.sub.1 =[p.sub.1 (r, g, b)] and P.sub.2 =[p.sub.2 (r, g, b)], the difference between these two distributions would be defined by a norm of the form ##EQU2## The question is which l.sub.p norm is the most appropriate one to use. The prior art encompasses a number of color sorting systems--for example those disclosed in U.S. Pat. Nos. 3,945,729; 4,132,314; 4,278,538; 4,992,949; 5,020,675; 5,075,768; and 5,085,325--each aimed at a particular application. U.S. Pat. No. 3,945,729 to Rosen, titled "Combined Ranging and Color Sensor," describes a system for measuring both range and color. A primary limitation of this system is the light source used. The light source employed is a mixed gas laser that emits light in only three wave lengths in the interval from 400 to 700 nanometers. While not specifically stated, it is assumed that one of the wavelengths is in the red region (600 to 700 nm), one in the green region (500 to 600 nm) and one in the blue region (400 to 500 nm). This type of illumination makes separating colors that are very similar to one another impossible. Another problem with this system is the color sorting algorithm. The sorting is based on three measurements, The sorting algorithm makes the color assignment by determining which interval of the R color axis r.sub.n is in, which interval of the G color axis g.sub.n is in, and which interval of the B color axis b.sub.n is in. This sorting algorithm is capable of only crude color sorts. Finally, using the normalized quantities (r.sub.n, g.sub.n, b.sub.n) means the system is insensitive to how light or dark a color is. This system can only separate color with different hues and saturations. The above limitations mean that this system is inappropriate for the color sorting of edge glued panel parts. U.S. Pat. No. 4,278,538 to Lawrence et al., titled "Methods and Apparatus for Sorting Workpieces According to Their Color Signatures," describes a system for very accurately color sorting parts based on point measurements on a materials surface. The specific application of the system contemplated by Lawrence et al. is to color sort parts used in making telephones. The system described once again uses normalized color coordinate values just as the system described above does. Hence it cannot separate colors that are different because of intensity differences. This limitation makes this system inappropriate for the sorting of edge glued panel parts. U.S. Pat. No. 5,020,675 to Cowlin et al., titled "Apparatus for Sorting Conveyed Articles," describes the materials handling and imaging components of a system for finding blemishes on fruits and vegetables. The corresponding method for finding the blemishes is described in European Patent Application Publication No. 0 194 148. The blemish finding algorithm disclosed in the European Patent Application is based on finding areas that have significantly different color from the surrounding areas. As such this system does not address the problem of sorting parts into a preselected number of color classes, i.e., the problem that need be addressed in sorting edge glued panel parts. U.S. Pat. No. 5,075,768 to Wirtz et al., titled "Method and Apparatus for Color Separation Scanning," describes an inexpensive color scanning system for use by the printing industry. The objective of this system is to color scan original art work and to use the color imagery to output to a color printer. The methods described by Wirtz et al. are inappropriate for the sorting of edge glued panel parts. U.S. Pat. No. 5,085,325 to Jones et al., titled "Color Sorting System and Method," describes a system For sorting color parts. This system uses a color lookup table that contains reject data at those addresses for colors to be rejected. Since this system is designed only to reject undesirable colors, its functionality is not appropriate for the sorting of edge glued panel parts. The only patent of which the present inventors are aware, which covers a system aimed at the color sorting wooden parts is U.S. Pat. No. 4,992,949 to Arden, titled "Color Sorting of Lumber." Before the development was begun on the present invention, the methodologies covered by the Arden patent were extensively tested. They were found to be unable to provide the types of sorts needed in sorting edge glued panel parts. The primary limitation of this system comes from the way Arden chose to reduce the storage requirements associated with the three-dimensional color space. The method selected does not capture all the required information contained in the full three-dimensional space. As was discussed above, the most appropriate mathematical representation for the distribution of colors on a part face appears to be the estimated probability function P=[p(r, g, b)]. Rather than use this memory intensive representation, Arden chose a less memory intensive representation, one that involves three estimated probability functions each only containing 256 elements. The three probability functions used are P.sub.r =[p.sub.r (r)], the probability distribution of the red; P.sub.g =[p.sub.g (r)], the probability distribution of green; and P.sub.b =[p.sub.b (r)], the probability distribution of blue. Note that each of these probability functions can be directly computed from P=[p(r, g, b)], i.e., Unfortunately, while using these three probability functions markedly reduces that amount of information that must stored and processed, these three functions do not contain all the important information contained in P. Extensive experimentation showed that this approach is incapable of separating dark brown oak parts from dark red oak parts, seemingly a requirement of any robust edge glued panel part color sorting system. Finally, researchers at Purdue University have developed a system for establishing color grading standards for hardwood dimension parts, described in the paper titled "Color Matching of Wood with a Real-Time Machine Vision System," by L. Haney et al., Paper No. 94357, presented at the 1994 International Winter Meeting Sponsored by ASAE. This system uses a color camera to image parts and a combination of quadratic Bayesian classifier and neural network to determine to which class a part belongs. The system is capable of sorting into three color classes, white, pink, and brown. The quadratic Bayesian classifier is applied first. It attempts to label each color pixel as either being background, defects, grain, white, pink, brown. Using the percentages of pink, brown, and white pixels appearing on each part face, another quadratic Bayesian classifier and a neural network are used to make the final classification. Unfortunately, the Purdue system has serious flaws. First, the color of grain varies significantly from one part to another, as does the color of defects and even the color of pink, white, and brown. It is possible, even very probable, that one brown part may have grain the same color as the non-grain areas of another brown part. Given this situation, it seems very unlikely that any statistical classifier that defines decision boundaries in three-dimensional color space will give accurate results of the variety of color classes needed to color match edge glued panel parts. The major difficulty is that parts from one color class may have portions of their surfaces which are the same color as areas on parts from another color class. It is to the solution of the above-described and other problems to which the present invention is directed. SUMMARY OF THE INVENTION A system that can automatically color and/or grain sort materials, in particular panel-type parts having two opposite faces (a first or top face and a second or bottom face) to be color and grain sorted, is achieved by the provision of a materials conveyor for moving the part; a pair of color CCD line scan cameras positioned to view the top and bottom faces, respectively, of the hardwood part; quartz tungsten halogen lamps positioned to illuminate the top and bottom faces, respectively, of the hardwood part; a single switching power supply providing DC power to the tungsten halogen light sources; and a computer for analyzing the data from the top and bottom cameras. Two color cameras are employed, one for imaging each board face. Each color camera has the appropriate infrared cutoff filter so that the sensitive locations on the charge coupled device (CCD) only respond to light in the visible range. To reduce the amount of dark current produced by each camera, the cameras are contained in cooled enclosures. The cooling assures the cameras operate at a constant temperature. The power for the quartz tungsten halogen comes from a single switching power supply which provides DC power so that the color images obtained from the color cameras do not have stripping caused lighting variations induced by AC power. The switching power supply used has an input line that is used to control how much power is supplied to the bulbs. The power supplied depends on the voltage presented on the input line. The computer controls that voltage on this line using a digital to analog converter. The amount of voltage supplied is based on an examination of a target appearing in one of the camera's field of view outside the area in which the part appears. Picture elements (pixels) that cover an area of this target are averaged. This average is compared to a standard. If the average is slightly below the standard more voltage is applied to the line to the switching power supply. This causes the power supply to increase the voltage supplied to all the quartz tungsten halogen bulbs. If the computed average is slightly above the standard the computer reduces the voltage on the line to the power supply. This causes the power supply to decrease the amount of power supplied to all the quartz tungsten halogen bulbs. If the average is markedly different from the target, system operation is halted and an alarm is displayed on the system console to inform operators that a bulb has burned out. There is a similar target appearing in the other camera's field of view outside the area in which the part appears. Pixels from this camera that cover an area of this second target are also averaged. This average value is just checked to determine if a bulb illuminating the bottom camera's field of view has burned out. In one aspect of the invention, the computer and the switching power supply are enclosed in a dust free enclosure that is air-conditioned to maintain a steady operating temperature, to improve computer reliability and the stability of the power provided to the quartz tungsten halogen bulbs. In another aspect of the invention, the light emitted from the quartz tungsten halogen bulbs is sent through a fiber optic light line. The light emitting from these lines illuminates the parts. Alternatively, the bulbs directly illuminate the surface. In still another aspect of the invention, camera controllers accept analog data from the camera heads and digitize it so that the information can be passed to the computer for analysis. In one embodiment of the invention, a single analog to digital (A/D) converter is used in the controller, and blue filters are used on the cameras. These filters assure that red, green, and blue values will be reasonably close when a white target is inserted into a camera's field of view. In a preferred embodiment of the invention, three different A/D converts are used, each having its own offset and gain, thus eliminating the need for the blue filters. In one embodiment of the invention, the color image data coming from a camera is directly transferred to the computer using a direct memory access (DMA) computer interface, allowing image data to be placed in computer memory without the need for the computer's central processing unit to have to perform any functions. In this embodiment, an optical sensor and an ultrasonic width sensor are also provided. The optical sensor determines when a part is about to enter the field of view of the two cameras and turns the cameras on and off. The ultrasonic sensor is used to determine the number of pixels on each CCD line scan camera that must be read. Also in a preferred embodiment of the invention, data from a color camera is first passed through a high speed processing board that performs certain operations on the image data. The results of this processing are then passed to the computer via the DMA interface discussed above. In this embodiment, the determination of the width and the location of the leading and lagging edge of the part is determined by the high speed processing board. Therefore, no sensors arc provided, the cameras stay on all of the time, and the processing board only sends data for each part to the computer. In a further aspect of the invention, two pneumatic devices controlled by the computer selectively insert a white target into the field of view of each camera where the edge glued panel parts pass through. The white target allows the computer to collect the data needed to do "shading compensation" on the collected color image data. Alternatively, the white targets are attached to the opposite faces of a carrier and are transported to the cameras by the materials conveyor. In one embodiment of the invention, the shading compensation is done only on the digitized imagery. In a preferred embodiment of the present invention, a "rough" analog shading correction is performed by the camera controller prior to the A/D conversion of the color imagery. After conversion, another "fine" shading correction is performed on the digital imagery. The rough analog shading correction is performed by controlling the offset and gain for each pixel going into each A/D converter. Three basic categories of algorithms are used in the sorting system in accordance with the present invention: (1) training algorithms, (2) real-time operation algorithms, and (3) utility algorithms. The training algorithms are used to teach the system to identify the color and grain classes that are to be used during the sorting process. The real-time algorithms actually perform the color and grain sorts with parts moving through the system at the desired throughput rate. The utility algorithms allow operators to display images, perform system tests, etc. Redundancy in the training algorithm for grain matching is eliminated by removing the effects of varying intensities among the color classes from the output of the edge detectors, using an equal probability quantizing algorithm. A training sample is one face of an edge-glued panel part considered to be prototypical of the color class to which the face has been assigned. The color sorting training algorithm is performed by analyzing a plurality of training samples, and includes the steps of: collecting a color image of a training sample; applying the shading compensation algorithm to the color image to produce a shading compensated color image; using the shading compensated color image to average the red, green, and blue channel values to form a black and white image; applying a preselected threshold to the black and white image, removing background pixels from further consideration; using the shading compensated color image to compute a three-dimensional color histogram for the training sample, ignoring any background pixels; using the black and white image to compute a black/white histogram for the training sample, again ignoring any background pixels; applying a character mark detection algorithm to the black/white histogram to find a threshold value; removing character mark pixels from the three-dimensional color histogram; normalizing the three-dimensional color histogram to convert it to an estimated probability function; adding the estimated probability function of the training sample to a running sum of three-dimensional estimated probability functions for the color class; also adding the estimated probability function of the training sample to a running sum for all part classes; repeating the above steps for all training samples; applying a color mapping algorithm to the running sum for all part classes to reduce the dimensionality of the color measurement vector and produce a color lookup table; and using the color lookup table to map the estimated probability function for each training sample into a reduced measure vector. The remaining steps of the algorithm depend upon whether the decision as to color class is based on a single prototype used to represent each class or on a pattern classification method using a k-nearest neighbor classification procedure. Where color class is based on a single prototype, the algorithm includes the remaining steps of: using the color lookup table to map each running sum of three-dimensional estimated probability functions for a color class into a reduced measure vector; determining the prototype for each class based on the reduced measure vector; and for each class estimating the threshold by examining all the training samples for all the classes and selecting the threshold that gives the minimum probability of error. Where color class is based on a pattern classification method, the algorithm includes the remaining steps of: using the color lookup table to map each estimated probability function into a reduced measure vector; and for each class, estimating the threshold by examining all of the training samples for all the classes and selecting the threshold that gives the best results. The shading correction algorithm is performed by collecting a selected number of lines of color image data from one of the cameras while the lens cap is on, computing the average response for each pixel in each channel of data, removing the lens cap and scanning the selected number of lines of color image data off the white target, computing the average response for each pixel in each channel of data, and applying the steps of a standard shading correction algorithm to the color imagery as it is being collected. The character mark detection algorithm accepts as input a black and white histogram of a part face, and outputs a threshold used to eliminate the effects of character mark from the color sorting of the parts. A color mapping algorithm is used to reduce the size of the measurement vector needed to represent each part face, and also to remove colors that might be character marks from the color class prototypes (if a simple pattern classification algorithm is employed), or from the training samples themselves (if a k-nearest neighbor pattern classification procedure is used), as well as from the two reduced measurement vectors that are used to represent the color of each part face during real-time operation. The color mapping algorithm is based on the Heckbert color mapping algorithm, with additional steps for removing character marks. The real-time color sorting algorithm has two embodiments, one based on using the distance from class prototype classifier, and the other based on using the k-nearest neighbor algorithm. Both embodiments have in common the steps of: collecting a color image of a sample part face; shade compensating the color image to remove non-uniformitites in light and in sensing element sensitivities across the filed of view; averaging the red, green, and blue components of each color pixel in the shade compensated color image to create a black and white image; applying a threshold to the black and white image to remove background pixels from consideration; computing a reduced measurement vector using the color lookup table; computing a histogram of the black and white image of the part face; applying the character mark algorithm to the histogram; removing character mark pixels from the reduced measurement vector; and normalizing the reduced measurement vector to form the normalized reduced measurement vector. In the embodiment in which the distance from prototype classifier is used, the algorithm includes the additional steps of: removing character mark colors from each of the prototypes; forming a new set of modified prototypes with the effects of character marks removed from consideration; computing the distance from each of the prototypes; and assigning a color class to the part face based on this distance. In the embodiment in which the k-nearest neighbor classification rule is used, the algorithm includes the additional steps of: removing character mark colors from each training sample to create a modified measurement vector for the sample; normalizing the modified measurement vector; computing the distance from the modified training sample; finding the k smallest of the distance values; finding the color class label that occurs the most often in the training vectors with the k smallest distances; and assigning the part face to a color class based on the shortest distance. The real-time color sorting algorithms pass three pieces of information about each part face to the best face selection algorithm: (1) the class label of the color class to which the face has been assigned; (2) a distance measure; and (3) Area.sub.clear, the clear area of the part face. The best face selection algorithm then uses this information to determine which of the two faces is the best face. Training for grain matching is done independently of the training that is done for color sorting, because the grain matching operation requires only black and white imagery. However, the grain matching training procedure shares a number of common steps with the training used for color matching. The grain matching training algorithm is performed by analyzing a plurality of training samples, and includes the steps of: collecting a color image of a training sample; applying the shading compensation algorithm to the color image to remove non-uniformities in lighting and in camera sensing element sensitivities across the field of view to produce a shading compensated color image; using the shading compensated color image to average the red, green, and blue channel values to form a black and white image; applying a preselected threshold to the black and white image, removing background pixels from further consideration; using the black and white image to compute a black/white histogram for the part face, ignoring any background pixels; applying a character mark algorithm to the black/white histogram to find the threshold value; removing character mark pixels from the black/white histogram; removing character mark areas from further consideration by labeling them as background pixels; computing the normalizing factor; applying the equal probability quantizing algorithm to the black and white image of the part, the black/white histogram, the normalizing factor, and the number of gray levels appearing in the requantized black and white image to obtain a requantized version of the black and white image; applying the edge detectors respectively most sensitive to the vertical, horizontal, right diagonal, and left diagonal edges to the requantized version of the black and white image to obtain the gradient images which record the absolute values of, respectively, the vertical, horizontal, right diagonal, and left diagonal edges; averaging the left and right diagonal gradient images to find a single gradient image that indicates the number of diagonal edges present in either the right or left diagonal dimensions; and creating an edge histogram and normalizing it. The remaining steps of the algorithm depend upon whether the decision as to grain class is based on a single prototype used to represent each class or on a pattern classification method using a k-nearest neighbor classification procedure. Where grain class is based on a single prototype, the algorithm includes the remaining steps of: finding the class prototype for each class; and for each class estimating the threshold by examining all the training samples for all the classes and selecting the threshold that gives the minimum probability of error. Where grain class is based on a pattern classification method, the algorithm includes the remaining step of estimating the threshold for each class by examining all the training samples for all the classes and selecting the threshold that gives the best results. The real-time grain sorting algorithms are performed after both part faces have been color sorted, and after the best face of the part has been selected. As with the real-time color sorting algorithm, the real-time grain sorting algorithm has two embodiments, one based on using the distance from class prototype classifier, and the other based on using the k-nearest neighbor algorithm. Both embodiments have in common the steps of: removing character mark pixels from the black and white histogram of the best part face; removing character mark areas from further consideration by labeling them as background pixels in the black and white image of the best part face; computing the normalizing factor; applying the equal probability quantizing algorithm to the black and white image of the best part face, the black/white histogram of the black and white image of the best part face, the normalizing factor, and the number of gray levels appearing in the requantized black and white image to obtain a requantized version of the black and white image; applying edge detectors respectively most sensitive to the vertical, horizontal, right diagonal, and left diagonal edges to the requantized version of the black and white image to obtain the gradient images which record the absolute values of, respectively, the vertical, horizontal, right diagonal, and left diagonal edges; averaging the left and right diagonal gradient images to find a single gradient image that indicates the number of diagonal edges present in either the right or left diagonal dimensions; and creating an edge histogram and normalizing it. In the embodiment in which the distance from prototype classifier is used, the algorithm includes the additional steps of: computing the distance from each of the prototypes; and assigning a grain pattern class to the part face based on the distance. In the embodiment in which the k-nearest neighbor classification rule is used, the algorithm includes the additional steps of: computing the distance from the training sample; finding the k smallest of the distance values; finding the grain class label that occurs the most often in the training vectors with the k smallest distances; and assigning the part face to a grain class based on the shortest distance. An algorithm for normalizing variations in sensitivity between the two cameras is also provided, so that both cameras are equally sensitive to each color, and the response of both cameras is the same for each color. The normalizing algorithm uses ten to fifteen color samples spanning the intensity levels that the cameras have been set up to handle, and includes the steps of: for each color sample, scanning the color sample to collect a color image of the sample from both cameras, applying the shading correction algorithm to the color images from both cameras, and computing the values of matrices representing the relative red, green, and blue responses of the two cameras based on the shading corrected color component images collected from both cameras; creating a two-dimensional plot of the relative red responses of the two cameras to all of the color targets, with the horizontal axis representing the output gray level value for the red channel of the first camera and the vertical axis representing the output gray level value for the red channel of the second camera; creating a two-dimensional plot of the relative green responses of the two cameras to all of the color targets, with the horizontal axis representing the output gray level value for the green channel of the first camera and the vertical axis representing the output gray level value for the green channel of the second camera; creating a two-dimensional plot of the relative blue responses of the two cameras to all of the color targets, with the horizontal axis representing the output gray level value for the blue channel of the first camera and the vertical axis representing the output gray level value for the blue channel of the second camera; determining if the function y=x is the function that best fits the points on all three of the red, green, and blue plots; if y=x provides the best fit, terminating execution of the normalizing algorithm, as adjustment in either camera output is unneeded; otherwise, estimating the degree of polynomial function that appears to best fit the relative response data; defining a function for each graph that fits the data, using a least squares fitting program; and creating three lookup tables that map the output of the first camera into the output of the second camera. BRIEF DESCRIPTION OF THE DRAWINGS The invention is better understood by reading the following Detailed Description of the Preferred Embodiments with reference to the accompanying drawing figures, in which like reference numerals refer to like elements throughout, and in which: FIG. 1 is a diagrammatic view of apparatus for the color and grain sorting of a hardwood part, in accordance with the present invention. FIG. 2 is a top perspective view of the conveyor, illumination, and imaging elements of the apparatus of FIG. 1. FIG. 3A is a side elevational view of the conveyor, illumination, and imaging elements of FIG. 2, in which the targets used for shading compensation are placed in the camera fields of view by pneumatic devices. FIG. 3B is a side elevational view of the conveyor, illumination, and imaging elements of FIG. 2, in which the targets used for shading compensation arc transported to the camera fields of view by a carrier moved by the conveyor. FIG. 4 is a typical shape black and white histogram extracted from a completely clear part face. FIG. 5 is a typical shape black and white histogram extracted from a part face that has a small amount of light-colored character marks present. FIG. 6 is a typical shape black and white histogram extracted from a part face that has a good deal of light-colored character marks. FIG. 7 is a typical shape black and white histogram extracted from a part face that has areas of very dark character mark and areas of light character marks. FIG. 8 is a typical shape black and white histogram extracted from a part face that has only areas of dark mineral steaks. FIG. 9 is a typical shape black and white histogram extracted from a completely clear part face. FIG. 10 is a graph illustrating the representation of a color C in three dimensional color space. FIG. 11 illustrates the spectral distribution curves specified by the C.I.E. for its standard narrow field observer. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In describing preferred embodiments of the present invention illustrated in the drawings, specific terminology is employed for the sake of clarity. However, the invention is not intended to be limited to the specific terminology so selected, and it is to be understood that each specific element includes all technical equivalents which operate in a similar manner to accomplish a similar purpose. Referring now to FIGS. 1, 2, 3A, and 3B, there is shown the apparatus for carrying out the system in accordance with one embodiment of the present invention in connection with the color and grain sorting of hardwood edge-glued parts, so that panels of uniform color and grain pattern can be created. As will be appreciated by those of skill in the art, and as described hereinafter, the apparatus can be varied depending on, among other things, the material being color and/or grain sorted. The apparatus as shown in FIGS. 1-3 includes a materials conveyor 2 for moving a hardwood part P having first and second opposite faces F1 and F2 to be color and grain sorted. Hardwood part P is positioned on driving belt 4 of conveyor 2 supported at an angle of between approximately 70.degree. to approximately 80.degree. by a support fence 10, with face F1 facing away from support fence 10 (and henceforth referred to as the top face) and face F2 facing toward support fence 10 (and henceforth referred to as the bottom face), for a purpose to be described hereinafter. Hardwood part P is propelled by friction between its bottom edge and belt 4. Hardwood part P is illuminated by top and bottom sets of quartz tungsten halogen lamps 12a and 12b positioned to illuminate the top and bottom faces, F1 and F2, res |