IMPROVEMENTS IN OR RELATING TO DATA COMPRESSION

Abstract: A method of compressing an image frame composed of an array of pixels in the form of digital signals comprises a two stage codebook search. In the first stage the pixelated image frame and the pixelated codebook patches are transformed to frequency domain coefficients and a pattern comparison is made between the coefficients of the image patch and the codebook patches to identify a short list of possible match codebook patches by discarding incorrectly matching patterns. In the second stage the image frame is compared with the short list of codebook patches by any desired method, e.g. by pixel comparisons, to select the best matching codebook patch.

Description: IMPROVEMENTS IN OR RELATING TO DATA COMPRESSION This invention relates to data compression, and in particular, though not exclusively, to an improved codebook search method, eg. for use in a data compression method. The invention further relates to a method and apparatus for compressing arrays of data in the form of digital signals, and is applicable to the compression of digitally encoded image sequences . During image and video compression it may be necessary, dependent upon the mixture of techniques used, to select from a set of candidate image patches that patch which best (in some sense) corresponds to a patch separately held. For instance in the technique commonly known as Vector Quantisation (VQ) a small patch of an image is compared to a set of patches held in a 'codebook' to determine which patch from the codebook can best be used to represent the image patch. This process is often known as 'codebook search'. Codebook exhaustive search involves the full computation of the actual quality-of-match measure for each codebook patch separately, and the selection of the adopted codebook patch on the basis of these measures. Quality-of- match measures can be of many types including: total absolute pixel differences, total squared pixel differences, averages of these etc. Codebook exhaustive search can be a computational intensive process since, in principle, the process will involve every pixel in the image patch and in the set of all codebook patches. It is therefore desirable, in the interests of computational efficiency and speed, to limit the search process in some way . It is possible to compare the image patch to a codebook patch directly on the basis of a comparison of the values of equivalent pixels. This is known as an 'image space process ' . It is an object of the present invention to obviate or at least mitigate one or more problems in the prior art. It is a further object of at least one embodiment of the present invention to provide an improved codebook search method whereby a codebook can be searched in an appreciably faster manner than by exhaustive search. It is a further object of at least one embodiment of the present invention to seek to exclude from a comparison process all codebook patches that would not be selected as the best match. It is a yet further object of at least one embodiment of the present invention to provide a codebook search method where occasional non-optimal image patch to codebook patch associations are acceptable, by excluding from the search all codebook patches which, according to some criterion, will probably not be selected as the best match. In making a decision as to whether a given codebook patch will certainly or probably not be selected some processing must be performed. It is evidently important that this processing be less than that involved in fully evaluating that codebook patch as to whether it is the best match. According to a first aspect of the present invention there is provided a codebook search method comprising the steps of : a) providing a plurality of codebook patches; b) providing at least one image patch; c) transforming by means of a lossless transform the plurality of codebook patches and the at least one image patch into sets of frequency domain codebook coefficients and a set(s) of frequency domain image coefficients, respectively; d) for the/each image patch selecting a shortlete (ie. shortlist) of possible match codebook patches by means of a pattern comparison of + and - signs of the image coefficients of the/each image patch with the codebook coefficients; and e) undertaking a further comparison of the image patch (es) against the shortlete codebook patches to select a substantially best match, this further comparison being effected by any desired method. It will be appreciated that steps (a) to (e) may be carried out in any suitable order, and that indeed one or more of the steps may be carried out substantially simultaneously, if appropriate. However, preferably the steps are undertaken in the order (a) , (b) , (c) , (d) and then (e) , though steps (a) and (b) may be carried out in the order (b) then (a) . Each set of codebook coefficients or image coefficients thus represents a frequency spectrum of a pixel value distribution across a codebook patch or image patch, respectively. The frequency domain codebook and image coefficients may be said to be characteristics of a 'frequency space' . Herein, a lossless transform is defined as one which permits an original data distribution to be reconstructed precisely by use of an 'inverse transform' process. The lossless transform may be selected from one of a Haddamard transform, Wavelets, a discrete cosine transform or the like. In a particular embodiment the number of image coefficients used in the pattern comparison may at least initially be equal in number to the number of pixels in a patch . However, in a modification the number of image coefficients required to make a comparison may be reduced, eg. to those most significant in the frequency spectrum, eg. down to typically 15. Each frequency space coefficient is representative of a property that is global to the transformed patch, whereas, a pixel value is representative only of one specific point in the patch, and can convey little or no global information. Useful patch comparisons can, therefore, be made on the basis of a small subset of all the frequency coefficients but which could not be made on an equivalent subset of the pixels in the original patch (es) . It should be noted that in a lossless transform there will be as many frequency coefficients as there are pixels in the transformed patch. Preferably, the transform is computed for each of the codebook patches and the codebook coefficients stored with the codebook patch to which they apply. Preferably also, the transform is computed for each image patch as it comes under examination. In a preferred embodiment, a subset of the coefficients is selected. For example, a set of 16 coefficients which represent predetermined most significant frequency properties of the pixel value distribution, eg. the lowest 16 frequencies of the pixel value distribution. It will be appreciated, however, that a different number of coefficients could be chosen, or coefficients representative of different portions of the frequency spectrum. Further, for each codebook patch a 'sign string' may be established. A sign string may, for example, comprise a 16-bit pattern in which each bit corresponds to a specific instance of the set of 16 coefficients chosen for examination. Each bit in the string may be assigned a first value, eg. 0, if the corresponding coefficient is negative or a second value, eg. 1, if it is positive. Yet further, for each codebook patch an 'amplitude significance string' may be established. An amplitude significance string may, for example, comprise a 16 -bit pattern in which each bit corresponds to a specific instance of the set of 16 coefficients chosen for examination. Each bit in the string may be assigned a first value, eg. 0, if the corresponding coefficient is 'insignificant', or a second value, eg. 1, if it is ' significant ' . A coefficient may be considered significant if its absolute value exceeds a threshold value and insignificant otherwise. The threshold value may be set as a defined fraction of the average absolute amplitude of all the 16 coefficients selected for each of the patches in the codebook. It will be appreciated, however, that there may be other ways of assigning such a threshold value. It is not required that there should be a single threshold value for all coefficients. Indeed, there could be created other criteria for judging significance. It should be noted that all these codebook computations may be performed off-line, and therefore represent no overhead during use of an encoder. When an image patch is selected for examination its Haddamard coefficients may be established in a manner analogous to that for a single codebook patch. Further, a sign string may also be established for an image patch. A codebook block or patch may be accepted for further examination, or rejected, as follows: 1. A bitwise 'exclusive or' of the sign strings of the codebook patch and the image patch may be computed. This is a set of bits, each of which is of a first value, eg. 0, if the corresponding bits in the sign strings are the same and of a second value, eg. 1, if they are different. E.g. the bitwise exclusive or of 0011 with 0110 would produce 0101. 2. The bit-string so produced may be bitwise ANDed with the significance string of the codebook patch. The bitwise AND is a set of bits, each of which is set to a first value, eg. 1, if the corresponding bits in the two strings are equal to the first value and to a second value 0 otherwise e.g. the bitwise AND of 0110 with 0101 would produce 0100. The effect of this operation is to set to a first value, eg. 0, all bits that are 'insignificant' and to leave all 'significant' bits unchanged. 3. The final resulting bit pattern may be examined and if every bit is of a first value, eg. 0, the codebook patch may be accepted for further examination, otherwise it may be rejected. The effect of this decision may be to ensure that every significant coefficient in the codebook set has the same sign as the corresponding coefficient in the image patch set; insignificant coefficients being disregarded. Such codebook patches should bear a closer resemblance to the image patch than will codebook patches that have significant coefficients of opposite sign. There remains a second case in which a codebook patch should be retained for examination. This is the case where the codebook and image patches are similar except that the codebook patch needs to be inverted before use, i.e. each of its pixel values must be multiplied by -1. The codebook patches are normalised in the sense that their pixel values are restricted to lie between plus and minus 1. This has implications for the computation of similarity with image patches (which typically will have pixel values in the range 0 to 127) but has no implications for the accept/reject criteria. An advantage of this method is that the use of frequency space coefficients eliminates the need to adjust the codebook patch pixel values before use. The sequence of operations required to determine whether to retain a codebook patch for further examination on this basis may be as follows. 1. The bitwise exclusive-or of the sign strings of the codebook patch and the image patch may be established. 2. The bit-string so produced may be bitwise ORed with the inverse of the significance string of the codebook patch. A bitwise OR produces set of bits, each of which is set to a second value, eg. 1 if one or more of corresponding bits in the two strings is of a second value, eg. 1 and to a first value, eg. 0, otherwise e.g. the bitwise OR of 0110 with 0101 would produce 0111. Inversion of a bit-string converts each first value to a second value, and vice versa eg. 0 to 1 and each 1 to 0. E.g. the inverse of 0110 is 1001. 3. The final resulting bit pattern may be examined and if every bit is 1 the codebook patch is accepted for further examination, otherwise it is rejected. The effect of this decision is to ensure that significant coefficients in the codebook set has the opposite sign to a corresponding coefficient in the image patch set; insignificant coefficients are disregarded. There are thus two criteria upon which a codebook patch may be retained for further examination. Rejected patches need not be examined further as potential matches for the current image patch and may not therefore contribute further to the computational burden. The computation so avoided more than compensates for the additional computation involved in any computation of the Haddamard transform coefficients for the image patch and their use in determining accept/reject for the codebook patches. The method therefore can provide a very useful increase in speed for the searching of a codebook. The Haddamard coefficients can further be used to compute the mismatch between a codebook patch and an image patch for purposes of determining the quality of a match and hence of the best patch to select from a codebook as the equivalent of an image patch. The difference E between a codebook patch and an image patch can be expressed as: E = ∑ ( ^ * σ - X ) 2 where W τ x denotes the ith transform coefficient for the codebook patch, σ is a contrast multiplier and X τ 1 is the i th transform coefficient for the image patch. σ can be computed from the coefficients. E can be estimated by summation over a subset of the coefficients and it can be shown that the estimate monotonically approaches the true value of E as the number of coefficients used increases. E bears a direct relationship (multiplication by a computable factor) to the error computed by an analogous formula involving the pixel values in the image space versions of the patches. Thus, the use of frequency domain or space coefficients permits selection of a best match between an image patch and a delivered codebook in an integrated and efficient manner. According to a second aspect of the present invention there is provided a method of compressing an image frame composed of an array of pixels in the form of digital signals, including the step of providing a codebook search method which comprises the steps of : a) providing a plurality of codebook patches; b) providing at least one image patch; c) transforming by means of a lossless transform the plurality of codebook patches and the at least one image patch into sets of frequency domain codebook coefficients and a set (s) of frequency domain image coefficients, respectively; d) for the/each image patch selecting a shortlete of possible match codebook patches by means of a pattern comparison of + and - signs of the image coefficients of the/each image patch with the codebook coefficients; and e) undertaking a further comparison of the image patch (es) against the shortlete codebook patches to select a substantially best match, this further comparison being effected by any desired method. According to a third aspect of the present invention there is provided an apparatus for compressing an array of data entries in the form of digital signals, the apparatus comprising a computer apparatus, for example of known type, set up to run a program embodying a codebook search method according to the first aspect . According to a fourth aspect of the present invention there is provided a computer program product carrying a computer program adapted to perform the codebook search method according to the first aspect. The computer program product may be a floppy disk, CD or the like. According to a fifth aspect of the present invention there is provided a computer program adapted to perform the codebook search method according to the first aspect. An embodiment of the present invention will now be described by way of example only, with reference to the accompanying drawings which are : Figs. 1 (A) - (E) a schematic view of a codebook having five codebook patches or vectors each representing a 4 x 4 pixel image block for use in an embodiment of the present invention; and Fig. 2 a schematic view of a source 4 x 4 pixel image block or patch for use in the embodiment referred to in Fig.l. By way of illustration, and as shown in Figs. 1(A) to (E) , in an embodiment of a codebook search method (fast search process) according to the present invention, a codebook having five vectors 0, 1, 2, 3 and 4, each with a dimensionality of sixteen is provided. Each of the five vectors represents an image block of 4 x 4 pels as shown in Figure 1. Actual pel values assigned to each vector are given in Table 1 hereinbelow, where f c (i , j) denotes the pel value at position i , j . When searching in the spatial domain, each vector element (ie. pixel) is equally significant and is, therefore, included in the evaluation of each codebook vector (patch) as a potential match to a source image block. However, according to the invention, transforming each codebook vector into the frequency domain using an appropriate transform function (the basis vectors of the function being orthogonal) gives a set. of transform coefficients equal in number to the number of pixels in each codebook vector. The frequency domain concentrates the most significant informa tion about each codebook vector into a small number of coefficients allowing both the rapid rejection of codebook vectors that do not well represent the source image block, and the identification of a good match from the remaining codebook vectors, by comparing a sub-set of the total transform coefficients. The Walsh-Haddamard Transform has been found to be both simple and efficient for the purpose of codebook search. The forward 2-D Haddamard transform is given by; η N-l N-l r-I H(u,v) = _ ∑ ∑ f(x,y) (-l) ∑ ten.* ) β u ,u > + β n.v> β u, v , N 2 ° v^ ° 1' ° (1) where, n = log 2 N, and the function β(q,r) is defined as; β(q,r)= 0 if bit q in the binary representation of r is i zero 1 if bit q in the binary representation of r is ( zero The significance of a frequency coefficient is defined in terms of its discriminatory power within the codebook; i.e. the degree of change in the coefficient across the codebook vectors, and hence its "usefulness" in segmenting the codebook into vectors that are similar/dissimilar to a source vector. Applying the Haddamard Transform to the codebook in Figs. 1(A) to (E) gives the transform coefficients shown in Table 2 hereinbelow, where H c (u,v) denotes the value of coefficient u,v from the 2-D representation of the frequency space. The relative significance of each coefficient within the codebook as a whole may be given by the mean absolute magnitude of each coefficient with respect to all the codebook vectors, or by the standard deviation of each coefficient. The standard deviation of each coefficient within the codebook is shown in Table 2. Sorting the Haddamard coefficients by standard deviation gives a coefficient significance ordering of: 2- 8→12→3- l→4→14→ll → 15→10→9→5→13→7→6→0 where coefficient 2 has the greatest standard deviation. Consider the source block shown in Figure 2 having the pel values and transform coefficients as given in Table 3, where f s (i,j) denotes the pel intensity at position i,j within the source image block. Note that the transform coefficient H s (0,0) corresponds to the DC value or mean of the source block. Matching in the spatial domain is done using an error function : € = ∑ 1 ∑ f s (x f y) - c (x,y) - γ)- (2) - =o y=o where σ is a contrast adjustment applied equally to all codebook elements, and γ is the mean of the source block. An optimal value for σ is given by: ∑ Σ ^ fs . y) - γl fX χ , y) (3) N-l f c ( x, y) ) - ■ =0 The optimal value of σ and the corresponding error e between the source block and each codebook vector is shown in Table 4. From the table it is clear that the best "fit" to the source block is from codebook vector 0 with a negative contrast adjustment. The first step in searching the codebook using frequency space is to discard those codebook vectors that are "unlikely" to give a good approximation to the source block. This is done by matching on the sign of the mos t signifi cant coefficients . Taking the significance order as determined by the standard deviation of each coefficient, the first Q coefficients, where Q is less than the total number of coefficients, may be used to discard poor matches. The following worked example illustrates this using the first 6 significant Haddamard coefficients: Φ Table 5 below shows the significance of coefficients 2, 8, 12, 3, 1 and 4, where the significance is 0 if the coefficient has an absolute magnitude less than a threshold, otherwise the significance is represented by the sign of the coefficient. For this example, the threshold used to select significance is for the coefficient to have an absolute value greater or equal to 25% of the mean absolute magnitude for all the codebook coefficients. • For each codebook vector, form a string of bits (one per coefficient) where a bit is 0 if the corresponding coefficient is less than zero or 1 if the corresponding coefficient greater or equal to zero. This is the sign string or mask. The sign masks for each of the codebook vectors are given in Table 6. • For each codebook vector, create a bit significance mask (one per coefficient), based on the amplitude significance of each of the coefficients. A bit is only one if the corresponding coefficient is non-zero in Table 5. The significance masks for each of the codebook vectors are given in Table 7. • Construct a sign mask for the source block to be matched where each bit gives the sign of the respective coefficient. The sign mask for the source block is shown in Table 8. • Determine the match for a positive contrast adjustment by performing a bit -wise exclusive-or between the source sign mask and each codebook sign mask. For an exclusive- or, the result is a zero if the two source bits have the same value and is one if they have different values. Any 1 ' s in the result indicates a difference in sign between the source and codebook coefficients. To determine the quality of the match, a bit-wise AND between the result of each bit-wise exclusive-or and the significance mask of each codebook vector is performed. The codebook vector is only considered a potential match if the result contains no l's. Table 9 shows the result of the bit-wise exclusive-or followed by the bit-wise AND for each codebook vector. • Determine the match for a negative contrast adjustment by performing a bit-wise exclusive-or between the source sign mask and the inverse of each codebook sign mask. Any l's in the result indicates a difference in sign between the source and codebook coefficients. To determine the quality of the match, a bit-wise AND between the result of each bit-wise exclusive-or and the significance mask of each codebook vector is performed. As before, the codebook vector is only considered a potential match if the result contains no l's. Table 10 shows the result of the inverse bit-wise exclusive-or followed by the bit-wise AND for each codebook vector. The match using the sign of each coefficient taken together with the significance yields three possible candidate matches. 'For positive contrast (as shown in Table 9) , codebook vectors 1 and 2 have the correct significant signs. For negative contrast (as shown in table 10), codebook vector 0 has the correct significant signs. In other words, codebook vectors 3 and 4 have been rejected from the search process. The best match from codebook vectors 0, 1 and 2 could be calculated in the spatial domain using Equation 2, but this is computationally expensive. An alternative is to calculate the match between the source block and the remaining codebook vectors in the frequency domain. For the search in the frequency domain to be less computationally expensive than searching in the spatial domain, the error must be determined using a sub-set of the coefficients. This is done by applying a "cut-off" to the error calculation. To understand the "cut-off" search, it is necessary to understand how the error in the frequency domain relates to the error in the spatial domain. Let w be a codebook vector representing a block of intensity values, where the mean of the intensity values is zero and the vector is of unit length. The match e between a source vector x and the vector w must, therefore, include the multiplication of the codebook vector elements by a constant contrast adjustment σ, plus the addition to each modified vector element of a constant intensity offset γ. This match is defined as, N-l e = ∑ (x, - σω, - γ) 2 (4) 1 =0 where x, is the i th element of the source block vector x, ω, is the i h element of the codebook vector w, and N is the dimensionality of the vectors x and w. This equation is equivalent to Equation 2 where the two-dimentsional intensity values are mapped onto the elements of a vector. The optimal values for σ and y to minimise ε are calculated from = = 0 as follows: dσ dy as ω = 0, and ∑ or = 1, then Equation 4 can be expressed as: N-l N-l N-l e = ∑ x - 2γ ∑ x λ - 2σ ∑ x, ω, + σ 2 + Nγ 2 (5) 1=0 ι=n ι=0 giving : de = 2Nγ - 2 ∑ ' x ± = 0 →> y = 1 ∑ x, (6) dy 1=0 N 1=0 N-l N-l de = 2σ - 2 ∑ x ω, = 0 →> σ = ∑ x, ω 2 (7) dσ 1=0 l -° Since both d ~ e and d 2 e are positive, de = de = 0 dγ 2 dσ 2 dσ dy represents a minimum of e. Thus substituting the optimal values for γ and σ into Equation 5 gives a best match between x and w of : e = ∑ ^ x 2 , ~ I (∑^ ) 2 " (∑ X,) 2 (8) N From equation 8 it can be seen that given a set W of normalised codebook vectors, where W = {w 0 , w lr ... ,w c ) , the best match to an arbitrary source block vector x is the codebook w η e W that gives the maximum absolute value for σ. That is, N-l N-l \∑rXXj,Λ * \T *0 XiW,,i\ ' e W (9) where ω Jr± is the i "1 element of the codebook vector 7 . Equation 4 represents the error in the spatial domain between a source vector x and codebook vector w. Each element of x and represents the spatial structure of the source and codebook blocks respectively and contributes equally to the error e. The elements of x and w are said to have equal "energy" . An alternative is to perform the match between the source and codebook blocks in the frequency domain. Unlike the spatial domain, the energy is concentrated into a few low frequency coefficients allowing the quality of the match between x and w to be assessed from a small sub-set of the total coefficients. However to be of value, the match in the frequency domain must correspond to the match in the spatial domain. Let X and W be N element vectors where the j tn element of X and W are given by: N-l X = Σ (Xi - ) Zj,_ , W- = ∑ wz Jrl 1=0 ι=0 where z Jrl is the i tn element of an N element vector z. , and x is the mean of the elements of the vector x. Let ε be the sum of the squared difference between the equivalent elements of X and W weighted by σ such that; N-l σW-, :ιo) = Jrl Z jΛ ) Using the 1-D Haddamard transform, one can define each vector z as a basic function such that : z 7 , = ITsr ( -D ΣT- 1 - β( j,D β drD ( 12: where, n = log 2 N, and the function β(q,r) is defined as: β(q,r) = 0 if bit q in the binary representation of r is i zero 1 if bit q in the binary representation of r is 1 one Since for the Haddamard transform: I ^ ^I ' i 1 _' i f 1 1 ' '= Λ V i , k e { 0 , 1 , . . . , N - 1} (13) then equation 10 can be simplified to = I Σ ( x. x σw, (14) N As x ≡ γ in Equation 4, the match in the frequency domain can be expressed in terms of the match in the spatial domain as, ε = £ (15) N Thus for the Haddamard transform, the error e in the spatial domain is equal to N times the error ε in the transform domain. For n Haddamard coefficients, where 1 < n < N, let the error between the first a coefficients be: ∑^- 0 η ( - σ n W - (16) where σ n is the contrast multiplier giving the best "fit" between the first n source and codebook Haddamard coefficients. If, A n = ∑ X f , B n = (x , c n = ∑ 1=0 = ι=r then the error ε r can be expressed as; ε n = A„ - 2σ B rι + σ n - C n (17 The optimal value of σ is calculated from; dε rι = 2 σ r , X - 2B π = 0 →> σ n = B r , ( 18 ) dσ, C n Thus the error for n coef f s with opt imi sed σ n is given by : ε rι = A n - B n 2 ( 19 ) C n To reduce search time, it is desirable to "cut-off" the calculation of the error following the evaluation of error based on a sub-set of the total Haddamard coefficients. That is, terminate the calculation if the error ε m is greater than the minimum error derived for a codebook match, where m < N. This cut-off is only possible if ε n > ε rι- Proof : = A n + B n C P C n = X- l + Xn : B Γ ,_ 1 + x. . ; B rι c„-. + n 2 C n -ι c rι X x.- + B n _. 2 - (B^ + x n w π ; = (C n .^ X n - B u _, W n 2 c,. ! 2 + c n ., w n 2 =s ε n - ε rι-1 > 0 since (C n-1 X n - B r-1 W n ) 2 > 0 and (C^ 2 + C n ^ W n 2 ) > 0. As ε n > ε n _ 1# the evaluation of the best codebook vector can be implemented by the following algorithm, where the codebook coefficients are assumed to be ordered by significance such that the last coefficient (coefficient N - 1) is the DC value which has the value zero for all the codebook vectors . ALGORITHM : for the first codebook coefficient vector n do set best error = A N _, - B^" store the index of the first codebook vector as the best fit to X end for — > for each remaining codebook coefficient vector W c do set the coefficient index j to one do calculate ε = A. - Bj increment j by one while j < N and ε < best error if ε < bes t error then set bes t error = ε store the index of the codebook vector as the best fit to X end if end for This algorithm can be applied to the numerical example to determine the best match from codebook vectors 0, 1 or 2. Table 11 gives the results of following the search algorithm. The error in frequency space for codebook vector 0, as the first vector, is evaluated from equation 19 with n = 15. This gives the best error value for the subsequent search. Calculating the error between the first two coefficients for codebook vector 1 gives an error that exceeds the bes t error and thus vector 1 is rejected. The match between the source and codebook vector 3 is evaluated up-to 14 out of the 15 coefficients before the error exceeds the bes t error . As codebook vector 0 gave the minimum error, it represents the best match to the source block . The final step is to calculate the contrast for codebook vector 0 that will map it onto the source block. Equation 18 gives a contrast of -0.944. Hence an optimal codebook vector with corresponding contrast can be determined by matching in both the spatial and frequency domain. A key advantage of using the frequency domain is a reduction in calculation necessary to determine a best match using both the significance of the source block frequency coefficients to discard poor matches and the error cut-off. Though the error cut-off could be applied in the spatial domain, it gives little benefit as the majority of pels must be used in the error calculation. Note that the difference between the optimal contrast calculated in the spatial domain and in the frequency domain is due to loss of accuracy in the transform process. It will be appreciated that the embodiment of the invention hereinbefore described is given by way of example only, and is not meant to limit the scope of the invention in any way . It will further be appreciated that various modifications may be made without departing from the invention. For example, the specific embodiment hereinbefore described provides a method of making a comparison of image and codebook patches with the objective of eliminating - for low computational cost - codebook patches which will probably not be the best match to a supplied image patch. The frequency transform adopted in the specific embodiment is the Haddamard transform, though it will readily be recognised that other frequency transforms could be used in a similar fashion. Further, it will be appreciated that the final selection of the best matching patch, from amongst those not rejected initially, can be made using the frequency space coefficients themselves. This in itself represents a reduction of computation in comparison to the determination of match quality of non-rejected codebook patches using image space . It is further envisaged that the invention may find use in compression of 'still' two dimensional image frames or compression of a set of image frames forming a video sequence. One specific application is that of transmission of video images between videophones . Yet further, it will be appreciated that the coefficients in the frequency domain are effectively an average type or global type of characterisation of each pattern in contradistinction to pixel data which is not. Table 1: Values assigned to the elements of the codebook vectors . Table 2 : Haddamard Transform coef icients for the codebook given in Figure 1. Table 3: Source block pel values and transform coefficients Table 5: Significance of principal coefficients in codebook Table 6: Sign mask for each codebook vector. Table 7: Significance mask for each codebook vector. Table 8: Sign mask for source block. Table 9: Match based on sign of significant coefficients for + ve contrast. Table 10: Match based on sign of significant coefficients for negative contrast. Table 11 : Match between source and codebook Haddamard Coefficients . CODEBOOK MATCH ERROR VECTOR 0 VECTOR 1 VECTOR 2 A 2 - (B 2 /C 2 ) not evaluated 7088.92 1134.74 A 3 - (B 2 3 /C 3 ) not evaluated not evaluated 1136.17 A, - (B 2 4 /C not evaluated not evaluated 1140.62 A 5 - (B 2 5 /C 5 ) not evaluated not evaluated 1219.54 , - (B 2 6 /C 6 ) not evaluated not evaluated 1380.37 A η - (B 2 7 /C 7 ) not evaluated not evaluated 1577.32 A B - (B 2 B /C β ) not evaluated not evaluated 2833.03 A, - (B 2 9 /C 9 ) not evaluated not evaluated 2838.34 •"10 (B 2 10 /C 10 ) not evaluated not evaluated 2838.55 An " (B 2 u/C 11 ) not evaluated not evaluated 2838.55 "1 — ' B" 12 /C 1 ) not evaluated not evaluated 2840.68 A 13 - (B 2 13 /C,,) not evaluated not evaluated 2956.36 A 14 ( B~i 4 / Ci 4 ) not evaluated not evaluated 3142.72 A 15 " (B 2 15 /C 15 ) 3014.45 not evaluated not evaluated

Claims: CLAIMS 1. A codebook search method comprising the steps of : a) providing a plurality of codebook patches,- b) providing at least one image patch; c) transforming by means of a lossless transform the plurality of codebook patches and the at least one image patch into sets of frequency domain codebook coefficients and a set (s) of frequency domain image coefficients, respectively; d) for the/each image patch selecting a shortlete (ie. shortlist) of possible match codebook patches by means of a pattern comparison of + and - signs of the image coefficients of the/each image patch with the codebook coefficients; and e) undertaking a further comparison of the image patch (es) against the shortlete codebook patches to select a substantially best match, this further comparison being effected by any desired method. 2. A method as claimed in claim 1, wherein the number of image coefficients used in the pattern comparison of step d) is, at least initially, equal in number to the number of pixels in a patch. 3. A method as claimed in claim 2, wherein the number of image coefficients required to make the pattern comparison of step d) is equal in number to those most significant in the frequency spectrum representative of the codebook coefficients 4. A method as claimed in any preceding claim, wherein the transform of step c) is computed for each of the codebook patches and the codebook coefficients are stored with the codebook patch to which they apply. 5. A method as claimed in any preceding claim, wherein for each codebook patch a 'sign string' is established, comprising a multi-bit pattern in which each bit corresponds to a specific instance of the set of multiple coefficients chosen for examination, each bit in the string being assigned a first binary value if the corresponding coefficient is negative or a second binary value if the corresponding coefficient is positive. 6. A method of compressing an image frame composed of an array of pixels in the form of digital signals, including the step of providing a codebook search method as claimed in any preceding claim. 7. An apparatus for compressing an array of data entries in the form of digital signals, the apparatus comprising a computer apparatus set up to run a program embodying a codebook search method according to any one of claims 1-5. 8. A computer program product carrying a computer program adapted to perform the codebook search method according to any one of claims 1-5.

Inventors: BRESLIN DAVID JAMES, DEVLIN PAUL EDWARD GEORGE, FRYER RICHARD JOHN, LAMBERT ROBERT BARTHOLEMEW, BRESLIN, DAVID, JAMES, DEVLIN, PAUL, EDWARD, GEORGE, FRYER, RICHARD, JOHN, LAMBERT, ROBERT, BARTHOLEMEW
Applicants: BRESLIN DAVID JAMES, DEVLIN PAUL EDWARD GEORGE, FRYER RICHARD JOHN, LAMBERT ROBERT BARTHOLEMEW, UNIV STRATHCLYDE, BRESLIN, DAVID, JAMES, DEVLIN, PAUL, EDWARD, GEORGE, FRYER, RICHARD, JOHN, LAMBERT, ROBERT, BARTHOLEMEW, UNIVERSITY OF STRATHCLYDE
Application year: 2001
Main classification: H04N7
IPC codes: G06F5, G06T9, H03M7, H04N1, H04N7