CN115731113A - Image processing method and image processing circuit - Google Patents

Image processing method and image processing circuit Download PDF

Info

Publication number
CN115731113A
CN115731113A CN202111011456.4A CN202111011456A CN115731113A CN 115731113 A CN115731113 A CN 115731113A CN 202111011456 A CN202111011456 A CN 202111011456A CN 115731113 A CN115731113 A CN 115731113A
Authority
CN
China
Prior art keywords
corner
detection
corners
image processing
specific
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111011456.4A
Other languages
Chinese (zh)
Inventor
池忠谚
黄文聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Realtek Semiconductor Corp
Original Assignee
Realtek Semiconductor Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Realtek Semiconductor Corp filed Critical Realtek Semiconductor Corp
Priority to CN202111011456.4A priority Critical patent/CN115731113A/en
Publication of CN115731113A publication Critical patent/CN115731113A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

The invention discloses an image processing method, which comprises the following steps: performing corner detection on a specific pixel in image data using a plurality of corner detection filters to generate a plurality of detection results, wherein the plurality of detection filters respectively correspond to a plurality of corners having different directions; determining to which of the plurality of corners having different directions the specific pixel belongs, at least according to the plurality of detection results; and according to the determined specific corner in the corners to which the specific pixel belongs, performing image processing corresponding to the specific corner on the specific pixel so as to generate processed image data.

Description

Image processing method and image processing circuit
Technical Field
The invention relates to an image processing circuit.
Background
In the related method of image processing, since a corner (corner) in an image pattern is an important feature point, a partial corner detection method has been developed and applied to the image processing method. Existing corner detection methods, such as the Harris corner detection (Harris corner detection) method, use image spatial differentiation and structure tensor to detect corners in images, however, these corner detection methods involve complex computations and are suitable for implementation using hardware circuits.
In addition, in a current image processing circuit, edge detection is generally performed using an edge filter like a Sobel (Sobel) operator, and a pattern edge in an image is processed. However, the current edge detection cannot effectively detect the corners in the image, and thus may cause flaws when processing the edges of the pattern in the image. For example, if the image includes a rectangle, the processing circuit may determine four corners of the rectangle as oblique sides, and therefore, the pixels at the four corners are considered as noise and are smoothed, so that the four corners of the rectangle become blurred, and the image quality is reduced.
As described above, it is an important issue to provide a corner detection method suitable for being implemented by a hardware circuit so as to effectively detect corners in different directions in an image and perform subsequent image processing.
Disclosure of Invention
It is therefore an object of the present invention to provide an image processing method, which can detect corners in different directions in an image through a corner detection filter and apply suitable image processing for the corners in different directions to solve the problems described in the background art.
In one embodiment of the present invention, an image processing method is disclosed, which comprises the following steps: performing corner detection on a specific pixel in image data using a plurality of corner detection filters to generate a plurality of detection results, wherein the plurality of corner detection filters respectively correspond to a plurality of corners having different directions; determining to which of the plurality of corners having different directions the specific pixel belongs, at least according to the plurality of detection results; and according to the determined specific corner in the corners to which the specific pixel belongs, performing image processing corresponding to the specific corner on the specific pixel so as to generate processed image data.
In another embodiment of the present invention, an image processing circuit is disclosed that includes a corner detection circuit and a corner and edge processing circuit. The corner detection circuit is configured to perform corner detection on a specific pixel in image data using a plurality of corner detection filters to generate a plurality of detection results, wherein the plurality of corner detection filters respectively correspond to a plurality of corners having different directions; and the corner detection circuit further determines to which of the plurality of corners having different directions the specific pixel belongs, based at least on the plurality of detection results. The corner and edge processing circuit is used for performing image processing corresponding to a specific corner in the plurality of corners according to the determined specific corner, wherein the specific pixel belongs to the corner, so as to generate processed image data.
Drawings
FIG. 1 is a schematic diagram of an image processing circuit according to an embodiment of the present invention.
Fig. 2 is a flowchart of an image processing method according to an embodiment of the present invention.
FIG. 3 is a diagram of an image frame.
Fig. 4 is a schematic view of a plurality of differently oriented corners.
Fig. 5 and 6 are schematic diagrams of a plurality of corner detection filters according to an embodiment of the present invention.
Fig. 7 is a schematic diagram of an example of a black-and-white angle and a black-and-white angle detection filter.
Fig. 8, 9 are schematic diagrams of a plurality of corner protection filters according to embodiments of the present invention.
FIG. 10 is a diagram of an operator for multiple contrast difference calculations, according to an embodiment of the present invention.
Fig. 11 is a diagram showing that corners of an image pattern in the background art are blurred due to improper image processing, and the corners are sharp using the method of the present embodiment.
Detailed Description
Fig. 1 is a schematic diagram of an image processing circuit 100 according to an embodiment of the present invention. As shown in fig. 1, the image processing circuit 100 includes a corner detection circuit 110, a straight line edge detection circuit 120, and a corner and edge processing circuit 130. The image processing circuit 100 is used for receiving the image data Din, and performing image processing on the image data Din, such as noise elimination, edge enhancement 8230, and the like, to generate processed image data Din ', and the processed image data Din' is then transmitted to the display panel 104 and displayed thereon after being processed by the back-end processing circuit 102. In the embodiment, the image processing circuit 100 can be applied to any electronic device that needs to perform image processing, such as an Image Signal Processor (ISP) in a camera or a video camera.
Referring to the flowchart shown in fig. 2, in step 200, the image processing circuit 100 enables and starts receiving image data, wherein the image data includes a plurality of image frames. FIG. 3 shows an image frame 300, wherein the image frame 300 includes M × N pixels P11 to PMN and pixel values (luminance values) thereof, and for convenience of the following description, the pixel values of P11 to PMN are directly used in the following partial formulas.
In step 202, the corner detection circuit 110 performs corner detection on each pixel in the image frame 300 to determine whether the pixel is a corner. Specifically, referring to fig. 4, the corner detection circuit 110 may perform corner detection on each pixel in the image frame 300 to determine which one of the corner 0, the corner 1, \ 8230, and the corner 7 shown in fig. 4 the pixel belongs to, wherein the direction difference between each two adjacent corners is 45 degrees, that is, the corner 1 may be regarded as the result of 45-degree rotation of the corner 0, the corner 2 may be regarded as the result of 45-degree rotation of the corner 1, and so on. For example, for each pixel, the corner detection circuit 110 may use the corner detection filters 510 u 0 to 510 u 7 shown in fig. 5 and 6 to detect which of the corner 0, the corner 1, \8230andthe corner 7 shown in fig. 4 the pixel belongs to. In detail, assuming that the corner detection circuit 110 determines which of the corners 0, 1, 8230, and 7 the pixel P33 belongs to, the corner detection circuit 110 may first use the corner detection filter 510 u 0 to detect the pixel P33, for example, the corner detection filter 510 u 0 is regarded as a corresponding weight to perform a weighted addition on a 5 × 5 region centered on the pixel P33 to generate a detection result DR0 corresponding to the corner 0, wherein the detection result DR0 may be calculated as follows:
DR0 = |P33*2 + P42*2 + P44*2 + P51*1 + P55*1 - P13*2 – P22*2 – P24*2 – P31*1 - P35*1|……………………………………………………(1);
then, the corner detection circuit 110 uses the corner detection filter 510 u 1 to detect the pixel P33, for example, the corner detection filter 510 u 1 is regarded as a corresponding weight to perform weighted addition on the 5 × 5 region centered on the pixel P33 to generate a detection result DR1 corresponding to the corner 1, wherein the detection result DR1 can be calculated as follows:
DR1 = |P33*3 + P31*1 + P32*1 + P43*1 + P53*1 - P12*1 - P13*1 - P15*2 - P25*1 - P35*1 - P45*1|……………………………………………………(2);
then, based on a similar calculation method, the corner detection circuit 110 uses the corner detection filters 510 _2to 510 _7to detect the pixel P33, so as to generate detection results DR2 to DR7 corresponding to the corners 2 to 7, respectively. The detection results DR0 to DR7 respectively reflect the intensities of the corners 0 to 7, that is, if the value of the detection result is larger, the pixel P33 is more likely to belong to the corner corresponding to the detection result, for example, if the detection result DR3 in the detection results DR0 to DR7 has the largest value, the pixel P33 is most likely to be the corner 3 shown in fig. 4.
It should be noted that the corner detection filters 510 u 0 to 510 u 7 shown in fig. 5 and 6 and the calculation manner of the detection result are only for illustration and not for limitation of the present invention. In other embodiments, the coefficients of the corner detection filters 510 _0to 510 _7may vary according to the designer's considerations, and the detection results may have different calculation manners, in other words, as long as the corner detection circuit 110 can use a plurality of corner detection filters to detect the pixel P33 to generate the detection results corresponding to different corners, the variation of the related design is within the scope of the present invention.
In one embodiment, the pixel P33 may belong to the black and white corner, and therefore two of the detection results DR 0-DR 7 have higher values, thereby causing a problem in subsequent corner determination. Referring to fig. 7, assuming that the lower left region of the pixels P11 to P55 has a lower brightness, the upper right region has a higher brightness, and the pixel P33 has a middle brightness, the detection result DR1 and the detection result DR5 may both have higher values, so that it cannot be determined whether the pixel P33 belongs to the corner 1 or the corner 5 shown in fig. 4 in the subsequent determination, and the pixel P33 can be regarded as a black-and-white corner at this time. Therefore, to solve this problem, the corner detection circuit 110 may additionally use a black-and-white angle detection filter to detect the pixel P33, for example, consider the black-and-white angle detection filter as a corresponding weight to perform weighted addition on a 5 × 5 area centered on the pixel P33 to generate a black-and-white angle detection result DR _ BW, where the black-and-white angle detection result DR _ BW may be calculated as follows:
DR_BW = P33*8 + P23*1 + P32*1 + P34*1 + P43*1 – P22*2 – P24*2 – P42*2 – P44*2 – P11*1 – P15*1 – P51*1 – P55*1………………………………(3);
in the embodiment, the monochrome corner detection filter is a non-directional filter with symmetric coefficients, and the detection result DR _ BW may reflect which corner the pixel P33 belongs to. For example, if the black-and-white angle detection result DR _ BW is a negative value, it indicates that the pixel P33 should belong to the corner 1; and if the black-and-white angle detection result DR _ BW is a positive value, it indicates that the pixel P33 should belong to the corner 5.
It should be noted that the calculation manner of the monochrome angle detection filter and the monochrome angle detection result DR _ BW shown in fig. 7 is only for exemplary illustration and is not a limitation of the present invention. In other embodiments, the coefficients in the black-white angle detection filter can be changed according to the designer's consideration, and the detection result can have different calculation manners, in other words, as long as the corner detection circuit 110 can use the black-white angle detection filter to detect the pixel P33 to generate the black-white angle detection result DR _ BW for the determination of the black-white angle, the related design changes belong to the scope of the present invention.
As described above, the corner detection circuit 110 can determine which of the corner 0, the corner 1, \ 8230and the corner 7 shown in FIG. 4 the pixel P33 belongs to according to the detection results DR 0-DR 7, or according to the detection results DR 0-DR 7 and the monochrome corner detection result DR _ BW, so as to generate the corner detection result.
Meanwhile, in step 204, the straight-line edge detection circuit 120 performs straight-line edge detection on each pixel in the image frame 300 to determine whether the pixel belongs to a vertical edge, a horizontal edge, a positive slope edge or a negative slope edge, so as to generate a straight-line edge detection result. In the present embodiment, taking the pixel P33 as an example, the straight line edge detection circuit 120 may perform edge detection by detecting a vertical luminance gradient, a horizontal luminance gradient, or by using an edge filter like Sobel (Sobel) operator of a 5 × 5 region with the pixel P33 as a center point, so as to generate a straight line edge detection result. It should be noted that, since the detection of the straight edge is a prior art and a person skilled in the art should understand the operation, the related contents are not described herein again.
In step 206, the corner and edge processing circuit 130 receives the corner detection result and the straight line edge detection result from the corner detection circuit 110 and the straight line edge detection circuit 120, respectively, and analyzes the corner detection result and the straight line edge detection result to determine whether the pixel P33 belongs to a corner or a straight line edge. In an embodiment, the designer may adjust the coefficients of the corner detection filters 510 _0to 510 _7used by the corner detection circuit 110 and the coefficients of the sobel operator used by the straight line edge detection circuit 120, so that the corner and edge processing circuit 130 may directly compare the sizes of the corner detection result and the straight line edge detection result to determine whether the pixel P33 belongs to the corner or the straight line edge.
In step 208, the corner and edge processing circuit 130 determines whether the pixel P33 is a corner, if so, the flow proceeds to step 210; if not, flow proceeds to step 214.
In step 210, the corner and edge processing circuit 130 denoises the pixel P33 so that the corner can be smoother. For example, the corner and edge processing circuit 130 may select one of the corner protection filters 810 u 0 to 810 u 7 shown in fig. 8 and 9 according to which corner the pixel P33 belongs to, so as to perform denoising on the pixel P33. For example, if pixel P33 belongs to corner 0 as shown in FIG. 4, then corner protection filter 810 u 0 is used for denoising; if pixel P33 belongs to corner 1 as shown in FIG. 4, then corner protection filter 810 _1is used for denoising. Taking the pixel P33 as belonging to the corner 0 as an example, the corner and edge processing circuit 130 may perform a weighted average operation on the 5 × 5 region centered on the pixel P33 by regarding the corner protection filter 810_0 as a corresponding weight to generate a denoised pixel value P33', where the denoised pixel value P33' may be calculated as follows:
P33’ = (P33*4 + P42*2 + P44*2 + P51*1 + P55*1) / 8…………………(4)。
it should be noted that the calculation of the corner protection filters 810 u 0 to 810 u 7 and the pixel values after denoising shown in fig. 8 and 9 are only for illustration and not for limitation of the invention. In other embodiments, the coefficients of the corner protection filters 810 _0to 810 _7may be changed according to the consideration of the designer, and the pixel values after denoising may have different calculation methods. In another embodiment, considering that the pixel P33 as a corner may be distorted by the processing of the previous stage circuit, the denoised pixel value P33 'may be calculated by directly ignoring the original pixel value of the pixel P33, and may be obtained by averaging the pixel values of the surrounding pixels, for example, the denoised pixel value P33' may be calculated as follows:
P33’ = (P42*2 + P44*2 + P51*1 + P55*1) / 4…………………………(5)。
next, in step 212, the corner and edge processing circuit 130 performs a contrast difference calculation on the pixel P33 to determine the sharpness of the corner for reference in the subsequent image processing. For example, the corner and edge processing circuit 130 may perform the contrast difference calculation according to which corner the pixel P33 belongs to select the corresponding operator. Fig. 10 shows operators for calculating the difference of contrast corresponding to the corner 0 and the corner 1, and the operators at the corners 2 to 7 can be obtained by rotating the operators at the corners 0 and 1, for example, the operator at the corner 2 is the operator at the corner 0 and rotates clockwise 90 degrees, the operator at the corner 3 is the operator at the corner 1 and rotates clockwise 90 degrees 8230, and so on, so the rest of the operators are not drawn on the drawing. For example, taking the pixel P33 as belonging to the corner 0 as an example, the corner and edge processing circuit 130 may take the operator of the corner 0 shown in fig. 10 as a corresponding weight to perform weighted addition on the 5 × 5 region centered on the pixel P33 to generate the contrast difference calculation result CR, where the contrast difference calculation result CR may be calculated as follows:
CR = (P33*8 + P42*6 + P44*6 -P13*1 – P22*3 – P23*1 – P24*3 – P31*3 – P32*1 – P34*1 – P35*3)……………………………………………(6)。
in step 214, the corner and edge processing circuit 130 may perform relevant edge processing on the pixel values, such as edge sharpness adjustment, and the like.
As described above, with the above embodiments, the image processing circuit 100 can accurately determine whether each pixel belongs to one of the corners 0 to 7 shown in fig. 4, and perform corner processing on the pixel value to improve the image quality. Furthermore, the operations of the above embodiments do not involve complex operations, such as spatial differentiation involved in harris corner detection, and are therefore suitable for implementation in circuitry.
Fig. 11 is a diagram showing that the corners of the image pattern in the background art are blurred due to inappropriate image processing, and the corners are sharp by using the method of the present embodiment. As shown in fig. 11, the image processing method of the present embodiment can indeed improve the display quality of the corners of the image.
Briefly summarizing the present invention, in an image processing circuit and an image processing method of the present invention, a corner detection is performed for each pixel using a plurality of corner detection filters to generate a plurality of detection results, and which of a plurality of corners having different directions the pixel belongs to is determined based on the plurality of detection results, whereby it is possible to surely know to which direction the pixel belongs to the corner, and to perform appropriate subsequent image processing on the pixel accordingly. Therefore, the image processing of the present invention can make the corners of the image pattern have better display quality.
The above description is only a preferred embodiment of the present invention, and all the equivalent changes and modifications made according to the claims of the present invention should be covered by the present invention.
Reference numerals
100 image processing circuit
102 back-end processing circuit
104 display panel
110 corner detection circuit
120 linear edge detection circuit
130 corner and edge processing circuit
200 to 214 steps
300 picture frame
510 w 0 to 510 w 7 corner detection filter
810 u 0 to 810 u 7 corner protection filter
Din image data
Processed image data
P11 to PMN pixels

Claims (10)

1. An image processing method, comprising:
performing corner detection on a specific pixel in image data using a plurality of corner detection filters to generate a plurality of detection results, wherein the plurality of corner detection filters respectively correspond to a plurality of corners having different directions;
determining to which of the plurality of corners having different directions the specific pixel belongs, at least according to the plurality of detection results; and
according to the determined specific corner in the plurality of corners to which the specific pixel belongs, performing image processing on the specific pixel corresponding to the specific corner so as to generate processed image data.
2. The method of image processing according to claim 1, wherein said plurality of corner detection filters is at least eight different corner detection filters.
3. The image processing method according to claim 1 or 2, wherein the plurality of detection results represent intensities of the specific pixel corresponding to the plurality of corners, and the step of determining to which of the plurality of corners having different directions the specific pixel belongs based at least on the plurality of detection results comprises:
and judging that the specific pixel belongs to the corner corresponding to the detection result with the highest intensity in the plurality of detection results.
4. The image processing method of claim 1, further comprising:
using a black and white angle detection filter to perform black and white angle detection on the particular pixel in the image data to generate a black and white angle detection result; and
the step of determining which of the plurality of corners having different directions the specific pixel belongs to based at least on the plurality of detection results comprises:
determining to which of the plurality of corners having different directions the specific pixel belongs, based on at least the plurality of detection results and the black-and-white angle detection result.
5. The image processing method according to claim 4, wherein the black-and-white angle detection filter is a coefficient symmetric filter.
6. The image processing method according to claim 4 or 5, wherein the plurality of detection results indicate intensities of the particular pixel corresponding to the plurality of corners, and the step of determining to which of the plurality of corners having different directions the particular pixel belongs based on at least the plurality of detection results and the black-and-white angle detection result comprises:
and under the condition of meeting the black-and-white angle detection result, judging that the specific pixel belongs to the corner corresponding to the detection result with the highest intensity in the plurality of detection results.
7. The image processing method according to claim 1, wherein the step of performing, according to the particular corner of the plurality of corners to which the particular pixel is determined to belong, the image processing on the particular pixel corresponding to the particular corner for generating the processed image data includes:
selecting a specific corner protection filter corresponding to the specific corner from a plurality of corner protection filters according to the specific corner of the plurality of corners to which the specific pixel belongs; and
denoising the particular pixel using the particular corner protection filter for producing the processed image data.
8. The image processing method of claim 7, wherein the plurality of corner detection filters is at least eight different corner detection filters and the plurality of corner protection filters is at least eight corner protection filters.
9. The image processing method according to claim 1, 7 or 8, wherein the step of performing, according to the particular corner of the plurality of corners to which the particular pixel belongs, the image processing corresponding to the particular corner on the particular pixel for generating the processed image data includes:
selecting a specific operator corresponding to the specific corner from a plurality of operators according to the specific corner in the plurality of corners to which the specific pixel belongs; and
performing a contrast difference calculation on the particular pixel using the particular operator for generating the processed image data.
10. An image processing circuit, comprising:
a corner detection circuit to perform corner detection on a specific pixel in image data using a plurality of corner detection filters to generate a plurality of detection results, wherein the plurality of corner detection filters respectively correspond to a plurality of corners having different directions; and the corner detection circuit further determines to which of the plurality of corners having different directions the specific pixel belongs, at least from the plurality of detection results; and
and the corner and edge processing circuit is used for carrying out image processing corresponding to a specific corner on the specific pixel according to the judged specific corner in the corners to which the specific pixel belongs so as to generate processed image data.
CN202111011456.4A 2021-08-31 2021-08-31 Image processing method and image processing circuit Pending CN115731113A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111011456.4A CN115731113A (en) 2021-08-31 2021-08-31 Image processing method and image processing circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111011456.4A CN115731113A (en) 2021-08-31 2021-08-31 Image processing method and image processing circuit

Publications (1)

Publication Number Publication Date
CN115731113A true CN115731113A (en) 2023-03-03

Family

ID=85291417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111011456.4A Pending CN115731113A (en) 2021-08-31 2021-08-31 Image processing method and image processing circuit

Country Status (1)

Country Link
CN (1) CN115731113A (en)

Similar Documents

Publication Publication Date Title
EP1058909B1 (en) A new perceptual thresholding for gradient-based local edge detection
JP2001005960A (en) Method and device for processing image
CN112583999B (en) Method for detecting lens dirt of camera module
KR100521963B1 (en) Image artifact removal technique for lcp
Akai et al. A single backlit image enhancement method for improvement of visibility of dark part
KR100521962B1 (en) Memory efficient image artifact removal technique for lcp
CN117218039A (en) Image processing method, device, computer equipment and storage medium
JP4520880B2 (en) Blot inspection method and blot inspection apparatus
CN115731113A (en) Image processing method and image processing circuit
TWI788967B (en) Image processing method and image processing circuit
WO2023078015A1 (en) Intra-prediction mode screening method and apparatus for video frame
US8542283B2 (en) Image processing device, image processing method, and information terminal apparatus
CN114266803A (en) Image processing method, image processing device, electronic equipment and storage medium
CN114648460A (en) Image sharpening method for inhibiting black and white edges
Lee et al. Laplacian of Gaussian Based on Color Constancy Algorithm for Surrounding Image Stitching Application
TW200416619A (en) Blind inverse halftoning
CN112085679B (en) Width-adjusted edge enhancement processing method and application
CN112184583B (en) Image noise reduction method and device
Che et al. Adaptive screen content image enhancement strategy using layer-based segmentation
WO2007105129A1 (en) Image enhancement
JP2006322757A (en) Stain inspection method and stain inspection device
Li An optimal algorithm for bilateral filtering
CN117764855A (en) Image noise reduction method, device, computer readable storage medium and equipment
Ko et al. Effective reconstruction of stereoscopic image pair by using regularized adaptive window matching algorithm
JP2000175047A (en) Image processing method and image processor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination