Image processing method

Abstract: An image processing method for flattering histogram with distribution comprising steps of: a density conversion table is generated for indicating to which densities each density is to be converted, as well as how many pixels are to be converted; the later of the density is registered in a address designated by the former of the density in a converting circuit, and the number of pixels to be converted is registered in a count-down circuit; density of each pixel of an image is inputted to the converting circuit and the count-down circuit so that later of the density is outputted from the converting circuit and that the number in an address designated by the density of each pixel is decreased by "1" on each input of the density; the density of each pixel is converted to the former density until the number is decreased to "0" ; and pixels in the image of the density which corresponds to the number decreased to "0" is converted to an index density thereafter.

Description: The present invention relates to an image processing method for processing an image in order to flatten the histogram representation of the density distribution. From CONFERENCE PROCEEDINGS IEEE SOUTHEASTCON 87, Tampa, Florida, 5th - 8th April 1987, vol. 1, pages 1-5, IEEE, New York, US; S.D. TUCKER et al.: "High-speed histogram calculations for real time image processing", a method for establishing a histogram representing the density distribution of an image is known. According to that method, each byte of pixel data is latched and used to address a location within a RAM containing pixel count information. The RAM data is fetched and incremented by a counter and then restored within the original location. In that manner the numbers of pixels for each density are counted from which it it possible to establish the histogram. From WO-A-8605901 an apparatus and method for modifying the brightness levels of three color separation digital images to make them compatible with an output display device which has a fewer number of available brightness levels for each color than the color digital images, is known. Color histograms are produced for each color separation digital image. Each histogram is used for producing a transform function which operates on one of the color separation digital images to perform the following modifications: a predetermined number of the digital pixels having the darkest brightness levels are assigned to the darkest brightness level of the output display device and a predetermined number of the digital pixels having the brightest brightness levels are assigned to the brightest level of the output device. The remaining pixels of the color digital images are assigned to their corresponding remaining output levels of the display device. It is the object of the present invention to provide an image processing method for flattening the density distribution of an image which can be carried out by a simple hardware and with a high process speed. This object is solved by the subject matter of claim 1. Prefered embodiments of the present invention will be described in the following in connection with the drawings, in which Fig. 1 shows a block diagram of an image processing system useful for carrying out a first embodiment of the present invention; Fig. 2 shows a block diagram of a count-down circuit of the image processing system; Fig. 3 shows a table for converting densities; Fig. 4 shows a block diagram of another image processing system. In Fig. 1, an image processing system for an embodiment of the present invention comprises a plurality of frame memories 1, a converting circuit 2 and a count-down circuit 3, to which circuits an image data is inputted from one of the frame memories 1. The output of the circuits 2 and 3 is inputted through a multiplexer to one of the frame memories 1. The outputs of the frame memories 1 are selected by a multiplexer 5 so that the output of one of the frame memories is selectively inputted to the circuits 2 and 3. The countdown circuit 3 comprises a high speed memory 6 and a light computational portion 7 to which the output of the high speed memory 6 is inputted. The high speed memory 6 comprises a static RAM (random access memory) or any other high speed memory. The output of the light computational portion 7 is inputted to a data input of the high speed memory 6 so that data in an read from a certain address is calculated and then again stored under the same address. In this embodiment, the light computational portion 7 comprises an subtracter for subtracting the inputted data by "1" and for storing the subtraction result under the same address. The converting circuit 2 comprises a high speed memory for storing a density to which a number of pixels of another density is partially moved. The address where the density stored is thereby designated by the density from which the number of pixels is partially moved. The density stored is called "converting density" hereinafter. Switching the converting circuit into a read mode and inputting pixel data (density) to an address input to the converting circuit 2 from the frame memory 1, the respective converting density to the inputted density is outputted. The converting density is written in the address of the frame memory, from where the inputted pixel data, is read out so as to generate an image, with a converted image histogram. In the count-down circuit 3, the number of pixels of a density to be converted to another density is stored in an address designated by the density of the former. The number in an address of the circuit 3 is decreased by "1" on every conversion of one pixel of the density. The decreasing is performed by the light computational portion 7. When such a number is decreased down to "0", it is not further decreased. For preventing the decreasing for a density, data writing of the density (address) is prevented or decrement value in the light computational portion for the density is changes to "0", or any other manners can be applied. When the number of a density becomes "0", the density conversion of the density should not be performed thereafter. So the multiplexer 4 is controlled so that the number "0" stored in the high speed memory is written in the frame memory 1. The number "0" is an index indicating that the pixel is not converted in the histogram, in this case. The density for the index can be any other density not included in the image. In the above processing, a number of pixel of one density is partially moved to another density. For partial distribution of a number of pixels to other densities, only not indexed pixels are processed in the same manner as the above. When number of pixels of one density is distributed to 3 densities, 3 times scanning of an image is necessary. The count-down circuit 3 performs various calculations by defining the calculation manner of the light computational portion. The calculation manner may be addition, MAX, MIN etc. This enables counting-up, maximum extraction, minimum extraction etc. When the data outputted from the high speed memory is directly outputted without calculation in the light computational portion, the count-down circuit can be used as a converting circuit. When the light computational portion is defined as an adder and the density of each pixel is inputted to the address input of the high speed memory 6, a histogram is easily generated. In this processing, the light computational portion increases the data outputted from the high speed memory by "1" so as to count the number of pixels of each density. Before the flattening of the histogram, histogram is naturally generated. An adder with a performance of complement generation can be used as a subtracter. So a light computational portion of such a type can be easily changed in calculation manner. From a histogram, a table can be generated as shown in Fig. 3. This table is called "density converting table" hereinafter. There are indicated in the table, to which density a density is to be converted, and how many pixels of each density are to be converted. In Fig. 3, each density is indicated by d₁ to d N , densities to which the densities d₁ to d N are to be converted are indicated by cd ij . The number of pixels to be converted from each density is indicated by n ij . As for the density d₁, n₁₁ pixels are to be converted to the density cd₁₁ and n₁₂ pixels are to be converted to the density cd₁₂. In the first scanning, the conversion from d₁ to cd₁₁ is performed. When n₁₁ times conversion is finished, the data in the address d₁ of the high speed memory becomes "0". Thereafter, pixels of density d₁ are changed to the index density of "0". In the second scanning, data cd₁₂ is registered in the address d₁ of the converting circuit, data n₁₂ is registered in the address d₁ of the high speed memory 6. By the processing similar to that of the first scanning, rest of the pixels of density d₁ are converted to the density cd₁₂. Therefore, maximal number of densities to which a density is converted defines the total scanning times. When a dual-port memory is used for the frame memory 1 in the circuit as well as the total system is constructed as a pipe-line system in Fig. 1, the process speed will become about 1/30 (sec/frame) for an image of 512x512x8bit. 30 times scanning will be performed in 1 sec. Fig. 4 shows another embodiment of the image processing system, which is different only in the count-down circuit from that of the system in Fig. 1. Therefore, portions are designated by the same references as that in Fig. 1. The count-down circuit 3 in Fig. 4 comprises a decoder 8 and a counter 9 in which the number of pixels to be converted are registered. The counter 9 is provided for each density, or the number of counters 9 is more than the number of densities. Each counter 9 is connected to a different output of the decoder 8. The decoder 8 enables one of the counters 9 to output registered data as well as to decrease the data by "1". The output of each counter 9 is transmitted to a multi-plexer 4 which is connected to the data output of the converting circuit 2. When the output "0" is transmitted to the multi-plexer 4 from a counter 9, the multi-plexer 4 prevents the output of the converting circuit 2 from passing therethrough. By this construction, the performance similar to that of the circuit in Fig. 1 can be obtained.

Claims: An image processing method for processing an image signal in order to flatten the histogram representation of the density distribution of the image by allocating pixels of one density to two or more densities, comprising the following steps : a density conversion table is generated for indicating to which one of a second set of densities each of a set of first densities is to be converted, as well as how many pixels are to be converted; each of said second densities is stored in a memory location in a converting circuit having an address designated by said first density, and said number of pixels to be converted is stored in a countdown circuit; the first density of each pixel of an image is inputted to said converting circuit and said countdown circuit so that said second density is outputted from said converting circuit and that said number in an address designated by said first density of each pixel is decreased by "1" on each input of said second density; said first density of each pixel is converted to the second density until said number is decreased to zero. An image processing method according to claim 1 wherein pixels with densities which are not further changed are indexed in order not to be processed in the further scanning of the image. An image processing method according to claim 1 or 2 wherein said countdown circuit comprises a high speed memory (6) and a light computational portion (7) which receives as a data input output data from the high speed memory and applies output data as input data to the high speed memory. An image processing method according to claim 3 wherein said light computational portion (7) comprises a subtracter. An image processing method according to any one of the preceeding claims wherein said countdown circuit comprises a decoder (8) and a plurality of counters (9), said decoder (8) designating one of said counters according to the density of each of said pixels so as to decrease data in said counter.

Inventors: KUMAGAI RYOHEI C O EZEL INC, KUMAGAI, RYOHEI C/O EZEL INC.
Applicants: EZEL INC, SHARP KK, EZEL INC., SHARP KABUSHIKI KAISHA
Application year: 1989
Main classification: H04N1
IPC codes: H04N1, G06T5