CN101551899B - Image edge detection method and image interpolation method using the method - Google Patents
Image edge detection method and image interpolation method using the method Download PDFInfo
- Publication number
- CN101551899B CN101551899B CN2008100911108A CN200810091110A CN101551899B CN 101551899 B CN101551899 B CN 101551899B CN 2008100911108 A CN2008100911108 A CN 2008100911108A CN 200810091110 A CN200810091110 A CN 200810091110A CN 101551899 B CN101551899 B CN 101551899B
- Authority
- CN
- China
- Prior art keywords
- oblique
- pixel
- pixel column
- fringe region
- edge
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000003708 edge detection Methods 0.000 title abstract description 7
- 238000001514 detection method Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 10
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000000593 degrading effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
Description
技术领域 technical field
本发明是有关于一种去交错方法,且特别是有关于一种去交错方法中的边缘检测方法。The present invention relates to a de-interlacing method, and in particular to an edge detection method in a de-interlacing method.
背景技术 Background technique
提高电视图像的分辨率的一种方式可以将交错(interlaced)的图像转换成循序扫描(progressive-scanned)的图像。在去交错(de-interlace)处理中,为了让分辨率增加,消除图像斜边的锯齿状边缘,往往会在图像中的斜线部分进行斜向的内插处理。One way to increase the resolution of television pictures is to convert interlaced pictures to progressive-scanned pictures. In de-interlacing (de-interlace) processing, in order to increase the resolution and eliminate the jagged edges of the oblique side of the image, oblique interpolation processing is often performed on the oblique line part in the image.
在已知技术中,例如美国专利US6,133,957专利提出一种适应性对角线内插法来提高图像分辨率的方法。在该方法中,取一定的区间内计算不同的角度的像素差值。最后,以差值最小的角度来做为斜线的斜率,并以该斜率再进行内插。In known technologies, for example, US Pat. No. 6,133,957 proposes an adaptive diagonal interpolation method to improve image resolution. In this method, a certain interval is used to calculate pixel difference values at different angles. Finally, the angle with the smallest difference is used as the slope of the slope, and the interpolation is performed based on the slope.
但是,以上的方式并无法准确地掌握图像斜线存在的位置,或者是无法精确地计算斜线的斜率(角度)。在位置或角度不正确下,无法让图像中的锯齿消失,而且分辨率也无法有效地提升,更甚使内插效果降低,而在画面上产生杂线或杂点。However, the above method cannot accurately grasp the position where the slanted line exists in the image, or cannot accurately calculate the slope (angle) of the slanted line. If the position or angle is not correct, the jaggies in the image cannot be eliminated, and the resolution cannot be effectively improved, and even the interpolation effect is reduced, resulting in noise lines or spots on the screen.
因此,研究出一种可以精确且简易的方式来检测图像中的斜线边缘以及其倾斜角度,在提升显示画面的分辨率方面便是当务之急。Therefore, it is urgent to develop an accurate and simple way to detect the oblique edge and its inclination angle in the image in order to improve the resolution of the display image.
发明内容 Contents of the invention
有鉴于上述问题,本发明提出一种图像边缘检测方法,以强化图像分辨率。In view of the above problems, the present invention proposes an image edge detection method to enhance image resolution.
本发明提供一种图像边缘的检测方法,其包括以下步骤。首先,读取图像中三条相邻的第一、第二与第三像素列,并读取各第一、第二与第三像素列中的多个像素值。接着,在第一与第二像素列之间产生至少一个第一斜向边缘区域,且在第二第三像素列之间产生至少一个第二斜向边缘区域。其中,第一与第二斜向边缘区域分别为与之相对应的上下相邻像素列相同行间的各像素值的差值超过边缘临界值,该第一与该第二斜向边缘区域是指上下相邻且具有相同标签的边缘区域。之后,检测第一与第二斜向边缘区域是否有重复部分或相差预定像素点之内。当第一与第二斜向边缘区域之间存在重复部分或相差预定像素点之内,则判断第一与第二斜向边缘区域之间的区域为斜向边缘。The invention provides an image edge detection method, which includes the following steps. Firstly, three adjacent first, second and third pixel columns in the image are read, and multiple pixel values in each of the first, second and third pixel columns are read. Then, at least one first oblique edge area is generated between the first and second pixel columns, and at least one second oblique edge area is generated between the second and third pixel columns. Wherein, the first and second oblique edge regions are respectively the difference between the pixel values of the corresponding upper and lower adjacent pixel columns in the same row exceeding the edge critical value, and the first and the second oblique edge regions are Refers to edge regions that are adjacent up and down and have the same label. Afterwards, it is detected whether the first and second oblique edge regions have overlapping portions or are within a predetermined pixel difference. When there is a repeating part between the first and the second oblique edge area or the difference is within a predetermined pixel point, it is determined that the area between the first and the second oblique edge area is an oblique edge.
根据本发明一实施方式,产生第一斜向边缘区域可以还包括以下步骤。将第一与第二像素列中相同行的各该像素值相减,以产生该第一与该第二像素列间的像素值差。接着,比较该第一与该第二像素列间的像素值差的绝对值是否超过边缘临界值。当超过边缘临界值时,将第一与第二像素列中两像素之间赋予标签。将第一与第二像素列之间,多个彼此相邻且具有该标签的位置定义为第一斜向边缘区域。第二斜向边缘区域的产生为相同的方式,但是以第二和第三像素列的数据来进行。According to an embodiment of the present invention, generating the first oblique edge region may further include the following steps. Each of the pixel values of the same row in the first and second pixel columns is subtracted to generate a pixel value difference between the first and second pixel columns. Next, it is compared whether the absolute value of the pixel value difference between the first and the second pixel columns exceeds an edge threshold. When the edge threshold is exceeded, a label is assigned between two pixels in the first and second pixel columns. Between the first and second pixel columns, a plurality of positions adjacent to each other and having the label are defined as a first oblique edge region. The generation of the second oblique edge region is done in the same way, but with the data of the second and third pixel columns.
此外,本发明还提供一种图像内插方法,其包括以下步骤。首先,读取图像中三条相邻的第一、第二与第三像素列,并读取各第一、第二与第三像素列中的多个像素值。接着,在第一与第二像素列之间产生至少一个第一斜向边缘区域,且在第二第三像素列之间产生至少一个第二斜向边缘区域。其中,第一与第二斜向边缘区域分别为与之相对应的上下相邻像素列相同行间的各像素值的差值超过边缘临界值,该第一与该第二斜向边缘区域是指上下相邻且具有相同标签的边缘区域。之后,检测第一与第二斜向边缘区域是否有重复部分或相差预定像素点之内。当第一与第二斜向边缘区域之间存在重复部分或相差预定像素点之内,则判断第一与第二斜向边缘区域之间的区域为斜线,并为斜向内插区域。之后,分别以第一与第二斜向边缘区域中的特定点的联机,决定该斜线的斜率。在斜向内插区域内,以斜率进行斜向内插处理。此外,在斜向内插区域外,则进行垂直内插处理。In addition, the present invention also provides an image interpolation method, which includes the following steps. Firstly, three adjacent first, second and third pixel columns in the image are read, and multiple pixel values in each of the first, second and third pixel columns are read. Then, at least one first oblique edge area is generated between the first and second pixel columns, and at least one second oblique edge area is generated between the second and third pixel columns. Wherein, the first and second oblique edge regions are respectively the difference between the pixel values of the corresponding upper and lower adjacent pixel columns in the same row exceeding the edge critical value, and the first and the second oblique edge regions are Refers to edge regions that are adjacent up and down and have the same label. Afterwards, it is detected whether the first and second oblique edge regions have overlapping portions or are within a predetermined pixel difference. When there is a repeating part between the first and the second oblique edge area or the difference is within a predetermined pixel point, it is determined that the area between the first and the second oblique edge area is an oblique line and is an oblique interpolation area. Afterwards, the slope of the oblique line is determined according to the connection of specific points in the first and second oblique edge regions. In the oblique interpolation area, oblique interpolation processing is performed with a slope. Also, outside the oblique interpolation area, vertical interpolation is performed.
根据本发明一实施例,上述斜向内插区域为多个彼此重迭或接近的该第一与该第二斜向边缘区域的联集。另外,上述特定点为第一与第二斜向边缘区域中的各第一点、最后一点、或是中间点。According to an embodiment of the present invention, the above-mentioned oblique interpolation area is a union of a plurality of the first and the second oblique edge areas overlapping or close to each other. In addition, the above-mentioned specific point is the first point, the last point, or the middle point of each of the first and second oblique edge regions.
综上所述,依据本发明的方法,通过斜向边缘区域设定,可以更准确地检测出斜向边缘的斜线的位置,而且此方法中,斜向边缘区域隐含斜线斜率的信息,以提供作为斜向内插处理之用,可以使斜向内插处理以更正确的角度来精准地进行。通过本发明的技术,图像的分辨率可以更为加强。In summary, according to the method of the present invention, by setting the oblique edge area, the position of the oblique line of the oblique edge can be detected more accurately, and in this method, the oblique edge area contains information about the slope of the oblique line , to be used as oblique interpolation processing, so that the oblique interpolation processing can be accurately performed at a more correct angle. Through the technology of the present invention, the resolution of the image can be further enhanced.
为让本发明的上述和其它目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附图式,作详细说明如下。In order to make the above and other objects, features and advantages of the present invention more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.
附图说明 Description of drawings
图1绘示用以说明本实施例所使用的斜向边缘区域的说明图。FIG. 1 is an explanatory diagram for illustrating the oblique edge region used in this embodiment.
图2为说明决定斜向边缘存在区域的判断方法示意图。FIG. 2 is a schematic diagram illustrating a judging method for determining a region where an oblique edge exists.
图3绘示出本实施例需要进行斜向内插的区域示意图。FIG. 3 is a schematic diagram of regions requiring oblique interpolation in this embodiment.
图4绘示本实施例检测进行斜向内插的角度的示意图。FIG. 4 is a schematic diagram of detecting angles for oblique interpolation in this embodiment.
图5A、5B绘示本实施例中斜向边缘的斜线的斜率示意图。5A and 5B are schematic diagrams showing the slope of the oblique line towards the edge in this embodiment.
图6为本发明的斜线位置检测方法的流程示意图。FIG. 6 is a schematic flow chart of the oblique line position detection method of the present invention.
[主要元件标号说明][Description of main component labels]
100、102、110、112、114、116、118:斜向边缘区域100, 102, 110, 112, 114, 116, 118: Slanted edge area
L1、L2、L3:相邻线L1, L2, L3: Adjacent lines
I、II重迭区域I, II overlapping area
具体实施方式 Detailed ways
在增加显示图像分辨率中,往往会采用内插的方式,在两两相邻像素之间插入一或多条线,以提升分辨率。在此方式中,图像具有斜线的部分以斜向内差为之,若无则以垂直内差为之。本发明针对斜向内插部分,提出一种可以更有效且精确判断斜线正确位置所在的方法。而且,通过该方法,可以提供更精确的斜线的斜率,使得斜向内插更为精确,分辨率提升效果更佳。When increasing the resolution of a displayed image, an interpolation method is often used to insert one or more lines between two adjacent pixels to improve the resolution. In this way, oblique interpolation is used for the portion of the image with oblique lines, and vertical interpolation is used if there is no part of the image. For the oblique interpolation part, the present invention proposes a method for more effectively and accurately judging the correct position of the oblique line. Moreover, through this method, a more accurate slope of the oblique line can be provided, so that the oblique interpolation is more accurate and the resolution improvement effect is better.
图1绘示用以说明本实施例所使用的斜向边缘区域的说明图。如图1所示,其绘示一个图像信号中其中两条相邻线L1、L2的部分范围的像素值,图中所示的数值即为像素值,其范围可例如0至255。在此图中,所列举的数值仅做为说明之用,并非用以限制本专利范围。FIG. 1 is an explanatory diagram for illustrating the oblique edge region used in this embodiment. As shown in FIG. 1 , it shows the pixel values of two adjacent lines L1 and L2 in an image signal. In this figure, the numerical values listed are for illustration only, and are not intended to limit the scope of this patent.
在本实施例中,斜向边缘区域分为两种,一种为负斜向边缘区域,另一为正斜向边缘区域。接着说明斜向边缘像素与斜向边缘区域的定义。In this embodiment, there are two types of oblique edge regions, one is a negative oblique edge region, and the other is a positive oblique edge region. Next, the definition of oblique edge pixels and oblique edge regions will be described.
首先,在执行本实施例的方法时,会先定义一个边缘临界值,此边缘临界值是用来判断是否做为一个斜边缘像素的基准。此边缘临界值可以依据具体实施时的各种情况来加以设定。在此实施例中,以边缘临界值为10来进行说明,但并非用来限制本发明的实施范围。此边缘临界值主要是判断图像中相邻线中对应的点的像素值差是否足够大以做为斜向边缘像素。Firstly, when the method of this embodiment is executed, an edge threshold value is firstly defined, and the edge threshold value is used as a benchmark for judging whether it is an oblique edge pixel. The edge threshold can be set according to various situations in actual implementation. In this embodiment, an edge threshold value of 10 is used for illustration, but it is not used to limit the implementation scope of the present invention. The edge threshold is mainly to judge whether the pixel value difference of corresponding points in adjacent lines in the image is large enough to be oblique edge pixels.
如图1所示,在两条相邻的线像素资料L1、L2中,下列线L2各像素点Xi(在此例中,i=1-15)的像素值减去上列线L1各对应像素点Xi的像素值,则在各点会得到正与负的像素值差。在此,像素值可以是灰阶值、亮度值、明度值等,或者其它本领域技术人员可以思及的各种适当显示数值。As shown in Figure 1, in two adjacent lines of pixel data L1, L2, the pixel value of each pixel point Xi (in this example, i=1-15) of the following line L2 minus the corresponding pixel value of the upper column line L1 If the pixel value of the pixel point Xi is different, the difference between positive and negative pixel values will be obtained at each point. Here, the pixel value may be a grayscale value, a brightness value, a lightness value, etc., or other various appropriate display values that can be conceived by those skilled in the art.
对于每一像素点Xi而言,当下列线L2的该点像素值小于上列线L1的对应点像素值时,且该差值的绝对值大于上述的边缘临界值,则赋予“-”的标签(tag);反之,若下列线L2的该点像素值大于上列线L1的对应点像素值时,且该差值的绝对值大于上述的边缘临界值,则赋予“+”的标签。在此,标签“+”与“-”仅做为说明之用,可以使用任何可资区分的两种不同标签来做标记,例如以“1”与“0”来替代“+”与“-”等。For each pixel point Xi, when the pixel value of the point on the lower line L2 is smaller than the pixel value of the corresponding point on the upper line L1, and the absolute value of the difference is greater than the above-mentioned edge critical value, the value of "-" is given. Label (tag); on the contrary, if the pixel value of the point on the lower line L2 is greater than the pixel value of the corresponding point on the upper line L1, and the absolute value of the difference is greater than the above-mentioned edge threshold value, then assign the label of "+". Here, the labels "+" and "-" are used for illustration only, and any two different labels that can be distinguished can be used for marking, such as "1" and "0" instead of "+" and "- "wait.
在图1中,对于上下列L1、L2对应的像素点的像素值差为负标签(“-”)的情况,称为负边缘。例如,针对图1中对应行X3的像素点,在列L1的像素值为119,列L2的像素值为96,两者差值为-23,其绝对值大于所设定的临界值10,因此在两列之间赋予“-”标签,即负边缘。另外,多个具有“-”标签的连续负边缘则构成本实施例中所谓的负边缘区域100,如图1中对应行X3至X10所围出的区域。In Fig. 1, for the case where the pixel value difference of the pixel points corresponding to the upper and lower columns L1 and L2 is a negative label ("-"), it is called a negative edge. For example, for the pixel point corresponding to row X3 in Figure 1, the pixel value in column L1 is 119, the pixel value in column L2 is 96, the difference between the two is -23, and its absolute value is greater than the set critical value 10, Hence the "-" label is given between the two columns, i.e. the negative margin. In addition, a plurality of consecutive negative edges with “-” labels constitute the so-called negative edge region 100 in this embodiment, such as the region surrounded by corresponding rows X3 to X10 in FIG. 1 .
反之,对于上下列L1、L2对应的像素点的像素值差为正标签(“+”)的情况,称为正边缘。例如,针对图1中对应行X11的像素点,在列L1的像素值为124,列L2的像素值为167,两者差值为43,其绝对值大于所设定的临界值10,因此在两列之间赋予“+”标签,即正边缘。另外,多个具有“+”标签的连续正边缘则构成本实施例中所谓的正边缘区域102,如图1中对应行X11至X15所围出的区域。Conversely, for the case where the pixel value difference of the pixel points corresponding to the upper and lower columns L1 and L2 is a positive label (“+”), it is called a positive edge. For example, for the pixel point corresponding to row X11 in Figure 1, the pixel value in column L1 is 124, the pixel value in column L2 is 167, the difference between the two is 43, and its absolute value is greater than the set critical value of 10, so Give a "+" label between two columns, i.e. a positive edge. In addition, a plurality of continuous positive edges with “+” labels constitute the so-called positive edge area 102 in this embodiment, such as the area surrounded by corresponding rows X11 to X15 in FIG. 1 .
此外,对应行X1至X2部分的各像素,因为上下列L1、L2的像素值差值的绝对值并未超出边缘临界值10,所以并未赋予标签。In addition, for each pixel corresponding to the row X1 to X2, since the absolute value of the pixel value difference between the upper and lower columns L1 and L2 does not exceed the edge threshold value 10, no label is assigned.
通过以上述方式所决定出来的负边缘区域以及正边缘区域,便可以用来检测出图像中的斜线位置。The negative edge area and the positive edge area determined in the above manner can be used to detect the oblique line position in the image.
接着,说明利用本实施例的方法来标示图像中明显的斜线位置。图2至图4绘示以三条相邻线来说明标示斜向边缘的方法。Next, the use of the method of this embodiment to mark the position of the oblique line in the image will be described. 2 to 4 illustrate the method of marking oblique edges with three adjacent lines.
依据图1所描述的方式,通过三条连续像素列L1、L2、L3的数据,可以产生两条边缘区域的标签。图2绘示X1至X31行的像素,此31行仅做为说明例之用,非用以限制实际实施时的行数目。如图2所示,列L1与列L2的像素数据分别产生负边缘区域110、负边缘区域112以及正边缘区域114。同理,列L2与列L3的像素数据分别产生负边缘区域116以及正边缘区域118。According to the method described in FIG. 1 , through the data of three consecutive pixel columns L1 , L2 , L3 , labels of two edge regions can be generated. FIG. 2 shows the pixels of rows X1 to X31, and the 31 rows are only used for illustrative purposes, and are not used to limit the number of rows in actual implementation. As shown in FIG. 2 , the pixel data of the column L1 and the column L2 generate the
决定出两两相邻像素之间的边缘区域后,接着便是判断两上下相邻的边缘区域之间是否有范围重迭或接近。在此所谓范围有重迭或接近是指上下两相邻边缘区域之间,在对应行的像素点之间具有相同标签的边缘点,亦即上下列之间的像素位置是属同一行。例如图2所示,在行X6-X8的像素之间,列L1和列L2之间的负边缘区域110,以及列L2和列L3之间的负边缘区域116在行X7-X8之间是重迭的,即区域I。同理,在行X19-X23的像素之间,列L1和列L2之间的正边缘区域114,以及列L2和列L3之间的正边缘区域118是重迭的,即区域II。另外,判断是否接近时,可以定出一个临界值来决定两个斜向边缘区域是否属于接近。例如,以相差5个像素点做为判断是否接近基础,点数的决定可以依据实际实施时的状况来加以变更。After determining the edge regions between two adjacent pixels, the next step is to determine whether there is overlap or proximity between the two adjacent edge regions. Here, the so-called overlapping or close range refers to the edge points with the same label between the pixels in the corresponding row between the upper and lower adjacent edge regions, that is, the pixel positions between the upper and lower columns belong to the same row. For example, as shown in FIG. 2, between the pixels of rows X6-X8, the
一旦重迭的范围决定出来,便可以判断有斜向边缘的存在。换句话说,在上下两相邻边缘区域的范围有重迭或接近时,则判定该些边缘区域所在区域的画像为图像中具有斜向边缘。单独存在的边缘区域,即未与其它区域重迭或接近的区域,则判断为不存在斜向边缘。Once the overlapping range is determined, it can be judged that there is an oblique edge. In other words, when the ranges of the upper and lower adjacent edge areas overlap or are close to each other, it is determined that the image of the area where these edge areas are located has an oblique edge in the image. An edge area that exists alone, that is, an area that does not overlap or be close to other areas, is judged to have no oblique edge.
当斜向边缘的存在区域判断出来后,便是要决定(标示)出需要进行斜向内插的区域。图3绘示出本实施例需要进行斜向内插的区域示意图。After the region where the oblique edge exists is determined, it is necessary to determine (mark) the region that needs to be interpolated obliquely. FIG. 3 is a schematic diagram of regions requiring oblique interpolation in this embodiment.
当检测到斜向边缘存在区域后,便是要进行去交错的内插处理。如前面所述,在去交错时,同一图像中斜向边缘存在区域的两列像素之间要进行所谓的斜向内插处理,而不存在斜向边缘区域的两列像素之间要进行所谓的垂直内插处理。因此,必须要再有斜向边缘处标定与该斜向边缘相关联的区域,并且只有在该区域内进行斜向内插处理,而该区域外的部分则进行垂直内插处理;然而,区域外的部分亦可以其它方式进行内插处理。When an area with an oblique edge is detected, de-interlacing is performed. As mentioned above, when de-interlacing, the so-called oblique interpolation process is performed between two columns of pixels in the area where oblique edges exist in the same image, and the so-called interpolation process is performed between two columns of pixels in areas without oblique edges. vertical interpolation processing. Therefore, it is necessary to demarcate the area associated with the oblique edge at the oblique edge, and only oblique interpolation is performed in this area, and the part outside the area is subjected to vertical interpolation; however, the area The outer parts can also be interpolated in other ways.
如图3所示,当如图1与图2的说明,以边缘区域(正、负)决定出斜向边缘位置时,该上下相邻且位置彼此重迭或接近的边缘区域本身已经标示出需要进行斜向内插处理的区域。此内插处理区域即正、负边缘区域的联集。接着,做更进一步说明。As shown in Figure 3, when the oblique edge position is determined by the edge area (positive and negative) as described in Figure 1 and Figure 2, the edge areas adjacent up and down and overlapping or close to each other have already been marked The area that needs to be processed by oblique interpolation. This interpolation processing area is the union of positive and negative edge areas. Next, further explanation will be given.
如上面图2所述,负边缘区域的重迭部分为区域I,因此包括与之接近的负边缘区域110、112与116等均为需要进行斜向内插的区域1。同理,正边缘区域的重迭部分为区域II,因此包括该重迭区域II和与之接近的边缘区域114、118等均为需要进行斜向内插的区域2。图3所示的区域1与区域2的联集,即涵盖行X1至行X31的整个区域均是要进行斜向内插处理。As mentioned above in FIG. 2 , the overlapping part of the negative edge area is the area I, and therefore the adjacent
接着,当斜向内插处理区域决定后,便是要决定出做斜向内插的角度。图4绘示本实施例检测进行斜向内插的角度的示意图。Then, after the oblique interpolation processing area is determined, it is necessary to determine the angle for oblique interpolation. FIG. 4 is a schematic diagram of detecting angles for oblique interpolation in this embodiment.
在检测出斜向边缘的位置以及需要进行斜向内插的区域后,接着要决定该斜向边缘的角度。正确的角度可以使斜向边缘的斜线的锯齿消失,让显示画面更加舒适与清晰,使分辨率得以提升。反之,不正确的角度会降低斜向内插的效果,甚至会在画面上产生错误或杂点,使分辨率变差。After detecting the position of the oblique edge and the area to be interpolated obliquely, the angle of the oblique edge should be determined next. The correct angle can make the jagged edges of the slanted lines disappear, making the display more comfortable and clear, and improving the resolution. Conversely, an incorrect angle will reduce the effect of oblique interpolation, and even produce errors or noise on the screen, degrading the resolution.
在前述步骤中,在检测出的具有斜向边缘的斜线的区域中,相关的上下相邻的边缘区域(例如图2中的114与118)已经包含角度(斜率)的信息。以下将以图4与图5A、5B来进行说明。图4绘示本实施例检测进行斜向内插的角度的示意图。图5A、5B绘示本实施例中斜向边缘的斜线的斜率示意图。In the preceding steps, in the detected oblique line area with an oblique edge, the relevant upper and lower adjacent edge areas (such as 114 and 118 in FIG. 2 ) already contain angle (slope) information. The following will be described with reference to FIG. 4 and FIGS. 5A and 5B . FIG. 4 is a schematic diagram of detecting angles for oblique interpolation in this embodiment. 5A and 5B are schematic diagrams showing the slope of the oblique line towards the edge in this embodiment.
如图4所示,以前述的正边缘区域来说明。图2的重迭区域II为判断存在斜向边缘的斜线的位置。之后,以该重迭区域II为准,上下相邻的相关区域为正边缘区域114和正边缘区域118。由正边缘区域114、118所决定出来的斜线斜度就是边缘区域本身位置的相差距离,也就是此检测到的斜线斜率,或者是上下相关边缘区域相连所形成的角度。因此,在角度决定上,可由以下方式进行。As shown in FIG. 4 , the aforementioned positive edge region is used for illustration. The overlapping area II in FIG. 2 is the location where it is judged that there is a slanted edge. Then, based on the overlapping area II, the upper and lower adjacent related areas are the
如图4所示,以正边缘区域114的第一点(行X19)A和正边缘区域118的第一点(行X9)B为两端点,将点端点A、B连接后得到线AB。此斜线AB便可以决定出斜率。如图5A与5B所示,其简化图4的例示以利说明。由图5A、5B可以更清楚地看出,斜线AB在水平方向相距10个像素点,又因为是两列像素,所以高度为两个像素点。因此,可以获得斜率(角度θ)为5。As shown in FIG. 4 , take the first point (row X19 ) A of the
另外,如上所述的说明,在中心点P左右各5个像素的区间即是要进行斜向内插的区域,而在进行斜向内插时的斜率便是以上述方法所得到的斜线AB的斜率来进行。因此,通过本实施例决定斜向边缘斜线的位置以及斜向内插处理的角度,便可以精准地进行分辨率的强化。In addition, as explained above, the interval of 5 pixels on the left and right of the center point P is the area where oblique interpolation is to be performed, and the slope when performing oblique interpolation is the oblique line obtained by the above method The slope of AB is carried out. Therefore, by determining the position of the oblique edge oblique line and the oblique interpolation angle in this embodiment, the resolution can be enhanced accurately.
在上述的例子中,是以相邻上下两斜向边缘区域中的各第一个点来连接以决定出斜线,进而定出斜率。另外,也可以利用两个斜向边缘区域中的各最后一个点来决定,例如图4所示的点C、D。由图可以看出两斜线AB、CD决定出来的斜率是几乎相同的。另外,也可以取两个斜向边缘区域中的各中间点来决定,或是分别以AB及CD的斜率在两头进行内插,中间的部分则以此二斜率的均值斜率进行内插。In the above example, the oblique line is determined by connecting the first points in the adjacent upper and lower oblique edge regions, and then the slope is determined. In addition, it can also be determined by using the last points in the two oblique edge regions, such as points C and D shown in FIG. 4 . It can be seen from the figure that the slopes determined by the two oblique lines AB and CD are almost the same. In addition, the intermediate points in the two oblique edge regions can also be used for determination, or the slopes of AB and CD are used to interpolate at both ends, and the middle part is interpolated with the average slope of the two slopes.
通过此方式,便可以精确地获得进行斜向内插时所插入像素点的倾斜趋势,而使图像的显示更为精准确实。In this way, it is possible to accurately obtain the inclination trend of the interpolated pixels during the oblique interpolation, so that the display of the image is more accurate and reliable.
图6绘示本实施例的检测斜向边缘的方法以及使用该方法的斜向内插处理的流程示意图。FIG. 6 is a schematic flowchart of a method for detecting oblique edges and oblique interpolation using the method according to the present embodiment.
如图6所示,首先在步骤S100,选择(读取)三条相邻像素列。基本上,一个图像画面有多条水平像素列所构成,在进行本实施例时需要利用三条连续像素列来进行。另外,对于整个画面而言,则以此方式循序读取完所有像素列来进行上面所述的斜向边缘检测以及斜向内插处理,已完成对整个画面的分辨率增加处理。As shown in FIG. 6 , first in step S100 , three adjacent pixel columns are selected (read). Basically, an image frame is composed of a plurality of horizontal pixel columns, and three continuous pixel columns are required to implement this embodiment. In addition, for the whole picture, all pixel columns are sequentially read in this way to perform the oblique edge detection and oblique interpolation processing described above, and the resolution increase process for the whole picture has been completed.
接着,在步骤S102,由上述步骤S100中的两两相邻像素列,产生第一与第二斜向边缘区域。例如,以上述方式,由列L1、L2产生第一斜向边缘区域110、112或114,以及由列L2、L3产生第二斜向边缘区域116、或118。在此,第一与第二斜向边缘区域是指上下相邻且具有相同标签的边缘区域,例如同为正或负。Next, in step S102, first and second oblique edge regions are generated from the two adjacent pixel columns in step S100. For example, in the manner described above, a first
边缘区域的产生方式是将两条像素列的各像素值彼此相减后,在以其绝对值与边缘临界值进行比较,以判断相邻两像素点之间是否存在正或负边缘点。而同列的相邻的正或负边缘点的集合则构成斜向边缘区域。The edge area is generated by subtracting the pixel values of the two pixel columns from each other, and then comparing the absolute value with the edge threshold to determine whether there is a positive or negative edge point between two adjacent pixel points. A set of adjacent positive or negative edge points in the same column constitutes an oblique edge region.
之后,在步骤S104,检测第一斜向边缘区域与第二斜向边缘区域之间是否存在重迭或接近的部分,关于重迭或接近的定义可以参考上述的说明。当第一斜向边缘区域与第二斜向边缘区域之间存在重迭或接近的部分,则可判断该区域内有斜向边缘的斜线存在,到此完成边缘的检测。反之,若第一斜向边缘区域与第二斜向边缘区域之间不存在重迭或接近的部分,则判定为该区域内没有斜向边缘的斜线存在。Afterwards, in step S104 , it is detected whether there is an overlapping or close portion between the first oblique edge region and the second oblique edge region. For the definition of overlapping or proximity, reference may be made to the above description. When there is an overlapping or close portion between the first oblique edge area and the second oblique edge area, it can be determined that oblique lines of oblique edges exist in the area, and the edge detection is completed. On the contrary, if there is no overlapping or close portion between the first oblique edge area and the second oblique edge area, it is determined that there is no oblique line of oblique edge in the area.
接着在步骤S106,利用重迭或接近的斜向边缘,求得需要进行斜向内插处理的区域。将在步骤S104中所决定出的具有重迭或接近的第一与第二斜向边缘区域,设定为需要进行斜向内插处理的区域。亦即,在三条相邻像素列中,所有具有重迭或接近的第一与第二斜向边缘区域进行联集,所涵盖的区域就是该三条像素列中需要进行斜向内插处理的区域。Next, in step S106 , the overlapping or close oblique edges are used to obtain the region requiring oblique interpolation processing. The overlapping or close first and second oblique edge regions determined in step S104 are set as regions requiring oblique interpolation. That is, in the three adjacent pixel columns, all overlapping or close to the first and second oblique edge areas are combined, and the covered area is the area that needs to be subjected to oblique interpolation in the three pixel columns .
接着,步骤S108决定斜向边缘的斜线的斜率(角度)。在步骤S106决定好需要进行斜向内插的区域后,利用上述重迭或接近的第一与第二斜向边缘区域,求取出斜向边缘的斜线的斜率(角度),详细方法可以参见图4与图5A、5B的说明。Next, step S108 determines the slope (angle) of the oblique line to the edge. After step S106 determines the area that needs to be interpolated obliquely, use the above-mentioned overlapping or close first and second oblique edge areas to calculate the slope (angle) of the oblique line of the oblique edge, the detailed method can be found in Description of Figure 4 and Figures 5A, 5B.
最后,在步骤S106决定好的区域中,以所求得的斜率,进行斜向内插处理。亦即,在三条相邻像素列两两之间的需要斜向内插的区域中,以该斜率进行斜向内插处理。另外,在该区域以外的其它部分,则以垂直内插处理进行;然而,区域外的部分亦可以其它方式进行内插处理。藉此,在去交错时的,使分辨率增加,以消除图像斜边的锯齿状边缘。Finally, in the region determined in step S106, oblique interpolation processing is performed using the obtained slope. That is to say, in the region requiring oblique interpolation between two adjacent pixel columns, the oblique interpolation process is performed with the slope. In addition, the other parts outside the area are processed by vertical interpolation; however, the parts outside the area can also be interpolated in other ways. This increases the resolution during deinterlacing to eliminate jagged edges on the slanted sides of the image.
综上所述,依据本发明的方法,通过斜向边缘区域设定,可以更准确地检测出斜向边缘的斜线的位置,而且此方法中,斜向边缘区域隐含斜线斜率的信息,以提供作为斜向内插处理之用,可以使斜向内插处理以更正确的角度来精准地进行。通过本发明的技术,图像的分辨率可以更为加强。In summary, according to the method of the present invention, by setting the oblique edge area, the position of the oblique line of the oblique edge can be detected more accurately, and in this method, the oblique edge area contains information about the slope of the oblique line , to be used as oblique interpolation processing, so that the oblique interpolation processing can be accurately performed at a more correct angle. Through the technology of the present invention, the resolution of the image can be further enhanced.
虽然本发明已以较佳实施例揭露如上,然其并非用以限定本发明,任何本领域技术人员,在不脱离本发明的精神和范围内,当可作些许的更动与润饰,因此本发明的保护范围当视所附的权利要求范围所界定者为准。Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art may make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, this The scope of protection of the invention should be defined by the appended claims.
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008100911108A CN101551899B (en) | 2008-04-02 | 2008-04-02 | Image edge detection method and image interpolation method using the method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008100911108A CN101551899B (en) | 2008-04-02 | 2008-04-02 | Image edge detection method and image interpolation method using the method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101551899A CN101551899A (en) | 2009-10-07 |
CN101551899B true CN101551899B (en) | 2012-06-27 |
Family
ID=41156131
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2008100911108A Expired - Fee Related CN101551899B (en) | 2008-04-02 | 2008-04-02 | Image edge detection method and image interpolation method using the method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101551899B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103136741A (en) * | 2011-12-05 | 2013-06-05 | 联咏科技股份有限公司 | Edge detection method and circuit for fixed pattern |
CN106296614B (en) * | 2016-08-17 | 2019-12-13 | 北京集创北方科技股份有限公司 | Image processing apparatus and image processing method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1406437A (en) * | 2000-12-27 | 2003-03-26 | 松下电器产业株式会社 | Stillness judging device and scanning line interpolating device having it |
US20030076447A1 (en) * | 2002-10-11 | 2003-04-24 | Samsung Electronics Co., Ltd. | Method of edge direction detection based on the correlations between pixels of a vector and an edge direction detection system |
CN101031029A (en) * | 2007-04-04 | 2007-09-05 | 华为技术有限公司 | Method and apparatus for processing video image |
-
2008
- 2008-04-02 CN CN2008100911108A patent/CN101551899B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1406437A (en) * | 2000-12-27 | 2003-03-26 | 松下电器产业株式会社 | Stillness judging device and scanning line interpolating device having it |
US20030076447A1 (en) * | 2002-10-11 | 2003-04-24 | Samsung Electronics Co., Ltd. | Method of edge direction detection based on the correlations between pixels of a vector and an edge direction detection system |
CN101031029A (en) * | 2007-04-04 | 2007-09-05 | 华为技术有限公司 | Method and apparatus for processing video image |
Non-Patent Citations (2)
Title |
---|
JP特開2003-87750A 2003.03.20 |
JP特開2006-270997A 2006.10.05 |
Also Published As
Publication number | Publication date |
---|---|
CN101551899A (en) | 2009-10-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100962801B1 (en) | Image angle detection device and scanning line interpolation device having the same | |
US7391920B2 (en) | Image processing method, apparatus, and program | |
JP2012243307A (en) | Method for detecting strain in input image, device for detecting strain in input image and computer readable medium | |
TWI381732B (en) | Apparatus and method for low angle interpolation | |
US6798422B2 (en) | Method and filtering system for filtering edge directions | |
JP4936108B2 (en) | Apparatus and method for detecting image formation prevention document | |
CN101551899B (en) | Image edge detection method and image interpolation method using the method | |
US20040189866A1 (en) | Method for motion pixel detection | |
US7447383B2 (en) | Directional interpolation method using frequency information and related device | |
US9495728B2 (en) | Method for edge detection, method for motion detection, method for pixel interpolation utilizing up-sampling, and apparatuses thereof | |
US8116572B2 (en) | Method for detecting image edge and image interpolation using the same | |
JP2005341337A (en) | Pixel interpolation discrimination circuit detecting apparatus, pixel interpolation apparatus, and video signal processing apparatus | |
JP2009277001A (en) | Image processor | |
US7215380B2 (en) | Method for detecting video frame types with median filtering | |
CN102196232B (en) | Method for restoring missing lines in interlaced video image | |
US20080111916A1 (en) | Image de-interlacing method | |
US7496231B2 (en) | Color interpolation method | |
JP2009177524A (en) | Scanning line interpolating device and scanning line interpolating method | |
JP4371907B2 (en) | Pixel feature determination device, pixel interpolation device, and video signal processing device | |
CN101536509B (en) | Scanning line interpolating device and scanning line interpolating method | |
CN103024332A (en) | Video de-interlacing method based on edge and motion detection | |
US8358850B2 (en) | Determination method of edge direction | |
CN101729882B (en) | Low-angle interpolation device and method thereof | |
KR100698151B1 (en) | Deinterlacer and method | |
JP2008258980A (en) | Image information processor, and image inclination angle calculation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120627 Termination date: 20150402 |
|
EXPY | Termination of patent right or utility model |