METHOD AND APPARATUS FOR ADAPTIVELY THRESHOLDING GRAYSCALE IMAGE DATA

Abstract: A method and apparatus for adaptively adjusting (e.g. thresholding) grayscale image data associates with each document image file (210, 212) a predetermined grayscale adjusting function (216) which can be used to threshold, contrast stretch and gray level reduce the original gray level image of the document into a picture representation for display at workstations, the picture representation yielding increased contrast of written and printed text viewed. The invention includes a method of generating a remapping function for use in converting near-photographic document image pixel gray level data lying in a first range of gray level values to higher contrast, background-suppressed pixel gray level data lying in a second more limited gray level range. Global document information, such as a histogram of all the document's original pixels, is used to generate at least one threshold gray level value and to determine the shape of the remapping function on either side of the threshold. Preferably, the remapping function is implemented by a look-up table (216) addressed in accordance with the original pixel data.

Description: METHOD AND APPARATUS FOR ADAPTIVELY THRESHOLDING GRAYSCALE IMAGE DATA BACKGROUND OF THE INVENTION The invention concerns image data processing. More particularly, the invention pertains to high speed, post¬ processing of image data to adaptively effect gray level tone scale adjustment of document imagery at an image-based data entry workstation. Still more specifically, the invention is directed to a method of generating a pixel remapping formation to effect the gray level adjustment. Financial documents, such as checks or drafts, usually contain a magnetic ink character recognition (MICR) code line which is typically read by a sorter and which automatically sorts these documents into a plurality of bins. Prior to sorting, in current practice, these documents are presented to banking personnel who physically handle the documents and mechanically enter, in MICR form, the dollar amount associated therewith upon each document by the use of specialized amount entry equipment. Additionally, these individuals physically correct incorrectly read MICR data associated with each of the sorted documents. These prior techniques of utilizing banking personnel to process financial documents have proven relatively costly and inefficient, in that many of these documents have been lost or destroyed during their physical handling, and the speed associated with the processing of the documents is limited to that associated with the processing capabilities of the banking personnel and the mechanical amount entry equipment they use. To address these problems, document imaging systems have been introduced to eliminate much of the previously required physical handling of the documents themselves. In such known systems, functions such as image data element normalization, background suppression, scaling and document height detection are performed as preprocessing functions prior to compression of the document image data for storage or transmission to a data decompressor. Previous approaches for effectingbackground suppression in document image processing systems to yield higher contrast images for data entry operators are complex. Additionally, for imaging systems to be associated with archival storage systems, the original image data cannot be discarded in a suppression technique, but must be maintained for archival integrity. Therefore, there is a need for an efficient, relatively non-complex approach to gray level tone scale adjustment, such as thresholding image pixel data, in order to yield picture-like representations of the image at the workstation which feature increased contrast of written and printed text for viewing by a data entry operator. Such gray level tone scale adjustment also finds use in printing and f csimile transmission applications. SUMMARY OF THE INVENTION Accordingly, a method of transforming grayscale document image data generated by an image processing system into high contrast document image for display at a workstation associated with the image processing system includes the steps of associating with each document image data file generated by the image processing system a preselected function for adjusting the document image data, the adjusting function stored in the document image data file with its associated document grayscale image data. When an operator at a workstation desires to view a higher contrast representation of the image, the document image data file is downloaded to the workstation and its associated adjusting function is utilized to post-process the grayscale image data at the workstation prior to display of the document image. Also in accordance with the invention, apparatus for adaptively adjusting grayscale document image data in an image processing system associated with at least one workstation includes a generator for examining grayscale image data produced by the image processing system corresponding to a document of interest for generating, as a function of the image data, a grayscale adjusting function for adjusting the image data and for placing the adjusting function in an image file header block for storage with image data associated with the document of interest in a storage module of the image processing system. Post-processing apparatus at each workstation is coupled for receipt of the grayscale adjusting function and is operative to adaptively adjust each grayscale pixel of the document image in accordance with the adjusting function and to present an adjusted image of the document of interest for display at the workstation. It is a feature of the invention that document image adjusting, such as thresholding or contrast stretching, is implemented as a simple post-processing operation performed at an operator workstation. It is a f rther feature of the invention that image data adjustment is accomplished by associating a predefined adjusting function with each document. It is still a further feature of the invention that the predefined adjusting function is stored as image parameter data in the document image file. Additionally, a method of generating a gray level contrast enhancing and adjustment function for use in adaptively thresholding original gray level document image data includes the steps of generating a gray level histogram of the original gray scale image data, identifying at least one peak in a preselected gray level range in the histogram, and defining the adjustment function as a) adjusting all original gray level datum points to a whitest gray scale level whenever a datum point level is whiter than a threshold level determined by the at least one histogram peak, and b) adjusting all other original gray level datum points having gray levels less than the threshold level to preselected levels darker than the whitest level. BRIEF DESCRIPTION OF THE DRAWINGS The invention is best understood from a reading of a detailed description of an exemplary embodiment taken in conjunction with the drawings, in which: FIG. 1 is a functional block diagram of a document sorting system utilizing a preferred embodiment of the method and apparatus for adaptively adjusting grayscale image data; FIG. 2 is a functional block diagram setting forth portions of an image processor, storage module and workstation arranged in accordance with the principles of the present invention; FIG. 3 is a flow chart outlining a portion of an embodiment of the method of the invention which is implemented at the image processor; FIG. 4 is a flow chart outlining a portion of an embodiment of the method of the present invention which is implemented at a workstation associated with the image processing system; FIG. 5 is a flow chart outlining the major steps of a method for generating the contents of a remapping look-up table arranged in accordance with the principles of the invention; FIG. 6 is a graph setting forth a typical pixel histogram along with two alternative remapping curves generated for the situation where a single threshold has been identified in the original pixel data histogram; and FIG. 7 is a graph setting forth examples similar to those in FIG. 6, with the exception that two thresholds have been identified in the histogram data. DETAILED DESCRIPTION Fig. 1 sets forth a financial document processing system 10 having a document sorter 12, which in the preferred embodiment of this invention comprises a model DP1800 sorter which is manufactured by the UNISYS CORPORATION of Blue Bell, Pennsylvania. Sorter 12 includes a track 14 through which a plurality of financial documents 16 traverse. Sorter 12 further contains a magnetic character reader 18 and magnetic strip character controller 20. Additionally, sorter 12 contains a document holder 22 and an image processor 24. Controller 20 is coupled to reader 18 by signals on bus 26, to a host computer 28 by signals on bus 30, and to image processor 24 by signals on bus 32. Computer 28 is coupled to an image storage module 34 by signals on bus 36 and image storage module 34 is also coupled to image processor 24 and to a plurality of workstations 38 by signals on buses 40 and 42, respectively. It is contemplated that image storage module 34 could include a document image archival system. In operation, documents 16 sequentially pass by reader 18 which reads a code appearing upon a MICR code line strip placed upon each of the documents 16. This code is then sent to computer 28 by signals on bus 30 for storage therein and to image processor 24 by signals on bus 32. As each of the documents 16 further travel along track 14, they pass in close proximity to processor 24 which creates an image thereof and sends this processed electronic image, by signals on bus 40, to image storage module 34 for storage therein. After passing by processor 24, each of the documents 16 are then sorted by sorter 12 in a conventional manner based upon the contents of the MICR code line. The documents are then held within document holder 22. After a typical block of documents 16 has been sorted in the aforementioned manner, workstations 38, by signals on bus 42, may sequentially request the aforementioned document images from storage module 34. These electronic images are then downloaded to the workstations 38 by use of signals on bus 42 along with their associated magnetic code data obtained from host computer 28. After the electronic images are decompressed, processed and displayed by workstation 38, workstation operators electronically enter information associated with each document (such as the so-called "courtesy amount" contained in a space on a typical bank check) and electronically resolve any difficulties associated with the reading of the MICR code. Each document image's MICR information and associated corrections then form a single record which is sent to storage module 34 by signals on bus 42. This information may then be later accessed for use in automatically placing MICR information on the sorted documents. Therefore, the document processing system 10 substantially eliminates the physical handling of the plurality of documents 16 when the associated MICR information is placed thereon, increasing the efficiency and speed of the overall document processing system 10. Fig. 2 sets forth further details of image processor 24 and workstation 38 of Fig. 1 pertinent to the method and apparatus of the invention. As seen from Fig. 2, image processor 24 includes a document scanner 202 coupled via bus 250 to a preprocessor unit 204. Preprocessor 204 is coupled via bus 252 to a look-up table (LUT) generator 206 which is coupled via bus 254 to an image data compressor unit 208 and via bus 40b to a file formation unit to be discussed below. Compressor 208 is coupled via bus 40c to a document image file organizer. The document image file organizer of image processor 24 arranges each document image file entry as an image file header block 210 and an associated image file image data block 212. Image file header block 210 includes a document data portion 214 which receives additional document data from other portions of image processor 24 (not shown) via bus 40a. Header block 210 additionally includes a look-up table 216 whose contents have been generated by table generator 206 in accordance with the method of the invention to be described in more detail in a later portion of the detailed description. The file image data block contains compressed image data 218 which has been generated by compressor 208. Look-up table 216 is utilized to represent an image data adjusting function for effecting one of a number of possible gray level tone scale adjustments. In the embodiment shown, pixel gray level thesholding for elimination of non-critical background image data is the adjustment being performed by table 216. However, it will become apparent to those skilled in the image processing art that the adjusting function could involve other tone scale adjusting functions, such as contrast reduction and gray level stretching. Indeed, depending upon the specific application, more than one adjusting or converting table could be generated at this point for association with compressed image data 218 of each document being processed. Each document image file consisting of a header block 210 and a data block 212 has its contents stored in image storage module 34 via bus 40. Document image files may be downloaded via bus 42 to one of a plurality of workstations 38. At workstation 38, the look-up table portion of the image file header block is coupled via bus 42a to threshold table and remapper unit 222, while the compressed image data block downloaded from image storage system 34 is coupled via bus 42b to an input of decompressor unit 220. Output 256 of decompressor 220 carries the original decompressed picture elements, or digital "pixels", of the document image which are coupled via bus 256b to an input of threshold table and remapper unit 222 and via bus 256a to a first input to selector unit 224. The output of threshold table and remapper 222 carries thresholded pixels of the document image and presents them via bus 258 to a second input of selector unit 224. A control input 260 to selector unit 224 carries selection signals generated by a workstation operator for determining which of the first and second inputs will be transferred to output 262 of selector unit 224 for transmission to display buffer unit 264. It is to be understood that the adjusted gray scale data in buffer 264 could be utilized for other applications, such as printing or facsimile transmission. Scanner unit 202 of image processor 24 optically scans each document 16 (Fig. 1) via, for example, a charge coupled photodiode array which senses, via a lens system, each document 16 which has been illuminated by a lamp arrangement. In one approach, the charged coupled photodiode array captures the image of a vertical strip associated with each document 16. As the document 16 passes by scanner unit 202, a plurality of these vertical strips of image data are generated and passed to image digitizers for forming a multi- bit pixel element corresponding to one portion of each vertical strip. Hence, each vertical strip is made up of plurality of digitized pixels. A document's image pixels are then sent via bus 250 to preprocessor unit 204 wherein the pixel data are "massaged" in order to provide for more efficient data compression which is about to take place in another portion of image processor 24. Typical preprocessing operations performed at preprocessor unit 204 include height detection, normalization and image scaling. In prior imaging systems, an additional preprocessing function would be background suppression wherein non-essential visual elements of each document would be discarded prior to image compression. For example, many bank checks have scenic background areas imprinted upon the checks. This background detail is, of course, not needed by data entry operators who will be performing further work on an image of the document. However, in one use of the instant invention, the background suppression function is deferred until the document image has been downloaded for viewing or printing at a workstation associated with the image processing system. In this manner, the compressed image data held in an archival data store represents the original document including any "non-informational" background image information. This type of image data array is sometimes referred to as "near photographic". Normalization at the preprocessor 204 refers to correcting data defects associated with such things as non- uniform photocell responsiveness of the image capture camera or non-uniform document illumination across a segment of the document being scanned. The image scaling function allows images to be scaled relative to the resolution of the image in accordance with any one of a number of known methods. After the preprocessing functions are performed in unit 204, the preprocessed document image pixels are sent via bus 252 to table generator 206. Table generator 206 examines preselected characteristics of the document image pixel data and forms the approximate equivalent of a, preferably, non¬ linear remapping curve or function via entries in a look-up table. The purpose of the remapping curve, in this embodiment, is to threshold the original gray level image pixel data into a picture representation yielding increased contrast of written and printed text to be viewed by a data entry operator at an image-based document workstation. This table generation could be taking place simultaneously with image data compression in compressor 208, depending upon the specifics of the image processor 24. In any event, the LUT contents are computed in real time at image processor 24 on a per-document basis. While a number of thresholding techniques may be used, the present invention incorporates a method which is particularly well-suited for this use. The LUT contents generated and placed in portion 216 of image file header block 210 for the document of interest is used later at a workstation to threshold original pixels such that document background will be removed, or at least muted, and such that printed and written text is enhanced (i.e. darkened). Preferably, to conserve display memory at the workstation, the thresholded pixels may have fewer gray levels than the original image pixels presented to the LUT for modification in accordance with the approximated remapping curve represented by the table contents. Compressor 208 can use any of a large number of well known compression schemes. In a preferred embodiment, compression is effected using a Discrete Cosine Transform (DCT) procedure as outlined by the Joint Photographic Experts Group of the International Standards Organization (ISO/JPEG). The ISO/JPEG DCT compression method is outlined in JPEG Technical Specification, Revision 6, dated January 14, 1991. The inverse of the method utilized in compressor 208 at image processor 24 is implemented via conventional techniques at decompressor 220 of workstation 38. Image storage system 34 could, for example, consist of an archival system for long term retention of near photographic document images, including background details on the documents from which the images were lifted. At workstation 38, decompressed pixel data at output 256 of decompressor 220 is presented to threshold table and remapper unit 222. In unit 222, each decompressed pixel is formed as an address to the look-up table which has been downloaded from image store 34 via bus 42 and bus 42a. The thresholded pixel value will then be the contents read from the look-up table at the address specified by the decompressed pixel. The thresholded pixel value is then presented to selector unit 224 via bus 258. The workstation operator may select for viewing either a thresholded pixel version of the document image or the original document image as maintained in archival storage. This selection is effected via signals on control input 260 to selector 224. The selected image data is then passed via selector output 262 to an appropriate display buffer for use by a display element of workstation 38. It will be appreciated by those of ordinary skill in the imaging art, that the image data being prepared for display, be it in thresholded or original decompressed pixel format, could be buffered at alternative positions in the workstation apparatus. Hence, selector 224 could pass data a pixel at a time to a display buffer at its output or, alternatively, the display data could be buffered at a point prior to the input to selector 224 such that an entire document image data set could be passed by selector 224 for appropriate display at the workstation 38. Additionally, as mentioned previously, more than one remapping table could be utilized, depending upon a specific application. The steps of this embodiment of a method are set forth in the flow charts of Figs. 3 and 4. With reference to Fig. 3, the method steps performed at image processor 24 of Fig. 2 are set forth. The routine starts at step 300 and proceeds to step 302 wherein the document image is captured and digitized to gray levels in a preselected range. After image capture and digitalization, the routine proceeds to step 304 wherein a gray scale remapping curve or function is selected as a function of characteristics of the original gray scale image data. Next, at step 306, the contents of a look-up table are generated for producing outputs related to address inputs in accordance with the selected remapping curve or function. Next, step 308 associates the generated look-up table with an image header block for the document being processed by image processor 24 of Figs. 1 or 2. After the look-up table has been generated, step 310 is entered wherein the original grayscale image is compressed for storage with its associated file header block in an image storage module or archival data system as set forth in step 312. Next, at step 314, if there are more documents to be processed by the sorter of Fig. 1, then the routine returns to step 302 to process the next document. If there are no more documents, then the method steps performed at image processor 24 are completed as indicated at step 316. Fig. 4 sets forth the steps of the inventive method in a preferred embodiment which are performed at workstation 38 of Figs. 1 or 2. The workstation steps start at 400 of Fig. 4 and the routine proceeds to a downloading of the document image file (including the image header block) to the workstation at step 402. Next, the image data is decompressed with an inverse routine related to the compression method utilized at the image processor. This decompression is shown as step 404. Next, step 406 enters the look-up table obtained from the image file header block with each pixel of decompressed image data as an address. Next, at step 408, the look-up table effectively thresholds the pixel being processed by reading the look-up table at an address specified by the decompressed pixel gray level value. The resulting readout may be stored as a thresholded pixel in a remapped image buffer. Next, at step 410, the routine checks for the presence of any more pixels in the image being processed. If there are more pixels, the routine returns to step 406. If there are no more pixels in this image, then the remapped image data is output to a display device at the workstation at step 412. Next, at step 414, if there are more documents to be processed, then the routine returns to step 402. If there are no more documents, then the method steps performed at the workstation are completed as shown at step 416. The method of Figs. 3 and 4 allows a full grayscale document image to be transferred into a limited grayscale high-contrast document image suitable for high-speed data entry operations. The generation of the high-contrast, limited grayscale document image is achieved by a simple post-processing operation performed locally at a document image workstation. The method eliminates the need to carry two or more document image representations in the image file, since the stored video look-up table can be optionally used to generate an alternate image representation from the original full grayscale picture data. The above method places the computational burden of generating the video look¬ up table used to threshold the image on the image capture portion of the system at the image processor 24, thereby eliminating or reducing the need for additional image post¬ processing hardware at the image workstation. Use of the method additionally permits real-time, high-speed image threshold post-processing to be performed at an image workstation with minimum computation. If the post-processing threshold hampers document image legibility at the workstation, the thresholding process can be easily disabled to provide the data entry operator with a full grayscale, near-photographic image rendition. In a preferred embodiment of a method for generating the remapping look-up table (LUT), a method for the rapid transformation of 8-bit, near-photographic document images to 2-bit or 4-bit high-contrast, "background suppressed" images is described. This method uses a gray level histogram of the input image to compute a gray level remapping LUT. This LUT is created with the goals of displaying information which is believed to be background as white and of contrast-enhancing the residual signal (i.e. portions of the document image which are necessary for its processing) information. The method is driven by a gray level histogram of the original (uncompressed) image. All substantial peaks of the histogram in the upper two-thirds (i.e. towards the whitest gray level) of the gray level range are identified. These peaks are usually due to the background of the document. Gray level thresholds derived from the locations of the peaks closest to all white and closest to one-third of all white are used to control the shape of a remapping curve or function. The characteristics of this curve are dependent upon the number of output gray levels available. For 2-bit output images, the remapping curve is defined as follows: 1. If two thresholds are found: a) Input gray levels above the higher threshold are mapped to white (3) . b) Input gray levels between the two thresholds are mapped to output level 2 (light gray) . c) Input gray levels below the lower threshold are linearly remapped between 0 (black) and 1 (dark gray) . 2. If one threshold is found: a) Input gray levels above the higher threshold are mapped to white (3) . b) Input gray levels below the lower threshold are linearly remapped between 0 (black) and 2 (light gray). For 4-bit output images, the remapping curve works qualitatively as follows: 1. If two thresholds are found: a) Gray levels of the original image greater than the higher threshold are forced to white (15) in the output image. b) Gray levels of the original image between the two thresholds are de- emphasized or lightened with a non¬ linear curve. c) Gray levels below the lower threshold are emphasized or darkened with a non-linear curve. 2. If a single threshold is found: a) Gray levels of the original image greater than the threshold are forced to white (15) in the output image. b) Gray levels below the threshold are emphasized or darkened with a non-linear curve. These rules for LUT specification were derived from the following considerations. Setting gray levels above the higher threshold to all white has the effect of removing background from the output image. Information between the two thresholds (if two peaks in the histogram are found) is retained, but de-emphasized. This is because such information is usually background and the second threshold is usually caused by a scenic or patterned background. Since signal information sometimes lies in this gray level range between the two thresholds, it is important that such information not be completely eliminated from the output image. Finally, since information below the lower threshold is almost always signal, it must be retained (and enhanced when possible) in the output image. The method of the preferred embodiment operates on 64 entry gray level histograms. This is principally because histogram resolution beyond that afforded by a 64 entry histogram has been found unnecessary. In addition, histogram smoothing or filtering, which is described in a later section of this specification, can be accomplished with a reasonably sized filter kernel if a 64 entry histogram is used. When a histogram with more than 64 entries is input to the table generating method of the invention, the input histogram, H in , is first reduced to 64 entries by summing contiguous histogram bin amounts. The equation which relates the input histogram H in to the output 64 entry histogram H out is -1 64 H ouC [£rl = ∑ H iΩ [ g+ ή } n«o 64 Where g = 0,1 ...63 and N = number of entries in the original,or input histogram H^. For example, if N = 128, then the output histogram entries are found by pairing adjacent input histogram entries - i.e. Hour (0) = H in (0) + H in (1), etc. To lower-bound the amount of histogram inflection which is considered to represent a peak, and to reduce the effects of noise, the 64 entry histogram is next smoothed with a low pass, finite impulse response filter. Very small peaks and rapid excursions in the histogram are removed by such a filter. In the preferred embodiment, the filter is a simple 5-element averager and is chosen to allow implementation without the need for any multipliers. The impulse response of this filter is n hfni -2 1 -1 1 0 1 1 1 2 1 Thus, to obtain a smooth histogram point, one would take the original histogram point (at n = 0) and average it with the two contiguous points to its right and left (i.e. n = -2 to n Next, to locate relevant peaks of the smoothed histogram, the discrete equivalent of the first derivative of the histogram waveform is generated. This is accomplished using a first-order difference function, d(n), of the smoothed histogram which is generated according to Since d[n] is the discrete equivalent of the first derivative, it has zeros where the undifferenced histogram function has extrema. This characteristic is used to locate the peaks of the smoothed histogram. Since the first-order difference of the histogram is sampled discretely, it is probable that it will contain no zeros. Therefore, the locations of the zeros of the difference function are estimated by testing for and locating zero crossings of that difference function. The zero- crossing location problem can be reduced to a binary pattern- matching test through use of the SIGN function. The SIGN function is defined as follows: «» <*>-ssss Starting at the white (level 63) end of the histogram and moving towards black (level 0), peaks of interest in the histogram will always be approached through regions of negative slope. This means the difference function will be negative in those regions and will transition to positive values at, or just beyond, the peak of the histogram. To reject broad flattenings of the histogram as well as residual noise, the difference function is required to have a number of negative samples adjacent to a number of zero or positive samples to constitute a valid zero crossing. Using the SIGN function, detection of appropriate zero-crossings of the difference function can be reduced to bit-wise logical operations. In particular, a detection window can be defined as a pattern of contiguous zeros adjacent to a pattern of contiguous ones. Zero-crossing detection then becomes a process of sliding the detection window along the SIGN function bit pattern, performing an exclusive-OR at each pattern bit position, and counting the number of ones that result. These ones represent mismatches between the detection window and the SIGN function. The number of ones must be below a specified threshold in order for the result to be considered a valid match. The details of detection window size and the number of bits of the SIGN function which must match the window are preselected parameters of the method of the invention. Empirically, the best test results have been attained with a method using a detection window of size or bit width 7 with the binary values 1110000, and a match threshold of 6. Thus, in the preferred embodiment, a difference function zero-crossing is said to occur at points on the SIGN function which match six of the seven bits of the detection window bit pattern. Each detected zero-crossing is subjected to an additional test before being considered valid. The peak of the histogram which corresponds to a given zero-crossing must be at least one-eighth as big as the largest peak found. This eliminates from consideration thresholds derived from small but well defined peaks. Generally, a histogram peak represents the statistical mode of some portion of the document background. Where, as in the present embodiment, the blackest gray level is all zeros and the whitest gray level is all ones, it is desirable to select thresholds somewhat to the left (i.e. darker or toward black) of this point so that much of the background can be de-emphasized or clipped to white. One can obtain additional information about a particular peak by examining the histogram difference function. As the difference function is traversed left of a zero-crossing, the difference function will reach a positive maximum (corresponding to the maximum slope of the histogram) and then decrease as the detection window moves away from an isolated peak. Setting the gray level threshold at the point at which the difference function falls to one-half its maximum value left or to the dark side of a particular zero-crossing has been found to yield good empirical results. One or two gray level thresholds are determined using the techniques described above and subject to the following additional constraints: 1. Only thresholds in the upper two-thirds of the gray level range of the original document data are considered valid. 2. If no zero-crossings are found in the valid range, a single threshold is set to two- thirds of the whitest gray level in the original document range. A high threshold, THRHI, is that threshold closest to the whitest gray level, while a low threshold, THRLO, corresponds to the other peak closest to one-third of white - i.e. the highest value gray level. If only one peak is found, then THRHI equals THRLO. The effects of histogram resolution/reduction, if any, are reversed by multiplying the thresholds by the reduction factor which is simply the entry size of the original histogram divided by 64. The output LUT values are next defined. The LUT values depend upon the number of output gray levels desired and the number of thresholds which were located. For two-bit converted images with two distinct thresholds located, the LUT contents are defined as follows: * 4a ) LUT(i) = 00 for i = 0,1, ... , \.THRLO/2\ ( 4b) LϋT{i) = 01 for i = lTHRLO/2 +1 , . . . , THRLO I C LUT(i) = 10 for i = THRLO+1 , . . . , THRHI * LUTtt) = 11 for i = THRHI+1 , . . . , highest original gray level I x J represents a floor operator which rounds x down to the nearest integer value . For two-bit images where only one threshold, THR, has been determined, the LUT contents are defined by: ^ ) LUT(i) = 00 for i = 0 , 1 , . . . THR/31 ' ' LUT(i) = 01 for i = LIHR/3J+1, . . . , 2 * L2ΗK/3J ( 5C ) LUTU) = 10 for i = 2*lTHR/3i+l, . . . , THR (5d) LϋT(i) =11 for i = 222R+1, ... , highest original gray level For four-bit images, which may be useful for returned item FAX, limited-gray scale hard copy or other applications, the following equations define the contents of the LUT: ( 6a LUT(i) = ROUND { 1 i™Ξ°[ anh ( -2.1) +ll } THRHI [ THRLO J for i = 0 , 1 , . . . THRLO ( 6b ) LUTU ) = ROUND { ^ JTHRHI-THRLO ) ^^ r 2 .5 ( i-THRLO ) 1 + 1ΛTHRLO ' ΛUU1W THRHI [ THRHI-THRLO J THRHI for i = THRLO+1, THRHI (6c) rjjT'jr) = mi 7 for i = THRHI+1, . . . , highest original gray le\ ROUND is a true rounding function which rounds up to the next highest integer for fractions of 0.5 or higher and down to the next lowest integer, otherwise. It should be noted that if there is only one threshold found, THRHI is set equal to THRLO and Equation 6b never becomes effective. The constants 2.1 and 2.5 were empirically derived and control the curvature of the non-linear emphasis and de-emphasis functions. The emphasis portion (below THRLO) is made less curved than the de-emphasis portion (between THRLO and THRHI) to prevent the extreme darkening of high contrast scenes on scenic documents such as personal checks. Implementation of the above approach to generating a remapping look-up table may be best summarized with reference to the flow chart of FIG. 5 and the software coding set forth in Appendices 1 through 9. The program flow of the method of the invention set forth in FIG. 5 is, in effect, an expanded detail of steps 304 and 306 of FIG. 3 wherein a suitable remapping look-up table is to be generated in accordance with a remapping curve whose characteristics are a function of the histogram of the document image data to be remapped. The computer code for implementing steps 503 through 517 of FIG. 5 are set forth in a C-coded program version in Appendix 1, which basically comprises a series of subroutine calls. The C-code for the various subroutines is set forth in Appendices 2 through 9. The routine of FIG. 5 is entered at the start step 501. Next, the size, or number of entry categories or bins, of the histogram for the document of interest is determined and if it is greater than 64, as determined by the C-code at line 2 of Appendix 1, then the histogram is subsampled at step 505 in accordance with the code set forth in Appendix 2. Next, the histogram is filtered or smoothed at step 507 utilizing the code set forth in Appendix 3. After smoothing, the first order difference function of the histogram is computed at step 509 which is implemented by the code set forth in Appendix 4. Next, valid zero-crossings are searched and identified at step 511 utilizing code set forth in Appendices 5, 6 and 7. After the zero-crossings are identified, the appropriate gray level thresholds THRLO and THRHI are determined using the code set forth in Appendix 5 and Appendix 8. This is shown as step 513 of FIG. 5. Then, at step 515, the thresholds are adjusted, if the original histogram contained more than 64 entries. This step is implemented at Appendix 1, line 6. Finally, the contents of the look-up table are generated using the code set forth in Appendix 9 and shown as step 517 of FIG. 5. Basically, the code of Appendix 9 implements the various equations (4a) through (4d), (5a) through (5d), and (6a) through (6c) set forth above. The original, near photographic image data can then be remapped at the workstation as set forth in the flow charts of FIG. 4 by entering the look-up table with an address determined by an original pixel gray level value and taking the look-up table contents at that address as the remapped pixel value. FIG. 6 shows sample 2-bit and 4-bit remapping curves for a single threshold of gray level 184. FIG. 7 shows sample 2- bit and 4-bit remapping curves for THRLO = 148 and THRLO = 200. It should be noted that the 2-bit LUT values for both FIGS. 6 and 7 are multiplied by 5 to fit on the same scale as the 4-bit LUT remapping curve. Additionally, the original 8- bit histograms of the original document images which were remapped are shown for reference in FIGS. 6 and 7. With reference to FIG. 6, the original histogram is designated 601 and its peak at 603. The single threshold identified is labeled 609 and results in the 2-bit remapping curve 605 and the 4-bit remapping curve 607. With reference to FIG. 7, the original document's histogram is designated 701 and is shown to have peaks located at 703 and 705, which result in the thresholds 711 and 713, respectively. Finally, the 2-bit remapping curve is designated 707, while the 4-bit remapping curve is designated 709. The invention has been described with reference to a preferred embodiment, the details of which are presented solely for the sake of example. The scope and spirit of the invention are to be determined by the appropriately interpreted appended claims.

Claims: WHAT IS CLAIMED IS: 1. In an image processing system associated with at least one workstation, a method of adjusting gray level tone scale of document image data generated by the image processing system for display at the workstation, the method comprising: associating with each document image data file, generated by the image processing system, a preselected image data tone scale adjusting function stored in the document image data file with its associated document grayscale image; and downloading the document image data file and its associated adjusting function to a workstation and post¬ processing the grayscale image data at the workstation by means of the adjusting function prior to display of the document image. 2. The method of Claim 1, wherein the adjusting function is implemented by means of a look-up table which is addressed using the grayscale value of pixels of the document image and which has contents at each address corresponding to an adjusted value of the pixel used as the table address. 3. In an image processing system associated with at least one workstation, a method of transforming grayscale document image data generated by the image processing system into a high-contrast document image for display at the workstation, the method comprising: associating with each document image data file, generated by the image processing system, a preselected grayscale remapping curve for thresholding the document image data, the remapping curve stored in the document image data file with its associated document grayscale image; and downloading the document image data file and its associated remapping curve to a workstation and post¬ processing the grayscale image data at the workstation by means of the remapping curve prior to display of the document image. 4. The method of Claim 3, wherein the remapping curve is implemented by means of a look-up table which is addressed using the grayscale value of pixels of the document image and which has contents at each address corresponding to a thresholded value of the pixel used as the table address. 5. The method of Claim 4, wherein the remapping curve and therefore the look-up table entries are determined by the image processing system as a function of characteristics of • grayscale image data of a corresponding document. 6. The method of Claim 5, wherein the preselected characteristics are global characteristics of the grayscale image data of the corresponding document. 7. The method of Claim 5, wherein the function of the grayscale image data characteristics is such that the post- process image data yields increased contrast of written and printed text on the document image. 8. The method of Claim 3, further comprising saving the grayscale image data of the. document in addition to a post-processed version thereof at the workstation and enabling an operator at the workstation to select either post-processed or non-post-processed image data for display at the workstation. 9. A method for adaptively thresholding grayscale document image data at a workstation receiving compressed image data from an image processing and storage system, the method comprising: capturing an image of a document and digitizing the image as a plurality of pixels, each having one of a plurality of grayscale levels in a preselected range; selecting a grayscale remapping curve as a function of predetermined characteristics of the digitized grayscale image data; generating a look-up table (LUT) for producing thresholded output pixels related to address inputs in accordance with the selected remapping curve; associating the generated LUT with an image header block for the document image data; compressing the original grayscale document image data; storing the compressed document image data and its associated file header in an image storage system; downloading the compressed document image data and its associated file header block to the workstation; decompressing the image data; obtaining the LUT from the downloaded image header block and addressing the LUT using each pixel of decompressed image data; thresholding each decompressed pixel by reading corresponding contents of the LUT and storing each thresholded pixel in a remapped image data buffer; and sending remapped image pixels to an output device at the workstation. 10. Apparatus for adaptively adjusting gray level tone scale of document image data in an image processing system associated with at least one workstation, the apparatus comprising: generator means for examining grayscale image data produced by the image processing system corresponding to a document of interest, for generating as a function of the image data a gray level tone scale adjusting function, and for placing the adjusting function in an image file header block for storage with image data associated with the document of interest in a storage module of the image processing system; and post-processing means at each workstation coupled for receipt of the adjusitng function and operative to adjust each grayscale pixel of the document image in accordance with the adjusting function and to present an adjusted image of the document of interest for display at the workstation. 11. The apparatus of Claim 10, wherein the adjusting function is represented by entries in a look-up table which is stored by the generator means in the image file header block. 12. Apparatus for adaptively thresholding grayscale document image data in an image processing system associated with at least one workstation, the apparatus comprising: generator means for examining grayscale image data produced by the image processing system corresponding to a document of interest, for generating as a function of the image data a grayscale remapping curve for thresholding the image data, and for placing the remapping curve in an image file header block for storage with image data associated with the document of interest in a storage module of the imnage processing system; and post-processing means at each workstation coupled for receipt of the grayscale remapping curve and operative to adaptively threshold each grayscale pixel of the document image in accordance with the remapping curve and to present a thresholded image of the document of interest for display at the workstation. 13. The apparatus of Claim 12, wherein the remapping curve is represented by entries in a look-up table which is stored by the generator means in the image file header block. 14. The apparatus of Claim 12, wherein the generator means examines the grayscale image data for generating the remapping curve prior to compression of the grayscale image data by the image processing system, and wherein the generator means places the remapping curve in the image file header block for storage in the storage module with compressed image data associated with the document of interest. 15. The apparatus of Claim 14, further comprising a decompressor at each workstation for decompressing compressed image data received from the storage module and wherein the post-processing means is operative to adaptively threshold each decompressed grayscale pixel. 16. The apparatus of Claim 15, further comprising selection means having a first input coupled for receipt of unthresholded decompressed image data from the decompressor, a second input coupled for receipt of thresholded image data from the post-processing means, and a control input coupled for receipt of selection signals generated by a workstation operator, the selection means operative to present either unthresholded or thresholded image data for display at the workstation in accordance with a signal present on the control input. 17. The apparatus of Claim 14, wherein the remapping curve is represented by entries in a look-up table which is stored in the storage module by the generator means in the image file header block with a compressed image data associated with the document of interest. 18. The apparatus of Claim 17, further comprising a decompressor at each workstation for decompressing compressed image data received from the storage module and wherein the post-processing means, upon receipt of the look-up table in the image header block is operative to adaptively threshold each decompressed grayscale pixel. 19. The apparatus of Claim 18, further comprising selection means having a first input coupled for receipt of unthresholded decompressed image data from the decompressor, a second input coupled for receipt of thresholded image data from the look-up table in the post-processing means, and a control input coupled for receipt of selection signals generated by a workstation operator, the selection means operative to present either unthresholded or thresholded image data for display at the workstation in accordance with a signal present on the control input. 20. A method of generating a gray level remapping function for use in adaptively thresholding original gray scale document image data, the method comprising: generating a gray level histogram of the original gray level image data; identifying at least one peak in a preselected gray level range in the histogram; defining the adjustment function as (a) adjusting all original gray level data points to a whitest gray level whenever a corresponding original gray level datum point is whiter than a threshold level determined by the at least one histogram peak, and (b) adjusting all other original gray level data points having gray levels less than the threshold level to preselected levels darker than the whitest level. 21. The method of claim 20 further comprising the step of filtering the histogram so as to smooth out very small peaks and noise therein prior to identifying at least one histogram peak. 22. The method of claim 21, wherein the histogram is filtered using a low-pass, finite impulse response filter. 23. The method of claim 20, wherein the preselected gray level range in which at least one histogram peak is identified, comprises a range of levels between about one- third of a whitest level and the whitest level of the original document gray level range. 24. The method of claim 23, wherein first and second histogram peaks are identified, the first peak being closest to the whitest level and the second peak being closest to one-third of the whitest level, wherein all original gray level data points whiter than a first threshold level determined by the first histogram peak are adjusted to a whitest gray level and wherein all original gray level data points lying between the first threshold and a second threshold determined by the second histogram peak are de- emphasized, and wherein all original gray level data points darker than the second threshold are enhanced. 25. The method of claim 20, wherein the remapping function is implemented by a look-up table whose contents are addressed in accordance with an original data point gray level value. 26. The method of claim 20, wherein the threshold level is selected to be darker than a gray level corresponding to the at least one histogram peak. 27. A method of generating a remapping function for use in converting document image original pixel gray level data lying in a first range of gray level values to higher contrast and background-suppressed pixel gray level data lying in a second range of gray level values, the method comprising: (a) generating a gray level histogram of all pixels of a document; (b) identifying and saving two histogram peaks, a first peak closest to the whitest gray level of the first range and a second peak closest to one-third the whitest gray level of the first range, if any; (c) whenever no peaks are identified, setting a high threshold and a low threshold, both equal to about two-thirds of the whitest gray level value in the first range and proceeding to step (f) ; (d) whenever a single peak is identified, setting a high threshold and a low threshold both equal to a gray level value in the first range which is darker, by a preselected amount, than a gray level value in the first range corresponding to the single histogram peak and proceeding to step (f); (e) setting a high threshold to a gray level value in the first range and darker, by a preselected amount, than a gray level value corresponding to the first peak, and setting 5 a low threshold to a gray level value in the first range and darker, by a preselected amount, than a gray level value corresponding to the second of the two peaks; and (f) defining the remapping function as 10 (i) converting all pixels in the first range having gray level values greater than the high threshold to a whitest gray level value in the second range, 15 (ii) converting all pixels in the first range having gray level values between the high and low thresholds to de-emphasized gray level values in the second range, and 20 (ϋi) converting all pixels in the first range having gray level values less than the low threshold to emphasized gray level values in the second range. 28. The method of claim 27, further comprising the step of filtering the histogram so as to smooth out small peaks and noise therein prior to identifying and saving histogram peaks. 29. The method of claim 27, wherein step (b) further comprises generating a first-order difference function of the histogram and identifying histogram peaks by estimating locations of zero-crossings of the first-order difference function. 30. The method of claim 29, wherein zero crossing locations are estimated using a binary pattern matching test comprising the steps of: calculating a SIGN function of the first-order difference function where sia x) - I & » g defining a detection window as a pattern of a first preselected number of contiguous binary zeros adjacent a second preselected number of contiguous binary ones; sliding the detection window along the calculated SIGN function bit pattern and at each window position counting mismatches between the detection window bit pattern and the SIGN function; and designating a valid zero crossing whenever the count of the mismatches is below a predetermined threshold. 31. The method of claim 29, wherein the preselected amount of steps (d) and (e) is approximately equal to a gray level value in the first range corresponding to a point at which the first-order difference function falls to half its maximum value on a darker side of a zero-crossing of interest. 32. The method of claim 27, wherein only thresholds in an upper two-thirds of the first range are considered valid. 33. The method of claim 27, wherein step (f)(ii) further comprises non-linearly de-emphasizing gray scale values between the high and low threshold values. 34. The method of claim 33, wherein non-linear de- emphasis is effected via a hyperbolic tangent function of the high and low threshold values. 35. The method of claim 27, wherein step (f) (iii) further comprises non-linearly emphasizing gray level values less than the low threshold value. 36. The method of claim 35, wherein non-linear emphasis is effected via a hyperbolic tangent function of the low threshold value. 37. The method of claim 27, wherein the remapping function is implemented by a look-up table whose contents contain gray level values in the second range addressed in accordance with an original pixel gray value in the first range. 38. A method of generating contents of a remapping look-up table for use in converting original near- photographic document image pixel gray levels lying in a first range of gray level values to higher contrast and background-suppressed limited pixel gray level data lying in a second range of gray level values smaller than the first range, the conversion performed by reading the look-up table at an address determined by a gray level value of an original pixel of interest and reading out a converted value, the method comprising: (a) generating a gray level histogram of all pixels of a document; (b) suppressing small peaks and noise in the histogram by use of a smoothing filter; (c) generating a first-order difference function of the histogram and identifying two histogram peaks, if any, by estimating locations of zero-crossings of the first- order difference function and saving two peaks, a first peak closest to the whitest gray level of the first range and a second peak closest to one-third the whitest gray level of the first range; (d) whenever no peaks are identified, setting a high threshold and a low threshold both equal to about two-thirds of a whitest gray level value in the first range and proceeding to step (g); (e) whenever a single peak is identified, setting a high threshold and a low threshold both 5 equal to a gray level value in the first range which corresponds to a gray level value at which the first-order difference function falls to half its maximum value on a darker side of the single peak and proceeding to 10 step (g); (f) setting a high threshold to a gray level value in the first range which corresponds to a gray level at which the first-order difference function falls to half its maximum 15 value on a darker side of the first saved peak, and setting a low threshold to a gray level value in the first range which corresponds to a gray level at which the first-order difference function falls to half 20 its maximum value on a darker side of the second saved peak; and (g) defining the contents of the remapping table by (i) placing a whitest gray level value of 25 the second range at all table addresses specified by original pixel values above the high threshold, (ii) placing de-emphasized gray level values in the second range at all table addresses specified by original pixel values between the high and low thresholds, and (iii) placing emphasized gray level values in the second range at all table addresses specified by original pixel values below the low threshold. 39. The method of claim 38, wherein only thresholds in an upper two-thirds of the first range are considered valid. 40. The method of claim 39, wherein step (g)(ii) further comprises non-linearly de-emphasizing gray level values in the second range. 41. The method of claim 40, wherein step (g)(iii) further comprises non-linearly emphasizing gray level values in the second range. 42. The method of claim 41, wherein non-linear de- emphasis is effected via a hyperbolic tangent function of the high and low thresholds and wherein non-linear emphasis is effected via a hyperbolic tangent function of the low threshold. 43. The method of claim 38, wherein the locations of the zero crossing in step (c) are estimated using a binary pattern matching test comprising the steps of: calculating a SIGN function of the first-order difference function where defining a detection window as a pattern of a first preselected number of contiguous binary zeros adjacent a second preselected number of contiguous binary ones; sliding the detection window along the calculated SIGN function bit pattern and at each window position counting mismatches by exclusive-ORing the window pattern to the SIGN pattern; and designating a valid zero crossing whenever the count of mismatches is below a predetermined threshold. APPENDK 1 /* Main */ 1. hist_reduction_factor = num_input_grays 64; 2. if (hist_reduction_factor >1) reduce_hist (input_hist, num_input_grays,hist_reduction_f actor); 3. smooth_hist (input_hist); /* Apply 5-element average FIR filter */ 4. diff_hist (input_hist, diff_func); ΛPlace lst-order difference function of input_hist in diff uπc */ 5. get_thresh (input_hist, diff_func, thrl,thr2); /"Compute thresholds */ 6. if (hist_reduction_factor >1){ thrl = thrl * hist_reduction_factor; thr2 = thr2 * hist_reduction_factor; } 7. make_lut (outJLUT^um nput ^ grays, num_output_ J grays, thrl, thr2); APPENDIX 2 /* reduce_hist */ void reduce_hist (input_hist, num_input_grays, hist_reduction_factor) for (i = 0;i < (num_input_grays/hist_reduction_factor-l) ; i + + ) { count = bput_hist[i*hist_reduction_factor]; for (j = 1; j < hist_reduction_factor-l; j + + ) count = count + input_hist[i*hist_reduction_factor-r-j]; hist[i] = count; } APPENDIX 3 /* smooth_hist */ void smooth_hist(input_hist) /* handle endpoints */ output_hist[0] = (mput_hist[0]+mput_hist[l]+input_hist[2])>>2; output_hist[l] = (mputjιist[0]+ put_hist[l]+mput_lust[2]-r-mput_hist[3])>>2; output_hist[62] = (input_hist[60] + input_hist[61] + input_hist[62] + input_hist[63]) > > 2; output_hist[l] = (mput_hist[61]+input_hist[62]+input_hist[63])>>2; I* smooth other entries */ for(i=2;i<62;i++) { sum = 0; forG=i-2;j< = i+2;j++) sum = sum + input_histβ]; output_hist[i] = sum> >2; } input_hist = output_hist; APPENDIX 4 /* diff hist */ void diff_hist (input_hist, diff_func) for (i=0; i<63; i+ +) diff_func[i] = input_hist[i + 1] - input_hist[i]; diff_func[63] = -input_hist[63]; /*In effect, input_hist[64] = 0 */ APPENDIX 5 I* get_thresh */ void get_thresh (input_hist, diffjunc, thrl, thr2) get_sign (diffjunc, sign_func); ΛPlace the sign function of diffjunc in sign_func */ get_zerocs (input_hist, sign_func, zeroes, numzcs); /•Place all valid zero-crossing indices in zerocsQ */ calc_thresholds (diff_func, zeroes, numzcs, thrl, thr2); ΛPlace threshold indices in variables thrl and thr2 */ APPENDIX 6 /* get_sign */ void get_sign (diffjunc, sign_func) for (i=0;<64; i+ +) if (diffjuncfi] > =0) sign_func[i] = 1; else signjunφ] = 0; sign_func[64] = 0; /* These statements allow very bright peaks to be found as zero-crossings */ sign_func[65] = 0; APPENDIX 7 I* get_zerocs */ void get_zerocs (input_hist, sign_func, thrl, thr2) detect_mask = 0x70; Λ Binary 11 29000 */ hist_max =0; Λ Used to elimate small peaks */ mismatch_thresh = 1; /* We require at least 6 of 7 bit match */ numzcs = 0; /* Initialize number of zero-crossings found */ for (i=65;i> =7;i~) { ΛMove from white to black */ inputjpattern = 0; for (m=6; m>0; m~) { Λ Get 7-bit sign pattern */ input_pattern = input_pattern I sign_func[i-m]; Λ OR the left-most remaining bit */ inputjpattern = inputjpattern < <1; /* Shift the pattern to make room for next bit */ } inputjpattern = input_pattern I signfl]; Λ Get the right-most bit */ match_result = input pattern Λ detect mask; /* XOR input pattern with detection mask Any unmatching bits will be 1 in matchjresult */ mismatch num = 0; for (m=0; m<7; m+ + ) { if (match_RESULT & 1) /* If LSB is a mismatch, count it */ mismatch αum + + ; match result = match_result > > 1; } /* Look at next bit */ if (mismatch Qum < = mismatch_thresh) { zerocsfnumzcs] = i - 3; /* Zero-crossing index is last negative diff-func value */ if (input_hist[i-3] > hist max) /* Update maximum if necessary */ hist_max = input Jιist[i-3]; numzcs + + ; } /* End zero-crossing detection FOR loop V /* Mark indices which correspond to peaks smaller than 1/8 the largest peak */ hist_thresh = hist_max> >3; for (i=0; i<numzcs; i+ +) { if (input_hist[zerocs[i]] < hist_thresh) { Λ Peak is too small */ numzcs-; zerocs[i] = -1; /* Mark location for later removal */ } } /* Now remove indices which correspond to small peaks. We want the array zerocsf] to be in sorted decreasing order. */ for (i=0; i<numzcs; i+ +) { m=ι: while (zerocsfm] = =-1) /* Remove -l's from zerocsf] */ m+ +; zerocsfi] = zerocs[m]; if (m ! = 1) zerocs[m] = 1; /* Replace current value with -1 to avoid using */ } APPENDIX 8 /* calc thresholds */ void calc_thresholds (diff_func, zeroes, numzcs, thrl, thr2) zc=0; Λ Zero-crossing counter */ t=0; /* Threshold counter */ while (zc < numzcs) { Λ Get a threshold for each zero-crossing of diffjunc */ /* Next while statement eliminates contiguous zero-crossings which result from multiple detections of the same peak */ while (zerocs[zc+ l] = = zerocsfzc] - 1) zc+ +; i = zerocsjzc]; Λ Start at 0 or positive value of diffjunc */ while (diff_func[i] < 0) i~; max = diff_func[i]; /* Find local-maximum of difference function left of the zero-crossing */ while (diff[i-l]> = diff[i]) { max = diff[i-l]; 1-; } while (diffp] > max/2) /* Continue left until 1/2 of max is reached */ thresh[t] = i; Λ 1/2 max point is the threshold */ t+ +; Λ Increment threshold counter */ Λ Finished processing all zero-crossings */ thr2 = thresh[0]; Λ Highest threshold is thr2 */ 10 if (thr2 < 21) { Λ Require thresholds to be in upper 2/3 of grayscale range */ 15 Λ Start from darkest of thresholds to while ((thresh[i]<21)&&(i>0)) Λ find thrl. It must be in upper 2 3 as well. */ i~; thrl = thresh[i]; APPENDIX 9 /* make Jut */ make Jut (out_LUT, num_input_grays, num_output jrays, thrl, thr2) if (num_output_grays = = 4) { /* Use 2-bit LUT rules */ if (thrl = =thr2) { /* There's only one threshold */ tOl = thr /3; /* Linearly remap */ tl2 - t01<<l; } else { /* There are two thresholds */ tOl = thrl>>l; tl2 = thrl; } for (i=0;i<=t01;i++) /* Do Equations 4 and 5 */ out_LUT[i] = 0; for(i = t01 + l;i< = tl2;i++) out_LUT[i] = 1; for (i = tl2 + l; i< = thr2; i+ +) out_LUT[i] = 2; for (i = thr2+l; i < num_input_grays; i+ +) out_LUT[i] = 3; } else { Λ 4-bit LUT rules (works for other output resolutions as well */ Λ Do Equations 6 */ low_fac = (num_output_grays-2)*(thrl/thr2); low slope = 2.1/thrl; 5 for (i=0; i< = thrl; i+ +) out_LUT[i] = (mt)(low_fac*(tanh(low_slope*i-2.1) -l-l) +0.5); high_fac = (num_output_gτays-2)*(thr2-thrl)/thr2; high_slope = 2.5/(thr2-thrl); high_intercept = (num_output_grays-2)*thr 7thr2; 10 for (i=thrl+l; i< = thr2; i+ +) outJ UTp] = (int)(h_^ ac*tanh(high_slope*(i-thrl)) + high ntercept + OS); for (i=thr2+l; i<num_input_grays; i+ +) out_LUT[i] = num_output_grays - 1;

Inventors: KIDD ROBERT CHARLES, KLEIN ROBERT DENNIS, KIDD, ROBERT, CHARLES, KLEIN, ROBERT, DENNIS
Applicants: UNISYS CORP, UNISYS CORPORATION
Application year: 1992
Main classification: H04N1
IPC codes: G06K9, G06T5, G09G5, H04N1