Edge direction detector for image processing video systems

Abstract: In an apparatus for approximating the direction of an edge in a video image formed by a video signal constituted by sequential fields and sequential lines in each of the fields, comprising first means (40-44d) for generating first signals (d1-d5) varying in dependence on the pixel values of primary pixels (A, B, C) in a given line in a present field and the pixel values of associated secondary pixels (1, 2, 3) in a different line, and evaluating means (46) for generating an edge direction signal in response to the first signals (d1-d5), the secondary pixels (1, 2, 3) are pixels from the field immediately preceding said present field and positioned, possibly after motion compensation, on a line in the preceding field which is adjacent to the given line in the present field.

Description: The present invention relates to video apparatus, and more particularly, to edge direction detectors thereof. It is well known that artefacts which arise due to an interlaced display standard, namely line-crawl and interline flicker, can be significantly reduced or eliminated by conversion to a progressive scanning scheme. To form such a progressive scan, a line is added, by line repetition or interpolation between each pair of adjacent lines in each field of the interlaced system. A cost effective way of implementing an interpolation is use of a median filter. A median filter will operate well with respect to the step response and performance on noisy images. However, because in some known algorithms only vertical interpolation is used, the median filter creates disturbing serration effects along the edges of moving diagonal transitions. The visibility of this effect depends on e.g. the contrast in the scene and the display characteristics, and is generally quite visible on a twenty inch receiver or monitor. Since the display sizes of larger television sets substantially exceed this dimension, the above-mentioned effects are particularly disturbing. It was proposed in the article "Progressive Scan Conversion using Edge Information" by T. Doyle and M. Looymans, Proceedings of the Workshop on HDTV, Torino, 1989, sponsored by the European Association for Signal Processing, IEEE, EIC, ITE and SMPTE to reduce the above mentioned effect by detecting the direction in which the edge extends and varying the interpolation algorithm in accordance with the detected direction. A 2 by 3 window in the current field was used and the magnitude of the three pixel differences in three different directions was determined, the smallest of these values being assumed to indicate the direction of the edge. For assumed vertical edges, the median filter, in this reference, then operated on the two selected pixels from the present field, namely the pixels yielding the smallest difference as mentioned above, and the corresponding pixel from the previous field. For other directions, the average value of the pair of pixels yielding the smallest absolute difference was used. A low-pass filter filtering the input video data was added in order to make the direction selection independent of high frequency noise. While the above-mentioned edge orientation detector with some additional features irrelevant to the present invention resulted in a great reduction of artefacts, its performance in high frequency areas is still subject to improvement. It is an object of the present invention to improve the performance of the above-described edge detectors in areas that contain high frequency detail. To this end, first and second aspects of the invention are defined in claims 1 and 6. The dependent claims define advantageous embodiments. It is a further object of the present invention to provide edge detection apparatus which will yield additional possible edge directions in the vicinity of the horizontal axis, since the main artefact of the median filter, serration on moving sloped transitions, is most objectionable in substantially horizontal directions. The present invention provides an apparatus for approximating the direction of an edge in a video image formed by a video signal constituted by sequential fields and sequential lines in each of the fields. It comprises first means for generating first signals indicative of the difference between the pixel value of each of a group of primary pixels in a line in a present field and the pixel value of respective corresponding slope defining secondary pixels, and means for generating an edge direction signal as a function of said first signals. It is characterized in that said slope defining secondary pixels are pixels in a vertically adjacent line in the field immediately preceding said present field. The operation and construction of the present invention will now be described with reference to the drawing. Figure 1 illustrates the algorithm underlying the known edge direction detector; Figure 2 is a block diagram of a line interpolation system utilizing an edge direction detector; Figure 3 illustrates the direction calculation algorithm in accordance with the present invention; Figure 4 is a block diagram of the edge direction detector of the present invention. To reduce artefacts which arise due to an interlaced display standard, namely line-crawl and interline flicker, conversion to a progressive scanning scheme has been proposed. To form such a progressive scan, a line is added, by line repetition or interpolation between each pair of adjacent lines in each field of the interlaced system, preferably by means of a median filter. However, because in some known algorithms only vertical interpolation is used, the median filter creates disturbing serration effects along the edges of moving diagonal transitions. It was proposed in the article "Progressive Scan Conversion using Edge information" by T. Doyle and M. Looymans, Proceedings of the Workshop on HDTV, Torino, 1989, to reduce the above mentioned effect by detecting the direction in which the edge extends and varying the interpolation algorithm in accordance with the detected direction. As illustrated in Figure 1, a 2 by 3 window in the current field was used and the magnitude of the differences A-C', C-A', and B-B' was determined, the smallest of these values being assumed to indicate the direction of the edge. For assumed vertical edges, the median filter, in this reference, then operated on the two selected pixels from the present field, namely the pixels yielding the smallest difference as mentioned above, and the corresponding pixel D from the previous field. For other directions, the average value of the pair of pixels yielding the smallest absolute difference was used. As illustrated in Figure 2, which is a block diagram of the known system and is also derived from the above-mentioned article, a low-pass filter 26 filtering the input video data was added in order to make the direction selection independent of high frequency noise. The incoming video data is applied to an interpolator 24, the direction of interpolation of which is determined by an edge direction detection stage 22. The above-mentioned low pass filter 26 filters the video data prior to its application to stage 22. Finally, the video data and the output of interpolator 24 are multiplexed in a multiplexer 28. As mentioned previously, the objective of the present invention is to improve the performance of the known detector in areas that contain high vertical frequency detail and to provide an option for increasing the number of directions which can be selected by the direction detector stage. Direction decisions in high frequency areas are more reliable the smaller the distance between the samples determining the differences in accordance with which the gradient is finally chosen. As shown in Fig. 1, in the prior art the values used to determine the differences or gradients in each of the three directions were spaced two frame lines apart vertically. According to the present invention, (Fig. 3), on the other hand, the samples A, B, C in a present field (also called primary pixels herein) are not processed together with the samples A', B', C' (also called secondary pixels herein) also in that field, but instead with samples 1, 2, 3 from the preceding field, which, in an interlaced system, provides a line vertically halfway between the lines having samples A, B, C and A', B', C' respectively. If now the differences listed on the right-hand side of Fig. 3 are considered, it will be noted that d1 and d5 are found in a direction closer to the horizontal than were the most horizontally inclined differences A-C' and C-A' of Fig. 1. Direction d2, based on the absolute difference between pixel A and pixel 2 yields a gradient in the same direction as did A-C', but with only half the length. The immunity to alias in this direction is thus increased by a factor of 2. Similarly, absolute difference d3 is only one half the magnitude of absolute difference B-B', thereby improving its immunity to vertical alias. The same comments apply to differences d4 and d5 as applied to differences d2 and d1, respectively. Thus, directions closer to the horizontal are available and, in every case, the distance over which the differences are obtained is less than in the prior art. The edge detector is shown in block diagram form in Fig. 4. There, the incoming video signal is delayed in cascade-connected pixel delays 42 and 42a furnishing pixel B and pixel A at their respective outputs. The incoming signal is also delayed by a field delay 40 and additional pixel delays 42b and 42c. As indicated in fig. 4, the output of field delay 40 is pixel 3. Pixel 2 and pixel 1 are found at the respective outputs of delays 42b and 42c. Pixel values derived from the above-described delay structure are applied to substraction stages 44, 44a, etc. according to the table in Fig. 3. Stages 44, etc. compute the absolute difference between signals applied to their inputs. The calculated differences dl etc. are then applied to a comparator arrangement 46 whose output yields the estimated edge direction. This may be the direction associated with the absolute minimum difference, or it may be the result of ranking the differences by absolute value, and using the minimum difference only if intermediate differences are associated with directions between those signified by the minimum and maximum difference values, or other schemes. It has been found useful to filter the video signal in the vertical direction before the calculation of the edge direction to prevent problems from moving parts of the image. A two tap transversal filter with coefficients 1/2 and 1/2 yields good results. A three tap filter with 1/4, 1/2, 1/4 coefficients is slightly better. Using motion compensation on the values from the previous field before application to the edge detector also improves the overall operation of the latter. In a second preferred embodiment also preferably using samples from the previous field, the direction angle is estimated by use of the arctan or arccotan functions. In its simplest form a look-up table is used to find the angle whose tangent is, for example, A-B / A-1 using the pixels illustrated in Fig. 3. Since the look-up table can be using the pixels illustrated in Fig. 3. Since the look-up table can be quantized in any manner deemed appropriate, i.e. the total number of direction angles which can be computed can be varied, the distribution can be such as to increase the resolution in certain angular regions, etc., this method is particularly flexible. It will be noted that only three pixel values are required for each edge direction estimate given above. Refinements with use of more pixel values are possible. It was shown experimentally that the ratio 1-2+A-B / A-1+B-2 more closely approximates the tangent of the angle of intersection of a presumed edge with the horizontal than does the above-mentioned tangent approximation. Mathematically it can be shown that this angle of intersection equals arctan A-2 / B-1.

Claims: Apparatus for approximating the direction of an edge in a video image formed by a video signal constituted by sequential fields and sequential lines in each of the fields, the apparatus comprising: first means (40-44d) for generating signals (d1-d5) varying in dependence on at least two differences between pixel values of pixels of a group formed by primary pixels (A, B, C) in a given line in a present field and associated secondary pixels (1, 2, 3) in a different line, the secondary pixels (1, 2, 3) having horizontal positions corresponding to horizontal positions of the primary pixels (A, B, C), at least one of these differences being a difference between a pixel value of a primary pixel and a pixel value of a secondary pixel, and evaluating means (46) coupled to receive said varying signals (d1-d5) for generating an edge direction signal (dmin) in dependence upon the varying signals (d1-d5), characterized in that said secondary pixels (1, 2, 3) are pixels in a field immediately preceding said present field, whereby said secondary pixels are located on a line which is vertically immediately adjacent to said given line. An apparatus as claimed in Claim 1, wherein said first means (40-44d) comprises means (44-44d) for finding at least the absolute difference between the pixel values of a first selected primary (A) and a first selected secondary pixel (3) constituting a first pixel pair (A, 3) on the one hand, and the absolute difference between a second selected primary (C) and a second selected secondary pixel (1) constituting a second pixel pair (C, 1) on the other hand, the angle to the horizontal determined by said first pixel pair (A, 3) differing from the angel to the horizontal determined by said second pixel pair (C, 1), said absolute differences constituting said first signals. An apparatus as claimed in Claim 2, wherein said primary pixels (A, B, C) form pixel groups each having at least three pixels. An apparatus as claimed in Claim 3, wherein said primary pixels comprise groups each having first (A), second (B) and third (C) pixels and said corresponding secondary pixels comprise first (1), second (2) and third (3) pixels in vertical alignment to said primary pixels (A, B, C), and wherein said varying signals (d1-d5) comprise a first difference signal (d1) indicative of the absolute difference between the first (A) of the primary pixels (A, B, C) and the third (3) of the secondary pixels (1, 2, 3), a second absolute difference signal (d2) corresponding to the absolute difference between said first (A) of said primary pixels (A, B, C) and said second (2) of said secondary pixels (1, 2, 3), a third absolute difference (d3) between a pair (B, 2) of vertically aligned primary (B) and secondary (2) pixels, a fourth absolute difference (d4) between the third (C) of said primary pixels (A, B, C) and the second (2) of said secondary pixels (1, 2, 3), and a fifth absolute difference (d5) between the third (C) of said primary pixels (A, B, C) and said first (1) of said secondary pixels (1, 2, 3). An apparatus as claimed in Claim 1, characterized in that said first means comprises means for generating tangent signals. An apparatus as claimed in claim 1 characterized in that said first means comprise : means for generating a first signal varying at least in part in dependence on pixel values of vertically aligned pixels located on vertically immediately adjacent lines respectively belonging to a first field and a field immediately preceding said first field; means for generating a second signal varying in at least in part in dependence on pixel values of horizontally aligned pixels; and in that said evaluating means comprise means for combining said first signal and said second signal thereby creating a geometric function signal indicative of said direction of said edge of said television image. An apparatus as claimed in Claim 6, further comprising a look-up table addressed by said geometric function signal for furnishing an angle value indicative of the angle corresponding thereto.

Inventors: DE HAAN GERARD, DE POORTERE GERRIT FREDERIK MA, DE HAAN, GERARD, DE POORTERE, GERRIT FREDERIK MAGDALENA
Applicants: PHILIPS ELECTRONICS NV, PHILIPS ELECTRONICS N.V.
Application year: 1991
Main classification: H04N5
IPC codes: H04N5