WO2014127665A1 - Improved method for digital image scaling - Google Patents

Improved method for digital image scaling Download PDF

Info

Publication number
WO2014127665A1
WO2014127665A1 PCT/CN2013/089614 CN2013089614W WO2014127665A1 WO 2014127665 A1 WO2014127665 A1 WO 2014127665A1 CN 2013089614 W CN2013089614 W CN 2013089614W WO 2014127665 A1 WO2014127665 A1 WO 2014127665A1
Authority
WO
WIPO (PCT)
Prior art keywords
sad
dir
horizontal
vertical
confidence
Prior art date
Application number
PCT/CN2013/089614
Other languages
French (fr)
Chinese (zh)
Inventor
欧阳平
黄海东
Original Assignee
深圳市晶日盛科技有限公司
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 深圳市晶日盛科技有限公司 filed Critical 深圳市晶日盛科技有限公司
Publication of WO2014127665A1 publication Critical patent/WO2014127665A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation

Definitions

  • the present invention relates to an improved digital image scaling method, and more particularly to a digital image scaling technique, which belongs to the field of digital image processing.
  • Image scaling is one of the basic techniques of digital image processing. It refers to the process of adjusting the width and height of a digital image. Image scaling can be achieved by two scalings, horizontal scaling and vertical scaling. Horizontal scaling changes the number of horizontal pixels in the image, and vertical scaling changes the number of vertical pixels in the image. If the image is from 640 (wide) X 480 (height) (4:3 aspect ratio) to 1920 X 1080 (16:9 aspect ratio), you can first zoom vertically to enlarge the image to 640 X 1080, and then pass Horizontal zoom adjusts image pixels from 640 X 1080 to 1920 X 1080. The principle of the two scaling algorithms is the same. An important problem in image scaling is the problem of image edge processing during zooming.
  • the image edge refers to the boundary between the object in the image and other objects or backgrounds in the image. If this boundary line is parallel to the horizontal axis, we Defined as a horizontal edge, if this boundary is perpendicular to the horizontal axis we define a vertical edge.
  • digital image scaling methods include a nearest neighbor method, a bilinear interpolation method, a bicubic interpolation, and the like.
  • the nearest neighbor interpolation is relatively simple and easy to implement, but this method produces significant edge aliasing in the resulting image.
  • the bilinear interpolation method has a smoothing function, which can effectively overcome the shortcomings of the nearest neighbor method, but can make the image details and edges become ambiguous.
  • Bicubic interpolation provides a good compromise, but does not fully address edge aliasing and edge blurring, which is the biggest problem with interpolation scaling.
  • some scholars have proposed a scaling method based on edge detection.
  • the main point is to detect the sub-pixel edge of the image first, and then interpolate the edge pixel and the non-edge pixel respectively. .
  • interpolation based on curve fitting is performed.
  • non-edge pixels bilinear interpolation is performed.
  • the scaling effect of this method depends on the quality of the subpixel edge detection.
  • Subpixel edge detection methods such as the Canny edge detection method
  • An improved digital image scaling method of the present invention includes performing direction and intensity detection on an original image corresponding to a target image, and then determining an interpolation filter to process the original image according to the result of the direction and intensity detection to obtain a target pixel.
  • a value characterized in that the interpolation filter is a composite interpolation filter, which is composed of a relatively smooth interpolation filter and The relatively sharp interpolation filters are respectively combined and corrected according to their corresponding weights, and the direction and intensity detection includes taking nX n pixel points centering on the original image pixel points corresponding to the target pixel points, and calculating the levels respectively.
  • the relatively smooth interpolation filter is defined as filter_sm 00 th
  • the relatively sharp interpolation filter is defined as filter_ S harp
  • the composite filter is defined as Filter_intel
  • the relatively smooth interpolation filter weight is defined as w_smooth, Bay U:
  • Filter_intel (w_smooth) X filter_smooth+ ( 1- w_smooth) X filter—sharp
  • the SAD value of the horizontal, vertical, diagonal, and anti-angle directions is calculated by calculating the direction SAD, the SAD in the horizontal direction is defined as SAD_H, and the SAD in the vertical direction is defined as SAD_V, diagonal
  • the SAD of the direction is defined as SAD_D
  • the SAD of the anti-angular direction is defined as SAD_A, which is the sum of the absolute differences of the pixel values of the adjacent pixels in the nX n pixel points
  • SAD_V is the adjacent pixel of the nX n pixel points.
  • SAD_D is the sum of the absolute differences of the pixel values of the diagonal neighboring pixels in nX n pixels
  • SAD_A is the absolute difference of the pixel values of the adjacent pixels in the nX n pixel points.
  • the Y component (gray value) of the RGB image is taken to calculate the horizontal, vertical, diagonal, and anti-angle lines, respectively. SAD values for each direction;
  • the SAD values of the horizontal, vertical, diagonal, and anti-angular directions of the three channels of RGB are respectively calculated, and respectively The maximum value is the SAD value of the horizontal direction, the vertical direction, the diagonal direction, and the anti-angular direction of the current target pixel.
  • the horizontal edge confidence is w_dir
  • the w_dir min(l,max(0,k_p X w_dir_p — k_n X w_dir_n)) ;
  • W_dir is the horizontal edge confidence
  • W_dir_p is the horizontal edge positive confidence
  • W_dir_n is the horizontal edge negative confidence
  • K_p>0 is the positive factor adjustment coefficient
  • K_n>0 is a negative factor adjustment coefficient
  • the horizontal edge positive confidence w_dir_p is max(0, SAD_V-SAD_H) ;
  • the horizontal edge negative confidence w_dir_n is w_dir_n0+w_dir_nl+w_dir_n2+w_dir_n3 ;
  • W_dir_n2 max(0, S AD_H-min_S AD) ,
  • W_dir_n3 min( max(0, SAD_A-S AD_V), max(0, SAD D-S AD V) )
  • the min_SAD is a minimum value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
  • the avg_SAD is a mean value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
  • a method for calculating horizontal edge confidence by using horizontal, vertical, diagonal, and anti-angle SAD values is provided.
  • any image there is generally parallel to the horizontal direction.
  • the horizontal edge and the vertical edge perpendicular to the horizontal direction.
  • the horizontal edge confidence we define when the target pixel corresponds to When the horizontal edge in the original image or the edge in the near horizontal direction, the horizontal edge confidence is large, and if the vertical edge or the near vertical edge in the original image corresponds to the horizontal edge, the horizontal edge confidence is small;
  • the w_dir alpha is called a horizontal transformation function
  • the significance is that when the horizontal edge confidence is small, it is unlikely to be a horizontal edge at this time.
  • the smoothing filter weight can be further reduced, so that the composite filter filterjntel is more inclined to the relatively sharp filter; when the horizontal edge confidence is larger, this is a more reliable horizontal edge, and the relative smoothing filter weight is further improved. , make the composite filter filter_intel more inclined to the relative smoothing filter.
  • the vertical edge confidence is defined as v_dir;
  • v_dir min(l,max(0,k_p X v_dir_p ⁇ k_n X v_dir_n));
  • V_dir is the vertical edge confidence
  • V_dir_p is the vertical edge positive confidence
  • V_dir_n is the vertical edge negative confidence
  • K_p>0 is the positive factor adjustment coefficient
  • K_n>0 is a negative factor adjustment coefficient
  • the vertical edge positive confidence v_dir_p is max(0, SAD_H-SAD_V) ;
  • v_dir_n is v_dir_n0+v_dir_nl+v_dir_n2+v_dir_n3 ;
  • V_dir_n0 min SAD
  • V_dir_n2 max(0, S AD_V-min_S AD) ,
  • V_dir_n3 min( max(0, SAD_A-SAD_V, max(0, SAD D-S AD V) )
  • the min_SAD is a minimum value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
  • the avg_SAD is a mean value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
  • a method for calculating the vertical edge confidence by using the SAD values of the horizontal, vertical, diagonal, and anti-angle directions is also provided, as described above for any image.
  • the vertical edge confidence is large. If the target pixel corresponds to the horizontal edge or the near horizontal edge in the original image, the vertical edge confidence is higher. small;
  • the method of the present invention is essentially smooth in the horizontal interpolation when the composite interpolation filter finally adopted for the horizontal edge is relatively smooth, and the vertical interpolation is relatively smooth for the composite interpolation filter finally adopted for the vertical edge, and the composite interpolation of the present invention.
  • the filter is composed of a relatively smooth interpolation filter and a relatively sharp interpolation filter, respectively, according to their corresponding weight corrections, and the weight of the relatively smooth interpolation filter and the relatively sharp interpolation filter is Centering on the original image pixel corresponding to the target pixel, select nX n pixels and calculate their horizontal, vertical, and diagonal
  • the SAD values of the four directions of the line and the anti-angle are finally calculated based on the SAD value, and the corresponding horizontal edge confidence is calculated in the horizontal scaling, and the corresponding vertical edge confidence is calculated in the vertical scaling to determine the final
  • the invention finally realizes that when horizontal scaling, the target pixel points of the horizontal edge or the near horizontal direction edge are interpolated by a relatively smooth composite interpolation filter, and the target pixel of the edge of the vertical edge or the near vertical direction is relatively sharp.
  • the composite interpolation filter is used for interpolation.
  • a relatively smooth composite interpolation filter is applied to the target pixel at the edge of the vertical edge or near vertical direction for interpolation, and a target pixel of the edge at the horizontal edge or the near horizontal direction is subjected to a relatively sharp composite interpolation filter.
  • relatively smooth interpolation filter interpolation is used for horizontal edges when horizontal scaling and vertical edges for vertical scaling, which does not cause aliasing problems, while vertical edges for horizontal scaling and horizontal edges for vertical scaling are relatively sharp. Interpolation filter interpolation ensures the sharpness of the edge.
  • the invention Based on the calculation of the SAD values in the horizontal, vertical, diagonal and anti-angle directions, the invention only adds the detection of the horizontal strong edge and the vertical strong edge. It solves the problem of edge aliasing and edge blur that interpolation method can't overcome for a long time. In addition, the detection is simple and the result is reliable and robust. At the same time, the demand for system resources, that is, the processing capacity of the computer system is also low. In summary, it is apparent that the object of the present invention is achieved.
  • 1 is a schematic diagram of an original image to be scaled
  • 2 is a relatively smooth interpolation filter filter-smooth diagram, where the horizontal axis is the pixel position, the original image pixel position corresponding to the target pixel point is 0, and the vertical axis is the filter value;
  • Figure 3 is a schematic diagram of a relatively sharp interpolation filter filter-sharp, where the horizontal axis is the pixel position, the pixel position of the original image corresponding to the target pixel is 0, and the vertical axis is the filter value;
  • FIG. 5 is a view showing the positional relationship of each pixel point in the horizontal direction of the 3 ⁇ 3 matrix formed by the pixel points of the original image
  • FIG. 6 is a neighborhood of each pixel point in the vertical direction of the 3 ⁇ 3 matrix formed by the pixel of the original image.
  • Positional relationship diagram FIG. 7 is a view of the positional relationship of each pixel point in the diagonal direction of the 3 ⁇ 3 matrix formed around the pixel of the original image
  • FIG. 8 is a 3 ⁇ 3 matrix formed centering on the pixel of the original image.
  • FIG. 9 is a relatively smooth interpolation filter transformation function diagram in which the horizontal axis is the edge confidence and the vertical axis is the smoothing filter weight;
  • FIG. 1 is a schematic diagram of an original image to be scaled, as shown in FIG. 1, including an object 1 in the image, including a vertical edge 101 that is substantially perpendicular to the horizontal axis 2, and parallel to the horizontal axis 2
  • the horizontal edge 102 of course, the vertical edge 101 is parallel to the vertical axis 3, the horizontal edge 102 is perpendicular to the vertical axis 3, and the object 1 may also have a near 103, also known as a horizontal strong edge and a near vertical edge 10 [taol] 4 , also known as vertical strong edge
  • the improved digital image scaling method given by the preferred embodiment first determines a relatively smooth interpolation filter filter_smooth and a relatively sharp interpolation filter filter_sharp, which is preferred
  • the relatively smooth interpolation filter filter smooth is as shown in FIG.
  • the relatively sharp interpolation filter filter_sharp is as shown in FIG. 3, and the composite filter filter_intel is equal to (w_smooth) X Filter_smooth+ ( 1- w_smooth) X filter—sharp, where w_smooth is a relatively smooth interpolation filter weight, and 0 w_smooth 1
  • FIG. 4 also shows the 3 ⁇ 3 matrix pixels centered on the original image pixel 22.
  • Point neighborhood positional relationship as shown in Figure 4, the first row of the 3 X 3 matrix from left to right is marked as: 11, 12, 13, the second row is labeled 21, 22, 23, respectively.
  • the third row is respectively labeled as: 31, 32, 33; as shown in FIG. 5, FIG. 6, FIG. 7, and FIG. 8, the horizontal direction, the vertical direction, and the diagonal direction among the 3 ⁇ 3 pixel points
  • the line direction and the anti-angle direction are all three lines, and P is defined as the pixel value of the pixel.
  • SAD_H I pl2-pl l
  • SAD V is
  • SAD_D is I p32-p21
  • SAD_A is
  • the original image 1 is an RGB image, for which RGB images are taken.
  • the Y component that is, the gray value is used as the basis for calculating the SAD.
  • the horizontal edge confidence can be calculated.
  • the horizontal edge positive confidence is defined as w_dir_p.
  • w_dir_p max(0, SAD_V-SAD_H)
  • the horizontal edge negative confidence is defined as w_dir_n
  • w_dir_nO min SAD
  • W_dir_n2 max(0, S AD_H-min_S AD) ,
  • W_dir_n3 min( max(0, SAD_A-S AD_V), max(0, SAD D-S AD V) )
  • the min_SAD is a minimum value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
  • the avg_SAD is a mean value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
  • K_p>0 is a positive factor adjustment coefficient, which ranges from 0 to 4, and takes a value of 2 in the preferred embodiment;
  • K_n>0 is a negative factor adjustment coefficient, which ranges from 0 to 4, and takes a value of 2 in the preferred embodiment
  • the relatively smooth interpolation filter weight w_sm 00 th is obtained according to the relatively smooth interpolation filter transformation function given by:
  • the k value is 1.5 and the alpha value is 2; w_dir ⁇ alpha is a horizontal transformation function, and FIG. 9 is given at k.
  • the relatively smooth interpolation filter weight w_sm 00 th is processed by the horizontal transformation function, and the dotted line 3 in the figure is the relatively smooth interpolation filter before the horizontal transformation function processing.
  • the weight of the device is w_smooth, and the solid line 3 is the relatively smooth interpolation filter weight w_smooth processed by the horizontal transformation function.
  • the relatively smooth interpolation filter is defined as filter_sm 00 th
  • the relatively sharp interpolation filter is defined as filter_sharp
  • the composite interpolation filter is defined as filterjntel
  • the relatively smooth interpolation filter weight is defined as w smooth
  • V_dir_n2 max(0, S AD_V-min_S AD) ,
  • V_dir_n3 min( max(0, SAD_A-SAD_V, max(0, SAD D-S AD V) )
  • the min_SAD is a minimum value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
  • the avg_SAD is a mean value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
  • K_p>0 is a positive factor adjustment coefficient, which ranges from 0 to 4, and takes a value of 2 in the preferred embodiment;
  • K_n>0 is a negative factor adjustment coefficient, which ranges from 0 to 4, and takes a value of 2 in the preferred embodiment
  • the relatively smooth interpolation filter weight w_sm 00 th is obtained according to the relatively smooth interpolation filter transformation function given by:
  • the "v_dir A alpha” is called the vertical transformation function, and the meaning is scaled horizontally, and will not be described in detail here.
  • the relatively smooth interpolation filter is defined as filter_sm 00 th
  • the relatively sharp interpolation filter is defined as filter_sharp
  • the composite interpolation filter is defined as filterjntel
  • the relatively smooth interpolation filter weight is defined as w smooth
  • Filter_intel (w_smooth) X filter_smooth+ ( 1- w_smooth) X filter—sharp;
  • an improved digital image scaling method of the present invention includes determining an interpolation filter to process a target image according to a result of detecting a target image direction and intensity to obtain a target pixel value, which is characterized by The interpolation filter is modified by a relatively smooth interpolation filter and a relatively sharp interpolation filter according to their corresponding weights.
  • the direction and intensity detection includes calculating the SAD values of the horizontal, vertical, diagonal, and anti-angle directions respectively, and calculating the horizontal edge confidence according to the SAD values of the four directions for the horizontal scaling and the vertical scaling, respectively.
  • the present invention solves the interpolation
  • the method scales edge aliasing and edge blurring problems that have long been untenable.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

Provided is an improved method for digital image scaling, which comprises: according to the detected results of direction and strength of a target image, determining an interpolation filter to process an original image to obtain a target pixel value, and is characterized in that the interpolation filter is composited by adding a relatively smooth interpolation filter and a relatively sharp interpolation filter after correcting same according to the weight respectively corresponding thereto. The direction and strength detection comprises: respectively calculating SAD values in four directions of the horizontal direction, the vertical direction, a diagonal line direction and a back diagonal direction; for horizontal scaling and vertical scaling, respectively calculating a horizontal edge confidence and a vertical edge confidence according to the SAD values in the four directions; and for horizontal scaling and vertical scaling, respectively setting the weight of the relatively smooth interpolation filter according to the principle that the higher the horizontal edge confidence and the higher vertical edge confidence, the larger the weight thereof. The present invention solves the problems of zigzag edges and fuzzy edges which cannot be overcome in the scaling of the interpolation method for a long time.

Description

说 明 书 一种改进的数字图像缩放方法 技术领域  An improved digital image scaling method
[0001] 本发明涉及一种改进的数字图像缩放方法, 具体涉及到数字图像的缩放技术, 其属 于数字图像处理领域类。  [0001] The present invention relates to an improved digital image scaling method, and more particularly to a digital image scaling technique, which belongs to the field of digital image processing.
背景技术 Background technique
[0002] 图像缩放 (image scaling ) 是数字图像处理的基本技术之一。 它是指对数字图像的宽 高进行调整的过程。 图像缩放可以通过两次缩放即水平缩放和垂直缩放来实现。 水平缩放改 变图像水平像素数量, 垂直缩放改变图像垂直像素的数量。 如图像从 640 (宽) X 480 (高) (宽高比为 4:3 ) 到 1920 X 1080 (宽高比为 16:9), 可以先进行垂直缩放将图像放大到 640 X 1080, 然后通过水平缩放将图像像素从 640 X 1080 调整到 1920 X 1080。 这两次缩放的算法 原理是相同的。 在图像缩放中有一个重要的问题就是缩放过程中图像边缘处理的问题, 所述 图像边缘指的是图像中物体与图像中其它物体或背景间的分界线, 如果这分界线平行于水平 轴线我们定义为水平边缘, 如果这分界线垂直于水平轴线我们定义为垂直边缘。  [0002] Image scaling is one of the basic techniques of digital image processing. It refers to the process of adjusting the width and height of a digital image. Image scaling can be achieved by two scalings, horizontal scaling and vertical scaling. Horizontal scaling changes the number of horizontal pixels in the image, and vertical scaling changes the number of vertical pixels in the image. If the image is from 640 (wide) X 480 (height) (4:3 aspect ratio) to 1920 X 1080 (16:9 aspect ratio), you can first zoom vertically to enlarge the image to 640 X 1080, and then pass Horizontal zoom adjusts image pixels from 640 X 1080 to 1920 X 1080. The principle of the two scaling algorithms is the same. An important problem in image scaling is the problem of image edge processing during zooming. The image edge refers to the boundary between the object in the image and other objects or backgrounds in the image. If this boundary line is parallel to the horizontal axis, we Defined as a horizontal edge, if this boundary is perpendicular to the horizontal axis we define a vertical edge.
[0003] 在现有技术中, 数字图像缩放方法有最近邻方法、 双线性插值方法、 双三次插值 等。 最近邻插值比较简单, 容易实现, 但该方法会在结果图像中产生有明显的边缘锯齿。 双 线性插值法具有平滑功能, 能有效地克服最近邻法的不足, 但会使图像细节和边缘变模 糊。 双三次插值能提供了较好的折衷, 但没有完全有效地解决边缘锯齿和边缘模糊问题, 这 是插值缩放最大的问题。 为了最终解决数字图像缩放过程中产生的边缘锯齿和边缘模糊, 亦 有学者提出过基于边缘检测的缩放方法, 其要点是先检测图像的亚像素边缘, 然后对边缘像 素和非边缘像素分别进行插值。 对于边缘像素, 进行基于曲线拟合的插值。 而对非边缘像 素, 进行双线性插值。 此方法的缩放效果依赖于亚像素边缘检测结果的好坏。 而亚像素边缘 检测方法 (如 Canny边缘检测方法)不仅非常复杂, 而且往往难以得到稳定的检测结果。 依以 上所述, 显然现有技术有进一步改进的必要。 [0003] In the prior art, digital image scaling methods include a nearest neighbor method, a bilinear interpolation method, a bicubic interpolation, and the like. The nearest neighbor interpolation is relatively simple and easy to implement, but this method produces significant edge aliasing in the resulting image. The bilinear interpolation method has a smoothing function, which can effectively overcome the shortcomings of the nearest neighbor method, but can make the image details and edges become ambiguous. Bicubic interpolation provides a good compromise, but does not fully address edge aliasing and edge blurring, which is the biggest problem with interpolation scaling. In order to finally solve the edge sawtooth and edge blur generated in the process of digital image scaling, some scholars have proposed a scaling method based on edge detection. The main point is to detect the sub-pixel edge of the image first, and then interpolate the edge pixel and the non-edge pixel respectively. . For edge pixels, interpolation based on curve fitting is performed. For non-edge pixels, bilinear interpolation is performed. The scaling effect of this method depends on the quality of the subpixel edge detection. Subpixel edge detection methods (such as the Canny edge detection method) are not only very complicated, but often it is difficult to obtain stable detection results. Based on the above, it is clear that there is a need for further improvements in the prior art.
发明内容 Summary of the invention
[0004] 本发明的目的在于提供一种改进的数字图像缩放方法, 以克服现有技术存在的问 题。  It is an object of the present invention to provide an improved digital image scaling method that overcomes the problems of the prior art.
[0005] 本发明的一种改进的数字图像缩放方法, 包括对目标图像对应的原始图像进行方向 和强度检测, 然后根据方向和强度检测的结果确定一个插值滤波器对原始图像进行处理得到 目标像素值, 其特征在于所述插值滤波器为复合插值滤波器, 其由相对平滑的插值滤波器和 相对锐利的插值滤波器分别根据其对应的权重修正后相加复合而成, 所述方向和强度检测包 括以与目标像素点对应的原始图像像素点为中心取 nX n个像素点, 分别计算水平、 垂直、 对角线、 反对角线四个方向的 SAD 值 (方向绝对差之和), 对水平缩放根据四个方向的 SAD值计算水平边缘置信度, 对于垂直缩放根据四个方向的 SAD值计算垂直边缘置信度, 对水平缩放按水平边缘置信度越高, 权重越大的原则基于水平边缘置信度设定相对平滑的插 值滤波器的权重, 对于垂直缩放, 按垂直边缘置信度越高, 权重越大的原则基于垂直边缘置 信度设定相对平滑的插值滤波器的权重, 相对平滑的插值滤波器定义为 filter_sm00th, 相对 锐利的插值滤波器定义为 filter_Sharp, 复合滤波器定义为 filter_intel, 相对平滑的插值滤波 器权重定义为 w_smooth, 贝 U : [0005] An improved digital image scaling method of the present invention includes performing direction and intensity detection on an original image corresponding to a target image, and then determining an interpolation filter to process the original image according to the result of the direction and intensity detection to obtain a target pixel. a value, characterized in that the interpolation filter is a composite interpolation filter, which is composed of a relatively smooth interpolation filter and The relatively sharp interpolation filters are respectively combined and corrected according to their corresponding weights, and the direction and intensity detection includes taking nX n pixel points centering on the original image pixel points corresponding to the target pixel points, and calculating the levels respectively. , vertical, diagonal, anti-angular SAD values (sum of absolute difference), horizontal scaling for horizontal edge confidence based on SAD values in four directions, for vertical scaling based on SAD values in four directions Calculate the vertical edge confidence. For horizontal scaling, the higher the horizontal edge confidence, the greater the weight. The principle is to set the weight of the relatively smooth interpolation filter based on the horizontal edge confidence. For vertical scaling, the higher the vertical edge confidence. The principle of greater weight is based on the vertical edge confidence to set the weight of the relatively smooth interpolation filter. The relatively smooth interpolation filter is defined as filter_sm 00 th, the relatively sharp interpolation filter is defined as filter_ S harp, and the composite filter is defined as Filter_intel, the relatively smooth interpolation filter weight is defined as w_smooth, Bay U:
filter_intel= (w_smooth) X filter_smooth+ ( 1- w_smooth) X filter—sharp Filter_intel= (w_smooth) X filter_smooth+ ( 1- w_smooth) X filter—sharp
其中 0 w_smooth;^ l。 Where 0 w_smooth;^ l.
[0006] 作为优选, 所述水平、 垂直、 对角线、 反对角线四个方向的 SAD 值计算方向 SAD 的计算, 水平方向的 SAD定义为 SAD_H, 垂直方向的 SAD定义为 SAD_V, 对角线方向的 SAD定义为 SAD_D, 反对角线方向的 SAD定义为 SAD_A, 所述 SAD_H为 nX n个像素点 中行相邻像素点像素值绝对差之和, SAD_V为 nX n个像素点中列相邻像素点像素值绝对差 之和, SAD_D为 nX n个像素点中对角线相邻像素点像素值绝对差之和, SAD_A为 nX n个 像素点中反对角线相邻像素点像素值绝对差之和。  [0006] Preferably, the SAD value of the horizontal, vertical, diagonal, and anti-angle directions is calculated by calculating the direction SAD, the SAD in the horizontal direction is defined as SAD_H, and the SAD in the vertical direction is defined as SAD_V, diagonal The SAD of the direction is defined as SAD_D, and the SAD of the anti-angular direction is defined as SAD_A, which is the sum of the absolute differences of the pixel values of the adjacent pixels in the nX n pixel points, and SAD_V is the adjacent pixel of the nX n pixel points. The sum of the absolute differences of the pixel values of the points, SAD_D is the sum of the absolute differences of the pixel values of the diagonal neighboring pixels in nX n pixels, and SAD_A is the absolute difference of the pixel values of the adjacent pixels in the nX n pixel points. with.
[0007] 作为前述优选方案的进一步优先之一, 在原始图像是 RGB 图像的情况下, 取 RGB 图像的 Y 分量 (灰度值) 分别计算所述水平、 垂直、 对角线、 反对角线四个方向的 SAD 值;  [0007] As one of the further preferred embodiments of the foregoing preferred method, in the case where the original image is an RGB image, the Y component (gray value) of the RGB image is taken to calculate the horizontal, vertical, diagonal, and anti-angle lines, respectively. SAD values for each direction;
作为前述优选方案的进一步优选之二, 在原始图像是 RGB图像的情况下, 分别计算 RGB三 个通道的水平、 垂直、 对角线、 反对角线四个方向的 SAD 值, 分别取它们中的最大值作为 当前目标像素点的水平方向、 垂直方向、 对角线方向以及反对角线方向的 SAD值。 As a further preferred second of the foregoing preferred embodiments, in the case where the original image is an RGB image, the SAD values of the horizontal, vertical, diagonal, and anti-angular directions of the three channels of RGB are respectively calculated, and respectively The maximum value is the SAD value of the horizontal direction, the vertical direction, the diagonal direction, and the anti-angular direction of the current target pixel.
[0008] 作为进一步优选, 对于水平缩放, 所述水平边缘置信度为 w_dir; [0008] As a further preferred, for horizontal scaling, the horizontal edge confidence is w_dir;
所述 w_dir = min(l,max(0,k_p X w_dir_p — k_n X w_dir_n)); The w_dir = min(l,max(0,k_p X w_dir_p — k_n X w_dir_n)) ;
其中: among them:
w_dir为水平边缘置信度; W_dir is the horizontal edge confidence;
w_dir_p为水平边缘正置信度; W_dir_p is the horizontal edge positive confidence;
w_dir_n为水平边缘负置信度; W_dir_n is the horizontal edge negative confidence;
k_p>0为正因素调整系数; k_n>0为负因素调整系数; K_p>0 is the positive factor adjustment coefficient; K_n>0 is a negative factor adjustment coefficient;
其中: among them:
水平边缘正置信度 w_dir_p为 max(0,SAD_V-SAD_H); The horizontal edge positive confidence w_dir_p is max(0, SAD_V-SAD_H) ;
水平边缘负置信度 w_dir_n为 w_dir_n0+w_dir_nl+w_dir_n2+w_dir_n3 ; The horizontal edge negative confidence w_dir_n is w_dir_n0+w_dir_nl+w_dir_n2+w_dir_n3 ;
其中: among them:
w_dir_n0 = min SAD, W_dir_n0 = min SAD,
w_dir_nl = avg_SAD, W_dir_nl = avg_SAD,
w_dir_n2 = max(0, S AD_H-min_S AD) , W_dir_n2 = max(0, S AD_H-min_S AD) ,
w_dir_n3 = min( max(0, SAD_A-S AD_V), max(0, SAD D-S AD V) ) W_dir_n3 = min( max(0, SAD_A-S AD_V), max(0, SAD D-S AD V) )
其中: among them:
所述 min_SAD为水平、 垂直、 对角线、 反对角线四个方向的 SAD的最小值; The min_SAD is a minimum value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
所述 avg_SAD为水平、 垂直、 对角线、 反对角线四个方向的 SAD的均值; The avg_SAD is a mean value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
本优选方案, 给出了通过水平、 垂直、 对角线、 反对角线四个方向的 SAD 值计算水平边缘 置信度的一种方法, 对于任何一幅图像来说, 一般会存在平行于水平方向的水平边缘以及垂 直于水平方向的垂直边缘, 在通过水平、 垂直、 对角线、 反对角线四个方向的 SAD 值计算 水平边缘置信度的函数关系式中, 我们限定了当目标像素点对应原始图像中的水平边缘或者 近水平方向的边缘时, 水平边缘置信度较大, 如果对应原始图像中的垂直边缘或者近垂直方 向边缘时, 水平边缘置信度较小; In the preferred embodiment, a method for calculating horizontal edge confidence by using horizontal, vertical, diagonal, and anti-angle SAD values is provided. For any image, there is generally parallel to the horizontal direction. The horizontal edge and the vertical edge perpendicular to the horizontal direction. In the function of calculating the horizontal edge confidence by the horizontal, vertical, diagonal, and anti-angle SAD values, we define when the target pixel corresponds to When the horizontal edge in the original image or the edge in the near horizontal direction, the horizontal edge confidence is large, and if the vertical edge or the near vertical edge in the original image corresponds to the horizontal edge, the horizontal edge confidence is small;
作为优选, 对于水平缩放, 所述相对平滑的插值滤波器权重 w_sm00th依据下式得到: w smooth = min(l,kX ( w_dir Aalpha)), Preferably, for horizontal scaling, the relatively smooth interpolation filter weight w_sm 00 th is obtained according to the following equation: w smooth = min(l, kX ( w_dir A alpha)),
其中, k>=l,alpha>=l均为变换调整参数, 所述 w_dir alpha我们称之为水平变换函数, 其意 义在于当水平边缘置信度较小的时候, 此时不大可能是水平边缘, 可以将平滑滤波器权重进 一步降低, 使复合滤波器 filterjntel更倾向于相对锐利滤波器; 当水平边缘置信度较大的时 候, 此时是比较可靠的水平边缘, 将相对平滑滤波器权重进一步提高, 使复合滤波器 filter_intel更倾向于相对平滑滤波器。 Where k>=l, alpha>=l are transformation adjustment parameters, and the w_dir alpha is called a horizontal transformation function, and the significance is that when the horizontal edge confidence is small, it is unlikely to be a horizontal edge at this time. The smoothing filter weight can be further reduced, so that the composite filter filterjntel is more inclined to the relatively sharp filter; when the horizontal edge confidence is larger, this is a more reliable horizontal edge, and the relative smoothing filter weight is further improved. , make the composite filter filter_intel more inclined to the relative smoothing filter.
[0009] 作为进一步优选, 对于垂直缩放, 定义所述垂直边缘置信度为 v_dir;  [0009] Further preferably, for vertical scaling, the vertical edge confidence is defined as v_dir;
所述 v_dir = min(l,max(0,k_p X v_dir_p ― k_n X v_dir_n)); The v_dir = min(l,max(0,k_p X v_dir_p ― k_n X v_dir_n));
其中: among them:
v_dir为垂直边缘置信度; V_dir is the vertical edge confidence;
v_dir_p为垂直边缘正置信度; V_dir_p is the vertical edge positive confidence;
v_dir_n为垂直边缘负置信度; k_p>0为正因素调整系数; V_dir_n is the vertical edge negative confidence; K_p>0 is the positive factor adjustment coefficient;
k_n>0为负因素调整系数; K_n>0 is a negative factor adjustment coefficient;
其中: among them:
垂直边缘正置信度 v_dir_p为 max(0,SAD_H-SAD_V); The vertical edge positive confidence v_dir_p is max(0, SAD_H-SAD_V) ;
垂直边缘负置信度 v_dir_n为 v_dir_n0+v_dir_nl+v_dir_n2+v_dir_n3 ; Vertical edge negative confidence v_dir_n is v_dir_n0+v_dir_nl+v_dir_n2+v_dir_n3 ;
其中: among them:
v_dir_n0 = min SAD, V_dir_n0 = min SAD,
v dir nl = avg_SAD, v dir nl = avg_SAD,
v_dir_n2 = max(0, S AD_V-min_S AD) , V_dir_n2 = max(0, S AD_V-min_S AD) ,
v_dir_n3 = min( max(0, SAD_A-SAD_V, max(0, SAD D-S AD V) ) V_dir_n3 = min( max(0, SAD_A-SAD_V, max(0, SAD D-S AD V) )
其中: among them:
所述 min_SAD为水平、 垂直、 对角线、 反对角线四个方向的 SAD的最小值; The min_SAD is a minimum value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
所述 avg_SAD为水平、 垂直、 对角线、 反对角线四个方向的 SAD的均值; The avg_SAD is a mean value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
本优选方案, 给出了通过水平、 垂直、 对角线、 反对角线四个方向的 SAD 值计算垂直边缘 置信度的一种方法, 亦如前所述那样对于任何一幅图像来说, 一般会存在平行于水平方向的 水平边缘以及垂直于水平方向的垂直边缘, 在通过水平、 垂直、 对角线、 反对角线四个方向 的 SAD 值计算垂直边缘置信度的函数关系式中, 我们限定了当目标像素点对应原始图像中 的垂直边缘或者近垂直方向的边缘时, 垂直边缘置信度较大, 如果目标像素点对应原始图像 中的水平边缘或者近水平方向边缘时, 垂直边缘置信度较小; In the preferred embodiment, a method for calculating the vertical edge confidence by using the SAD values of the horizontal, vertical, diagonal, and anti-angle directions is also provided, as described above for any image. There will be a horizontal edge parallel to the horizontal direction and a vertical edge perpendicular to the horizontal direction. In the function of calculating the vertical edge confidence by the SAD values in the horizontal, vertical, diagonal, and anti-angle directions, we define When the target pixel corresponds to the vertical edge in the original image or the edge in the near vertical direction, the vertical edge confidence is large. If the target pixel corresponds to the horizontal edge or the near horizontal edge in the original image, the vertical edge confidence is higher. small;
作为优选, 对于垂直缩放, 所述相对平滑的插值滤波器权重 w_sm00th依据下式得到: w smooth = min(l,kX ( v_dir Aalpha)), Preferably, for vertical scaling, the relatively smooth interpolation filter weight w_sm 00 th is obtained according to the following equation: w smooth = min(l, kX ( v_dir A alpha)),
其中, k>=l,alpha>=l 均为变换调整参数, 所述 "v_dir Aalpha"我们称之垂直变换函数, 其 意义在于当垂直边缘置信度较小的时候, 此时不大可能是垂直边缘, 可以将相对平滑的插值 滤波器权重进一步降低, 使复合滤波器 filterjntel更倾向于相对锐利滤波器; 当垂直边缘置 信度较大的时候, 此时是比较可靠的垂直边缘, 将相对平滑的插值滤波器权重进一步放大, 使复合滤波器 filterjntel更倾向于相对平滑滤波器。 Where k>=l,alpha>=l are transformation adjustment parameters, and the "v_dir A alpha" is called the vertical transformation function. The significance is that when the vertical edge confidence is small, it is unlikely that Vertical edges can further reduce the relatively smooth interpolation filter weight, making the composite filter filterjntel more inclined to the relatively sharp filter; when the vertical edge confidence is larger, this is a more reliable vertical edge, which will be relatively smooth The interpolation filter weight is further amplified, making the composite filter filterjntel more inclined to the relative smoothing filter.
[0010] 本发明的方法, 本质上是水平缩放时对于水平边缘最终采用的复合插值滤波器相对 平滑, 垂直缩放时则对于垂直边缘最终采用的复合插值滤波器相对平滑, 同时本发明的复合 插值滤波器是由相对平滑的插值滤波器和相对锐利的插值滤波器分别根据其对应的权重修正 后相加复合而成的, 而相对平滑的插值滤波器和相对锐利的插值滤波器的权重则是以目标像 素点对应的原始图像像素点为中心, 选定 nX n个像素点,并通过计算其水平、 垂直、 对角 线、 反对角线四个方向的 SAD值, 最终以 SAD值为基础, 在水平缩放中计算出相应的水平 边缘置信度, 在垂直缩放中计算出相应的垂直边缘置信度而最终确定的, 本发明最终实现了 在水平缩放时, 对水平边缘或近水平方向的边缘的目标像素点采用相对平滑的复合插值滤波 器来进行插值, 对垂直边缘或近垂直方向的边缘的目标像素则采用相对锐利的复合插值滤波 器来进行插值。 对于垂直缩放, 对垂直边缘或近垂直方向的边缘的目标像素采取相对平滑的 复合插值滤波器来进行插值, 对水平边缘或近水平方向的边缘的目标像素采用相对锐利的复 合插值滤波器来进行插值。 显然对于水平缩放时的水平边缘以及垂直缩放时的垂直边缘采用 相对平滑的插值滤波器插值, 不会带来锯齿问题, 而于水平缩放时的垂直边缘以及垂直缩放 时的水平边缘采用相对锐利的插值滤波器插值, 可确保边缘的清晰度, 本发明在水平、 垂 直、 对角线、 反对角线四个方向的 SAD 值的计算的基础上, 只附加了水平强边缘和垂直强 边缘的检测, 就较好地解决了插值法缩放长期以来无法克服的边缘锯齿和边缘模糊问题, 另 外检测比较简单而且结果可靠鲁棒, 同时对***资源的需求, 即对计算机***的处理能力要 求亦低, 综上所述, 显然本发明的目的得以实现。 [0010] The method of the present invention is essentially smooth in the horizontal interpolation when the composite interpolation filter finally adopted for the horizontal edge is relatively smooth, and the vertical interpolation is relatively smooth for the composite interpolation filter finally adopted for the vertical edge, and the composite interpolation of the present invention. The filter is composed of a relatively smooth interpolation filter and a relatively sharp interpolation filter, respectively, according to their corresponding weight corrections, and the weight of the relatively smooth interpolation filter and the relatively sharp interpolation filter is Centering on the original image pixel corresponding to the target pixel, select nX n pixels and calculate their horizontal, vertical, and diagonal The SAD values of the four directions of the line and the anti-angle are finally calculated based on the SAD value, and the corresponding horizontal edge confidence is calculated in the horizontal scaling, and the corresponding vertical edge confidence is calculated in the vertical scaling to determine the final The invention finally realizes that when horizontal scaling, the target pixel points of the horizontal edge or the near horizontal direction edge are interpolated by a relatively smooth composite interpolation filter, and the target pixel of the edge of the vertical edge or the near vertical direction is relatively sharp. The composite interpolation filter is used for interpolation. For vertical scaling, a relatively smooth composite interpolation filter is applied to the target pixel at the edge of the vertical edge or near vertical direction for interpolation, and a target pixel of the edge at the horizontal edge or the near horizontal direction is subjected to a relatively sharp composite interpolation filter. Interpolation. Obviously, relatively smooth interpolation filter interpolation is used for horizontal edges when horizontal scaling and vertical edges for vertical scaling, which does not cause aliasing problems, while vertical edges for horizontal scaling and horizontal edges for vertical scaling are relatively sharp. Interpolation filter interpolation ensures the sharpness of the edge. Based on the calculation of the SAD values in the horizontal, vertical, diagonal and anti-angle directions, the invention only adds the detection of the horizontal strong edge and the vertical strong edge. It solves the problem of edge aliasing and edge blur that interpolation method can't overcome for a long time. In addition, the detection is simple and the result is reliable and robust. At the same time, the demand for system resources, that is, the processing capacity of the computer system is also low. In summary, it is apparent that the object of the present invention is achieved.
附图说明 DRAWINGS
[0011] 图 1是拟缩放原始图像示意图;  1 is a schematic diagram of an original image to be scaled;
图 2是相对平滑的插值滤波器 filter—smooth示意图, 图中水平轴为像素位置, 与目标像素点 对应的原始图像像素点位置为 0, 垂直轴为滤波器取值; 2 is a relatively smooth interpolation filter filter-smooth diagram, where the horizontal axis is the pixel position, the original image pixel position corresponding to the target pixel point is 0, and the vertical axis is the filter value;
图 3是相对锐利的插值滤波器 filter—sharp示意图, 图中水平轴为像素位置, 与目标像素点对 应的原始图像像素点位置为 0, 垂直轴为滤波器取值; Figure 3 is a schematic diagram of a relatively sharp interpolation filter filter-sharp, where the horizontal axis is the pixel position, the pixel position of the original image corresponding to the target pixel is 0, and the vertical axis is the filter value;
图 4是以原始图像像素点为中心形成的 3 X 3矩阵各像素点邻域位置关系图; 4 is a view showing the positional relationship of each pixel point of the 3×3 matrix formed by the pixel points of the original image;
图 5是以原始图像像素点为中心形成的 3 X 3矩阵水平方向各像素点邻域位置关系图; 图 6是以原始图像像素点为中心形成的 3 X 3矩阵垂直方向各像素点邻域位置关系图; 图 7是以原始图像像素点为中心形成的 3 X 3矩阵对角线方向各像素点邻域位置关系图; 图 8是以原始图像像素点为中心形成的 3 X 3矩阵反对角线方向各像素点邻域位置关系图; 图 9是相对平滑的插值滤波器变换函数图图中水平轴为边缘置信度, 垂直轴为平滑滤波器权 重; FIG. 5 is a view showing the positional relationship of each pixel point in the horizontal direction of the 3×3 matrix formed by the pixel points of the original image; FIG. 6 is a neighborhood of each pixel point in the vertical direction of the 3×3 matrix formed by the pixel of the original image. Positional relationship diagram; FIG. 7 is a view of the positional relationship of each pixel point in the diagonal direction of the 3×3 matrix formed around the pixel of the original image; FIG. 8 is a 3×3 matrix formed centering on the pixel of the original image. The positional relationship diagram of each pixel point in the diagonal direction; FIG. 9 is a relatively smooth interpolation filter transformation function diagram in which the horizontal axis is the edge confidence and the vertical axis is the smoothing filter weight;
各图中的主要标识如下: The main indicators in each figure are as follows:
1为图像中物体; 1 is an object in the image;
101为垂直边缘; 101 is a vertical edge;
102为水平边缘; 103为近水平方向边缘; 102 is the horizontal edge; 103 is a near horizontal edge;
104为近垂直方向边缘;  104 is a near vertical direction edge;
2为水平轴线;  2 is the horizontal axis;
3为垂直轴线;  3 is the vertical axis;
4为水平边缘置信度曲线;  4 is a horizontal edge confidence curve;
5为经相对平滑的插值滤波器变换函数变换得来的相对平滑的插值滤波器权重曲线;  5 is a relatively smooth interpolation filter weighting curve transformed by a relatively smooth interpolation filter transform function;
6为相对平滑的插值滤波器曲线; 6 is a relatively smooth interpolation filter curve;
7为相对锐利的插值滤波器曲线。 7 is a relatively sharp interpolation filter curve.
具体实施方式 detailed description
[0012] 以下将结合本发明较佳实施例所提供的一种改进的数字图像缩放方法及其附图对本 发明作进一步说明。  [0012] The present invention will now be further described in conjunction with an improved digital image scaling method and its accompanying drawings provided by a preferred embodiment of the present invention.
[0013] 附图 1 给出了拟进行缩放处理的原始图像示意图, 如附图 1 所示, 图像中包括物体 1, 包括明显与水平轴线 2垂直的垂直缘 101,以及与水平轴线 2平行的水平缘 102, 当然垂直 边缘 101与垂直轴线 3平行, 水平边缘 102与垂直轴线 3垂直, 同时, 所述物体 1还可能存 在近 103, 亦称水平强边缘和近垂直方向边缘 10[taol] 4, 亦称垂直强边缘, 本较佳实施例给 出的这种改进的数字图像缩放方法, 首先确定一个相对平滑的插值滤波器 filter—smooth和一 个相对锐利的插值滤波器 filter_sharp, 在本较佳实施例中, 所述相对平滑的插值滤波器 filter smooth如附图 2所示, 所述相对锐利的插值滤波器 filter_sharp如附图 3所示, 同时定 义复合滤波器 filter—intel等于 (w_smooth) X filter_smooth+ ( 1- w_smooth) X filter—sharp, 其中 w_smooth为相对平滑的插值滤波器权重, 且 0 w_smooth 1;  1 is a schematic diagram of an original image to be scaled, as shown in FIG. 1, including an object 1 in the image, including a vertical edge 101 that is substantially perpendicular to the horizontal axis 2, and parallel to the horizontal axis 2 The horizontal edge 102, of course, the vertical edge 101 is parallel to the vertical axis 3, the horizontal edge 102 is perpendicular to the vertical axis 3, and the object 1 may also have a near 103, also known as a horizontal strong edge and a near vertical edge 10 [taol] 4 , also known as vertical strong edge, the improved digital image scaling method given by the preferred embodiment first determines a relatively smooth interpolation filter filter_smooth and a relatively sharp interpolation filter filter_sharp, which is preferred In an embodiment, the relatively smooth interpolation filter filter smooth is as shown in FIG. 2, and the relatively sharp interpolation filter filter_sharp is as shown in FIG. 3, and the composite filter filter_intel is equal to (w_smooth) X Filter_smooth+ ( 1- w_smooth) X filter—sharp, where w_smooth is a relatively smooth interpolation filter weight, and 0 w_smooth 1
具体缩放时, 先以与目标像素点对应的原始图像像素点 22为中心取 3 X 3个像素点, 附图 4 同时标示出了以原始图像像素点 22为中心形成的 3 X 3矩阵各像素点邻域位置关系, 如附图 4 所示, 3 X 3 矩阵中第一行从左到右各像素点分别标示为: 11、 12、 13,第二行分别标示为 21、 22、 23,第三行分别标示为: 31、 32、 33; 如附图 5、 附图 6、 附图 7、 附图 8所示, 所 述 3 X 3 个像素点中, 水平方向、 垂直方向、 对角线方向以及反对角线方向均为三行, 定义 P 为像素点的像素值, 则我们有 SAD_H 为 I pl2-pl l | 、 | pl3-pl2 | 、 | p22-p21 | 、 | p23-p22 I 、 I p32-p31 | 、 | p33-p32 | 六个邻域像素点像素值绝对差之和, SAD V 为 | p21-pl l I 、 I p31-p21 | 、 | p22-pl2 | 、 | p32-p22 | 、 | p23-pl3 | 、 | p33-pl3 |六个邻域 像素点像素点像素值绝对差之和, SAD_D 为 I p32-p21 | 、 | p22-pl l | 、 | p33-p22 | 、 | p23-pl2 I 四个邻域像素点像素点像素值绝对差之和, SAD_A 为 | p21-pl2 | 、 | P22-pl3 I 、 I p31-p22 I 、 I P32-p23 | 四个邻域像素点像素值绝对差之和, 在本较佳实施例中, 所 述原始图像 1为 RGB图像, 为此取 RGB图像的 Y分量, 即灰度值作为计算 SAD的依据, 在本较佳实施例中, 如果 [tao2], 可对水平边缘置信度进行计算, 在本较佳实施例中定义水 平边缘正置信度为 w_dir_p, 然后根据 w_dir_p = max(0,SAD_V-SAD_H)求得水平边缘正置信 度 w_dir_p 的值; 再定义水平边缘负置信度为 w_dir_n, 然后根据 w_dir_n = w_dir_nO+w_dir_n 1 +w_dir_n2+ w_dir_n3取得水平边缘负置信度 w_dir_n的值, 其中: w_dir_nO = min SAD, For specific scaling, 3×3 pixels are taken as the center of the original image pixel 22 corresponding to the target pixel. FIG. 4 also shows the 3×3 matrix pixels centered on the original image pixel 22. Point neighborhood positional relationship, as shown in Figure 4, the first row of the 3 X 3 matrix from left to right is marked as: 11, 12, 13, the second row is labeled 21, 22, 23, respectively. The third row is respectively labeled as: 31, 32, 33; as shown in FIG. 5, FIG. 6, FIG. 7, and FIG. 8, the horizontal direction, the vertical direction, and the diagonal direction among the 3×3 pixel points The line direction and the anti-angle direction are all three lines, and P is defined as the pixel value of the pixel. Then we have SAD_H as I pl2-pl l | , | pl3-pl2 | , | p22-p21 | , | p23-p22 I , I p32-p31 | , | p33-p32 | The sum of the absolute differences of the pixel values of the six neighborhood pixels, SAD V is | p21-pl l I , I p31-p21 | , | p22-pl2 | , | p32- P22 | , | p23-pl3 | , | p33-pl3 | The sum of the absolute differences of the pixel values of the pixels in the six neighborhood pixels, SAD_D is I p32-p21 | , | p22-pl l | , | p33-p22 | | P23-pl2 I The sum of the absolute differences of the pixel values of the pixels in the four neighborhood pixels, SAD_A is | p21-pl2 | , | P 22-pl3 I, I p31-p22 I , I P 32-p23 | The sum of the absolute differences of the pixel values of the four neighborhood pixels. In the preferred embodiment, the original image 1 is an RGB image, for which RGB images are taken. The Y component, that is, the gray value is used as the basis for calculating the SAD. In the preferred embodiment, if [tao2], the horizontal edge confidence can be calculated. In the preferred embodiment, the horizontal edge positive confidence is defined as w_dir_p. Then, according to w_dir_p = max(0, SAD_V-SAD_H), the value of the horizontal edge positive confidence w_dir_p is obtained; then the horizontal edge negative confidence is defined as w_dir_n, and then the horizontal edge negative confidence is obtained according to w_dir_n = w_dir_nO+w_dir_n 1 +w_dir_n2+ w_dir_n3 The value of degree w_dir_n, where: w_dir_nO = min SAD,
w_dir_nl = avg_SAD, W_dir_nl = avg_SAD,
w_dir_n2 = max(0, S AD_H-min_S AD) , W_dir_n2 = max(0, S AD_H-min_S AD) ,
w_dir_n3 = min( max(0, SAD_A-S AD_V), max(0, SAD D-S AD V) ) W_dir_n3 = min( max(0, SAD_A-S AD_V), max(0, SAD D-S AD V) )
其中: among them:
所述 min_SAD为水平、 垂直、 对角线、 反对角线四个方向的 SAD的最小值; The min_SAD is a minimum value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
所述 avg_SAD为水平、 垂直、 对角线、 反对角线四个方向的 SAD的均值; The avg_SAD is a mean value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
最后根据水平边缘置信度为 w_dir = min(l,max(0,k_p X w_dir_p —k_nX w_dir_n))取得水平边 缘置信度为 w_dir的值; Finally, the horizontal edge confidence is w_dir according to the horizontal edge confidence of w_dir = min(l,max(0,k_p X w_dir_p —k_nX w_dir_n));
其中: among them:
k_p>0为正因素调整系数, 其取值范围为 0-4,在本较佳实施例中取值 2; K_p>0 is a positive factor adjustment coefficient, which ranges from 0 to 4, and takes a value of 2 in the preferred embodiment;
k_n>0为负因素调整系数, 其取值范围为 0-4,在本较佳实施例中取值 2; K_n>0 is a negative factor adjustment coefficient, which ranges from 0 to 4, and takes a value of 2 in the preferred embodiment;
过大的 k_p值和太小 k_n值会有模糊图像细节的风险, 反之会有导致水平边缘锯齿的风险。 Excessive k_p values and too small k_n values have the risk of blurring the details of the image, and vice versa.
[0014] 而所述相对平滑的插值滤波器权重 w_sm00th依据下式给出的相对平滑的插值滤波器 变换函数得到: [0014] The relatively smooth interpolation filter weight w_sm 00 th is obtained according to the relatively smooth interpolation filter transformation function given by:
w smooth = min(l,kX ( w_dir Aalpha)), w smooth = min(l,kX ( w_dir A alpha)),
其中, k>=l,alpha>=l 均为变换调整参数, 在本较佳实施例中 k值为 1.5, alpha值为 2; w_dir ^alpha为水平变换函数, 附图 9给出了在 k值为 1.5, alpha值为 2的情况下, 经水平 变换函数处理后的相对平滑的插值滤波器权重 w_sm00th的变化情况, 图中虚线 3为经水平 变换函数处理前的相对平滑的插值滤波器权重 w_smooth, 实线 3 为经水平变换函数处理后 的相对平滑的插值滤波器权重 w_smooth。 Where k>=l, and alpha>=l are transformation adjustment parameters. In the preferred embodiment, the k value is 1.5 and the alpha value is 2; w_dir^alpha is a horizontal transformation function, and FIG. 9 is given at k. When the value is 1.5 and the alpha value is 2, the relatively smooth interpolation filter weight w_sm 00 th is processed by the horizontal transformation function, and the dotted line 3 in the figure is the relatively smooth interpolation filter before the horizontal transformation function processing. The weight of the device is w_smooth, and the solid line 3 is the relatively smooth interpolation filter weight w_smooth processed by the horizontal transformation function.
[0015] 依前所述, 相对平滑的插值滤波器定义为 filter_sm00th, 相对锐利的插值滤波器定义 为 filter_sharp, 复合插值滤波器定义为 filterjntel, 相对平滑的插值滤波器权重定义为 w smooth, 贝 U我们有: [0015] As described above, the relatively smooth interpolation filter is defined as filter_sm 00 th, the relatively sharp interpolation filter is defined as filter_sharp, the composite interpolation filter is defined as filterjntel, and the relatively smooth interpolation filter weight is defined as w smooth, We have:
filter_intel= (w_smooth) X filter_smooth+ ( 1- w_smooth) X filter—sharp; 最后按我们得到的复合插值滤波器 filterjntel进行水平缩放的插值处理得到目标图像; 如果进行垂直缩放, 在本较佳实施例中定义垂直边缘正置信度为 v_dir_p, 然后根据 v_dir_p = max(0,SAD_H-SAD_V)求得垂直边缘正置信度 v_dir_p 的值; 再定义垂直边缘负置信度为 v_dir_n, 然后根据 v_dir_n = v_dir_n0+v_dir_nl+v_dir_n2+v_dir_n3 取得垂直边缘负置信度 v dir n的值; Filter_intel= (w_smooth) X filter_smooth+ ( 1- w_smooth) X filter—sharp; Finally, the horizontal interpolation interpolation process is performed according to the composite interpolation filter filterjntel obtained to obtain the target image. If vertical scaling is performed, the vertical edge positive confidence is defined as v_dir_p in the preferred embodiment, and then according to v_dir_p = max(0, SAD_H -SAD_V) obtains the value of the vertical edge positive confidence v_dir_p; further defines the vertical edge negative confidence as v_dir_n, and then obtains the value of the vertical edge negative confidence v dir n according to v_dir_n = v_dir_n0+v_dir_nl+v_dir_n2+v_dir_n3;
其中: among them:
v_dir_nO = min SAD, v_dir_nO = min SAD,
v dir nl = avg_SAD, v dir nl = avg_SAD,
v_dir_n2 = max(0, S AD_V-min_S AD) , V_dir_n2 = max(0, S AD_V-min_S AD) ,
v_dir_n3 = min( max(0, SAD_A-SAD_V, max(0, SAD D-S AD V) ) V_dir_n3 = min( max(0, SAD_A-SAD_V, max(0, SAD D-S AD V) )
其中: among them:
所述 min_SAD为水平、 垂直、 对角线、 反对角线四个方向的 SAD的最小值; The min_SAD is a minimum value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
所述 avg_SAD为水平、 垂直、 对角线、 反对角线四个方向的 SAD的均值; The avg_SAD is a mean value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
然后根据垂直边缘置信度 v_dir = min(l,max(0,k_p Xv_dir_p - k_nX v_dir_n))取得垂直边缘 置信度 v_dir的值, 其中: The value of the vertical edge confidence v_dir is then obtained according to the vertical edge confidence v_dir = min(l,max(0,k_p Xv_dir_p - k_nX v_dir_n)), where:
k_p>0为正因素调整系数, 其取值范围为 0-4,在本较佳实施例中取值 2; K_p>0 is a positive factor adjustment coefficient, which ranges from 0 to 4, and takes a value of 2 in the preferred embodiment;
k_n>0为负因素调整系数, 其取值范围为 0-4,在本较佳实施例中取值 2; K_n>0 is a negative factor adjustment coefficient, which ranges from 0 to 4, and takes a value of 2 in the preferred embodiment;
过大的 k_p值和太小 k_n值会有模糊图像细节的风险, 反之会有导致垂直边缘锯齿的风险。 Excessive k_p values and too small k_n values have the risk of blurring the details of the image, and vice versa.
[0016] 相对平滑的插值滤波器权重 w_sm00th依据下式给出的相对平滑的插值滤波器变换函 数得到: [0016] The relatively smooth interpolation filter weight w_sm 00 th is obtained according to the relatively smooth interpolation filter transformation function given by:
w smooth = min(l,kX ( v_dir Aalpha)), w smooth = min(l,kX ( v_dir A alpha)),
其中, k>=l,alpha>=l 均为变换调整参数, 所述 "v_dir Aalpha"我们称之垂直变换函数, 意 义同水平缩放, 在此不再详细说明。 Where k>=l, alpha>=l are transformation adjustment parameters, the "v_dir A alpha" is called the vertical transformation function, and the meaning is scaled horizontally, and will not be described in detail here.
[0017] 依前所述, 相对平滑的插值滤波器定义为 filter_sm00th, 相对锐利的插值滤波器定义 为 filter_sharp, 复合插值滤波器定义为 filterjntel, 相对平滑的插值滤波器权重定义为 w smooth, 贝 U我们有: [0017] As described above, the relatively smooth interpolation filter is defined as filter_sm 00 th, the relatively sharp interpolation filter is defined as filter_sharp, the composite interpolation filter is defined as filterjntel, and the relatively smooth interpolation filter weight is defined as w smooth, We have:
filter_intel= (w_smooth) X filter_smooth+ ( 1- w_smooth) X filter—sharp; Filter_intel= (w_smooth) X filter_smooth+ ( 1- w_smooth) X filter—sharp;
最后按我们得到的复合插值滤波器 filterjntel进行垂直缩放的插值处理得到目标图像。 Finally, according to the composite interpolation filter filterjntel we obtained, the interpolation process of vertical scaling is performed to obtain the target image.
[0018] 综上所述, 本发明的一种改进的数字图像缩放方法, 包括根据对目标图像方向和强 度检测的结果确定一个插值滤波器对原始图像进行处理得到目标像素值, 其特征在于所述插 值滤波器由相对平滑的插值滤波器和相对锐利的插值滤波器分别根据其对应的权重修正后相 加复合而成, 所述方向和强度检测包括分别计算水平、 垂直、 对角线、 反对角线四个方向的 SAD值, 对水平缩放和垂直缩放分别根据四个方向的 SAD值计算水平边缘置信度和垂直边 缘置信度, 对水平缩放和垂直缩放分别按水平边缘置信度越高以及垂直边缘置信度越高, 权 重越大的原则设定相对平滑的插值滤波器的权重, 本发明解决了插值法缩放长期以来无法克 服的边缘锯齿和边缘模糊问题。 [0018] In summary, an improved digital image scaling method of the present invention includes determining an interpolation filter to process a target image according to a result of detecting a target image direction and intensity to obtain a target pixel value, which is characterized by The interpolation filter is modified by a relatively smooth interpolation filter and a relatively sharp interpolation filter according to their corresponding weights. Adding the composite, the direction and intensity detection includes calculating the SAD values of the horizontal, vertical, diagonal, and anti-angle directions respectively, and calculating the horizontal edge confidence according to the SAD values of the four directions for the horizontal scaling and the vertical scaling, respectively. Degree and vertical edge confidence, the horizontal scaling and vertical scaling respectively, the higher the horizontal edge confidence and the higher the vertical edge confidence, the greater the weight, the relatively smooth interpolation filter weight, the present invention solves the interpolation The method scales edge aliasing and edge blurring problems that have long been untenable.
[0019] 以上所述, 仅为本发明的具体实施方式。 但本发明的保护范围并不局限于此。 任何 熟悉本技术领域的技术人员在本发明披露的技术范围内, 可轻易想到的变化或替换, 都应涵 盖在本发明的保护范围之内, 因此, 本发明的保护范围应以权利要求的保护范围为准。  [0019] As described above, it is only a specific embodiment of the present invention. However, the scope of protection of the present invention is not limited thereto. Any changes or substitutions that may be easily conceived within the scope of the present invention are intended to be included within the scope of the present invention. Therefore, the scope of the present invention should be protected by the claims. The scope shall prevail.

Claims

权 利 要 求 书 Claim
1. 一种改进的数字图像缩放方法, 包括对目标图像对应的原始图像进行方向和强度检测, 然后根据方向和强度检测的结果确定一个插值滤波器对原始图像进行处理得到目标像素值, 其特征在于所述插值滤波器为复合插值滤波器, 其由相对平滑的插值滤波器和相对锐利的插 值滤波器分别根据其对应的权重修正后相加复合而成, 所述方向和强度检测包括以与目标像 素点对应的原始图像像素点为中心取 nX n个像素点, 分别计算水平、 垂直、 对角线、 反对 角线四个方向的 SAD值, 对水平缩放根据四个方向的 SAD值计算水平边缘置信度, 对于垂 直缩放根据四个方向的 SAD 值计算垂直边缘置信度, 对水平缩放按水平边缘置信度越高, 权重越大的原则基于水平边缘置信度设定相对平滑的插值滤波器的权重, 对于垂直缩放, 按 垂直边缘置信度越高, 权重越大的原则基于垂直边缘置信度设定相对平滑的插值滤波器的权 重。  An improved digital image scaling method, comprising: performing direction and intensity detection on an original image corresponding to a target image, and then determining an interpolation filter to process the original image according to the result of the direction and intensity detection to obtain a target pixel value, wherein the feature The interpolation filter is a composite interpolation filter, which is composed of a relatively smooth interpolation filter and a relatively sharp interpolation filter respectively according to their corresponding weight corrections, and the direction and intensity detection includes The original image pixel corresponding to the target pixel takes nX n pixels as the center, and calculates the SAD values of the horizontal, vertical, diagonal, and anti-angle lines respectively, and calculates the horizontal level according to the SAD value of the four directions. Edge confidence, for vertical scaling, calculates vertical edge confidence based on SAD values in four directions. For horizontal scaling, the higher the horizontal edge confidence, the greater the weight. The principle is based on horizontal edge confidence to set a relatively smooth interpolation filter. Weight, for vertical scaling, the higher the confidence by vertical edge, the weight Broad principles set relatively smooth interpolation filter based on the vertical edges of the confidence weights.
2. 根据权利要求 1 所述的一种改进的数字图像缩放方法, 其特征在于相对平滑的插值滤波 器定义为 filter_smooth, 相对锐利的插值滤波器定义为 filter_sharp, 复合滤波器定义为 filter intel, 相对平滑的插值滤波器权重定义为 w_smooth, 贝 U :  2. An improved digital image scaling method according to claim 1, wherein the relatively smooth interpolation filter is defined as filter_smooth, the relatively sharp interpolation filter is defined as filter_sharp, and the composite filter is defined as filter intel, relative The smoothed interpolation filter weight is defined as w_smooth, Bay U:
filter_intel= (w_smooth) X filter_smooth+ ( 1- w_smooth) X filter—sharp; Filter_intel= (w_smooth) X filter_smooth+ ( 1- w_smooth) X filter—sharp;
其中 0 w_smooth;^ l。 Where 0 w_smooth;^ l.
3. 根据权利要求 2 所述的一种改进的数字图像缩放方法, 其特征在于所述水平、 垂直、 对 角线、 反对角线四个方向的 SAD值计算方向 SAD的计算, 水平方向的 SAD为 nX n个像素 点中行相邻像素点像素值绝对差之和, 垂直方向的 SAD为 nX n个像素点中列相邻像素点像 素值绝对差之和, 对角线方向的 SAD为 nX n个像素点中对角线相邻像素点像素值绝对差之 和, 反对角线方向的 SAD为 nX n个像素点中反对角线相邻像素点像素值绝对差之和。  3. The improved digital image scaling method according to claim 2, wherein the horizontal, vertical, diagonal, and anti-angular directions of the SAD value are calculated in the direction SAD, and the horizontal direction is SAD. The sum of the absolute differences of the pixel values of the adjacent pixels in the nX n pixel points, the SAD in the vertical direction is the sum of the absolute differences of the pixel values of the adjacent pixels in the nX n pixel points, and the SAD in the diagonal direction is nX n The sum of the absolute differences of the pixel values of the diagonal pixels in the pixel points, and the SAD in the anti-angular direction is the sum of the absolute differences of the pixel values of the adjacent pixels in the nX n pixel points.
4. 根据权利要求 3所述的一种改进的数字图像缩放方法, 其特征在于在原始图像是 RGB图 像的情况下, 取 RGB图像的 Y分量 (灰度值) 分别计算所述水平、 垂直、 对角线、 反对角 线四个方向的 SAD值。  4. An improved digital image scaling method according to claim 3, wherein in the case where the original image is an RGB image, the Y component (gray value) of the RGB image is taken to calculate the horizontal, vertical, The SAD values in the four directions of the diagonal and the anti-angle.
5. 根据权利要求 3所述的一种改进的数字图像缩放方法, 其特征在于在原始图像是 RGB图 像的情况下, 分别计算 RGB 三个通道的水平、 垂直、 对角线、 反对角线四个方向的 SAD 值, 分别取它们中的最大值作为当前目标像素点的水平方向、 垂直方向、 对角线方向以及反 对角线方向的 SAD值。  5. The improved digital image scaling method according to claim 3, wherein in the case where the original image is an RGB image, the horizontal, vertical, diagonal, and anti-angle lines of the three RGB channels are respectively calculated. The SAD values of the directions are taken as the maximum value among them as the SAD values of the horizontal direction, the vertical direction, the diagonal direction, and the anti-angular direction of the current target pixel.
6. 根据权利要求 3 所述的一种改进的数字图像缩放方法, 其特征在于对于水平缩放, 所述 水平边缘置信度为 w_dir;  6. The improved digital image scaling method according to claim 3, wherein for horizontal scaling, the horizontal edge confidence is w_dir;
所述 w_dir = min(l,max(0,k_p X w_dir_p - k_n X w_dir_n)); 其中: The w_dir = min(l,max(0,k_p X w_dir_p - k_n X w_dir_n)) ; among them:
SAD H为水平方向的 SAD;  SAD H is a horizontal SAD;
SAD_V为垂直方向的 SAD; S SAD_V is the vertical SAD; S
AD D为对角线方向的 SAD; AD D is the SAD in the diagonal direction;
SAD_A为反对角线方向的 SAD; SAD_A is the SAD in the opposite direction;
w_dir为水平边缘置信度; W_dir is the horizontal edge confidence;
w_dir_p为水平边缘正置信度; W_dir_p is the horizontal edge positive confidence;
w_dir_n为水平边缘负置信度; W_dir_n is the horizontal edge negative confidence;
k_p>0为正因素调整系数; K_p>0 is the positive factor adjustment coefficient;
k_n>0为负因素调整系数; K_n>0 is a negative factor adjustment coefficient;
其中: among them:
水平边缘正置信度 w_dir_p为 max(0,SAD_V-SAD_H); The horizontal edge positive confidence w_dir_p is max(0, SAD_V-SAD_H) ;
水平边缘负置信度 w_dir_n为 w_dir_n0+w_dir_nl+w_dir_n2+w_dir_n3 ; The horizontal edge negative confidence w_dir_n is w_dir_n0+w_dir_nl+w_dir_n2+w_dir_n3 ;
其中: among them:
w_dir_nO = min SAD, w_dir_nO = min SAD,
w_dir_nl = avg_SAD, W_dir_nl = avg_SAD,
w_dir_n2 = max(0, S AD_H-min_S AD) , W_dir_n2 = max(0, S AD_H-min_S AD) ,
w_dir_n3 = min( max(0, SAD_A-S AD_V), max(0, SAD D-S AD V) ) W_dir_n3 = min( max(0, SAD_A-S AD_V), max(0, SAD D-S AD V) )
其中: among them:
所述 min_SAD为水平、 垂直、 对角线、 反对角线四个方向的 SAD的最小值; The min_SAD is a minimum value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
所述 avg_SAD为水平、 垂直、 对角线、 反对角线四个方向的 SAD的均值。 The avg_SAD is the mean of the SAD in the four directions of horizontal, vertical, diagonal, and anti-angle.
7. 根据权利要求 6 所述的一种改进的数字图像缩放方法, 其特征在于所述相对平滑的插值 滤波器权重 w_smooth依据下式得到:  7. An improved digital image scaling method according to claim 6, wherein said relatively smooth interpolation filter weight w_smooth is obtained according to the following equation:
w smooth = min(l,kX ( w_dir Aalpha)); w smooth = min(l,kX ( w_dir A alpha));
其中, k>=l,alpha>=l均为变换调整参数。 Where k>=l and alpha>=l are transformation adjustment parameters.
8. 根据权利要求 3 所述的一种改进的数字图像缩放方法, 其特征在于对于垂直缩放, 所述 垂直边缘置信度为 v_dir;  8. The improved digital image scaling method according to claim 3, wherein for vertical scaling, the vertical edge confidence is v_dir;
所述 v_dir = min(l,max(0,k_p X v_dir_p - k_n X v_dir_n)); The v_dir = min(l,max(0,k_p X v_dir_p - k_n X v_dir_n));
其中: among them:
SAD H为水平方向的 SAD;  SAD H is a horizontal SAD;
SAD_V为垂直方向的 SAD; 8 ^)_0为对角线方向的 SAD; SAD_V is the SAD in the vertical direction; 8 ^)_0 is the SAD in the diagonal direction;
SAD_A为反对角线方向的 SAD; SAD_A is the SAD in the opposite direction;
v_dir为垂直边缘置信度; V_dir is the vertical edge confidence;
v_dir_p为垂直边缘正置信度; V_dir_p is the vertical edge positive confidence;
v_dir_n为垂直边缘负置信度; V_dir_n is the vertical edge negative confidence;
k_p>0为正因素调整系数; K_p>0 is the positive factor adjustment coefficient;
k_n>0为负因素调整系数; K_n>0 is a negative factor adjustment coefficient;
其中: among them:
垂直边缘正置信度 v_dir_p为 max(0,SAD_H-SAD_V); The vertical edge positive confidence v_dir_p is max(0, SAD_H-SAD_V) ;
垂直边缘负置信度 v_dir_n为 v_dir_n0+v_dir_nl+v_dir_n2+v_dir_n3 ; Vertical edge negative confidence v_dir_n is v_dir_n0+v_dir_nl+v_dir_n2+v_dir_n3 ;
其中: among them:
v_dir_nO = min SAD, v_dir_nO = min SAD,
v dir nl = avg_SAD, v dir nl = avg_SAD,
v_dir_n2 = max(0, S AD_V-min_S AD) , V_dir_n2 = max(0, S AD_V-min_S AD) ,
v_dir_n3 = min( max(0, SAD_A-SAD_V, max(0, SAD D-S AD V) ) V_dir_n3 = min( max(0, SAD_A-SAD_V, max(0, SAD D-S AD V) )
其中: among them:
所述 min_SAD为水平、 垂直、 对角线、 反对角线四个方向的 SAD的最小值; The min_SAD is a minimum value of SAD in four directions of horizontal, vertical, diagonal, and anti-angle;
所述 avg_SAD为水平、 垂直、 对角线、 反对角线四个方向的 SAD的均值。 The avg_SAD is the mean of the SAD in the four directions of horizontal, vertical, diagonal, and anti-angle.
9. 根据权利要求 8 所述的一种改进的数字图像缩放方法, 其特征在于对于垂直缩放, 所述 相对平滑的插值滤波器权重 w_smooth依据下式得到:  9. An improved digital image scaling method according to claim 8, wherein for vertical scaling, said relatively smooth interpolation filter weight w_smooth is obtained according to the following equation:
w smooth = min(l,kX ( v_dir Aalpha)); w smooth = min(l,kX ( v_dir A alpha));
其中, k>=l,alpha>=l均为变换调整参数。 Where k>=l and alpha>=l are transformation adjustment parameters.
PCT/CN2013/089614 2013-02-21 2013-12-16 Improved method for digital image scaling WO2014127665A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310055610.7A CN103093418B (en) 2013-02-21 2013-02-21 A kind of digital image scaling method of improvement
CN201310055610.7 2013-02-21

Publications (1)

Publication Number Publication Date
WO2014127665A1 true WO2014127665A1 (en) 2014-08-28

Family

ID=48205954

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/089614 WO2014127665A1 (en) 2013-02-21 2013-12-16 Improved method for digital image scaling

Country Status (2)

Country Link
CN (1) CN103093418B (en)
WO (1) WO2014127665A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200219229A1 (en) * 2020-03-18 2020-07-09 Intel Corporation Edge-Aware Upscaling for Improved Screen Content Quality

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093418B (en) * 2013-02-21 2015-08-26 深圳市晶日盛科技有限公司 A kind of digital image scaling method of improvement
CN103530845A (en) * 2013-10-19 2014-01-22 深圳市晶日盛科技有限公司 Improved image zooming method
US9461936B2 (en) 2014-02-14 2016-10-04 Google Inc. Methods and systems for providing an actionable object within a third-party content slot of an information resource of a content publisher
US9246990B2 (en) 2014-02-14 2016-01-26 Google Inc. Methods and systems for predicting conversion rates of content publisher and content provider pairs
WO2016165097A1 (en) * 2015-04-16 2016-10-20 中国科学院自动化研究所 Image de-aliasing system
CN104794692B (en) * 2015-04-16 2017-08-25 中国科学院自动化研究所 The system that a kind of image removes sawtooth
US11024012B2 (en) * 2018-08-02 2021-06-01 Apple Inc. Directional scaling systems and methods

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050094899A1 (en) * 2003-10-29 2005-05-05 Changick Kim Adaptive image upscaling method and apparatus
CN101188017A (en) * 2007-12-18 2008-05-28 上海广电集成电路有限公司 Digital image zooming method and system
JP2010157877A (en) * 2008-12-26 2010-07-15 Sharp Corp Image processing apparatus, image processing method and computer program
CN102568443A (en) * 2010-12-29 2012-07-11 无锡华润矽科微电子有限公司 Digital image scaling method
CN103093418A (en) * 2013-02-21 2013-05-08 深圳市晶日盛科技有限公司 Improved digital image resizing method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011052602A1 (en) * 2009-10-27 2011-05-05 株式会社 日立メディコ Ultrasonic imaging device, ultrasonic imaging method and program for ultrasonic imaging
CN102779335B (en) * 2011-05-13 2015-07-08 华晶科技股份有限公司 Processing device and processing method for digital image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050094899A1 (en) * 2003-10-29 2005-05-05 Changick Kim Adaptive image upscaling method and apparatus
CN101188017A (en) * 2007-12-18 2008-05-28 上海广电集成电路有限公司 Digital image zooming method and system
JP2010157877A (en) * 2008-12-26 2010-07-15 Sharp Corp Image processing apparatus, image processing method and computer program
CN102568443A (en) * 2010-12-29 2012-07-11 无锡华润矽科微电子有限公司 Digital image scaling method
CN103093418A (en) * 2013-02-21 2013-05-08 深圳市晶日盛科技有限公司 Improved digital image resizing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200219229A1 (en) * 2020-03-18 2020-07-09 Intel Corporation Edge-Aware Upscaling for Improved Screen Content Quality
US11854157B2 (en) * 2020-03-18 2023-12-26 Intel Corporation Edge-aware upscaling for improved screen content quality

Also Published As

Publication number Publication date
CN103093418A (en) 2013-05-08
CN103093418B (en) 2015-08-26

Similar Documents

Publication Publication Date Title
WO2014127665A1 (en) Improved method for digital image scaling
CN110276734B (en) Image distortion correction method and device
US9524539B2 (en) Method for edge-directed adaptive image interpolation and VLSI implementation device for the same
CN110264426B (en) Image distortion correction method and device
CN104217416B (en) Gray level image processing method and its device
CN102665030B (en) Improved bilinear Bayer format color interpolation method
Dengwen An edge-directed bicubic interpolation algorithm
CN110930301B (en) Image processing method, device, storage medium and electronic equipment
EP2898473A1 (en) Systems and methods for reducing noise in video streams
US8610801B2 (en) Image processing apparatus including chromatic aberration correcting circuit and image processing method
JP6172935B2 (en) Image processing apparatus, image processing method, and image processing program
TW201344629A (en) Image processing device and processing method thereof
GB2547842A (en) Image processing device and method, image pickup device, program, and recording medium
TWI549096B (en) Image processing device and processing method thereof
KR101140953B1 (en) Method and apparatus for correcting distorted image
Kim et al. Advanced bilinear image interpolation based on edge features
CN115272068A (en) Efficient interpolation method for image upsampling
JP2014010776A (en) Image processing apparatus, image processing method, and program
CN109325909B (en) Image amplification method and image amplification device
JP4868249B2 (en) Video signal processing device
CN114007074B (en) Method and device for screening intra-frame prediction modes of video frames
JP2016201037A (en) Image processing device, image processing method, and program
JP2010193154A (en) Image processor and method
WO2020181641A1 (en) Image magnification method and image magnification device
Jiang et al. An improved edge-adaptive image scaling algorithm

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13875638

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13875638

Country of ref document: EP

Kind code of ref document: A1