Abstract:
An affine or non-affine transformation is executed from an input array sequence of first sampled signals to an output array sequence of second sampled signals. To this effect, for each transformed signal a finite set of products is accumulated, each generated by implementing a filter transform function value, times the various applicable said sampled signals. In particular, the filter transform function is implemented in the form of a filter shape integral.

Description:
BACKGROUND OF THE INVENTION  
         [0001]    The invention relates to a method as recited in the preamble of claim  1 . A prime field of application of such transforms is the magnification or minification of digital images, such as black and white or color photographs. The scaling factors involved need not be uniform among the various coordinates and they furthermore may also be non-uniform over the image. In particular, magnification in one part or dimension of the input sample sequence may be combined with minification in another part or direction of the input sample sequence. A typical example of application would be to display an image in a perspective view. The invention is likewise applicable for other numbers of coordinates than two and for other fields of use, such as the compression of sound. Another name for such process is sample-rate conversion. As will be shown hereinafter, such process will in many instances produce “ripples” in the values associated to the resulting samples that lower the eventual quality.  
           [0002]    Relevant technology has been disclosed in U.S. Pat. No. 5,892,695 to Van Dalfsen et al. Particular applications of this technology are texture mapping in a 3D graphics pipeline and the use of a warping function with an image morph technique. This method uses a higher order prefilter to suppress high frequencies when the output signal is minified and warped. The prior art has been successful in various fields.  
           [0003]    The present inventor has however recognized that in particular for minification factors close to one, the prior art would still perform less than optimum and would justify further improvement. In particular, when appreciating the teachings of FIG. 4 hereinafter, this insight bases on the difference between the area of the trapezoid that lies below the line Zt 4 —Zt 5 , and the area that lies below the corresponding part of the prefilter function. In fact, the discrepancy is caused by the digital character of the filter characteristic as only approximating an ideal transfer function.  
         SUMMARY TO THE INVENTION  
         [0004]    In consequence, amongst other things, it is an object of the present invention to mitigate problems that stem from the digitization as recited supra, to allow a better mapping of the input sample sequence on the output sample sequence.  
           [0005]    Now therefore, according to one of its aspects the invention is characterized according to the characterizing part of claim  1 . The inventor has recognized that the procedure of the invention allows to avoid the so-called DC-ripple or sample-frequency ripple, in particular so for minification factors that would be variable and furthermore, not far from a value of 1. In particular, the invention allows the use of arbitrary and continuously variable minification factors. The invention effectively bases to storing a definite integral of the normal filter or weight function instead of storing the function itself.  
           [0006]    The invention also relates to an apparatus being arranged for implementing a method as claimed in claim  1 . Further advantageous aspects of the invention are recited in dependent Claims. 
       
    
    
     BRIEF DESCRIPTION OF THE DRAWING  
       [0007]    These and further aspects and advantages of the invention will be discussed more in detail hereinafter with reference to the disclosure of preferred embodiments, and in particular with reference to the appended Figures that show:  
         [0008]    [0008]FIGS. 1 a - 1   c,  a comparison of the present invention with prior art regarding DC ripples;  
         [0009]    [0009]FIGS. 1 d - 1   f,  impressions of the influence of the DC ripple with the prior art method;  
         [0010]    [0010]FIG. 2, the principle of calculating a complete discrete convolution in direct form;  
         [0011]    [0011]FIG. 3, the principle of calculating a partial discrete convolution in transposed form;  
         [0012]    [0012]FIG. 4, the principle of a box-reconstructed signal for convolution with the prefilter;  
         [0013]    [0013]FIG. 5, a transposed polyphase structure with the primitive of the filter function;  
         [0014]    [0014]FIG. 6, a direct-form structure;  
         [0015]    [0015]FIG. 7, another transposed polyphase structure with the filter function primitive;  
         [0016]    [0016]FIG. 8, a revised direct structure based on the foregoing;  
     
    
     GENERAL DISCUSSION OF THE INVENTION&#39;S OPERABILITY  
       [0017]    To avoid the production of DC-ripple, the weighting factors of all input samples that will contribute to a single output sample must add to exactly 1. These effectively are the input samples falling within the filter&#39;s footprint, including those that just fall outside. The present invention, in particular as represented by equation (9) hereinafter, fulfills this requirement. Consider the part to the right of the third “=” symbol. Herein, the weight factor of an input sample is the part in front of C t , to with (for a definition of XM t  see below):  
         F(XM t+1 −X p )−F(XM t −X p )  
         [0018]    Summing the weight factors will *exactly* produce the area below the filter function. These filter functions have been designed in such manner that the area below the filter profile is “one”, if the intensity of the output image must be the same as that of the input image. Consider FIG. 4 for an intuitive explanation. One weight factor  
         F(XM t+1 −X p )−F(XM t −X p )  
         [0019]    corresponds to the area above a constant fraction of the reconstructed signal, cf. the light gray hatched part. Thereby, the sum of all these weighting factors will exactly equal 1. In traditional FIR methods that are based on equation (2) hereinafter, it can be recognized that the summation of the weights will sum only “approximately” to 1, but not necessarily exactly. Again, the weighting factor of an input sample is the part before C t  (now in Eq. 2, however), to wit: f (X t −X p ). S t . Intuitively, this will go as follows: In FIG. 4, the weight f (X t −X p ). S t  corresponds to the area of a rectangle, which for clarity has not been drawn, however. The area of the rectangle may be considered as an approximation for the exact area shown supra. The area of the rectangle is equal to the area below the trapezoid bounded by Zt 4 −Zt 5 . It is clear that this is not equal to the area below the filter function. The summing of all those approximations is about equal to 1, but will fluctuate around 1, dependent on the shifting of the input samples with respect to the filter profile. This fluctuation in the summation of weighting factors causes intensity fluctuations in the output image, even when all input samples have constant values. This is effectively the DC-ripple.  
       DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS  
       [0020]    [0020]FIGS. 1 a - 1   c  illustrate a comparison of the present invention with the cited prior art regarding DC ripples. FIG. 1 a  has the original image. In FIG. 1 b,  the image has been minified horizontally by a factor 1.11, corresponding to a scaling factor of 0.9, whilst retaining the original vertical size. Horizontal ripples called DC- or sample frequency ripples are prominent. In FIG. 1 c,  the method according to the invention has been used. No ripples are visible anymore.  
         [0021]    [0021]FIGS. 1 d - 1   f  give further impressions of the influence of the DC ripple with the prior art method, for uniform horizontal minification factors of 1.066, 1.5, and 2, corresponding to scaling factors of 0.94, 0,75, and 0.5, respectively. For low minification factors i.e. close to 1, the period of the ripple gets longer, while its amplitude grows, and therefor, its visibility increases. Above a minification factor of 2, DC ripple will virtually vanish. For non-uniform scaling factors, such as in perspective transformation, the pattern of the DC-ripple will become irregular as well, and may resemble a Moiré pattern. Also the latter DC ripple patterns will be avoided by the present invention. Prior art methods will find little problems in upscaling. However, prior art only allows downscaling with a sufficient degree of DC-ripple suppression in particular value regions for the downscaling factor.  
         [0022]    Hereinafter, the following relevant variables are listed:  
         [0023]    x the coordinate value in the output space  
         [0024]    S the approximated local scaling factor, according to dm(u)/du, wherein m(u) is the mapping function, e.g., through a perspective transformation. Now, dm(u)/du is the exact local scaling value for a sample t on input coordinate U t =u with mapped coordinate (X t =m(u)). The implementations hereinafter use a straightforward approximation for dm(u)/du, in particular, with: S t =(X t+1 −X t-1 )/2, with X t =m(u).  
         [0025]    C the input sample value  
         [0026]    f a prefilter function  
         [0027]    UM t  the midpoint coordinate of the input samples such as U t    
         [0028]    XM t  the mapping result of m(UM t ).  
         [0029]    [0029]FIG. 2 illustrates the principle of calculating a complete discrete convolution, using the direct form: herein, a particular output sample is calculated from the contributions of all relevant input samples; the algorithm is said to be output driven. Each output sample is processed only once. For simplicity, a single amplitude is calculated for output sample X p , thus corresponding to a black-and-white image. In the example, the output sample is shown at the peak (A) of the filter curve (B). For the filter footprint of 4 chosen in this case, all input samples below the filter curve and just outside will contribute. Note the non-uniformity of the input sample distribution on axis C when transformed to the output sample distribution on axis D. Note that both axis relate to the output space.  
         [0030]    The above applies to a direct-form structure that operates output-driven. This procedure has proven well-suited for magnification calculations inasmuch there exists no upper boundary for the magnification factor. For minification calculations however, there exists a region for the minification factor, where the DC-ripple artefacts will severely diminish the usefulness of the resulting image.  
         [0031]    Another disadvantage of using the direct-form structure for minification is that each filter tap needs a filter coefficient out of a separately indexed filter function (such as specified by a table). (This is illustrated with FIG. 8). In FIG. 2, curve E would apply to calculating the next output sample.  
         [0032]    Now, a particular procedure according to the invention is to use transposed structures for calculating the output samples, through as it were extracting all contributions from the various input samples to a particular output sample, and thereafter stepping to the calculation of the next output sample, without once reverting to an earlier output sample. The usage of an integral form or primitive of the input filter characteristic will eliminate the generation of DC-ripple, independent of the value of the minification factor. The selecting between the direct form and the transposed form will sometimes be just a matter of choice, whereas in other cases one of the two should be chosen either in terms of hardware, or in terms of signal delay, or even on the basis of other arguments.  
         [0033]    [0033]FIG. 3, illustrates the principle of calculating a partial discrete convolution; this is used in the transposed structure. Herein, the contributions from a particular input sample are calculated for all relevant output samples; the structure is called input driven. If all input samples relevant for a particular output sample have been taken in to account, the relevant output sample has been finished. When processing in the embodiment in question from left to right, during the accounting of input sample X t4 , output sample X p-2  will just have been completed. This procedure is well suited for minification calculations. However, calculation time and/or necessary hardware will increase for larger minification factors.  
         [0034]    The principle of resampling is according to the following four steps: first, a continuous signal is formed from the input samples; next, the continuous signal is transformed through scaling or warping; third, the transformed continuous signal is subjected to prefiltering to suppress high frequency constituents that may not be properly represented by the output grid; finally, resample the continuous result on the output grid points. Now, the procedure illustrated in this Figure will lend itself in a particularly advantageous manner for use with a continuously variable scaling factor, so that the implementation would be extremely straightforward.  
         [0035]    [0035]FIG. 4 illustrates the principle of a box-reconstructed signal for convolution with the prefilter. In particular, this illustrates the convolution of a box-reconstructed signal mapped into the output space with a prefilter. The Figure undertakes to illustrate the generating of a DC-ripple error for a particular sample. In this context, the resample formula of an output sample is represented by Equation (1), hereinafter, that by itself constitutes prior art.  
         [0036]    FIR filters will have a finite width. The approximated expression thereof is given by Eq. (2) hereinafter. Practically, only the pixels covered by the footprint itself will be included. This limitation is the first, although minor cause of DC ripple. A second, more important, cause is however that Eq. (2) will produce an error with respect to the exact convolution equation (1) that should be calculated. This error causes DC-ripple, which are spatial intensity fluctuations in the output image.  
         [0037]    In FIG. 4, the weight factor corresponding to the trapezoid that lies below Z t4 -Z t5  is replaced by the corresponding area below the integrated filtering curve itself. The effect thereof is that irrespective of the shift between the output sample and the input sample set, the overall summed weight factor will always be equal to a uniform value, usually 1.  
         [0038]    [0038]FIG. 5 illustrates a first transposed polyphase structure with the filter function primitive stored in a Table 24. The input values X t+1  (20) are processed in block  22  that generates the next XS t  value which estimates XM t  from the XT b , X h  and X t−1  values. When (X t+1 +X t )/2 is used to estimate XM t  this becomes simpler. As shown, the subsystem comprises latches indicated D, adders indicated +, and a subtractor indicated −, for outputting the value next XS t . Device  44  splits the integer i and fractional f parts of the value received. The integer part is transmitted to item  46 , that grabs bit number 0 of the integer part of Next XS t . Furthermore, the least significant bit of the result LSB is stored in latch  50 . EXOR  48  outputs a “1” for thereby controlling a STEP on multiple switches  84 . This setup applies in particular to minification.  
         [0039]    Furthermore, input  34  receives Ct, which is stored in latch  36 , so that subtractor  38  can produce a differential between successive Ct values. These various differentials will be multiplied in multipliers  30  by the appropriate values read from integral filter function table  24 . The results will in depence of the switch control from latch  48 , either be stored in latches  32  after adding to the preexistent values stored in those latches, or rather, after adding of the preexistent values in the next latches to the left. At the final output of the device, adding of Ct will yield the value Cp required.  
         [0040]    In similar manner, FIG. 6 illustrates a direct-form structure, that is suited in particular for magnification, and which is the transposed form of FIG. 5. The lower part of the Figure largely corresponds to that of FIG. 5, but the additions are executed in parallel in block  50  for eventually producing Cp. In correspondence therewith, the top part of the Figure has block  52 , that is part of the control of the FIR filter structure. As shown, the input signal X t+1  is delayed over two sample periods, and subjected to subtraction. The blocks indicated by “&lt;&lt;” are in fact shifters (*2, *4, etc.) over as many bit positions as the numeral value shown. The results are combined with X p  through subtraction and division, for so again correctly addressing the integral filter function table  24 . XS t  is an estimation for XM t . It is also possible to use a coarser estimation for XM t  (e.g. (X th +X t )/2) that requires less hardware.  
         [0041]    [0041]FIG. 7 illustrates a second transposed polyphase structure with the filter function primitive. The lower part  28  corresponds nearly exactly with that of FIG. 5 and warrants no further discussion. In this case however, signal C t  is input immediately. In contradistinction to the foregoing, the polyphase integral filter function table is followed by a set of latches cum subtractors as a counterpart to the elements  36 ,  38  in FIG. 5. The further elements at the top of the Figure again correspond one-to-one to those of FIG. 5 to receive the signal next XS t . This transposed approach applies in particular to minification.  
         [0042]    [0042]FIG. 8 illustrates a revised direct structure based on the foregoing. Here, the primitive filter function is used as being stored in a single table which is being indexed multiple times, to wit once per filter tap. The lower part of the Figure again broadly corresponds to that of FIG. 6. Item  58  represent the various full or partial tables. The differences between X p  and successive elements of XS t  will control the actual accessing. In fact, FIG. 8 represents a closer approximation of the theoretical resample formula than FIG. 6. The closer approximation is attained by taking into account that samples within the filter footprint that have a greater value of S t  will contribute more, abstracted from the transformation factor produced by the filter amplitude, than corresponding samples that have a smaller value for S t . This direct-form implementation is in particular applicable to minification, but is a bit less suited for larger minification factors.  
         [0043]    Equations used in the foregoing:  
           C   p = −oo ∫ +00   f ( X   t   −X   p ).rec box ( X   t   C   t ) dt    (1)  
           C   p   =Σf ( X   t   −X   p ). S   t   .C   t.    (2)  
           C   p   =∫f ( X   t   −X   p ).rec box ( X   t   .C   t ) dt=Σ[   XMT ] XM1+1   .f ( X   t   −X   p ). dtC   t)   =C   p =Σ ∀t (( F ( XM   t+1   −X   p )− F ( XM   t   −X   p )). C   t ),   (9)  
         [0044]    wherein F is a primitive of f: dF (x)/dx=f(x)  
         [0045]    The above implementations and embodiments have been recognized by the inventors as being particular effective in terms of various quality-determining parameter values. However, persons skilled in the area will be able to derive various amendments and modifications through the reading of the present disclosure. Inasmuch as the scope of the appended Claims will be determinative for ascertaining the metes and bounds of the instant invention, the embodiments supra should indeed be construed as being illustrative and non-limiting viz-à-viz such Claims.