TWI429274B - Image processing system having scaling and sharpness device and method thereof - Google Patents
Image processing system having scaling and sharpness device and method thereof Download PDFInfo
- Publication number
- TWI429274B TWI429274B TW98123423A TW98123423A TWI429274B TW I429274 B TWI429274 B TW I429274B TW 98123423 A TW98123423 A TW 98123423A TW 98123423 A TW98123423 A TW 98123423A TW I429274 B TWI429274 B TW I429274B
- Authority
- TW
- Taiwan
- Prior art keywords
- factor
- image processing
- frequency
- threshold
- input pixels
- Prior art date
Links
Landscapes
- Image Processing (AREA)
Description
本發明係有關於一種影像處理系統及其方法,特別是有關於一種具有縮放與清晰裝置之影像處理系統及其方法。The present invention relates to an image processing system and method thereof, and more particularly to an image processing system having a zooming and sharpening device and a method thereof.
一般而言,傳統的影像處理技術需要縮放(scale)一影像(video image)至任意尺寸大小,常用的方式係將影像分別沿著水平方向與垂直方向個別地(separately)放大,然而此種方式易導致影像品質變差,例如形成鋸齒邊的形狀(jagged edge),稱為階梯狀效應(stairstepping)。In general, the conventional image processing technology needs to scale a video image to any size. The usual way is to separately image the images separately in the horizontal direction and the vertical direction. It is easy to cause image quality deterioration, such as forming a jagged edge, called a stair stepping.
習知技術中,當進行影像縮放處理時,係利用方向性縮放內插(directional scaling interpolation)法來改善影像品質,以減少階梯狀效應。基本上,當對該影像執行該方向性縮放內插法時,該影像具有複數個輸入像素,且依序將每一個輸入像素視為一參考像素時,每一個輸入像素相對應於一個二維視窗(window),例如視窗的維度(dimension)為6×8。當透過原始尺寸的影像重新建立形成一放大影像時,必須在原始的輸入像素之間進行內插(interpolate)處理,以於連續的線段之間形成之升頻取樣(upsampled)像素,並且對原始的輸入像素進行內插法,以於該放大影像插入新的像素。In the prior art, when the image scaling process is performed, the directional scaling interpolation method is used to improve the image quality to reduce the staircase effect. Basically, when the directional scaling interpolation method is performed on the image, the image has a plurality of input pixels, and each input pixel is regarded as a reference pixel in sequence, and each input pixel corresponds to a two-dimensional The window, such as the dimension of the window, is 6×8. When re-establishing an enlarged image through the original size image, an interpolation process must be performed between the original input pixels to form upsampled pixels between successive line segments, and to the original The input pixels are interpolated to insert new pixels into the magnified image.
習知技術中,使用方向性縮放內插法的演算法係藉由分析在影像中輸入像素的局部(local)梯度(gradient)特性,然後依據這些沿著最低頻率方向(lowest frequency direction)或是最小梯度準位之局部梯度特性來執行內插法,以及沿著水平方向或是正交(orthogonal)於該最低頻率方向之局部梯度特性來執行內插法。In the prior art, the algorithm using directional scaling interpolation is to analyze the local gradient characteristics of the input pixels in the image, and then according to these in the lowest frequency direction or The local gradient characteristic of the minimum gradient level is used to perform the interpolation, and the interpolation is performed along the horizontal direction or the local gradient characteristic orthogonal to the lowest frequency direction.
此外,當影像畫面依序播放時,每一影像畫面是由三個維度方向(three dimensional directions)組成,包括垂直方向、水平方向以及時間(temporal)方向(亦即時間基底(time-based)。然而,摻雜於該時間(temporal)方向的雜訊錯誤地影響沿著最低頻率方向的局部梯度特性之計算,因而影響正交於該最低頻率方向的其他方向之決定。因此摻雜該雜訊的輸入像素沿著至少兩個不同的時間方向(正確者只能為同一個時間方向)在一影像畫面中閃爍,例如,於一靜止影像畫面的同一影像區域中,在時間方向”t”的最低頻率方向係由角度”A”決定,但是在時間方向”t+1”的最低頻率方向卻是由角度”B”決定,其中角度”A”與角度”B”兩者不相同,此現象稱為”輕拍(flick)”或是”閃爍(sparkle)”效應,因此當播放影像時,角度”B”與角度”A”兩者的不對等而導致最低頻率方向的偏移,使得輸入像素在相同的影像(不同的時間點,亦即前、後畫面)閃爍。In addition, when the image frames are sequentially played, each image frame is composed of three dimensional directions, including a vertical direction, a horizontal direction, and a temporal direction (ie, a time-based). However, the noise doped in the temporal direction erroneously affects the calculation of the local gradient characteristics along the lowest frequency direction, thus affecting the decision of other directions orthogonal to the lowest frequency direction. Therefore, the noise is doped. The input pixels flash in an image frame along at least two different time directions (the correct one can only be the same time direction), for example, in the same image area of a still image frame, in the time direction "t" The lowest frequency direction is determined by the angle "A", but the lowest frequency direction in the time direction "t+1" is determined by the angle "B", where the angle "A" and the angle "B" are different. It is called "flick" or "sparkle" effect, so when playing an image, the angle "B" and the angle "A" are not equal, resulting in the lowest frequency direction. Move so that the input pixels flash at the same image (different time points, ie, front and back screens).
另外,在習知技術中,對已縮放(scaled)的輸入像素分別在水平方向以及垂直方向進行清晰度處理(sharpness procedure),然而經過清晰度處理的縮放像素的影像品質不佳,例如形成鋸齒邊的形狀(jagged edge)。換言之,當進行清晰度處理時,鋸齒邊的形狀沿著縮放像素的最低頻率方向存在鋸齒邊的形狀,因此需要發展一種新式的影像處理系統,以克服上述之問題。In addition, in the prior art, a sharpness procedure is performed on the scaled input pixels in the horizontal direction and the vertical direction, respectively, but the image quality of the scaled pixels subjected to the sharpness processing is not good, for example, forming a sawtooth. Jagged edge. In other words, when the sharpness processing is performed, the shape of the sawtooth edge has a shape of a jagged edge along the lowest frequency direction of the scaled pixel, and thus it is necessary to develop a new image processing system to overcome the above problem.
本發明之一目的係提供一種具有縮放與清晰裝置之影像處理系統及其方法,以解決影像閃爍的問題。It is an object of the present invention to provide an image processing system having a zooming and sharpening device and method thereof to solve the problem of image flicker.
本發明另一目的係提供一種具有縮放與清晰裝置之影像處理系統及其方法,當進行影像縮放時,對該影像沿著正交於最低頻率方向之方向正確地執行清晰度,以解決影像產生鋸齒邊的形狀(jagged edge)之問題。Another object of the present invention is to provide an image processing system having a zooming and sharpening device and a method thereof. When performing image scaling, the image is correctly decoded in a direction orthogonal to the lowest frequency direction to solve image generation. The problem of jagged edges.
為達成上述目的,本發明提供一種具有縮放與清晰裝置之影像處理系統及其方法,該影像處理系統包括全域頻率偵測裝置、梯度計算總和單元、臨界值調整裝置以及影像混合裝置,該影像混合裝置包括正交角度決定模組、最低頻率決定模組、權重評估單元、第一縮放/清晰模組、第二縮放/清晰模組、雜訊濾波器以及混合單元。To achieve the above object, the present invention provides an image processing system having a zooming and sharpening device and a method thereof, the image processing system including a global frequency detecting device, a gradient calculating sum unit, a threshold adjusting device, and an image mixing device, the image mixing The device includes an orthogonal angle determining module, a minimum frequency determining module, a weight evaluation unit, a first zoom/clear module, a second zoom/clear module, a noise filter, and a mixing unit.
該全域頻率偵測單元用以偵測複數個輸入像素之頻率,以沿著垂直方向計算該些輸入像素的垂直頻率準位,並且沿著水平方向計算該些輸入像素的一水平頻率準位。該梯度計算總和單元分別沿著複數個方向,且依據一部分的該些輸入像素來計算一組梯度亮度準位。該臨界值調整裝置耦接於該全域頻率偵測單元,依據該垂直頻率準位與該水平頻率準位之間的關係調整第一臨限值以及第二臨限值。該影像混合裝置耦接於該梯度計算總和單元,藉由來自臨界值調整裝置的第一臨限值,用以決定正交角度方向,並且藉由來自臨界值調整裝置的第二臨限值,用以決定一最低頻率方向,其中該影像混合裝置形成相關於該正交角度方向之第一圖案,以及形成相關於該最低頻率方向之第二圖案,並且該影像混合裝置依據一權重因數值混合該第一圖案與該第二圖案。The global frequency detecting unit is configured to detect a frequency of the plurality of input pixels to calculate vertical frequency levels of the input pixels along a vertical direction, and calculate a horizontal frequency level of the input pixels along a horizontal direction. The gradient calculation summation unit is respectively along a plurality of directions, and a set of gradient luminance levels is calculated according to a part of the input pixels. The threshold adjustment device is coupled to the global frequency detecting unit, and adjusts the first threshold and the second threshold according to the relationship between the vertical frequency level and the horizontal frequency level. The image mixing device is coupled to the gradient calculation summation unit, by using a first threshold value from the threshold value adjustment device for determining an orthogonal angular direction, and by using a second threshold value from the threshold value adjustment device, Determining a lowest frequency direction, wherein the image mixing device forms a first pattern related to the orthogonal angular direction, and forms a second pattern related to the lowest frequency direction, and the image mixing device is mixed according to a weighting factor value The first pattern and the second pattern.
該全域頻率偵測單元沿著垂直方向全域性地(globally)且概略地(coarsely)計算全部的輸入像素之垂直頻率準位,並且沿著水平方向全域性地(globally)且概略地(coarsely)計算全部的輸入像素之水平頻率準位。亦即相關於該第一臨限值以及該第二臨限值的垂直頻率準位與水平頻率準位係分別沿著垂直方向與水平方向在二維視窗中,以全域性計算全部輸入像素的亮度準位(brightness levels)之絕對差值和(sums of absolute difference),當計算垂直與水平頻率時,每一個輸入像素依序被視為參考像素(reference pixel),以分別對應形成每一個二維視窗,例如視窗的維度(dimension)為6×8。The global frequency detecting unit calculates the vertical frequency levels of all the input pixels globally and coarsely in a vertical direction, and is globally and coarsely along the horizontal direction. Calculate the horizontal frequency level of all input pixels. That is, the vertical frequency level and the horizontal frequency level system related to the first threshold value and the second threshold value are all in the two-dimensional window along the vertical direction and the horizontal direction, and all input pixels are calculated in a global manner. The sum of the difference between the brightness levels, when calculating the vertical and horizontal frequencies, each input pixel is sequentially treated as a reference pixel to form each of the two Dimensional windows, such as the dimension of a window, are 6 x 8.
當權重因數增加時,其內插結果表示輸入像素趨近於最低頻率方向,當權重因數減少時,其內插結果表示輸入像素趨近於正交角度方向。當影像播放時,動態地調整權重因數,以增加或是減少權重因數,以動態修正沿著最低頻率方向與正交角度方向之內插結果,因此來自於雜訊而影響沿著最低頻率方向的內插結果之閃爍效應將可從影像中消除。When the weighting factor is increased, the interpolated result indicates that the input pixel approaches the lowest frequency direction. When the weighting factor decreases, the interpolated result indicates that the input pixel approaches the orthogonal angular direction. When the image is played, the weighting factor is dynamically adjusted to increase or decrease the weighting factor to dynamically correct the interpolation result along the direction of the lowest frequency and the orthogonal angle, thus coming from the noise and affecting the direction along the lowest frequency. The flicker effect of the interpolated results will be removed from the image.
本發明之影像處理方法包括下列步驟:The image processing method of the present invention comprises the following steps:
(a)利用全域頻率偵測裝置以及梯度計算總和單元接收複數個輸入像素。(a) receiving a plurality of input pixels using the global frequency detecting means and the gradient calculating summing unit.
(b)利用全域頻率偵測單元沿著垂直方向以計算該些輸入像素的垂直頻率準位,並且沿著水平方向以計算該些輸入像素的水平頻率準位。(b) using the global frequency detecting unit to calculate the vertical frequency levels of the input pixels along the vertical direction, and to calculate the horizontal frequency levels of the input pixels along the horizontal direction.
(c)利用臨界值調整裝置依據該垂直頻率準位與該水平頻率準位之間的關係調整第一臨限值以及一第二臨限值。(c) adjusting the first threshold and the second threshold according to the relationship between the vertical frequency level and the horizontal frequency level by using a threshold adjustment device.
(d)利用梯度計算總和單元,分別沿著一組方向且依據一部分的該些輸入像素,用以計算一組梯度亮度準位。(d) Calculating a summation unit using a gradient, respectively, along a set of directions and according to a portion of the input pixels, to calculate a set of gradient brightness levels.
(e)利用正交角度決定模組比較該組梯度亮度準位以決定正交方向沿著水平方向或是垂直方向,以利用該第一臨限值形成第一圖案。(e) using an orthogonal angle determining module to compare the set of gradient luminance levels to determine whether the orthogonal direction is along a horizontal direction or a vertical direction to form a first pattern using the first threshold.
(f)利用最低頻率決定模組比較該組梯度亮度準位以決定一最低頻率方向沿著該組方向之一,以利用該第二臨限值形成第二圖案。(f) using the lowest frequency determining module to compare the set of gradient luminance levels to determine a lowest frequency direction along one of the set of directions to form a second pattern using the second threshold.
(g)利用影像混合裝置依據權重因數值混合來自該全域頻率偵測單元的第一圖案與第二圖案,其中該第一圖案相關於第一臨限值,該第二圖案相關於第二臨限值。(g) using the image mixing device to mix the first pattern and the second pattern from the global frequency detecting unit according to the weight factor value, wherein the first pattern is related to the first threshold, and the second pattern is related to the second aspect Limit.
為讓本發明之上述內容能更明顯易懂,下文特舉較佳實施例,並配合所附圖式,作詳細說明如下:In order to make the above-mentioned contents of the present invention more comprehensible, the preferred embodiments are described below, and the detailed description is as follows:
第1圖係依據本發明實施例中影像的複數個輸入像素之示意圖,其中係利用影像處理系統沿著最低頻率方向100以及正交角度方向102對該像素執行方向縮放機制。第1圖顯示目標輸出像素Ptar ,四個中心輸入像素P23,P24,P33,P34環繞該目標輸出像素Ptar 形成一矩形區域,像素Ptar 的亮度準位係藉由計算輸入像素中沿著最低頻率方向100以及正交角度方向102的亮度準位所產生,其中正交角度方向102係為水平方向或是垂直方向,如第1圖所示。影像的維度準位(dimensional level)之視窗大小為6×8,且正交角度方向102係沿著水平方向102,應注意的是,輸入像素的視窗大小(window size)可為任意的維度準位。1 is a schematic diagram of a plurality of input pixels of an image in accordance with an embodiment of the present invention, wherein a direction scaling mechanism is performed on the pixels in the lowest frequency direction 100 and the orthogonal angle direction 102 using an image processing system. Figure 1 shows a target output pixel P tar , four central input pixels P23, P24, P33, P34 forming a rectangular area around the target output pixel P tar , and the brightness level of the pixel P tar is calculated along the input pixel The lowest frequency direction 100 and the brightness level of the orthogonal angular direction 102 are generated, wherein the orthogonal angular direction 102 is horizontal or vertical, as shown in FIG. The size of the image of the dimensional level is 6×8, and the direction of the orthogonal angle 102 is along the horizontal direction 102. It should be noted that the window size of the input pixel can be any dimension. Bit.
影像的輸入像素之標識如第1圖所示,以位於視窗左上角的像素P00作為參考位置座標,目標輸出像素Ptar 為已知,以相對於參考像素P23表示,其中參考像素P23係位於矩形區域的左上角,一般而言,目標輸出像素Ptar 的座標值為非正整數(non-integer)。The input pixel of the image is identified as shown in FIG. 1 , and the pixel P00 located in the upper left corner of the window is used as the reference position coordinate, and the target output pixel P tar is known to be represented with respect to the reference pixel P23, wherein the reference pixel P23 is located in the rectangle. In the upper left corner of the area, in general, the coordinate value of the target output pixel P tar is a non-integer.
依據本發明的方向縮放機制(directional scaling mechanism)之方向內插演算法(directional interpolation algorithm),最終內插結果(final interpolation result),如公式E1所示:According to the directional scaling algorithm of the directional scaling mechanism of the present invention, the final interpolation result is as shown in the formula E1:
目標輸出像素Ptar 的最終內插結果(final interpolation result)=(intp_min)* (weighting factor value)+(intp_cross)*(1-weighting factor value).........(E1)Final interpolation result of target output pixel P tar = (intp_min) * (weighting factor value) + (intp_cross) * (1-weighting factor value)... (E1)
其中intp_min係為沿著最低頻率方向的內插值,且intp_cross係為沿著正交角度方向的內插值,其中正交角度方向係為水平方向或是垂直方向任一,且最低頻率方向為除了正交角度方向以外的方向角度。影像的最低頻率方向以及正交角度方向係選自複數個梯度方向(gradient directions),主要是沿著各種方向角度計算輸入像素的亮度水平來決定該些梯度方向,如第2A圖所示。Where intp_min is the interpolated value along the lowest frequency direction, and intp_cross is the interpolated value along the orthogonal angular direction, wherein the orthogonal angular direction is either horizontal or vertical, and the lowest frequency direction is except positive Angle of direction other than the angle of intersection. The lowest frequency direction and the orthogonal angular direction of the image are selected from a plurality of gradient directions, and the brightness levels of the input pixels are calculated along various angles to determine the gradient directions, as shown in FIG. 2A.
在第1圖以及第2F圖最低頻率方向100之實施例中,內插結果”intp_min”係由中間點m0至m5的內插來決定,其中m0至m5可視為最低頻率方向的虛擬像素(virutal pixel),這些中間點的連線104通過目標輸出像素Ptar 且垂直於最低頻率方向,亦即最低頻率方向100,中間點m0至m5由像素P22,P22,P14,P31,P23,P15,P32,P24,P33,P25P42,P34,P26,P43,以及P35沿著最低頻率方向100的內插值決定。同樣地,在第1圖以及第2C圖正交角度方向102之實施例中,內插結果”intp_cross”係由中間點m0至m5的內插來決定,其中m0至m5可視為正交角度方向的虛擬像素(virtual pixel),這些中間點的連線104通過該目標輸出像素Ptar 且垂直於最低頻率方向,亦即正交角度方向102,如第2C圖所示,中間點m0至m5由像素P31,P21,P32,P22,P43,P33,P23,P13,P44,P34P24,P14,P35,P25,P36以及P26沿著最低頻率方向100的內插值決定。因此可利用內插結果”intp_min”與內插結果”intp_cross”來決定該目標輸出像素Ptar 。In the embodiment of the first and second F-picture lowest frequency directions 100, the interpolation result "intp_min" is determined by interpolation of intermediate points m0 to m5, where m0 to m5 can be regarded as virtual pixels in the lowest frequency direction (virutal) Pixel), the line 104 of these intermediate points passes through the target output pixel P tar and is perpendicular to the lowest frequency direction, that is, the lowest frequency direction 100, and the intermediate points m0 to m5 are pixels P22, P22, P14, P31, P23, P15, P32 , P24, P33, P25P42, P34, P26, P43, and P35 are determined by interpolation values in the lowest frequency direction 100. Similarly, in the embodiment of the orthogonal angle direction 102 of FIG. 1 and FIG. 2C, the interpolation result "intp_cross" is determined by interpolation of the intermediate points m0 to m5, where m0 to m5 can be regarded as orthogonal angular directions. Virtual pixel, the line 104 of these intermediate points passes through the target output pixel P tar and is perpendicular to the lowest frequency direction, that is, the orthogonal angle direction 102, as shown in FIG. 2C, the intermediate points m0 to m5 are Pixels P31, P21, P32, P22, P43, P33, P23, P13, P44, P34P24, P14, P35, P25, P36 and P26 are determined along the interpolated value in the lowest frequency direction 100. Therefore, the target output pixel P tar can be determined by using the interpolation result "intp_min" and the interpolation result "intp_cross".
第2A圖係依據本發明實施例中相關於輸入像素的複數個梯度方向之示意圖,其中當影像處理系統執行縮放影像步驟時,可決定最低頻率方向以及正交角度方向。最低頻率方向與正交角度方向係分別選自該些梯度方向,例如該些梯度方向為方向”0”至方向”9”,應注意的是,依據不同數量的輸入像素之視窗的排列,該梯度方向的數量可大於或是小於方向”0”至方向”9”之十個方向。2A is a schematic diagram of a plurality of gradient directions associated with an input pixel in accordance with an embodiment of the present invention, wherein when the image processing system performs the scaling image step, the lowest frequency direction and the orthogonal angular direction may be determined. The lowest frequency direction and the orthogonal angle direction are respectively selected from the gradient directions, for example, the gradient directions are the direction “0” to the direction “9”, and it should be noted that according to the arrangement of the windows of different numbers of input pixels, The number of gradient directions may be greater than or less than ten directions from the direction "0" to the direction "9".
在一實施例中,沿著最低頻率方向的梯度準位係為最小亮度變化量,且在該最低頻率方向中,該最小梯度準位以一組沿著右側平面的亮度梯度準位以及左側平面的亮度梯度準位之計算產生,其中該右側平面的亮度梯度準位包括方向”1”、”3”、”5”以及”7”,該左側平面的亮度梯度準位包括方向”2”、”4”、”6”以及”8”,熟習此項技術者應注意的是,依據影像的輸入像素之排列大小,該最小亮度變化量的可由大於上述八個方向數量來作選擇。沿著正交角度的梯度準位係選自複數個亮度梯度準位之一,且該亮度梯度準位係以正交角度方向(例如方向”0”與方向”9”)之計算產生。In an embodiment, the gradient level along the lowest frequency direction is the minimum brightness change amount, and in the lowest frequency direction, the minimum gradient level is a set of brightness gradient levels along the right side plane and the left side plane The calculation of the brightness gradient level is generated, wherein the brightness gradient level of the right side plane includes directions "1", "3", "5", and "7", and the brightness gradient level of the left side plane includes the direction "2", "4", "6" and "8", those skilled in the art should note that depending on the arrangement size of the input pixels of the image, the minimum brightness variation can be selected by the number of the above eight directions. The gradient level along the orthogonal angle is selected from one of a plurality of luminance gradient levels, and the luminance gradient level is generated by calculation of orthogonal angular directions (eg, direction "0" and direction "9").
第2B-2G圖係依據本發明實施例中計算亮度差異的絕對值總和之示意圖,其中該亮度差異係指各對輸入像素之間沿著不同的梯度方向的亮度差異值。The 2B-2G diagram is a schematic diagram for calculating the sum of absolute values of luminance differences according to an embodiment of the present invention, wherein the luminance difference refers to a luminance difference value between different pairs of input pixels along different gradient directions.
如第2B圖所示,沿著方向”9”(水平方向),亮度梯度準位(brightness gradient level)的絕對差值(absolute difference)總和(sum)係利用公式E2計算產生:As shown in Fig. 2B, along the direction "9" (horizontal direction), the absolute difference sum (sum) of the brightness gradient level is calculated by the formula E2:
S0=|P14-P13|+|P23-P22|+|P24-P23|+|P25-P24|+|P33-P32|+|P34-P33|+|P35-P34|+|P44-P43|.........(E2)S0=|P14-P13|+|P23-P22|+|P24-P23|+|P25-P24|+|P33-P32|+|P34-P33|+|P35-P34|+|P44-P43|. ........(E2)
如第2C圖所示,沿著方向”0”(垂直方向),亮度梯度準位(brightness gradient level)的絕對差值(absolute difference)總和係利用公式E3計算產生:As shown in Fig. 2C, along the direction "0" (vertical direction), the sum of the absolute differences of the brightness gradient levels is calculated using the formula E3:
S9=|P32-P22|+|P43-P33|+|P33-P23|+|P23-P13|+|P44-P34|+|P34-P24|+|P24-P14|+|P35-P25|.........(E3)S9=|P32-P22|+|P43-P33|+|P33-P23|+|P23-P13|+|P44-P34|+|P34-P24|+|P24-P14|+|P35-P25|. ........(E3)
如第2D圖所示,沿著方向”1”,亮度梯度準位(brightness gradient level)的絕對差值(absolute difference)總和係利用公式E4計算產生:As shown in Fig. 2D, along the direction "1", the sum of the absolute differences of the brightness gradient levels is calculated using the formula E4:
S1=|P32-P13|+|P42-P23|+|P33-P14|+|P43-P24|+|P34-P15|+|P44-P25|.........(E4)S1=|P32-P13|+|P42-P23|+|P33-P14|+|P43-P24|+|P34-P15|+|P44-P25|.........(E4)
如第2E圖所示,沿著方向”3”,亮度梯度準位(brightness gradient level)的絕對差值(absolute difference)總和係利用公式E5計算產生:As shown in Fig. 2E, along the direction "3", the sum of the absolute differences of the brightness gradient levels is calculated using the formula E5:
S3=|P32-P23|+|P23-P14|+|P42-P33|+|P33-P24|+|P24-P15|+|P43-P34|+|P34-P25|.........(E5)S3=|P32-P23|+|P23-P14|+|P42-P33|+|P33-P24|+|P24-P15|+|P43-P34|+|P34-P25|....... ..(E5)
如第2F圖所示,沿著方向”7”,亮度梯度準位(brightness gradient level)的絕對差值(absolute difference)總和係利用公式E6計算產生:As shown in Figure 2F, along the direction "7", the sum of the absolute differences of the brightness gradient levels is calculated using Equation E6:
S5=|P22-P14|+|P31-P23|+|P23-P15|+|P32-P24|+|P33-P25|+|P42-P34|+|P34-P26|+|P43-P35|.........(E6)S5=|P22-P14|+|P31-P23|+|P23-P15|+|P32-P24|+|P33-P25|+|P42-P34|+|P34-P26|+|P43-P35|. ........(E6)
如第2G圖所示,沿著方向”7”,亮度梯度準位(brightness gradient level)的絕對差值(absolute difference)總和係利用公式E7計算產生:As shown in Fig. 2G, along the direction "7", the sum of the absolute differences of the brightness gradient levels is calculated using Equation E7:
S7=|P22-P15|+|P30-P23|+|P23-P16|+|P31-P24|+|P24-P17|+|P32-P25|+|P40-P33|+|P33-P26|+|P41-P34|+|P34-P27|.........(E7)S7=|P22-P15|+|P30-P23|+|P23-P16|+|P31-P24|+|P24-P17|+|P32-P25|+|P40-P33|+|P33-P26|+ |P41-P34|+|P34-P27|.........(E7)
由於”2”、”4”、”6”以及”8”分別對稱於”1”、”3”、”5”以及”7”,如第2A圖所示,因此沿著方向”2”、”4”、”6”以及”8”的亮度梯度準位的絕對差值總和S2、S4、S6以及S8可利用上述公式E4至E7之亮度梯度準位的絕對差值總和S1、S3、S5以及S7計算產生。依據計算的亮度梯度準位的絕對差值總和,沿著最低頻率方向的梯度準位係為選自S1、S2、S3、S4、S5、S6、S7以及S8的最小亮度變化值,如上述公式E4至E7所述。同樣地,沿著正交角度方向的梯度準位係為選自S0以及S9的最小亮度變化值Since "2", "4", "6", and "8" are respectively symmetric with respect to "1", "3", "5", and "7", as shown in Fig. 2A, therefore, along the direction "2", The sum of the absolute differences of the luminance gradient levels of "4", "6", and "8", S2, S4, S6, and S8 can use the sum of the absolute differences of the luminance gradient levels of the above formulas E4 to E7, S1, S3, and S5. And the S7 calculation is generated. According to the sum of the absolute differences of the calculated brightness gradient levels, the gradient level along the lowest frequency direction is the minimum brightness change value selected from S1, S2, S3, S4, S5, S6, S7, and S8, as in the above formula. E4 to E7. Similarly, the gradient level along the orthogonal angular direction is the minimum brightness change value selected from S0 and S9.
第3圖係依據本發明實施例中影像處理系統300之方塊圖。該影像處理系統300包括全域頻率偵測單元(global frequency detecting unit)302、梯度計算總和單元(gradient-calculating summation unit)304、臨界值調整裝置(threshold-adjusting device)306以及影像混合裝置(image blending device)308,該全域頻率偵測單元302耦接於該臨界值調整裝置306,該梯度計算總和單元304耦接於該影像混合裝置308,該臨界值調整裝置306耦接於該影像混合裝置308。該影像混合裝置308還包括正交角度決定模組310、最低頻率決定模組312、權重估算單元314、第一縮放/清晰模組316、第二縮放/清晰模組318、雜訊濾波器320以及混合單元322。該梯度計算總和單元304分別耦接於該正交角度決定模組310、最低頻率決定模組312以及權重估算單元314,該第一縮放/清晰模組316耦接該正交角度決定模組310至該混合單元322,該第二縮放/清晰模組318耦接該最低頻率決定模組312至該混合單元322,該雜訊濾波器320耦接該權重估算單元314至該混合單元322。Figure 3 is a block diagram of an image processing system 300 in accordance with an embodiment of the present invention. The image processing system 300 includes a global frequency detecting unit 302, a gradient-calculating summation unit 304, a threshold-adjusting device 306, and an image blending device. The global frequency detecting unit 302 is coupled to the threshold adjusting device 306. The gradient calculating unit 304 is coupled to the image mixing device 308. The threshold adjusting device 306 is coupled to the image mixing device 308. . The image mixing device 308 further includes an orthogonal angle determining module 310, a lowest frequency determining module 312, a weight estimating unit 314, a first zooming/clearing module 316, a second zooming/clearing module 318, and a noise filter 320. And a mixing unit 322. The gradient calculation summation unit 304 is coupled to the orthogonal angle determination module 310, the lowest frequency determination module 312, and the weight estimation unit 314. The first zoom/clear module 316 is coupled to the orthogonal angle determination module 310. To the mixing unit 322 , the second zooming/clearing module 318 is coupled to the lowest frequency determining module 312 to the mixing unit 322 , and the noise filter 320 is coupled to the weight estimating unit 314 to the mixing unit 322 .
該全域頻率偵測單元302用以偵測複數個輸入像素之頻率,以沿著一垂直方向計算該些輸入像素的一垂直頻率準位,並且沿著一水平方向計算該些輸入像素的一水平頻率準位,其中該些輸入像素之一被指定為參考像素,以形成二維視窗。梯度計算總和單元304,分別沿著複數個方向例如方向”0”至方向”9”,且依據一部分的該些輸入像素,用以計算一組梯度亮度準位,如第2A圖所示。臨界值調整裝置304依據來自該全域頻率偵測單元302的垂直頻率準位與該水平頻率準位之間的關係調整第一臨限值以及第二臨限值。首先,該影像混合裝置308藉由來自該臨界值調整裝置306的第一臨限值,用以決定正交角度方向,並且藉由來自該臨界值調整裝置306的第二臨限值,用以決定最低頻率方向,其中該影像混合裝置308形成相關於該正交角度方向之第一圖案,以及形成相關於該最低頻率方向之第二圖案,並且該影像混合裝置依據一權重因數值(weighting factor value)混合該第一圖案與該第二圖案。在本發明中,第一臨限值係儲存於該臨界值調整裝置306之暫存器的值,且相關於該正交角度決定模組310,並可被調整;第二臨限值係儲存於該臨界值調整裝置306之暫存器的值,且相關於該最低頻率決定模組312,並可被調整。The global frequency detecting unit 302 is configured to detect a frequency of the plurality of input pixels to calculate a vertical frequency level of the input pixels along a vertical direction, and calculate a level of the input pixels along a horizontal direction. Frequency level, wherein one of the input pixels is designated as a reference pixel to form a two-dimensional window. The gradient calculation summation unit 304, respectively, along a plurality of directions, such as direction "0" to direction "9", and based on a portion of the input pixels, is used to calculate a set of gradient luminance levels, as shown in FIG. 2A. The threshold adjustment device 304 adjusts the first threshold and the second threshold according to the relationship between the vertical frequency level from the global frequency detecting unit 302 and the horizontal frequency level. First, the image mixing device 308 is used to determine the orthogonal angle direction by using the first threshold value from the threshold value adjusting device 306, and is used by the second threshold value from the threshold value adjusting device 306. Determining a lowest frequency direction, wherein the image mixing device 308 forms a first pattern associated with the orthogonal angular direction and forms a second pattern associated with the lowest frequency direction, and the image mixing device is based on a weighting factor Value) mixing the first pattern with the second pattern. In the present invention, the first threshold is stored in the value of the register of the threshold adjusting device 306, and is related to the orthogonal angle determining module 310, and can be adjusted; the second threshold is stored. The value of the register of the threshold adjusting device 306 is related to the lowest frequency determining module 312 and can be adjusted.
該全域頻率偵測單元302沿著垂直方向以全域(globally)及粗略(coarsely)計算全部輸入像素(total input pixels)的垂直頻率準位以及沿著水平方向以全域性地(globally)及粗略地(coarsely)計算全部輸入像素(total input pixels)的水平頻率準位。亦即在二維視窗中沿著垂直方向以及水平方向,根據全部輸入像素的亮度準位之絕對差值總和,以全域性計算相關於該第一臨界值以及第二臨界值之垂直頻率準位與水平頻率準位,當計算該垂直與水平頻率準位時,每一輸入頻率被視為一參考像素(reference pixel),以形成一個二維視窗,例如是6×8。The global frequency detecting unit 302 calculates the vertical frequency levels of all input pixels globally and coarsely in a vertical direction and globally and roughly along the horizontal direction. (coarsely) Calculate the horizontal frequency level of all input pixels. That is, in the two-dimensional window, along the vertical direction and the horizontal direction, the vertical frequency level related to the first critical value and the second critical value is calculated globally according to the sum of the absolute differences of the luminance levels of all the input pixels. With the horizontal frequency level, when calculating the vertical and horizontal frequency levels, each input frequency is treated as a reference pixel to form a two-dimensional window, for example, 6x8.
第一縮放/清晰模組316依據垂直方向或是水平方向之一,以執行一方向性縮放(directional scaling)與清晰化(sharpness)步驟,第二縮放/清晰模組318依據最低頻率方向(除了垂直方向以及水平方向以外),以執行一方向性縮放(directional scaling)與清晰化(sharpness)步驟。The first zoom/clear module 316 performs one directional scaling and sharpness steps according to one of a vertical direction or a horizontal direction, and the second zoom/clear module 318 is based on the lowest frequency direction (except The vertical direction and the horizontal direction are performed to perform a directional scaling and sharpness step.
請繼續參考第1圖以及上述公式E1,當權重因數增加時,該內插結果表示該些輸入像素趨向於該最低頻率方向,當權重因數減少時,該內插結果表示該些輸入像素趨向於該正交(cross-angle)角度方向,當該影像播放時,動態(dynamically)調整該權重因數值(weighting factor value),亦即增加或是減少該權重因數值(weighting factor value),使得沿著最低頻率方向以及正交角度方向的內插結果可被動態修正,因此由於沿著最低頻率方向的雜訊干擾而影響內插結果之閃爍(sparkles)現象可於該影像中濾除(filtered)。Referring to FIG. 1 and the above formula E1, when the weighting factor is increased, the interpolation result indicates that the input pixels tend to the lowest frequency direction, and when the weighting factor is decreased, the interpolation result indicates that the input pixels tend to The cross-angle angle direction dynamically adjusts the weighting factor value when the image is played, that is, increases or decreases the weighting factor value, so that the edge The interpolation results in the lowest frequency direction and the orthogonal angle direction can be dynamically corrected, so that the sparkles that affect the interpolation result due to noise interference along the lowest frequency direction can be filtered in the image. .
請參考第1圖以及第3圖,全域頻率偵測單元302進一步包括垂直頻率偵測單元302a以及水平頻率偵測單元302b,該垂直頻率偵測單元302a沿著垂直方向計算相關於該全部輸入像素的垂直頻率準位,該水平頻率偵測單元302b沿著水平方向計算相關於該全部輸入像素的水平頻率準位,其中該水平頻率準位”hsum(n,m)”表示為下列公式(E8),該垂直頻率準位”vsum(n,m)”表示為下列公式(E9):Referring to FIG. 1 and FIG. 3, the global frequency detecting unit 302 further includes a vertical frequency detecting unit 302a and a horizontal frequency detecting unit 302b. The vertical frequency detecting unit 302a calculates the relevant input pixels along the vertical direction. a vertical frequency level, the horizontal frequency detecting unit 302b calculates a horizontal frequency level related to the entire input pixel along a horizontal direction, wherein the horizontal frequency level "hsum(n, m)" is expressed as the following formula (E8) ), the vertical frequency level "vsum(n,m)" is expressed as the following formula (E9):
此處,”n”與”m”係為參考像素指標(reference pixel indexes),分別表示列位置(row)指標以及行位置(column),且該參考像素係為二維視窗中之一輸入像素,其中”i”為相關於該參考像素指標”n”之列指標(row index),”j”為相關於該參考像素指標”m”之行指標(column index),reg_hedge_th1及reg_vedge_th1為頻率臨界值(frequency threshold),符號”min”表示該些總和中最小值且符號”abs”表示亮度準位的絕對差值之總和。依據公式(E8)以及(E9),每一輸入像素被視為參考像素,且每一參考像素對應於一個二維視窗,例如6×8視窗尺寸,使得可利用公式(E8)以及(E9)計算產生沿著垂直方向的垂直頻率準位以及沿著水平方向的垂直頻率準位。Here, "n" and "m" are reference pixel indexes, which respectively represent a column position indicator and a column position, and the reference pixel is one input pixel in the two-dimensional window. Where "i" is the column index associated with the reference pixel index "n", "j" is the column index associated with the reference pixel index "m", and reg_hedge_th1 and reg_vedge_th1 are frequency thresholds The value "frequency", the symbol "min" indicates the minimum of the sums and the symbol "abs" indicates the sum of the absolute differences of the brightness levels. According to the formulas (E8) and (E9), each input pixel is regarded as a reference pixel, and each reference pixel corresponds to a two-dimensional window, for example, a 6×8 window size, so that formulas (E8) and (E9) can be utilized. The calculation produces a vertical frequency level along the vertical direction and a vertical frequency level along the horizontal direction.
臨界值調整裝置306依據該水平頻率準位”hsum(n,m)”與該垂直頻率準位”vsum(n,m)”之間的關係調整第一臨限值以及第二臨限值,以控制正交角度決定模組310以及最低頻率決定模組312,使得該正交角度決定模組310以及該最低頻率決定模組312分別正確地(precisely)決定正交角度方向以及最低頻率方向,該正交角度決定模組310的計算結果之範例如下所述。The threshold adjustment device 306 adjusts the first threshold and the second threshold according to the relationship between the horizontal frequency level "hsum(n, m)" and the vertical frequency level "vsum(n, m)", The orthogonal angle determining module 310 and the lowest frequency determining module 312 are controlled so that the orthogonal angle determining module 310 and the lowest frequency determining module 312 respectively determine the orthogonal angular direction and the lowest frequency direction correctly. An example of the calculation result of the orthogonal angle determining module 310 is as follows.
當該水平頻率準位大於該垂直頻率準位,相關於該輸入像素的正交角度方向趨近於該垂直方向,而當該垂直頻率準位大於該水平頻率準位,相關於該輸入像素的正交角度方向趨近於該水平方向。最低頻率方向係為相關於輸入像素的最小亮度變化之方向。在一實施例中,該垂直頻率偵測單元302a為高通(high-pass)濾波器,且水平頻率偵測單元302b為高通(high-pass)濾波器,該臨界值調整裝置306決定該水平頻率準位”hsum(n,m)”與該垂直頻率準位”vsum(n,m)”之間的五種關係範例。When the horizontal frequency level is greater than the vertical frequency level, an orthogonal angle direction associated with the input pixel approaches the vertical direction, and when the vertical frequency level is greater than the horizontal frequency level, associated with the input pixel The orthogonal angular direction approaches the horizontal direction. The lowest frequency direction is the direction of the minimum brightness change associated with the input pixel. In an embodiment, the vertical frequency detecting unit 302a is a high-pass filter, and the horizontal frequency detecting unit 302b is a high-pass filter, and the threshold adjusting device 306 determines the horizontal frequency. An example of five relationships between the level "hsum(n, m)" and the vertical frequency level "vsum(n, m)".
在第一範例中,當該水平頻率準位”hsum(n,m)”大於一最大水平臨界值(maximum horizontal threshold)且該垂直頻率準位”vsum(n,m)”小於一最小垂直臨界值(minimum vertical threshold),則相關於該全部輸入像素的正交角度方向全域性地(globally)趨近於垂直方向(亦即低頻方向),亦即垂直方向為確定的低頻方向,其預設值之正交的絕對差值總和臨限值(dscale_sad_cross_th)為最大的值,且正交因數(dscale_sad_cross factor)為最小的值。其中正交因數(dscale_sad_cross_factor)可由設置於該臨界值調整裝置306之正交因數暫存器(register)讀取。當正交因數(dscale_sad_cross factor)為較小值,正交值(cross alpha)(亦即沿著正交方向的權重因數值)減少。正交的絕對差值總和(sums of absolute difference,SAD)臨限值(dscale_sad_cross_th)可由設置於該臨界值調整裝置306之正交的絕對差值總和暫存器讀取,當正交絕對差值總和臨限值為較大值時,該正交值(cross alpha)(亦即沿著正交方向的權重因數值)減少。正交值(cross_alpha)減少代表選取垂直方向為正交角度方向機會變大。In the first example, when the horizontal frequency level "hsum(n, m)" is greater than a maximum horizontal threshold (the maximum horizontal threshold) and the vertical frequency level "vsum(n, m)" is less than a minimum vertical threshold (minimum vertical threshold), the orthogonal angular direction of the entire input pixel is globally approaching to the vertical direction (ie, the low frequency direction), that is, the vertical direction is the determined low frequency direction, and the preset is The absolute difference sum of the values (dscale_sad_cross_th) is the largest value, and the orthogonal factor (dscale_sad_cross factor) is the smallest value. The orthogonality factor (dscale_sad_cross_factor) can be read by a quadrature factor register set in the threshold adjustment device 306. When the orthogonal factor (dscale_sad_cross factor) is a small value, the cross alpha (that is, the weight factor value along the orthogonal direction) is reduced. The orthogonal sum of the absolute difference (SAD) threshold (dscale_sad_cross_th) may be read by the orthogonal absolute sum sum register set in the threshold adjusting means 306, when the orthogonal absolute difference When the sum threshold is a large value, the cross alpha (i.e., the weight factor value along the orthogonal direction) is reduced. The decrease in the orthogonal value (cross_alpha) means that the chance of selecting the vertical direction as the orthogonal angle becomes larger.
在第二範例中,當該垂直頻率準位”vsum(n,m)”大於一最大垂直平臨界值(maximum vertical threshold)且該水平頻率準位”hsum(n,m)”小於一最小水平臨界值(minimum horizontal threshold),則相關於該全部輸入像素的正交角度方向全域性地(globally)趨近於水平方向(亦即低頻方向),亦即水平方向為確定的低頻方向,其正交的絕對差值總和臨限值(dscale_sad_cross_th)為最小的值,且正交因數(dscale_sad_cross factor)為最大的值。其中正交因數(dscale_sad_cross_factor)可由設置於該臨界值調整裝置306之正交因數暫存器(register)讀取。當正交因數(cross factor)為較大值,正交值(cross alpha)增加。正交的絕對差值總和(sums of absolute difference,SAD)臨限值(dscale_sad_cross_th)可由設置於該臨界值調整裝置306之正交的絕對差值總和暫存器讀取,當正交絕對差值總和臨限值為較小值時,該正交值(cross alpha)(亦即沿著正交方向的權重因數值)增加。正交值(cross_alpha)增加代表選取水平方向為正交角度方向的機會變大。In the second example, when the vertical frequency level "vsum(n, m)" is greater than a maximum vertical threshold and the horizontal frequency level "hsum(n, m)" is less than a minimum level The minimum horizontal angle is globally related to the horizontal direction (ie, the low frequency direction), that is, the horizontal direction is the determined low frequency direction, and the positive direction is positive. The absolute difference sum threshold (dscale_sad_cross_th) of the intersection is the smallest value, and the orthogonal factor (dscale_sad_cross factor) is the largest value. The orthogonality factor (dscale_sad_cross_factor) can be read by a quadrature factor register set in the threshold adjustment device 306. When the cross factor is a large value, the cross alpha increases. The orthogonal sum of the absolute difference (SAD) threshold (dscale_sad_cross_th) may be read by the orthogonal absolute sum sum register set in the threshold adjusting means 306, when the orthogonal absolute difference When the sum threshold is a small value, the cross alpha (i.e., the weight factor value along the orthogonal direction) increases. An increase in the orthogonal value (cross_alpha) means that the chance of selecting the horizontal direction as the orthogonal angle direction becomes larger.
在第三範例中,當該垂直頻率準位”vsum(n,m)”大於一最大垂直平臨界值(maximum vertical threshold)且該水平頻率準位”hsum(n,m)”大一最大水平臨界值(maximum horiaontal threshold),則相關於該全部輸入像素處於棋盤式(check board)狀態,在此狀況時,該水平方向或是垂直方向並未被確定為低頻方向,此時以垂直方向視為低頻方向之預設值,設定的方式如上述第一範例所述。正交因數(dscale_sad_cross_factor)可由設置於該臨界值調整裝置306之正交因數暫存器(register)讀取,正交的絕對差值總和(sums of absolute difference,SAD)臨限值(dscale_sad_cross_th)可由設置於該臨界值調整裝置306之正交的絕對差值總和暫存器讀取。In the third example, when the vertical frequency level "vsum(n, m)" is greater than a maximum vertical threshold and the horizontal frequency level "hsum(n, m)" is a maximum level The threshold (maximum horiaontal threshold) is related to the fact that all the input pixels are in a check board state. In this case, the horizontal direction or the vertical direction is not determined as the low frequency direction, and the vertical direction is viewed at this time. For the preset value in the low frequency direction, the setting is as described in the first example above. The orthogonal factor (dscale_sad_cross_factor) can be read by the orthogonal factor register set in the threshold adjusting device 306, and the sum of absolute difference (SAD) threshold (dscale_sad_cross_th) can be The orthogonal absolute difference sum set in the threshold adjustment means 306 is read by the register.
在第四範例中,在不滿足上述三個範例條件之下,當該垂直頻率準位”vsum(n,m)”是該水平頻率準位”hsum(n,m)”的數倍大,則相對於該垂直方向而言,相關於該全部輸入像素的正交角度方向趨近於水平方向(亦即低頻方向),亦即水平方向為低頻方向(但是不若上述第二範例來得確定),故其正交的絕對差值總和臨限值(dscale_sad_cross_th)為較小的值,且正交因數(dscale_sad_cross factor)為較大的值,使得水平方向被選取為最後正交角度方向的機會變大。In the fourth example, when the above three exemplary conditions are not satisfied, when the vertical frequency level "vsum(n, m)" is a multiple of the horizontal frequency level "hsum(n, m)", With respect to the vertical direction, the orthogonal angular direction associated with the entire input pixel approaches the horizontal direction (ie, the low frequency direction), that is, the horizontal direction is the low frequency direction (but not determined by the second example above) Therefore, the orthogonal absolute difference sum threshold (dscale_sad_cross_th) is a small value, and the orthogonal factor (dscale_sad_cross factor) is a larger value, so that the horizontal direction is selected as the opportunity change of the last orthogonal angle direction. Big.
在第五範例中,相關於該全部輸入像素的正交角度方向趨近於預設方向,亦即垂直方向,但是其強度不如上述之第一範例與第三範例,故其正交的絕對差值總和臨限值(dscale_sad_cross_th)為較大的值,且正交因數(dscale_sad_cross factor)為較小的值,使得垂直方向被選取為最後正交角度方向的機會變大。In the fifth example, the orthogonal angular direction of the all input pixels approaches the preset direction, that is, the vertical direction, but the intensity is not as good as the first example and the third example described above, so the orthogonal absolute difference The value sum threshold (dscale_sad_cross_th) is a larger value, and the orthogonal factor (dscale_sad_cross factor) is a smaller value, so that the chance that the vertical direction is selected as the last orthogonal angle direction becomes larger.
如上述範例所述,根據全域性的水平頻率準位”hsum(n,m)”與該垂直頻率準位”vsum(n,m)”之值,故即使影像中的一部份的像素受到雜訊的影響,該雜訊仍然無法改變該輸入像素的全域性梯度(以正交角度方向來說)。As described in the above example, according to the global horizontal frequency level "hsum(n, m)" and the vertical frequency level "vsum(n, m)", even if a part of the pixels in the image are subjected to Due to the effects of noise, the noise still cannot change the global gradient of the input pixel (in the direction of the orthogonal angle).
請繼續參考第2A圖以及第3圖,正交角度決定模組310依據第一臨限值沿著垂直方向或是水平方向之一,用以決定第一圖案(pattern)。最低頻率決定模組312依據第二臨限值沿著一組方向中之任一方向(垂直方向以及水平方向除外),用以決定第二圖案(pattern)。Referring to FIG. 2A and FIG. 3 , the orthogonal angle determining module 310 determines one of the first patterns according to the first threshold value in one of the vertical direction or the horizontal direction. The lowest frequency decision module 312 determines the second pattern according to the second threshold value in any one of a set of directions (excluding the vertical direction and the horizontal direction).
在一實施例中,該正交角度決定模組310利用下列的程式片段來決定正交值(cross alpha)、正交角度(cross angle)以及正交絕對差值總和(cross SAD):In one embodiment, the orthogonal angle decision module 310 uses the following program segments to determine the cross alpha, the cross angle, and the cross absolute difference (cross SAD):
根據上述程式,當沿著方向”9”(水平方向)的SAD(sad[i][j][9])與正交的絕對差值總和(sums of absolute difference,SAD)臨限值(dscale_sad_cross_th)之和小於或是等於沿著方向”0”(垂直方向)的SAD(sad[i][j][0]),正交值(cross alpha)可由上述之公式E10計算產生,因此可計算出沿著方向”9”的正交值(cross alpha),否則產生沿著方向”0”的正交值(cross alpha)。利用該臨界值調整裝置306決定正交因數(cross factor)(dscale_sad_cross_factor)。當正交值(cross alpha)大於或是等於正交臨限值(cross alpha threshold)(reg_dscale_cross_alpha_th),則正交角度(cross_angle)沿著方向”9”;否則正交角度(cross_angle)沿著方向”0”。當沿著方向”9”的SAD值小於沿著方向”0”的SAD值,正交絕對差值總和(cross SAD,cross_sad)為沿著方向”0”的SAD;否則正交絕對差值總和(cross SAD,cross_sad)為沿著方向”9”的SAD。因此,正交角度決定模組310可決定沿著正交角度方向的正交值(cross alpha)、正交角度(cross angle)以及正交絕對差值總和(cross SAD)。According to the above procedure, SAD (sad[i][j][9]) along the direction "9" (horizontal direction) and the sum of the absolute difference (SAD) threshold (dscale_sad_cross_th) The sum of the sum is less than or equal to SAD (sad[i][j][0]) along the direction "0" (vertical direction), and the cross alpha can be calculated by the above formula E10, so it can be calculated A cross alpha along the direction "9" is produced, otherwise a cross alpha along the direction "0" is generated. The threshold value adjusting means 306 determines a cross factor (dscale_sad_cross_factor). When the cross alpha is greater than or equal to the cross alpha threshold (reg_dscale_cross_alpha_th), the orthogonal angle (cross_angle) is along the direction "9"; otherwise the orthogonal angle (cross_angle) is along the direction "0". When the SAD value along the direction "9" is smaller than the SAD value along the direction "0", the orthogonal absolute difference sum (cross SAD, cross_sad) is the SAD along the direction "0"; otherwise the sum of the orthogonal absolute differences (cross SAD, cross_sad) is the SAD along the direction "9". Thus, the orthogonal angle decision module 310 can determine the cross alpha, the cross angle, and the cross absolute difference (cross SAD) along the orthogonal angular direction.
如第2A圖所示,依據垂直方向”0”,具有方向”0”至方向”9”的視窗(例如3×7視窗尺寸)分區分成兩個平面。該最低頻率決定模組312依據位於右側平面的4個方向”1”、”3”、”5”以及”7”與位於左側平面的4個方向”2”、”4”、”6”以及”8”決定最低頻率。As shown in Fig. 2A, the window having the direction "0" to the direction "9" (e.g., the 3 x 7 window size) partition is divided into two planes according to the vertical direction "0". The lowest frequency decision module 312 is based on four directions "1", "3", "5", and "7" in the right plane and four directions "2", "4", "6" in the left plane, and "8" determines the lowest frequency.
依據右側平面的4個方向”1”、”3”、”5”以及”7”,該最低頻率決定模組312決定最小的SAD值(min_sad_r)及其對應的方向指標(min_angle_r),並且決定第二小SAD值(min_sad_r_2nd)及其對應的方向指標(min_angle_r_2nd);同樣地,依據左側平面的4個方向”2”、”4”、”6”以及”8”,該最低頻率決定模組312決定最小的SAD值(min_sad_l)及其對應的方向指標(min_angle_l),並且決定第二小SAD值(min_sad_l_2nd)及其對應的方向指標(min_angle_l_2nd)。此外,該最低頻率決定模組312計算右側平面的4個方向”1”、”3”、”5”以及”7”的輸入像素之SAD總和(sumsad_r),並且計算左側平面的4個方向”2”、”4”、”6”以及”8”的輸入像素之SAD總和(sumsad_l)。According to the four directions "1", "3", "5" and "7" of the right plane, the lowest frequency decision module 312 determines the minimum SAD value (min_sad_r) and its corresponding direction indicator (min_angle_r), and determines The second small SAD value (min_sad_r_2nd) and its corresponding direction indicator (min_angle_r_2nd); similarly, according to the four directions "2", "4", "6" and "8" of the left plane, the lowest frequency determining module 312 determines a minimum SAD value (min_sad_l) and its corresponding direction indicator (min_angle_l), and determines a second small SAD value (min_sad_l_2nd) and its corresponding direction indicator (min_angle_l_2nd). In addition, the lowest frequency decision module 312 calculates the SAD sum (sumsad_r) of the input pixels of the four directions "1", "3", "5", and "7" in the right plane, and calculates the four directions of the left plane" The SAD sum (sumsad_l) of the input pixels of 2", "4", "6", and "8".
該最低頻率決定模組312比較右側平面的最小的SAD值(min_sad_r)與左側的最小的SAD值(min_sad_l),以選擇最小的SAD值及其對應的方向指標,以作為最小的SAD值(min_sad_lr)以及最低頻率方向(min_angle)。在一實施例中,該最低頻率決定模組312進一步藉由(min_sad_l)、(min_sad_l_2nd)、(min_sad_r)以及(min_sad_r_2nd)來決定第二小SAD值及其對應的方向指標,亦即當該最小SAD值以及最低頻率方向初步求得之後,該最低頻率決定模組312利用最低頻率方向及其鄰近的第二小角度方向以輔助決定該最小SAD值以及最低頻率方向是否確實為最小(minimum)。The lowest frequency decision module 312 compares the smallest SAD value (min_sad_r) of the right plane with the smallest SAD value (min_sad_l) of the left side to select the smallest SAD value and its corresponding direction indicator as the minimum SAD value (min_sad_lr ) and the lowest frequency direction (min_angle). In an embodiment, the lowest frequency decision module 312 further determines the second small SAD value and its corresponding direction indicator by (min_sad_l), (min_sad_l_2nd), (min_sad_r), and (min_sad_r_2nd), that is, when the minimum After the SAD value and the lowest frequency direction are initially determined, the lowest frequency decision module 312 utilizes the lowest frequency direction and its second small angular direction to assist in determining whether the minimum SAD value and the lowest frequency direction are indeed minimum.
基本上,當該最低頻率決定模組312選定該右側平面以及左側平面之間的最小的SAD值及其相對應的方向指標,以作為最小的SAD值以及最低頻率方向時,以下數個準則可以作為選定標準:Basically, when the lowest frequency determining module 312 selects the minimum SAD value between the right side plane and the left side plane and its corresponding direction indicator as the minimum SAD value and the lowest frequency direction, the following criteria may be As a selection criterion:
此處,在準則D3的運算子”?”表示當(min_sad_1>min_sad_r)成立時,其結果為min_sad_1>=min_sad_r*dscale_lr_ratio1,否則其結果min_sad_r>=min_sad_1*dscale_lr_ratio1。同樣地,在準則D4、D5以及其他的公式之運算子”?”亦具有相同的意義。Here, the operator "?" in the criterion D3 indicates that when (min_sad_1>min_sad_r) is established, the result is min_sad_1>=min_sad_r*dscale_lr_ratio1, otherwise the result min_sad_r>=min_sad_1*dscale_lr_ratio1. Similarly, the operators "?" in the criteria D4, D5, and other formulas have the same meaning.
當準則D1以及D3滿足時,min_sad_1與min_sad_r之間的差值足以決定較小的SAD值以及最小的角度方向,而在一些情況之下當該差值不足以決定時,可以利用準則D2以及D4作初步判斷的條件,在這些情況,利用準則D5來決定較小的SAD值以及最小的角度方向,準則D5係指當最低頻率方向趨近於右側平面的方向或是左側平面的方向,其對應的最低頻率方向之平面側的SAD值總和應遠小於另一平面側。當min_sad_1與min_sad_r之間的差值同時滿足準則D1以及D3,或是同時滿足準則D2、D4以及D5,則min_sad_1與min_sad_r之間較小的SAD值及其對應的角度方向即為最小的SAD值以及最低頻率方向;否則,該最小的SAD值被設定為絕對最大值且該最低頻率方向可被忽略。When the criteria D1 and D3 are satisfied, the difference between min_sad_1 and min_sad_r is sufficient to determine a smaller SAD value and a minimum angular direction, and in some cases, when the difference is not sufficient to determine, the criteria D2 and D4 can be utilized. In the case of preliminary judgment, in these cases, the criterion D5 is used to determine the smaller SAD value and the minimum angular direction, and the criterion D5 refers to the direction in which the lowest frequency direction approaches the right plane or the direction of the left plane, which corresponds to The sum of the SAD values on the plane side of the lowest frequency direction should be much smaller than the other plane side. When the difference between min_sad_1 and min_sad_r satisfies the criteria D1 and D3 at the same time, or both the criteria D2, D4 and D5 are satisfied, the smaller SAD value between min_sad_1 and min_sad_r and the corresponding angular direction are the minimum SAD values. And the lowest frequency direction; otherwise, the minimum SAD value is set to an absolute maximum and the lowest frequency direction can be ignored.
在一實施例中,臨界值調整裝置306依據全域頻率偵測單元302的偵測結果動態改變上述準則D1制D5的臨限值,以決定最小的SAD值及其對應的最低頻率方向。如上所述,利用全域頻率偵測單元302計算產生的五種範例之第1、2及3種範例中,臨界值調整裝置306調整準則D1與D5之臨限值至較大值,並且令該最低頻率決定模組312的選擇受限制。視窗6×8的全域梯度方向在第1、2範例中趨進於垂直方向或是水平方向;在第3範例中,垂直方向以及水平方向存在較高的頻率成分(component)。本發明在此三個範例中有效調整臨限值以避免選到錯誤的最低頻率方向。權重估算單元314計算最低頻率方向的權重因數(weighting factor),該權重估算單元314估算4個因數以決定該權重因數值,該權重因數值係為第一因數、第二因數、第三因數以及第四因數之總和,如下所述。In an embodiment, the threshold adjustment device 306 dynamically changes the threshold of the criterion D1 to D5 according to the detection result of the global frequency detection unit 302 to determine the minimum SAD value and its corresponding lowest frequency direction. As described above, in the first, second, and third examples of the five examples generated by the global frequency detecting unit 302, the threshold adjusting means 306 adjusts the thresholds of the criteria D1 and D5 to a larger value, and causes the The selection of the lowest frequency decision module 312 is limited. The global gradient direction of the window 6×8 tends to be vertical or horizontal in the first and second examples; in the third example, there are higher frequency components in the vertical direction and the horizontal direction. The present invention effectively adjusts the threshold in these three examples to avoid selecting the wrong lowest frequency direction. The weight estimating unit 314 calculates a weighting factor in the lowest frequency direction, and the weight estimating unit 314 estimates four factors to determine the weighting factor value, which is the first factor, the second factor, the third factor, and The sum of the fourth factors is as follows.
第一因數係由沿著正交角度方向以及最低頻率方向的SAD值決定,該第一因數由下列公式E11表示:The first factor is determined by the SAD value along the orthogonal angular direction and the lowest frequency direction, the first factor being represented by the following formula E11:
factor1=(min_sad_cross-min_sad_lr-reg_dscale_sad_margin)/min_sad_lr*reg_dscale_sad_factor1;...(E11)Factor1=(min_sad_cross-min_sad_lr-reg_dscale_sad_margin)/min_sad_lr*reg_dscale_sad_factor1;...(E11)
此處,”reg_dscale_sad_margin”以及”reg_dscale_sad_factor1”係由臨界值調整裝置306決定。該第一因數正比於沿著正交角度方向與最低頻率方向之間的SAD差值。當第一因數增加時,趨近於最低頻率方向且權重因數值增加。Here, "reg_dscale_sad_margin" and "reg_dscale_sad_factor1" are determined by the threshold value adjusting means 306. The first factor is proportional to the SAD difference between the orthogonal angular direction and the lowest frequency direction. As the first factor increases, it approaches the lowest frequency direction and the weight factor increases.
第二因數係由左側平面與右側平面的SAD值之總和來決定,該第二因數由下列公式E12表示:The second factor is determined by the sum of the SAD values of the left and right planes, which is represented by the following formula E12:
If(min_angle_lr==1||min_angle_lr==3||mi_angle_lr=5||min_angle_lr==7)//min_angle_lr為右平面方向If(min_angle_lr==1||min_angle_lr==3||mi_angle_lr=5||min_angle_lr==7)//min_angle_lr is the right plane direction
factor2=(sum_sad_1-sum_sad_r*reg_dscale_sad_factor_2)/(sum_sad_r+1);else//min_angle_lr為左平面方向Factor2=(sum_sad_1-sum_sad_r*reg_dscale_sad_factor_2)/(sum_sad_r+1);else//min_angle_lr is the left plane direction
factor 2=(sum_sad_r-sum_sad_1*reg_dscale_sad_factor_2)/(sum_sad_1+1);...(E12)Factor 2=(sum_sad_r-sum_sad_1*reg_dscale_sad_factor_2)/(sum_sad_1+1);...(E12)
當factor 2為正數(positive)時,最低頻率方向”min_angle_lr”為左側平面之方向或是右側平面之方向,係以比較sumsad_l與sumsad_r之結果作判斷,否則factor2為負值(negative)。當第二因數愈大,表示找到的方向趨近於最低頻率方向。When factor 2 is positive, the lowest frequency direction "min_angle_lr" is the direction of the left plane or the direction of the right plane. It is judged by comparing the results of sumsad_l and sumsad_r, otherwise factor2 is negative. The larger the second factor, the direction found is approaching the lowest frequency direction.
第三因數係相關於沿著最低頻率方向的最小SAD值,該第三因數由下列公式E13表示:The third factor is related to the minimum SAD value along the lowest frequency direction, which is represented by the following formula E13:
factor3=(min_sad_lr_reg_dscale_sad_max)*reg_dscale_sad_factor3;...(E13)Factor3=(min_sad_lr_reg_dscale_sad_max)*reg_dscale_sad_factor3;...(E13)
此處,”reg_dscale_sad_max”以及”reg_dscale_sad_factor3”係由臨界值調整裝置306決定。當第三因數增加時,權重因數減少。Here, "reg_dscale_sad_max" and "reg_dscale_sad_factor3" are determined by the threshold value adjusting means 306. As the third factor increases, the weighting factor decreases.
第四因數用於辨識沿著最低頻率方向的最小的SAD值是否具有第二小的SAD值(相較於該最小的SAD值)。該第四因數由下列程式片斷表示:The fourth factor is used to identify whether the smallest SAD value along the lowest frequency direction has a second small SAD value (compared to the minimum SAD value). This fourth factor is represented by the following program fragment:
此處,”reg_dscale_sad_factor4_1”以及”reg_dscale_sad_factor4_2”係由臨界值調整裝置306決定。Here, "reg_dscale_sad_factor4_1" and "reg_dscale_sad_factor4_2" are determined by the threshold value adjusting means 306.
請參考第2F圖,第2F圖係依據本發明實施例中沿著一最低頻率方向來決定梯度準位。縮放濾波器(scaler filter)可由公式:fscaler (phase)=[a0 a1 a2 a3]表示,其中a0,a1,a2以及a3係為窗函數濾波器(windowed-sinc filter)的係數(coefficients)。Please refer to FIG. 2F. FIG. 2F determines the gradient level along a lowest frequency direction according to an embodiment of the present invention. A scaler filter can be represented by the formula: f scaler (phase) = [a0 a1 a2 a3], where a0, a1, a2, and a3 are coefficients of a windowed-sinc filter.
清晰濾波器(sharpness filter)可由公式:fsharp (gain)=[-12-1]*gain+[010]=[s0 s1 s2]表示,其中增益表示清晰度的程度,且[-12-1]為一種清晰濾波器。The sharpness filter can be expressed by the formula: f sharp (gain)=[-12-1]*gain+[010]=[s0 s1 s2], where the gain represents the degree of sharpness, and [-12-1] Is a clear filter.
因此,本發明結合窗函數濾波器(windowed-sinc filter)與清晰增益,更新的係數可由下列公式表示:fsharp_scaler (phase,gain)=convolution(fscale (phase),fsharp (gain))=convolution([a0 a1 a2 a3],[s0,s1,s2])=[a0’,a1’,a2’,a3’,a4’,a5];以及intp_min=interpolation(fsharp_scaler (phase,gain),m0,m1,m2,m3,m4,m5)=a0’*m0+a1’*m1+a2’*m2+a3’*m3+a4’*m4+a5’*m5。Therefore, the present invention combines a windowed-sinc filter with a sharp gain, and the updated coefficient can be expressed by the following formula: f sharp_scaler (phase,gain)=convolution(f scale (phase),f sharp (gain))= Convolution([a0 a1 a2 a3],[s0,s1,s2])=[a0',a1',a2',a3',a4',a5]; and intp_min=interpolation(f sharp_scaler (phase,gain), M0, m1, m2, m3, m4, m5) = a0'*m0+a1'*m1+a2'*m2+a3'*m3+a4'*m4+a5'*m5.
此處,清晰度增益相關於m1至m4中最大值與最小值之間差值,應注意的是,中間點(intermediate points)m0,m1,m2,m3,m4以及m5相關於目標輸出像素Ptar ,中間點m0至m5可視為虛擬像素(virtual pixel),這些中間點的連線104通過目標輸出像素Ptar ,且該連線垂直於最低頻率方向。Here, the sharpness gain is related to the difference between the maximum and minimum values in m1 to m4. It should be noted that the intermediate points m0, m1, m2, m3, m4, and m5 are related to the target output pixel P. Tar , the intermediate points m0 to m5 can be regarded as virtual pixels, and the line 104 of these intermediate points passes through the target output pixel P tar , and the line is perpendicular to the lowest frequency direction.
特定而言,在第2F圖的最低頻率方向100,內插結果”intp_min”係由中間點m0至m5的內插計算所決定。中間點的連線104通過目標輸出像素Ptar ,並且垂直於最低頻率方向,亦即最低頻率方向。中間點m0至m5係由像素的內插計算所決定,在一實施例中,中間點m0至m5可表示為下列公式。Specifically, in the lowest frequency direction 100 of the 2Fth diagram, the interpolation result "intp_min" is determined by the interpolation calculation of the intermediate points m0 to m5. The line 104 of the intermediate point passes through the target output pixel P tar and is perpendicular to the lowest frequency direction, that is, the lowest frequency direction. The intermediate points m0 to m5 are determined by interpolation calculation of pixels, and in an embodiment, the intermediate points m0 to m5 can be expressed as the following formula.
m0=P14*d0+P22*(1-d0);d0=distance(m0,P22)/distance(P22,P14);M0=P14*d0+P22*(1-d0); d0=distance(m0,P22)/distance(P22,P14);
m1=P23*d1+P31*(1-d1);d1=distance(m1,P31)/distance(P31,P23);M1=P23*d1+P31*(1-d1);d1=distance(m1,P31)/distance(P31,P23);
m2=P24*d2+P32*(1-d2);d2=distance(m2,P32)/distance(p32,P24);M2=P24*d2+P32*(1-d2);d2=distance(m2,P32)/distance(p32,P24);
m3=P25*d3+P33*(1-d3);d3=distance(m3,P33)/distance(P33,P25);M3=P25*d3+P33*(1-d3); d3=distance(m3,P33)/distance(P33,P25);
m4=P34*d4+P42*(1-d4);d4=distance(m4,P42)/distance(P42,P34);以及M4=P34*d4+P42*(1-d4); d4=distance(m4,P42)/distance(P42,P34);
m5=P35*d5+P43*(1-d5);d5=distance(m5,P43)/distance(P43,P35)。M5=P35*d5+P43*(1-d5); d5=distance(m5, P43)/distance(P43, P35).
此處,d0至d5表示距離比值,例如距離比值d0等於(m0,P22)的距離與(P22,P14)的距離兩者之比值。同樣地,d1至d5可利用像素與中間點之間的距離比值來計算,因此可決定縮放濾波器(scaler filter)與清晰濾波器(sharpness filter)的內插結果”intp_min”。應注意的是,除了第2C圖以及第2G圖使用上述公式之外,其他圖式的不同方向亦適用上述之公式。Here, d0 to d5 represent the distance ratio, for example, the distance ratio d0 is equal to the ratio of the distance of (m0, P22) to the distance of (P22, P14). Similarly, d1 to d5 can be calculated using the ratio of the distance between the pixel and the intermediate point, and thus the interpolation result "intp_min" of the scaler filter and the sharpness filter can be determined. It should be noted that, in addition to the above formulas in the 2Cth and 2Gth drawings, the above formulas are also applicable to different directions of other patterns.
為降低習知技術中清晰濾波器所產生的鋸齒邊形狀之效應,本發明之影像處理系統結合一維清晰濾波器至縮放濾波器中,其中該一維清晰濾波器係用在正交於該正交角度(cross-angle)方向以及正交於該最低頻率(minimum-angle)方向。In order to reduce the effect of the sawtooth edge shape generated by the clear filter in the prior art, the image processing system of the present invention incorporates a one-dimensional clear filter to the scaling filter, wherein the one-dimensional clear filter is used to be orthogonal to the A cross-angle direction and an orthogonal to the minimum-angle direction.
該混合單元322依據權重因數值混合一正交角度方向之圖案以及一最低頻率方向之圖案。The mixing unit 322 mixes a pattern of orthogonal angular directions and a pattern of a lowest frequency direction according to weighting factor values.
根據上述,本發明之具有縮放/清晰裝置之影像處理系統,以解決影像的鋸齒邊形狀之效應以及閃爍問題。此外,當該些輸入像素沿著垂直於該低頻方向進行縮放時,該具有縮放/清晰裝置之影像處理系統正確地且同時對該輸入像素執行清晰處理步驟。According to the above, the image processing system of the present invention having a zoom/sharp device solves the effect of the sawtooth edge shape of the image and the flicker problem. Moreover, when the input pixels are scaled perpendicular to the low frequency direction, the image processing system with the zoom/sharp device performs the clear processing steps on the input pixels correctly and simultaneously.
在第2F圖中,沿著最低頻率方向的內插結果以”intp_min’表示,其中intp_min=interpolation(fsharp_scaler (Phasemin ,Gainmin ),m0,m1,m2,m3,m4,m5),fsharp_scaler 函數輸出相對應於特定縮放相位Phasemin 的係數及其最低頻率方向的清晰增益(sharpness gain)Gainmin ,換言之,藉由中間點m0,m1,m2,m3,m4以及m5,的權重和(weighting sum)產生”intp_min”,並且產生由目標輸出像素Ptar 至該些輸入像素的任一中間點的清晰增益(sharpness gain)Gainmin 以及縮放相位Phasemin 。In Fig. 2F, the interpolation result along the lowest frequency direction is represented by "intp_min", where intp_min = interpolation (f sharp_scaler (Phase min , Gain min ), m0, m1, m2, m3, m4, m5), f The sharp_scaler function outputs a sharpness gain Gain min corresponding to a coefficient of a specific zoom phase Phase min and its lowest frequency direction, in other words, a weight sum by the intermediate points m0, m1, m2, m3, m4, and m5, Weighting sum) produces "intp_min" and produces a sharpness gain Gain min and a zoom phase Phase min from the target output pixel P tar to any intermediate point of the input pixels.
請參考第2C圖,第2C圖係依據本發明實施例中沿著一正交角度方向來決定梯度準位。沿著正交角度方向的內插結果表示為”intp_cross”,其中intp_cross=interpolation(fsharp_scaler (PHASEcross ,GAINcross ),c0,c1,c2,c3,c4,c5),fsharp_scaler 函數輸出相對應於特定縮放相位PHASEcross 的係數及其正交角度方向的清晰增益(sharpness gain)GAINcross 。換言之,藉由中間點c0,c1,c2,c3,c4以及c5,的權重和(weighting sum)產生”intp_cross”,並且產生由目標輸出像素Ptar 至該些輸入像素的任一中間點的清晰增益(sharpness gain)GAINcross 以及縮放相位Phasemin 。Referring to FIG. 2C, FIG. 2C determines the gradient level along an orthogonal angle direction in accordance with an embodiment of the present invention. The result of the interpolation along the orthogonal angle direction is expressed as "intp_cross", where intp_cross=interpolation(f sharp_scaler (PHASE cross , GAIN cross ), c0, c1, c2, c3, c4, c5), the output of the f sharp_scaler function corresponds The coefficient of the specific zoom phase PHASE cross and its sharpness gain GAIN cross . In other words, "intp_cross" is generated by the weighting sum of the intermediate points c0, c1, c2, c3, c4, and c5, and the clearness from the target output pixel P tar to any intermediate point of the input pixels is generated. Sharpness gain GAIN cross and zoom phase Phase min .
影像混合裝置308的雜訊濾波器320用於偵側最低頻率方向是否正確,當最低頻率方向不正確時,該雜訊濾波器320能夠修正該權重因數值。特定來說,將該權重因數值減去梳型因數(comb factor),以減少該權重因數值,參考第4圖,第4圖係依據本發明實施例中四個相關於目標像素Ptar 之像素示意圖,其中該四個像素形成的一矩形區域包圍該目標像素Ptar 。The noise filter 320 of the image mixing device 308 is configured to detect whether the lowest frequency direction is correct. When the lowest frequency direction is incorrect, the noise filter 320 can correct the weight factor value. Specifically, the weight factor value is subtracted from the comb factor to reduce the weight factor value. Referring to FIG. 4, FIG. 4 is related to the target pixel P tar according to the embodiment of the present invention. A pixel diagram in which a rectangular area formed by the four pixels surrounds the target pixel P tar .
當梳型因數(comb factor)增加時,像素Ptar 的亮度準位會偏離P23,P24,P33以及P34,此種情形表示最低頻率方向可能不正確,內插結果趨近於正交角度方向,像素Ptar 的內插結果與沿著正交角度方向以及最低頻率方向之值混合。利用內插的像素P23,P24,P33以及P34產生像素Pa(up_y),Pb(dn_y),Pc(1f_y),Pd(rt_y),其中Pa、Pb為垂直方向偵測,Pc、Pd為水平方向偵測。When the comb factor increases, the luminance level of the pixel P tar may deviate from P23, P24, P33 and P34. This case indicates that the lowest frequency direction may be incorrect, and the interpolation result approaches the orthogonal angle direction. The interpolation result of the pixel P tar is mixed with values along the orthogonal angular direction and the lowest frequency direction. Pixels P23, P24, P33 and P34 are used to generate pixels Pa(up_y), Pb(dn_y), Pc(1f_y), Pd(rt_y), where Pa and Pb are detected in the vertical direction, and Pc and Pd are in the horizontal direction. Detection.
請參考第2F圖,其中p[2]、p[3]相對應於m2以及m3,且Ptar (tmp_y)的座標表示為(row_fract,col_fract)。Please refer to the 2F map, where p[2], p[3] correspond to m2 and m3, and the coordinates of P tar (tmp_y) are expressed as (row_fract, col_fract).
此處,”reg_dscale_comb_margin1”以及”reg_dscale_comb_filter_mth”係由係由臨界值調整裝置306決定。Here, "reg_dscale_comb_margin1" and "reg_dscale_comb_filter_mth" are determined by the threshold value adjusting means 306.
請參考第3圖以及第5圖,第5圖係依據本發明實施例中影像處理系統300的執行方法之流程圖。該影像處理系統300包括全域頻率偵測單元302、梯度計算總和單元304、臨界值調整裝置306以及影像混合裝置308,該全域頻率偵測單元302耦接於該臨界值調整裝置306,該梯度計算總和單元304耦接於該影像混合裝置308,該臨界值調整裝置306耦接於該影像混合裝置308。該影像混合裝置308還包括正交角度決定模組310、最低頻率決定模組312、權重估算單元314、第一縮放/清晰模組316、第二縮放/清晰模組318、雜訊濾波器320以及混合單元322。該全域頻率偵測單元302進一步包括垂直頻率偵測單元302a以及水平頻率偵測單元302b。本發明之執行該影像處理系統300的方法包括下列步驟:在步驟S500中,該全域頻率偵測單元302以及該梯度計算總和單元304分別接收複數個輸入像素(input pixels)。Please refer to FIG. 3 and FIG. 5. FIG. 5 is a flowchart of a method for executing the image processing system 300 according to an embodiment of the present invention. The image processing system 300 includes a global frequency detecting unit 302, a gradient calculating sum unit 304, a threshold adjusting device 306, and an image mixing device 308. The global frequency detecting unit 302 is coupled to the threshold adjusting device 306. The summing unit 304 is coupled to the image mixing device 308 , and the threshold adjusting device 306 is coupled to the image mixing device 308 . The image mixing device 308 further includes an orthogonal angle determining module 310, a lowest frequency determining module 312, a weight estimating unit 314, a first zooming/clearing module 316, a second zooming/clearing module 318, and a noise filter 320. And a mixing unit 322. The global frequency detecting unit 302 further includes a vertical frequency detecting unit 302a and a horizontal frequency detecting unit 302b. The method for executing the image processing system 300 of the present invention includes the following steps: In step S500, the global frequency detecting unit 302 and the gradient calculating total unit 304 respectively receive a plurality of input pixels.
在步驟S502中,利用全域頻率偵測單元302沿著垂直方向以計算該些輸入像素的垂直頻率準位,並且沿著水平方向以計算該些輸入像素的水平頻率準位,於該步驟S502,該垂直頻率偵測單元302a進一步計算沿著垂直方向的垂直頻率準位,該水平頻率偵測單元302b進一步計算沿著水平方向的水平頻率準位。In step S502, the global frequency detecting unit 302 is used to calculate the vertical frequency levels of the input pixels along the vertical direction, and the horizontal frequency levels of the input pixels are calculated along the horizontal direction. In step S502, The vertical frequency detecting unit 302a further calculates a vertical frequency level along the vertical direction, and the horizontal frequency detecting unit 302b further calculates a horizontal frequency level along the horizontal direction.
在步驟S504中,該臨界值調整裝置306調整依據該垂直頻率準位與該水平頻率準位之間的關係調整第一臨限值以及第二臨限值。In step S504, the threshold adjustment device 306 adjusts the first threshold and the second threshold according to the relationship between the vertical frequency level and the horizontal frequency level.
在步驟S506中,利用梯度計算總和單元304,分別沿著一組方向且依據一部分的該些輸入像素,用以計算一組梯度亮度準位。In step S506, the gradient calculation summation unit 304 is used to calculate a set of gradient luminance levels along a set of directions and according to a part of the input pixels.
在步驟S508中,該正交角度決定模組310比較該組梯度亮度準位以決定一正交方向沿著一水平方向或是一垂直方向,以利用該第一臨限值形成第一圖案。In step S508, the orthogonal angle determining module 310 compares the set of gradient brightness levels to determine an orthogonal direction along a horizontal direction or a vertical direction to form a first pattern by using the first threshold.
在步驟S510中,該最低頻率決定模組312比較該組梯度亮度準位以決定一最小方向沿著該組方向之一,以利用該第二臨限值形成第二圖案。In step S510, the lowest frequency decision module 312 compares the set of gradient brightness levels to determine a minimum direction along one of the set of directions to form a second pattern using the second threshold.
在步驟S512中,該影像混合裝置308依據權重因數值混合來自該全域頻率偵測單元302的第一圖案與第二圖案,其中該第一圖案相關於第一臨限值,該第二圖案相關於第二臨限值。In step S512, the image mixing device 308 mixes the first pattern and the second pattern from the global frequency detecting unit 302 according to the weight factor value, wherein the first pattern is related to the first threshold, and the second pattern is related. At the second threshold.
於該步驟S512,該正交角度決定模組310依據該第一臨限值且沿著垂直方向或是水平方向之一來決定第一圖案。該正交角度決定模組310依據該第二臨限值且沿著垂直方向或是水平方向以外的方向來決定第二圖案。In the step S512, the orthogonal angle determining module 310 determines the first pattern according to the first threshold and one of the vertical direction or the horizontal direction. The orthogonal angle determining module 310 determines the second pattern according to the second threshold and in a direction other than the vertical direction or the horizontal direction.
雖然本發明已用較佳實施例揭露如上,然其並非用以限定本發明,本發明所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。While the invention has been described above in terms of the preferred embodiments, the invention is not intended to limit the invention, and the invention may be practiced without departing from the spirit and scope of the invention. The scope of protection of the present invention is therefore defined by the scope of the appended claims.
100...最低頻率方向100. . . Lowest frequency direction
102...正交角度方向102. . . Orthogonal angle direction
104...連接線104. . . Cable
300...影像處理系統300. . . Image processing system
302...全域頻率偵測單元302. . . Global frequency detection unit
302a...垂直頻率偵測單元302a. . . Vertical frequency detection unit
302b...水平頻率偵測單元302b. . . Horizontal frequency detection unit
304...梯度計算總和單元304. . . Gradient calculation sum unit
306...臨界值調整裝置306. . . Threshold adjustment device
308...影像混合裝置308. . . Image mixing device
310...正交角度決定模組310. . . Orthogonal angle determination module
312...最低頻率決定模組312. . . Minimum frequency decision module
314...權重評估單元314. . . Weight evaluation unit
316...第一縮放/清晰模組316. . . First zoom/clear module
318...第二縮放/清晰模組318. . . Second zoom/clear module
320...雜訊濾波器320. . . Noise filter
322...混合單元322. . . Mixing unit
第1圖係依據本發明實施例中影像的複數個輸入像素之示意圖,其中係利用影像處理系統沿著最低頻率方向以及正交角度方向對該像素執行方向縮放機制;1 is a schematic diagram of a plurality of input pixels of an image according to an embodiment of the present invention, wherein an image scaling system is used to perform a direction scaling mechanism on the pixel along a lowest frequency direction and an orthogonal angle direction;
第2A圖係依據本發明實施例中相關於輸入像素的複數個梯度方向之示意圖,其中當影像處理系統執行縮放影像步驟時,可決定最低頻率方向以及正交角度方向;2A is a schematic diagram of a plurality of gradient directions related to an input pixel according to an embodiment of the present invention, wherein when the image processing system performs the scaling image step, the lowest frequency direction and the orthogonal angle direction may be determined;
第2B-2G圖係依據本發明實施例中計算亮度差異的絕對值總和之示意圖,其中該亮度差異係指各對輸入像素之間沿著不同的梯度方向的亮度差異值;2B-2G is a schematic diagram for calculating a sum of absolute values of luminance differences according to an embodiment of the present invention, wherein the luminance difference refers to a luminance difference value between different pairs of input pixels along different gradient directions;
第3圖係依據本發明實施例中影像處理系統之方塊圖;Figure 3 is a block diagram of an image processing system in accordance with an embodiment of the present invention;
第4圖係依據本發明實施例中四個相關於目標像素之像素示意圖,其中該四個像素形成的一矩形區域包圍該目標像素;以及4 is a schematic diagram of four pixels related to a target pixel according to an embodiment of the present invention, wherein a rectangular area formed by the four pixels surrounds the target pixel;
第5圖係依據本發明實施例中影像處理方法之流程圖。Figure 5 is a flow chart of an image processing method in accordance with an embodiment of the present invention.
300...影像處理系統300. . . Image processing system
302...全域頻率偵測單元302. . . Global frequency detection unit
302a...垂直頻率偵測單元302a. . . Vertical frequency detection unit
302b...水平頻率偵測單元302b. . . Horizontal frequency detection unit
304...梯度計算總和單元304. . . Gradient calculation sum unit
306...臨界值調整裝置306. . . Threshold adjustment device
308...影像混合裝置308. . . Image mixing device
310...正交角度決定模組310. . . Orthogonal angle determination module
312...最低頻率決定模組312. . . Minimum frequency decision module
314...權重評估單元314. . . Weight evaluation unit
316...第一縮放/清晰模組316. . . First zoom/clear module
318...第二縮放/清晰模組318. . . Second zoom/clear module
320...雜訊濾波器320. . . Noise filter
322...混合單元322. . . Mixing unit
Claims (25)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW98123423A TWI429274B (en) | 2009-07-10 | 2009-07-10 | Image processing system having scaling and sharpness device and method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW98123423A TWI429274B (en) | 2009-07-10 | 2009-07-10 | Image processing system having scaling and sharpness device and method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201103309A TW201103309A (en) | 2011-01-16 |
TWI429274B true TWI429274B (en) | 2014-03-01 |
Family
ID=44837833
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW98123423A TWI429274B (en) | 2009-07-10 | 2009-07-10 | Image processing system having scaling and sharpness device and method thereof |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI429274B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9865035B2 (en) | 2014-09-02 | 2018-01-09 | Nvidia Corporation | Image scaling techniques |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI549096B (en) * | 2011-05-13 | 2016-09-11 | 華晶科技股份有限公司 | Image processing device and processing method thereof |
TWI460681B (en) * | 2012-02-20 | 2014-11-11 | Novatek Microelectronics Corp | Method for processing edges in an image and image processing apparatus |
TWI602152B (en) * | 2013-02-06 | 2017-10-11 | 聚晶半導體股份有限公司 | Image capturing device nd image processing method thereof |
-
2009
- 2009-07-10 TW TW98123423A patent/TWI429274B/en not_active IP Right Cessation
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9865035B2 (en) | 2014-09-02 | 2018-01-09 | Nvidia Corporation | Image scaling techniques |
Also Published As
Publication number | Publication date |
---|---|
TW201103309A (en) | 2011-01-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102957844B (en) | Image processing equipment and image processing method | |
US8165415B2 (en) | Image processing system having scaling and sharpness device and method thereof | |
US7406208B2 (en) | Edge enhancement process and system | |
US7792384B2 (en) | Image processing apparatus, image processing method, program, and recording medium therefor | |
JP5908174B2 (en) | Image processing apparatus and image processing method | |
US8244054B2 (en) | Method, apparatus and integrated circuit capable of reducing image ringing noise | |
US8792746B2 (en) | Image processing apparatus, image processing method, and program | |
US20160112659A1 (en) | Image processing apparatus and image processing method, and program | |
US10021413B2 (en) | Apparatus and method for video data processing | |
US20130216130A1 (en) | Image processing device, image processing method, and program | |
US20090226097A1 (en) | Image processing apparatus | |
US9165345B2 (en) | Method and system for noise reduction in video systems | |
TWI429274B (en) | Image processing system having scaling and sharpness device and method thereof | |
US9881358B2 (en) | Method and system for adaptive pixel replacement | |
JP2011060282A (en) | Method and system for motion detection using nonlinear smoothing of motion field | |
US20150187051A1 (en) | Method and apparatus for estimating image noise | |
WO2012121412A1 (en) | Methods of image upscaling based upon directional interpolation | |
US8526680B2 (en) | Image processing method, image processing program, image processing device, and imaging device | |
Bouma et al. | Precise local blur estimation based on the first-order derivative | |
JP4868249B2 (en) | Video signal processing device | |
JP6057629B2 (en) | Image processing apparatus, control method thereof, and control program | |
JP2006003352A (en) | Instrument and method for measuring noise of image signal | |
US20120045143A1 (en) | Apparatus and method for high speed filtering of image for high precision | |
US9008463B2 (en) | Image expansion apparatus for performing interpolation processing on input image data, and image expansion method thereof | |
JP2010079815A (en) | Image correction device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
MM4A | Annulment or lapse of patent due to non-payment of fees |