Parallel interpolator for high speed digital image enlargement

Abstract: Generation of new pixels and pixel values for a modified format image is achieved by employing parallel signal pipelines in a way that allows for highly efficient insertion of suitably modified interpolated pixels adjacent to the original pixels.

Description: This invention relates to digital image processing and more particularly to apparatus for rapidly performing data interpolation required for image magnification. A digitally stored image comprises a plurality of numerical values each representing an image characteristic, typically an optical density value, for a small, discrete portion of the image. These values are known in the art as PIXEL values, the name representing a short hand form of the term "Picture Element". The relative location of each PIXEL in the complete image is also known. A captured and digitized image is stored in a memory in the form of a finite number of picture values representing image densities for each PIXEL. In reconstructing the image for display, the stored PIXEL values are recovered and used to recreate each original picture element in the exact location in the image, with the same optical density as in the original. So long as there is a one to one relationship between the number of acquired original picture elements and the required output picture elements there are of course no problems. When one wishes to magnify an acquired image during display, it becomes immediately apparent that since the supply of original pixel data is fixed, there will be gaps in the displayed information, which must be filled in some manner in order to produce an acceptable display. It has been known to use the original pixel data to interpolate additional pixel values filling in the gaps in the original data generated because of the image magnification. Mathematical techniques to do the interpolation are well known. A commonly used approach for data interpolation, relies on defining in mathematical terms a three dimensional curve using existing pixel data and from that curve calculating intermediate pixel values. Existing pixel values are obtained from a defined area surrounding the area to be filled in, and these values are used to predict additional pixel values. The number of the new pixels depends on the magnification ratio. For a magnification of 2 times, for instance, four values have to be generated for each original pixel value. The new values are calculated using a number of arithmetic operations on the available pixel data, which involve selecting a predetermined number of coefficients, multiplying a selected number of original pixel data by the selected coefficients, and adding the results to produce new pixel values. The process of selecting the proper coefficients, obtaining the original data, multiplying and adding-the result to produce new values is time consuming, and particularly so if implemented in software. A substantial speed advantage may be gained by developing hardware to do the mathematical processing. Some such hardware is disclosed in U. S.-A-4,468,693 and US-A-4,837,722. While both of the above references teach circuitry that achieves rapid new pixel generation, when dealing with large image magnification ratios and particularly in situations where there is need to use multiple coefficients resulting in numerous arithmetic operations, especially when real, or quasireal, time displays are desired, increased speed is still needed. From US-A-4 578 812 a digital image processing apparatus for rapidly enlarging an image is known. The original pixel data are stored in a first memory and are read out thereof according to address signals generated by an address generating means, wherein the original pixel data according to locations where new pixel data are to be determined are read out. The generating means also generates control signals for selecting weight factors from a weight factor table according to the location where new pixel data are to be read out. The read out original pixel data and the related weighting factors are multiplied and the products of these multiplications are added to determine each new pixel data which are stored in a memory. EP-A-0 396 517 discloses a system and method for processing image data in a graphics display system using parallel processing. A source image represented as an array of image pixel values is convolved by a kernel function to enhance selected features and assist in image analysis. Bi-linear interpolation is implemented to preserve picture quality when a source image is enlarged or reduced. A series of processing elements connected in parallel are used to speed image transformation and interpolation. The application of convolution is divided between the processors so that the processing with adjacent pixels overlaps and output image pixels are generated in fewer machine cycles. A pipeline architecture continually processes values from the parallel processors through validation and conversion to generate the final image. Summary of the invention It is an object of the present invention to provide a high speed processor which interpolates digital data to generate new pixel values faster than heretofore achieved. According to the invention, this object is solved by an apparatus and a method as defined in claims 1 and 6, respectively. The subclaims relate to preferred embodiments, respectively. The invention will be best understood from the following description of a preferred embodiment shown in the drawings, in which Figure 1 shows an arrangement of a number of Pixels representing a portion of an original image, Figure 2 shows the gap in pixel information resulting from a two-fold magnification of the image portion depicted in figure 1, Figure 3 is a block diagram of hardware implementing the present invention, Figure 4 is a detailed representation of the interpolator portion of the circuit represented as a black box in figure 3, and Figure 5 shows the relationship between the primary and secondary clock timing output pulses. Figures 1 and 2 illustrate the problem briefly discussed in the introductory part of this specification. Figure 1 shows a small portion of an original image represented by 16 picture elements arranged in a 4x4 array. The original image comprises of course a large number of such elements, and in Fig. 1, there is only isolated a tiny portion for illustrative purposes. Each picture element is identified by column and row designation as to its relative position in the image (D11...D44). Associated with each pixel there is a numerical value which corresponds to a digital representation of the optical density of the original image within each of the picture elements. This value may be preserved in a temporary or permanent memory where from it can be accessed and used to reproduce the original picture optical density. In an 8 bit digital system this value may be a number between 0 and 255. Also associated with each number is an address which permits locating the memory contents for a corresponding image location. The technology for capturing, storing, and retrieving an image in digital format is well known and needs not be further discussed herein. In reproducing this image portion without magnification, the display device will typically be driven so that for each of the stored pixel values there is reproduced on the display a corresponding displayed picture element with this value. Thus in the output, for each D11....D44 there is a D'11...D'44. Each of the output pixels is arrayed adjacent to each other exactly as in the original image. Figure 2 shows what happens when the original image is displayed in double the original size using the same display device as before. Since the image is now twice as big, each original picture element covers an area in the output display that is four times as large. Thus D11 now should be extended to cover four adjacent pixels, D12 four more and so on, so that the original 4x4 pixel area will extend over 8x8 pixels. However, data initially is only available for D11...D44 and if evenly spread, would cover only 16 pixels as shown in Figure 2. Accordingly, before displaying the enlarged image, it is necessary to generate new pixel values for the blank pixels. Typically, if the magnification factor is M, every picture element in the original image will be replaced by M 2 output pixels. Using any one of the available interpolating techniques for developing new pixel values, each new pixel value is calculated by multiplying original pixel data by weighting factors and summing the results of the multiplication. Usually a neighborhood of 4x4 original pixels will be used. If the pixels are represented by "D" as shown in figures 1 and 2, there is a different set of weighing factors by which each of the original pixel values must be multiplied four times to generate the replacement value N1, and the new values N2, N3, and N4, for each original pixel D. These weighing factors can be represented as a coefficient matrix C k where: and where K=1, 2, ...M 2 (Magnification factor). One example for the derivation of the weighing factors which depends on the interpolation process selected, i.e. linear, bilinear, cubic etc. is disclosed in 07/636,647, filed December 31, 1990. Using the above notation, the new output pixels Nk corresponding to D are given by the following formula: N k = Σ j Σ i D ij C ijk for j= 1 to 4, for i=1 to 4, and for all k. The following numerical example illustrates an interpolation calculation for a 2x magnification limited to the calculation of the pixels designated as N1, N2, N3, and N4 shown in figure 2. Calculation of each of the remaining values within the designated pixel matrix is done in a similar manner. For purposes of this example the following specific values are given to the pixels D in figure 1: The following is a set of coefficients Ck developed for the case of cubic convolution interpolation. In this example, M = 2 and K = 1, 2, 3 & 4. The coefficients were developed for the region D shown above, in the vicinity of D22. Each of C 1 , C 2 , C 3 , and C 4 is a subset of the set of coefficients C k . Applying Equation (1) to D22 yields the following output pixel values: N 1 = (1) (161) = 161 N 2 = (-0.075)(145) + (0.5750)(161) + (0.5750)(193) + (-0.075)(201) = 178 N 3 = (-0.075)(170) + (0.5750)(161) + (0.5750)(165) + (-0.075)(172) = 162 N 4 = (0.0056)(150) + (-0.0431)(170) + (-0.0431)(200) + (0.0056)(205) + (-0.0431)(145) + (0.3306)(161) + (0.3306)(193) + (-0.0431)(201) +(-0.0431)(147) + (0.3306)(165) + (0.3306)(197) + (-0.0431)(203) + (0.0056) (153) +(-0.0431)(172) + (-0.0431)(199) + (0.0056)(202) = 179 The new values N 1 , N 2 , N 3 and N 4 will be placed as shown in Figure 2. The calculation process will then be repeated for the next pixel, i.e., D23 to generate another set of four new pixels, and so on. Figure 3 shows hardware to rapidly perform the aforementioned discussed operations. This hardware comprises a primary clock 10 having a first (input) frequency, which controls over line 11 the supply of image pixel data from a memory 12 containing the original picture data. Pixel data from memory 12 are supplied over line 23 to an interpolator module 16. The primary clock 10 also provides input timing signals to the interpolator module 16, to be further discussed in detail hereinbelow, and to a coefficient source module 18, over lines 13 and 19 respectively. The coefficient source module 18 may be a memory containing precalculated sets of coefficients accessible in the form of a look-up-table or tables containing fixed values, or it may include calculating elements able to calculate a set of coefficients based on input from the original pixel data in the interpolator. The latter is particularly useful where the interpolation is adaptive, i.e. the coefficients change with the image as the image nature varies. The coefficients are supplied to the interpolator module over line 21. In accordance with the present invention, a secondary clock 14 having a second (output) frequency, is used in addition to the primary clock 10. This secondary clock provides an output timing signal whose period is a fraction of the primary clock period equal to the inverse of the desired image magnification "M". Figure 5 shows the relationship of the timing pulses produced by the two clocks for the M = 4 case. In the preferred embodiment the period "t" of the secondary clock is set and kept constant, and the period "T" of the primary clock is varied to produce the required frequency relationship, as a matter of convenience. It is further preferred that the falling edge of the output pulses of the primary clock coincides with the falling edge of an output pulse of the secondary clock as shown in Figure 5. Also in the preferred embodiment the width of the primary clock pulse is set at 1/4 the period t of the secondary clock. The output timing signal is supplied to the interpolator module 16 over line 15. When an interpolation method using adaptive coefficients is practiced the output timing signal is further supplied to the coefficient source module 18 to control the rate of extraction of coefficient sets which are subsequently supplied to the interpolation module over line 21. In the preferred embodiment, the coefficient source module 18 is omitted, and precalculated coefficients are used which are preloaded in the interpolator module 16 memory modules which are discussed later on in this specification. The output of the interpolator 16 is preferably directed over line 25 to a buffer storage 20 for further processing, which may include display. Reference is now made to figure 4, where the interpolator 16 is shown in detail. A raster line buffer 30 comprises a number of individual line buffer memories 34. In the preferred embodiment, if in the interpolation calculation a neighborhood of N x N original pixels is used, N + 1 individual line buffers 34 are used. Pixel information from the stored image data 12 is directed over line 23 to the raster line buffer 30. The data are serially loaded into the individual line buffers 34, one raster line in each line buffer. Once at least N line buffers are loaded the primary clock begins advancing individual pixel data simultaneously from each of N line buffer 34 to each of the corresponding pipelines 32. Each pipeline comprises N data holding cells, and there are N pipelines. In the circuit depicted in Figure 4, a 4 x 4 pixel neighborhood is used, so there are four pipelines 32 each containing 4 cells for a total of 16 cells, numbered 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64 and 66. Within each pipeline 32, the four cells are connected so that each cell can receive data from the cell preceding it and supply data to the cell following it, the data transfer path going from right to left. The first cell in each pipeline receives data from a corresponding individual line buffer 34. When the calculation of all pixels based on the data loaded in line buffer 34A, 34B, 34C, and 34D, the pipeline inputs are shifted to receive data from line buffers 34B, 34C, 34D and 34E, the latter having been filled while disconected from the pipelines. Line buffer 34A now becomes available to be filled for subsequent use. The process is continually repeated rotating all five line buffers through all four pipelines. Associated with each cell there is a multiplier 100 having two inputs, A and B. There are sixteen such multipliers in the 4 x 4 case, N x N in the general case. The multipliers are connected so that the value stored in each cell, appears at input A of each multiplier. Also associated with each pipeline 32 there is a memory module (which could be a RAM chip) in which the sets of coefficients C k are loaded. In the circuit depicted in Figure 4, a coefficient memory module is shown associated with each holding cell, and there are 16 such coefficient memory modules, designated as 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, and 98. The output of each of the memory modules is presented to input B of each of the multipliers 100 respectively. A fractional x and fractional y address generator 140 and 142 respectively, controlled by the secondary clock, is associated with the memory modules. The output of the x and y address generators 140 and 142 is used to extract the proper coefficients from the memory modules which are applied to the data to generate the new pixels N ij . The output of each of multipliers 100 appears in the first stage of a multistage adder 101 connected such that the output of multipliers 100 and 108, 102 and 110, 104 and 112, 106 and 114, 116 and 124, 118 and 126, 120 and 128, and 122 and 130 are added together. The outputs of the first stage of the adder appear and are summed in parallel in the second stage of adder 101, the output of which appears and is added in the third stage of adder 101. While not essential for the practice of this invention, it is preferred that registers 103 be placed between stages in the adder 101 as well as in the nput and output of the multipliers 100, 102, 104, ... to 130. Some of the registers have been omitted in Figure 4 to avoid undue cluttering of the drawing. In figure 4 there is shown a particular interconnection of the various adder stages. The specific sequence shown is not critical and may be altered, provided that the final output represents the output obtained by the implementation of equation (1) giving N k . In selecting the order of addition of the results of the multiplication of the data, one must consider the coefficient magnitude for each pixel location in the neighborhood of pixel considered, and proceed with the addition order so as to avoid overflow or underflow in any of the adder stages. In the preferred embodiment, a limiting circuit 151 may also be used to eliminate such over- or under-flow of the output of the final stage of adder 101 as follows. The information handled, i.e. pixel values, is in 8 bit format. Generally speaking, to minimize rounding off error, the adder stages should be chosen with greater capacities than 8 bits. Typically 12 bit adder stages are used. If the significant bits of the adder output are 1-8 of the total available 0-11, 0 being the LSB (least significant bit) and 11 being the MSB (most significant bit), an underflow is indicated if the MSB is a "1". On the other hand if the MSB is a "0" and bit 9 is "1" an overflow is indicated. The limiting circuit replaces the adder output with a "0" for underflow and "255" for overflow. The output of the final stage of adder 101 may be supplied together with its fractional address to an output buffer wherefrom it is retrieved for use as required, i.e. display, permanent storage, or further processing. In applications where the expanded data is used to drive a raster line output device in real or quasi-real time, it may be convenient to direct the output of the final register to a FIFO buffer memory element, wherefrom it is retrieved sequentially, in a first-in-first-out order to drive the output device without need for specific pixel address information storage. In this case, and as described below in further detail, the fractional address generators are operated so that the y address generator is incremented at the end of each line until it reaches a count of "M" lines, and then resets, while the x address generator is incremented with every secondary clock pulse and reset after a count of "M". As a result, new pixels N1 and N2 (fig. 2) are generated in a first pass on the data until all new pixels in one raster line have been calculated, and N3 and N4 are calculated in a second pass over the same data after the y address generator has been incremented, until a new raster line has been completed, producing the same final result as if all four pixel values were generated in one pass and their addresses stored or mapped in a buffer memory. In operation, image (raster) lines are loaded into the raster line buffers 34. When N line buffers are full, the primary clock loads N pixels (one from each of the N line buffers) into the first stage of the parallel pipelines 32, cells 36, 44, 52, and 60 in the present embodiment. When N primary clock cycles have occurred, NxN pixels have been loaded and the pipelines are full. The outputs of all N stages of the pipelines are simultaneously available on the A inputs of the NxN multipliers 100, 102, 104, ...130. Each coefficient memory module 68, 70, 74, ... 98, has been pre-loaded with M squared coefficient values, where M is the enlargement ratio of output image to input image. In the example used earlier, in calculating N 1 , N 2 , N 3 and N 4 , for D22, and where M = 2, cells 36, 38, 40,... 66 are respectively loaded with D11 in cell 36, D21 in cell 38 and so on through D44 in cell 66. At the same time memory modules 68, 70, 72, ..., 98, are preloaded with C k coefficient so that memory module 68 contains coefficients C1 11 , C2 11 , C3 11 , and C4 11 , memory module 70 contains C1 21 , C2 21 , C3 21 and C4 21 and so on through memory module 98 which contains coefficients C1 44 , C2 44 , C3 44 and C4 44 . The secondary clock drives the two counters 140 and 142, which generate offsets in fractional X and fractional Y pixel space, indexing all NxN coefficient memory modules simultaneously. On the first pass, the fractional Y index is zero. The fractional X index increments with each secondary clock cycle. The coefficients subsets are available on the B inputs of the multipliers. With each secondary clock, NxN multiplications of coefficients and image data (AxB) are simultaneously executed. These NxN products are fed to the multi-stage adder 101, where from after several more secondary clock ticks, the resulting output pixel is available. Thereafter, with each secondary clock tick, a new output pixel is available. After M secondary clock cycles, all of the output pixels corresponding to fractional X indexing have been multiplied, and the primary clock loads the next set of N pixels from the raster line buffers. After P primary clock cycles (where P is the number of pixels on an input raster line), the end of the first output line has been multiplied and first pass is complete. The second output image line is calculated by incrementing the fractional Y index and making a second pass over the same N input raster lines. After M passes over the input data, M output lines have been generated and the controller rotates the input raster line buffers. The "top" raster line is rotated out (and is available to be filled) and a new raster line is brought in from the "bottom". The complete output image is generated after M passes over each possible set of N adjacent raster lines. Using current technology, a minimum time of approximately 50ns per output pixel (20 Megapixels/second) could be achieved. The same principles and methods taught hereinabove may be equally advantageously applied without using two passes to process the raster lines and develop fractional Y data. The coefficient source 18 may be omitted and the coefficients simply be pre-loaded in the coefficient memory modules. The preloaded coefficients may be for one interpolation method and magnification ratio only or preferably may comprise a look-up-table from which appropriate coefficients may be selected for use, corresponding to predetermined interpolation methods and/or magnification ratios.

Claims: Apparatus for enlarging by a magnification "M", an original image consisting of a first plurality of pixels serially arrayed in a plurality of parallel lines, by obtaining through interpolation from said first plurality of pixels a second plurality of new pixels also serially arrayed in a new plurality of parallel lines, wherein the interpolation comprises identifying a region of surrounding pixels N Y x N X where H Y represents the number of parallel lines comprised in said region and H X represents the number of pixels comprised in each of said lines, and calculating new pixel values using said pixel values comprised in said region by simultaneously multiplying by a selected coefficient set said surrounding pixel values, the apparatus comprising a line memory including at least a plurality of Ny original pixel line buffers (34); a plurality Ny of pixel pipelines (32) each having Nx serially connected cells (36-66) connected in parallel to said memory; primary timing means generating timing pulses at a frequency f(p), a plurality of memory modules (18;68-98) containing sets of coefficients for obtaining by interpolation new pixel values, calculating means (16) for receiving a subset of said set of coefficients comprising multiplying means for multiplying each of the pixel values stored in said cells by a corresponding coefficient of said selected subset of coefficients, and summing means for summing the output of said multiplying means to provide interpolated pixel values, characterized in that said apparatus further comprises: a means for transferring said pixel values from said line memories to said pipelines and means for simultaneously moving each pixel value in said pipelines (32) along said pipelines (32) from cell to cell at the frequency f(p) of the primary timing means (10), a secondary timing means (14) producing secondary timing pulses at a frequency f(s) = M x f(p), an x-address counter (140) and a y-address counter (142) controlled by the secondary timing pulses for selecting a subset of one of the coefficient sets and for applying said coefficient subset to the calculating means, the x-counter (140) incrementing with every secondary timing pulse and resetting after M pulses, and the y-Counter (142) incrementing after the number of secondary timing pulses equals the number of new pixels in an enlarged image line, and resetting after incrementing by M whereby the new pixels are generated as a continuous stream of sequential pixels, image line by image line, and FIFO buffer memory means for receiving and storing the new pixels in an ordered way so that they can be retrieved sequentially in order to be displayed. An apparatus in accordance with claim 1 wherein the number of line buffers in the line memory equals N Y + 1. An apparatus in accordance with claim 1 or 2, further including coefficient calculating means controlled by said secondary timing means to calculate a set of coefficients according to the characteristics of the pixel data to be interpolated to carry out an adaptive interpolation, that is an interpolation wherein the coefficients of said subset of coefficients change with the image as the image value varies. An apparatus in accordance with any one of claims 1 to 3 wherein there is associated with "x" address and "y" address counters a look-up-table of precalculated coefficient values from which the subsets of coefficients are selected. An apparatus in accordance with claim 1 wherein the number of line buffers in the line memory equals N Y + 1. A method for enlarging by a magnification "M", an original image consisting of a first plurality of pixels serially arrayed in a plurality of parallel lines, by obtaining through interpolation from said first plurality of pixels a second plurality of new pixels also serially arrayed in a new plurality of parallel lines, wherein the interpolation comprises identifying region of surrounding pixels N Y x N X where H Y represents the number of parallel lines comprised in said region and H X represents the number of pixels comprised in each of said lines, and calculating new pixel values using said pixel values comprised in said region by simultaneously multiplying by a selected coefficient set said surrounding pixel values, the method comprising loading at least a plurality of N Y original pixel lines in a plurality of N Y line buffers (34) of a line memory to which there is connected in parallel a plurality N Y of pixel pipelines (32) each having N X serially connected cells (36-66), generating primary timing pulses at a frequency f(p), loading a plurality of memory modules (18;68-98) with sets of coefficients for obtaining by interpolation new pixel values, using calculating means (16) for receiving a subset of said set of coefficients and for multiplying each of the pixel values stored in said cells by a corresponding coefficient of said selected subset of coefficients, and for summing the output of said multiplication to provide interpolated pixel values, characterized by the steps of: transferring said pixel values from said line memories to said pipeline (5) and simultaneously moving each pixel value in said pipelines (32) along said pipelines (32) from cell to cell at the frequency f(p) of the primary timing pulses, producing secondary timing pulses at a frequency f(s) = M x f(p) generating a stream of new pixel values serially, pixel by pixel and line by line by selecting a subset of one of the coefficient sets and applying said coefficient subset to the calculating means (16), wherein the selection of the subset is controlled by an x-address counter (140) controlled by the secondary timing pulses and wherein the x-counter increments with every secondary timing pulse and resets after M pulses, and by a y-counter (142) which increments after the number of secondary timing pulses equals the number of new pixels in an enlarged image line, and resets after incrementing by M, and receiving and storing the new pixels sequentially in a FIFO buffer memory, in the order generated so that they can be retrieved sequentially in order to be displayed. A method in accordance with claim 6 further including the step of receiving and displaying said new pixel values. A method in accordance with claim 6 or 7 wherein the number of line buffers in the line memory equals N Y + 1. A method in accordance with any one of claims 6 to 8 further including the step of calculating an adaptive set of coefficients at a rate controlled by the secondary clock to calculate a set of coefficients according to the characteristics of the pixel data to be interpolated to carry out an adaptive interpolation, that is an interpolation wherein the coefficients of said subset of coefficients change with the image as the image value varies. A method in accordance with claim 9 wherein the step of selecting said subset of coefficients comprises selecting said subset from a look-up-table of precalculated coefficient values.

Inventors: BYRNE TIMOTHY JAMES, MOMCILOVICH MARK ALEXANDER, BYRNE, TIMOTHY JAMES, MOMCILOVICH, MARK ALEXANDER
Applicants: STERLING DIAGNOSTIC IMAGING, STERLING DIAGNOSTIC IMAGING, INC.
Application year: 1992
Main classification: G06F17
IPC codes: G09G5, G06T3, H04N1, G06T1, G06F17