[go: up one dir, main page]

TW200904206A - Improved RGB images scaling or resizing method - Google Patents

Improved RGB images scaling or resizing method Download PDF

Info

Publication number
TW200904206A
TW200904206A TW96124554A TW96124554A TW200904206A TW 200904206 A TW200904206 A TW 200904206A TW 96124554 A TW96124554 A TW 96124554A TW 96124554 A TW96124554 A TW 96124554A TW 200904206 A TW200904206 A TW 200904206A
Authority
TW
Taiwan
Prior art keywords
image
interpolation
pixel
scaling
yuv
Prior art date
Application number
TW96124554A
Other languages
Chinese (zh)
Inventor
Chaucer Chiu
Rui Sun
Original Assignee
Inventec Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inventec Corp filed Critical Inventec Corp
Priority to TW96124554A priority Critical patent/TW200904206A/en
Publication of TW200904206A publication Critical patent/TW200904206A/en

Links

Landscapes

  • Image Processing (AREA)

Abstract

An improved RGB images scaling or resizing method is used to solve low performance and high distortion problems during the scaling/resizing process. By transferring a RGB format image into a YUV format image, the method uses integer arithmetic instead of floating point operation to complete the transferring calculation. To reduce the distortion, a high level interpolation process is applied to the Y weight of interpolation points of the YUV image when scaling/resizing. Finally, the method reverts the scaling/resizing YUV image to a scaling/resizing RGB image so that a real and accurate scaling/resizing image is acquired with high performance.

Description

200904206 九、發明說明: 【發明所屬之技術領域】 本發明係為-種RGB影雜放方法,特職指—種透過 將RGB影像轉換為丽影像後,再進行縮放處理的娜影 像縮放方法。 如 【先前技術】 在影像處理的技術領域中’最常使用到的就是“影像縮放” 技術,其主要目的係希望能夠將所取得的影像重新取樣 (resampling)之後轉換為實際所需的影像大小,在許多醫學、 多媒體及數位資料的處理上經常會應用到這樣的技術。 其中,最常使用到的影像縮放方法又屬針對目前使用率 最高之RGB影像所提供的RGB影像縮放方法。請參考「第ι 圖」之S知RGB衫像縮放方法流程圖,可知以往的rgb影 像縮放方法娜在RGB f彡像以及欲縮獻小之縮放參數值被 讀入之後(步驟10及步驟20),直接針對RGB影像進行重新 取樣的計算,亦即侧運算式去計算RGB影像依照縮放參數 值進行縮放後所產生出之RGB縮放影像中各像素點的新座標 位置(步驟30),然後直接以這些新獲得座標位置之各像素點 的RGB分量來進行各個插值點的插值運算(步驟4〇),插值運 鼻通常就是直接以插值點最鄰近的像素點之R、G、B分量作 為插值點的RGB分量’當所有插值點都完成插值運算之後, 即可得到一個依照縮放參數值進行縮放後所產生的RGB縮放 影像,最後輸出此RGB縮放影像(步驟5〇)。200904206 IX. Description of the Invention: [Technical Field] The present invention relates to a RGB image miscellaneous method, and a special image is a method for scaling a RGB image by converting an RGB image into a lent image. [Prior Art] In the technical field of image processing, 'the most commonly used image is the "image scaling" technology, the main purpose of which is to convert the acquired image to the actual desired image size after resampling. Such techniques are often applied to the processing of many medical, multimedia and digital materials. Among them, the most commonly used image scaling method is the RGB image scaling method provided for the RGB image with the highest usage rate. Please refer to the flowchart of the S-RGB picture scaling method in the "1st picture". It can be seen that the conventional rgb image scaling method is read after the RGB f-image and the zoom parameter value to be reduced (steps 10 and 20). ), directly calculating the re-sampling of the RGB image, that is, the side-calculation to calculate the new coordinate position of each pixel in the RGB-scaled image generated by the RGB image after scaling according to the scaling parameter value (step 30), and then directly Interpolation of each interpolation point is performed by the RGB components of each newly obtained coordinate point of the coordinate position (step 4〇), and the interpolation nose is usually directly interpolated by the R, G, and B components of the nearest pixel of the interpolation point. The RGB component of the point 'After all the interpolation points have been subjected to the interpolation operation, an RGB zoom image generated by scaling according to the scaling parameter value is obtained, and finally the RGB zoom image is output (step 5〇).

此種習知技術雖然常用,但是由於其所產生出來的RGB 200904206 縮放影像往往會產生邊緣不夠平滑或者是邊界不夠清晰的現 象’導致影像產生失真問題;並且由於整個縮放過程中因為 運算充滿了大量的浮點運算(float p〇int 〇perati〇n)過程也導致 影像縮放的運算效率大受影響,產生處理效率不高的問題。 因此,如何針對現有RGB影像縮放方法提出改良,特別 係針對影像敝後所產生的雜失觸題以及在雜縮放過 程中所產生的大量運算進行改良,是f要努力的課題所在。 【發明内容】 有鑒於習知RGB影像縮放方法所產生的影像失真以及大 量運算技姻題,本糾目的在於提供—觀良之RGB影像 縮放方法其利用影像格式轉換、採取整數運算及增強部分 插值點插值運算的技術手段來解決習知技術所存在的技術問 題。 整個改1之RGB f彡雜財法的麟手段,包含下列步 驟⑻喂入欲進行縮放之RGB影像,將之轉換格式為^^ 影像;(b)触欲獲得實際影像大小之縮放參數值;⑷然後依 照縮放參數值開始計算YUV影像中各像素點進行縮放後所 產生之新的YUV縮放f彡像巾各像素點麵位置,特別的是整 個運算過簡以錄财方錢行;(d)麟觸的爾縮放 影像後,便針對YUV縮放雜巾之各插值點進行TOV分量 的插值’其主要魏分為下列兩個步驟執行:㈣娜各關聯 像素點之Y 〃 f細各練點之冑麟值運算;㈣操取各關 聯像素點之U、V分量進行各插值點之直接插 後再將谓、缩放影像轉換回獅縮放影像,輸出職縮放 200904206 影像。 其中,整數運算方式主要係針對計算新的请縮放影像 中各像素點座標位置時,因為縮放參數值代入運算式後經常 會產生浮點數(floatpoint)的緣故,因此在實際運算時本發明方 法將可用整數m及η表示為時,先以m計算座標位置 (x〇,y〇)再除以ιοη的方式,使整個運算過程中都係以整數方式 進行運算,以大幅減少過多的浮點運算量。 透過本發明之改良之RGB縣職方法,確實可以達到 使影像縮放·猶理效率提升,並且能_得更為接近真 實的縮放影像的技術功效。 有關本發萄特徵與實作,航合㈣作紐實施例詳 細說明如下。 【實施方式】Although this conventional technique is commonly used, the RGB 200904206 scaled image generated by the image is often caused by a phenomenon that the edge is not smooth enough or the boundary is not clear enough to cause image distortion; and because the operation is full due to the entire zooming process The floating point operation (float p〇int 〇perati〇n) process also causes the computational efficiency of image scaling to be greatly affected, resulting in a problem of inefficient processing. Therefore, how to improve the existing RGB image scaling method, in particular, to improve the miscellaneous problems generated by the image and the large number of operations generated during the mis-scaling process is the subject of efforts. SUMMARY OF THE INVENTION In view of the image distortion caused by the conventional RGB image scaling method and a large number of computing techniques, the purpose of the present invention is to provide a RGB image scaling method that utilizes image format conversion, takes integer operations, and enhances partial interpolation points. The technical means of interpolation operation solves the technical problems existing in the prior art. The RGB 彡 彡 财 整个 改 , , , , , 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改 改(4) Then, according to the scaling parameter value, the new YUV scaling generated by the zooming of each pixel in the YUV image is calculated, and the pixel position of each pixel is frustrated, in particular, the entire operation is simplified to record the money; (d After the zoom image of the lining touch, the interpolation of the TOV component is performed for each interpolation point of the YUV zooming shawl. The main Wei is divided into the following two steps: (4) Y 关联 关联 细 细 细 细 细 细 细 细The unicorn value operation; (4) fetching the U and V components of each associated pixel to directly insert each interpolation point, and then convert the scaled image to the lion zoom image, and output the job zoom 200904206 image. Among them, the integer calculation method is mainly for calculating the coordinate position of each pixel in the newly zoomed image, because the scaling parameter value often generates a floating point number after substituting the arithmetic expression, so the method of the present invention is actually operated. When the available integers m and η are expressed as follows, the coordinate position (x〇, y〇) is first calculated by m and then divided by ιοη, so that the whole operation is performed in an integer manner to greatly reduce excessive floating point. Computation. Through the improved RGB county job method of the present invention, it is indeed possible to achieve the technical effect of scaling the image and improving the efficiency of the image, and can be closer to the real zoomed image. For the characteristics and implementation of this issue, the following is a detailed description of the implementation of the Hanghe (4). [Embodiment]

本發明提出的改良RGB影像縮放方法,騎對以往在 顚影像縮放時運算#過大及影像縮放後容易產生影像失真 的問題提出解決方I本發明所提出改良之職影像縮放方 法,可以用電腦軟_形式被類實現在任何電腦可執行之 影像處理平台上(如:數位電視、電腦)。 《所谓的RGB影像,即目前廣泛被應用於多媒體顯示、電 麵不影像及電視⑽彡像格式,其制紅嗯吨、綠 G(Green)及藍寧此)三原色進行相加混合的原理透過發射 不^強度的二原色電子束,來產生所須色彩的RGB影像;而 所明的YUV影像,則係另 _ 腦顯示影像以及電視㉟干上㈣^遍被朗在夕媒體顯不、電 頁不上的影像格式,其主要其基於人眼 200904206 視覺對亮度的敏歧大於色彩紐的敏感度之前提而將影像 改以冗度分量Y以及色差分量U、v來表示’其特點就是γ 分量係與U、V分量獨立分開的。 由於RGB影像在進行影像縮放時,必須同時對影像中的 R G、B为里分別作運算,且運算過程中經常出現大量的浮 點數運算’ S此在處理效率上補高;再加上RGB影像本身 的組成結構雜,導致RGB影縣精f彡雜域所產生的 影像失真問題(顏色失真、影像模糊…)特別嚴重。因此,本發 明採取將RGB影像做影像格式轉換、整數及增強部分^ 值點插值運算的方絲改善f知技射存在於膽影像縮放 的問題,以下進一步說明:The improved RGB image zooming method proposed by the present invention provides a solution for the problem of image distortion caused by excessive operation and image scaling when the image is zoomed in. In the prior art, the improved image zooming method proposed by the present invention can be softened by a computer. The _form is implemented on any computer-executable image processing platform (eg digital TV, computer). "The so-called RGB image, which is widely used in multimedia display, electric surface non-image and television (10) image format, the principle of adding and mixing the three primary colors of the red, green, and blue The second primary color electron beam is emitted without intensity to generate the RGB image of the desired color; and the YUV image is displayed as the other _ brain display image and the television 35 is dry (four) ^ is lang in the evening media display, electricity The image format on the page is mainly based on the human eye 200904206. The visual sensitivity to brightness is greater than the sensitivity of the color neon. The image is changed to the redundancy component Y and the color difference components U, v to indicate 'the characteristic is γ The component system is separated from the U and V components independently. Since the RGB image is zoomed in, it is necessary to perform operations on RG and B in the image at the same time, and a large number of floating point operations are often performed during the operation. S is added in processing efficiency; plus RGB The composition and structure of the image itself are mixed, which causes the image distortion problem (color distortion, image blurring...) generated by the RGB shadow county to be particularly serious. Therefore, the present invention adopts the problem that the RGB image is used for image format conversion, integer and enhanced part of the value point interpolation operation to improve the problem of scaling the image in the biliary image, which is further explained below:

習知RGB影像縮放方法,已如先前技術中所述(可參考 「第1圖」)在此不再贅述’其主要產生缺失的原因财於係 直接對輸从RGB f彡像本麟處理,必絲在先前技術 所待解決的問題。請參考「第2圖」的部份,係為本發明改 良之RGB影像縮放方法流程目,首先將待細之卿影像 讀入(步驟100) ’讀入的方式可以透過電腦軟體的設計將咖 -彻冑概細« 傳:線_入’亦可自影像處理平台外掛之記錄儲存媒體讀 =:記憶卡、光碟片)旧後執行影像格式轉換的程序,亦The conventional RGB image scaling method has been described in the prior art (refer to "FIG. 1"), and the reason for the main occurrence of the missing is not described here. Must be a problem to be solved in the prior art. Please refer to the section of Figure 2 for the improved RGB image scaling method. First, read the image to be fined (step 100). The method of reading can be done through the design of computer software. - 胄 胄 « « : 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 线 : :

為辦蝴_GG),雜換方式係透 過運鼻式祕RGB錄巾各騎巾的R、G 影像之Y、u,“),其 200904206In order to do the butterfly _GG), the miscellaneous change method is the Y, u, ") of the R and G images of each of the RGB recordings of the nose-type secrets.

σ 5] ο 0.299 587 0.114 -0.148 0.615 -0.289 -0.515 0.437 -0.100 完成影像格式轉換後,便接著進行縮放參數值的接收(步 驟3〇〇) ’縮放參數值的接收可以透過電腦軟體設計之使用者 操作介面(User Interface,UI)實現於影像處理平台之畫面上供 自外部進行隨機輸入,基本上縮放參數值即為影像欲縮放的 倍數值,可以用正、負整數來表示放大倍數或者縮放倍數(如: 3表示放大3倍,-2表示縮小2倍)但輸入及表現可不受限於 此’此外電腦軟體實現的過程中步驟300之縮放參數值亦可 提則於步驟100前作輸入設定,本發明對此並不作限定。σ 5] ο 0.299 587 0.114 -0.148 0.615 -0.289 -0.515 0.437 -0.100 After the image format conversion is completed, the scaling parameter value is received (step 3〇〇) 'The receiving of the scaling parameter value can be used by the computer software design. The user interface (UI) is implemented on the image processing platform for random input from the outside. Basically, the scaling parameter value is the multiple value of the image to be scaled, and the positive or negative integer can be used to indicate the magnification or zoom. Multiple (such as: 3 means 3 times magnification, -2 means 2 times reduction), but the input and performance are not limited to this. In addition, the scaling parameter value of step 300 in the process of computer software implementation can also be mentioned as input setting before step 100. The invention is not limited thereto.

獲得縮放參數值後’接著開始進行對YUV影像的實際縮 放過程,由於影像縮放必然會使原本像素點所在的座標位置 f生偏移而出現_像素點座標位置,而縣像素點所在座 “位置也因為產生偏移而出現—些新的插值點需要利用關聯 像素點去進行内插(interp〇lati〇n)來得到其像素點的爾分 量,因此_先域數運算方絲計算依難放參數值進行 縮放後騎產生之YUV職縣巾各觸的像素點座標位 置(步驟400) ’計算方式同樣是透過將原本的像素點座標位置 fe,yi)及縮放錄值㈣0)代人運算式後去計算出谓縮放 影像中新的像素點座標位置(XG,y。),其運算式可採如下表示: 200904206 Ο 值传/主意的疋’由於運算式中的1 /經常會出現浮點 數的數值結果’在運算上往往料造成運算資源上的魔大負 擔,特別係在一連串影像轉換的運算過程中,對於運算處理 效率上的影像非常之大,因此本發明特別在此利用整數運算 方式來改善大量浮點數運算的效率問題(步驟41〇)。所述的整 數運算邏輯如下.當判斷出運算式巾的丨數值為浮點數 $ ’且此浮點數能夠用整數m及n表示為m*1〇 n時,則在運 具時先以111去3十算出新的座標位置(x〇,y〇)之後,再將所得到 的座標位置(x0,y0)除以10n,最終仍可以得到正確的新像素 座標位置(χ_,透過錄運算方式甚至還可以降低轉換編 碼誤差機率’產生更為精確的抓^縮放影像結果。 當依照縮放參數值運算出新的νυν縮放影像中各個新 像素所在的絲位置時,_也可雜由職紐之⑽影 像及YUV縮放影像的比對而得出對應要執行插值計算的各 插值點所在座標位置,此為習知技術在此就不多做資述。有 了月確的插值點,接下來就必須針對縮放影像巾之各插 值點,行YUV分量的計算,為了降低影像失真的 =算量,本_· 鱗的特_料算各插值點 醫/刀量的部份分為兩個部份進行(即「第2圖」 500及步驟550),說明如下: 騍 驟500 :係針對卿縮放影像令較容易為人眼感受 刀進行插值運算’換句話說本發明方法在γ分量 上採取較尚_織法料算,因此可財 到較精確且較高品質的插值社里 置传 值、、、。果,對於整體TOV縮放影像的 200904206 失真改善效果最為顯著。因此,本發明方法係擷取各關聯像 素點之γ分量進行各插值點之高階插值運算。 (2)步驟550 :係針對γυν縮放影像中較不易為人眼感受 的U及V分量部分進行插值運算,換句話說本發明方法在 UV分量上由於其對YUV縮放影像的失真改善效果不大,且 容易造成大量的運算量,因此對UV分量係採取直接插值運 算法來計算,對於整體YUV縮放影像的失真問題影響效果不 大但能夠提升整體運算效率。目此,本發财法侧取各關 聯像素點之U、V分量進行各插值點之直接插值運算。 本發明所提到之高階插值運算,基本上可以採取目前習 知的一些插值運算法來進行γ分量的運算,但至少係必須為 一階以上的插值運算法。例如:雙線性插值運算法(bmne批 interpolation)、雙立方插值運算法(bicubicinterp〇lati〇n);至於 直接插值運算’則係直接以和插值點相鄰之像素點作為關聯 像素點,並以此關聯像素點之u、V分量作為各插值點之U、 V为量,通常會以最接近插值點之單一關聯像素點來進行運 算’此種運算最為有效率(但並不以此為限)。 至於所述之關聯像素點,則依照所使用之插值運算法不 同而會有不同用來參考計算插值點各分量的關聯像素點。一 般都是以插值點鄰近的像素點(可以係縮放前YUV影像中的 像素點或者是縮放後YUV縮放影像中的新像素點)為基準, 虽然在較為尚階的插值運算法中還可以透過複雜的運算來決 疋插值點所須參考的關聯像素點;並且在一些高階插值運算 中還可以依照關聯像素點與插值點之間的距離關係來給予不 11 200904206 „素點不同的權重係數以便能夠更精確的計算γ分 置。本翻對於關聯録點的決定方式以 判定方式均未作任何限定。 卞權重係數的 在此’僅以厂第3Α圖」至「第3C圖」來對醫縮放 影像進打橫向放大2倍時所採取職婦徵 明(YUV影像縮小時亦同): 平身1】兄After obtaining the scaling parameter value, 'the actual zooming process of the YUV image is started. Since the image scaling will inevitably cause the coordinate position f where the original pixel is located to shift, the _ pixel point coordinate position appears, and the county pixel position is located. Also due to the occurrence of offsets - some new interpolation points need to use the associated pixel points to interpolate (interp〇lati〇n) to get the erg component of their pixel points, so the _ first-domain number calculation is difficult to calculate After the parameter value is scaled, the position of the pixel point of each touch of the YUV occupational county towel is generated (step 400). The calculation method is also based on the original pixel coordinate position fe, yi and the zoomed record value (4) 0) Then calculate the new pixel point coordinate position (XG, y.) in the scaled image, and its expression can be expressed as follows: 200904206 Ο Value transmission / idea 疋 'Because 1 / in the algorithm will often appear floating point The numerical result of the number 'in the operation is often expected to cause a huge burden on the computing resources, especially in the series of image conversion operations, the image processing efficiency is very large, In particular, the present invention utilizes an integer arithmetic method to improve the efficiency of a large number of floating point operations (step 41). The integer arithmetic logic is as follows. When it is determined that the value of the arithmetic towel is a floating point number $' When the floating point number can be expressed as m*1〇n by the integers m and n, then the new coordinate position (x〇, y〇) is calculated by 111 to 3 in the tool, and then the obtained coordinates are obtained. By dividing the position (x0, y0) by 10n, you can still get the correct new pixel coordinate position (χ_, you can even reduce the conversion coding error probability through the recording operation method) to produce more accurate image capture results. When the parameter value calculates a new νυν zoom image where the new pixel is located, the _ can also be compared with the comparison of the (10) image and the YUV zoom image to obtain the coordinate of each interpolation point corresponding to the interpolation calculation. Position, this is a conventional technique. There is no more information here. With the monthly interpolation point, the next step is to calculate the YUV component for each interpolation point of the zoom image towel, in order to reduce the image distortion = calculation Volume, this _· scale The special part of the calculation is divided into two parts (ie, "Fig. 2" 500 and step 550), which are explained as follows: Step 500: It is easier to zoom in on the image. In order to interpret the knives for the human eye, in other words, the method of the present invention takes a more _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ The distortion improvement effect of the 200904206 for the overall TOV zoom image is most significant. Therefore, the method of the present invention extracts the γ component of each associated pixel to perform high-order interpolation operations for each interpolation point. (2) Step 550: Scale the image for γυν It is less easy to interpolate the U and V components of the human eye. In other words, the method of the present invention has little effect on the distortion of the YUV-scaled image on the UV component, and is easy to cause a large amount of computation, so UV The component is calculated by the direct interpolation algorithm, which has little effect on the distortion problem of the overall YUV scaled image but can improve the overall computational efficiency. For this reason, the present financing method takes the U and V components of each associated pixel to perform direct interpolation calculation of each interpolation point. The high-order interpolation operation mentioned in the present invention can basically perform some γ-component calculations by using some conventional interpolation algorithms, but at least it must be an interpolation algorithm of a first-order or more. For example: bilinear interpolation algorithm (bmne batch interpolation), bicubic interpolation algorithm (bicubicinterp〇lati〇n); as for direct interpolation operation, the pixel points adjacent to the interpolation point are directly associated pixels, and The u and V components of the associated pixel are used as the U and V of each interpolation point, and the operation is usually performed with a single associated pixel closest to the interpolation point. 'This operation is most efficient (but not as limit). As for the associated pixel points, there are different associated pixel points for calculating the components of the interpolation point, depending on the interpolation algorithm used. Generally, the pixels adjacent to the interpolation point (which can be the pixels in the YUV image before zooming or the new pixels in the zoomed YUV image) are used as reference, although in the more advanced interpolation algorithm, Complex operations to determine the associated pixel points to be interpolated by the interpolation point; and in some high-order interpolation operations, the weighting coefficients of different points can be given according to the distance relationship between the associated pixel points and the interpolation points. It is possible to calculate the gamma split more accurately. There is no limit to the way the decision is made for the associated recorded points. 卞The weight coefficient is hereby treated only from the third map of the factory to the third figure. Zooming in on the image when you zoom in 2 times in the horizontal direction (the same as when the YUV image is zoomed out):

首先第3A圓」H顯示當景綠欲進行橫向2 倍放大時,YUV影像原像素點(P1及_〇會分別向左右兩 邊橫向偏敍YUV職㈣㈣驗雜新像素點 (nPl及nP2)810,其新座標位置的計算方式已於前面說明過在 此不再作敘述,而原先的黯原像素點(ρι及p2)動橫 向偏移之後’為了使放大後的YUV縮财彡像錢降低失真程 度便需要在YUV縮放影像新像素點㈣及奶卿兩個新像 素點之間的插值點進行插值運算(即圖中所示之第一插值點 811 ιΡΙ及第二插值點8l2“iP2”),插值點的座標位置決定可 透過縮放前後之YUV影像及YUV縮放影像的比對而得出對 應要執行插值計算的各插值點所在座標位置,不多作敘述。 如前所述,本發明方法係將插值點中的γ分量以及uv 分量做不同的處理。請參考到「第3B圖」部份,係對γ分量 進行高階插值運算示意圖,由圖中可知針對第一插值點811 的Y分量(iYl),採取了將插值點相鄰之像素點視為關聯像素 點(此例中係nPl及nP2)的方式擷取其各自的γ分量來計算, 所採取的高階插值運算則係可以用iYl=2*Yl/3+Y2/3來表 示,其中對於與插值點不同距離之關聯像素點的Y分量也適 12 200904206 當給予不同權重係數,同樣第二插值點812的Y分量(iY2), 亦使用插值點相鄰之像素點作為關聯像素點(此例中係奶及 nP2)的方賴取其各自的γ分量來計算,但不同的是由於鄰 近插值點的關聯像素點關係不同,因此給?權重係數的方式 也不同,而改為以iY2=Y1/3 + 2*Υ2/3表示。至於「第3C圖」 部分’則係對UV分量進行直接插值運算示意圖,基本上由 於UV分量對於影像失真的影響度不高因此採取不需要額外 〇 運算的直接插值法來處理插值點所需要的υν分量,由圖中 可知’第一插值點811的UV分量(im, iV1)及第二插值點812 的UV分量(iU2, iV2)均係利赌值點相鄰的像素點來作為關 聯像素點,在本實施例中以最接近插值點的關聯像素點來進 行直接的插值,因此第一插值點811的UV分量(iUl,iVl)可 以用iUl=Ul及iVl=Vl來表示’而第二插值點812的υγ分 量(iU2, iV2)則可以用iU2=U2及iV2=V2來表示。 最後’當YUV縮放影像中的各像素點均完成步驟500及 ϋ 步驟550的程序後,將可以產生出完整的γυν縮放影像。最 後’再將YUV縮放影像轉換為rgb格式,產生所謂的RGB 縮放影像(步驟600),然後輸出RGB縮放影像(步驟700),至 此結束本發明方法的流程。 其中,所述步驟600中將yuv縮放影像轉換為RGB縮 放影像,其轉換方式係透過如下運算式將YUV縮放影像中各 像素中的γ、u、V分量(/r t/⑺分別轉換為對應之RGB縮放 影像之R、G、B分量: 200904206 1 1 1 [R G 5] = [Γ u V] 0 -0.39 2.03 1.14 -0.58 0 由於本發明提出的改良RGB影像縮放方法,特別著重在 影像縮放過程中的影像格式轉換、採取整數運算及增強部分 插值點插值運算的技術手段運用,因此能夠充分解決掉習知 技術所存在的技術問題,並且達到預期的技術功效。 雖然本發明以前述之較佳實施例揭露如上,然其並非用 〇 以限定本發明,任何熟習相像技藝者,在不脫離本發明之精 神和範圍内,當可作些許之更動與潤飾,因此本發明之專利 保護範圍須視本說明書所附之申請專利範圍所界定者為準。 【圖式簡單說明】 第1圖係習知RGB影像縮放方法流程圖。 第2圖係本發明改良之RGB影像縮放方法流程圖。 第3A圖係本發明改良之RGB影像縮放方法應用於放大 影像實施例示意圖。 。第3B圖係第3A圖中應用本發明改良之RGB影像縮放 方法對Y分量進行細插值運算示意圖。 、第3C圖係第3A圖中應用本發明改良之RGB影像縮放 方去對UV分量進行直接插值運算示意圖。 【主要元件符號說明】 800 yuv影像原像素點 810 yuv縮放影像新像素點 811 第一插值 812 第二插值 200904206 步驟10 讀入RGB影像 步驟20 接收縮放參數值 步驟30計算RGB影像中各像素點依縮放參數值進行 縮放後所產生之一 RGB縮放影像中各像素點 座標位置 步驟40擷取R、G、B分量進行各插值點直接插值運 算 步驟50 輸出RGB縮放影像 步驟100讀入RGB影像 步驟200轉換RGB影像為yuv影像 步驟300接收縮放參數值 步驟計算YUV f彡射各騎驗較參數值進行 縮放後所產生之- YUV縮放影像中各像素點 座標位置 步驟410轉換整數運算 步驟500 _γ分量進行各插值點高階插值運算 步驟55G _取U、V分量進行各插值點直接插值運算 步驟60G _醫敝雜為刪縮放影像 步驟700輪出RGB縮放影像First, the 3rd circle "H" shows that when the scene green is to be horizontally magnified 2 times, the original pixel points of the YUV image (P1 and _〇 will be laterally slanted to the left and right sides respectively. YUV position (4) (4) New pixel points (nPl and nP2) 810 The calculation method of the new coordinate position has been described above, and the original original pixel points (ρι and p2) are shifted laterally after the 'transmission of the YUV. The degree of distortion needs to be interpolated at the interpolation point between the new pixel point of the YUV zoom image (4) and the two new pixel points of the milk (ie, the first interpolation point 811 ιΡΙ and the second interpolation point 8l2 “iP2” shown in the figure. The coordinate position of the interpolation point determines the coordinate position of the YUV image and the YUV zoom image before and after the zoom, and the coordinates of the coordinates of the interpolation points corresponding to the interpolation calculation are obtained, and the description is not repeated. The method is to treat the γ component and the uv component in the interpolation point differently. Please refer to the section “3B” for a high-order interpolation operation on the γ component. The Y for the first interpolation point 811 is known from the figure. Component (iYl), taken The pixel points adjacent to the interpolation point are regarded as the associated pixel points (in this case, nPl and nP2), and their respective γ components are calculated, and the high-order interpolation operation adopted can be iYl=2*Yl/3. +Y2/3 indicates that the Y component of the associated pixel for different distances from the interpolation point is also suitable for 12200904206. When different weight coefficients are given, the Y component (iY2) of the second interpolation point 812 is also used, and interpolation points are also used. The pixels are calculated as the associated pixels (in this case, milk and nP2) by taking their respective γ components, but the difference is due to the difference in the associated pixel points of adjacent interpolation points, so the weight coefficient is given. It is also different, but instead is represented by iY2=Y1/3 + 2*Υ2/3. As for the “3C figure” section, it is a schematic diagram of direct interpolation of the UV component, basically due to the influence of UV component on image distortion. It is not high, so the direct interpolation method that does not require extra 〇 operation is used to process the υν component required for the interpolation point. The UV component (im, iV1) of the first interpolation point 811 and the UV component of the second interpolation point 812 are known from the figure. (iU2, iV2) are gambling points adjacent The pixel is used as the associated pixel. In the present embodiment, the direct interpolation is performed with the associated pixel closest to the interpolation point. Therefore, the UV component (iU1, iVl) of the first interpolation point 811 can be iU1=U1 and iVl= V1 is used to indicate 'the υ γ component of the second interpolation point 812 (iU2, iV2) can be represented by iU2=U2 and iV2=V2. Finally 'when each pixel in the YUV scaled image completes step 500 and ϋ step 550 After the program, a complete γυν zoom image can be generated. Finally, the YUV zoom image is converted to rgb format, a so-called RGB zoom image is generated (step 600), and then the RGB zoom image is output (step 700). The flow of the inventive method. In the step 600, the yuv zoom image is converted into an RGB zoom image, and the conversion manner is performed by converting the γ, u, and V components (/rt/(7) in each pixel of the YUV zoom image into corresponding ones through the following operation formula. R, G, B components of RGB scaled image: 200904206 1 1 1 [RG 5] = [Γ u V] 0 -0.39 2.03 1.14 -0.58 0 Due to the improved RGB image scaling method proposed by the present invention, particular emphasis is placed on the image zooming process. In the image format conversion, the use of integer arithmetic and the use of enhanced interpolation of interpolation techniques, the technical problems existing in the prior art can be fully solved and the expected technical effects can be achieved. The embodiments are disclosed above, but are not intended to limit the invention, and those skilled in the art can make some modifications and refinements without departing from the spirit and scope of the invention. The scope of the patent application attached to this specification shall prevail. [Simplified description of the drawing] Figure 1 is a flow chart of the conventional RGB image scaling method. A modified RGB image scaling method flow chart. Fig. 3A is a schematic diagram of an improved RGB image scaling method applied to an enlarged image embodiment. Fig. 3B is a third embodiment of the improved RGB image scaling method for the Y component. Schematic diagram of fine interpolation operation. Fig. 3C is a schematic diagram of direct interpolation of UV components by applying the improved RGB image scaling method of Fig. 3A. [Main component symbol description] 800 yuv image original pixel point 810 yuv zoom image New pixel point 811 first interpolation 812 second interpolation 200904206 step 10 read RGB image step 20 receive scaling parameter value step 30 calculate each pixel in the RGB image generated by the pixel parameter according to the scaling parameter value Point coordinate position step 40 extracts R, G, B components for each interpolation point direct interpolation operation Step 50 Output RGB zoom image Step 100 Read RGB image Step 200 Convert RGB image to yuv image Step 300 Receive zoom parameter value Step Calculate YUV f彡 各 各 各 骑 骑 骑 骑 - - - - - - - - Y Y Y Y Y Y Y Y Y Y Step 410 converts the integer arithmetic is set in step 500 _γ components for each higher order interpolation calculating step of interpolation points taken 55G _ U, V components for each interpolated point computation step direct interpolation 60G _ Medical spacious heteroaryl is zoomed image deletion step 700 the RGB video scaling

Claims (1)

200904206 十、申請專利範圍: h —種改良之RGB影像縮放方法,其包含下列步驟: ⑻讀入一 RGB影像,轉換該RGB影像為一 影像; 0)接收一縮放參數值; (c) 以一整數運算方式計算該γυν影像中各像素點 依該縮放參數值進行縮放後所產生之一 YXJY縮放影像 〇 中各像素點座標位置; (d) 針對該YUV縮放影像中各像素點以外之各插值 點之YUV分量,執行下列步驟: (dl)自該YUV縮放影像中各像素點擷取各關 聯像素點之Y分量進行各插值點之一高階插值運 算;及 (d2)自該YUV縮放影像中各像素點擷取各關 聯像素點之U、V分量進行各插值點之一直接插值 \ / 運算;及 (e) 轉換該YUV縮放影像為一 RGB縮放影像,輸出 該RGB縮放影像。 2.如申請專利範圍第1項所述之改良之RGB影像縮放方 法,其中該步驟(a)係透過下列運算式將該RGB影像中 各像素之R、G、B分量([/? G5])轉換為該YUV影像之 Y、U、V分量([Ft/P]): 200904206 -0.148 0.615 -0.289 -0.515 0.437 -0.100 3·如申睛專利範圍第^所述之改良之rgb影像縮放方 法,其中該步驟(c)係透過下列運算式以該YUV影像中 各像素點賴位置(Xi,y树算職_縮放影像 中各像素點座標位置(知,y〇):200904206 X. Patent application scope: h - an improved RGB image scaling method, comprising the following steps: (8) reading in an RGB image, converting the RGB image into an image; 0) receiving a scaling parameter value; (c) taking one The integer operation method calculates a coordinate position of each pixel in the YXJY zoom image generated by each pixel in the γυν image according to the scaling parameter value; (d) interpolating each pixel except the pixel in the YUV zoom image For the YUV component of the point, perform the following steps: (dl) extracting the Y component of each associated pixel from each pixel in the YUV scaled image for high-order interpolation operation of each interpolation point; and (d2) scaling the image from the YUV Each pixel captures the U and V components of each associated pixel to perform a direct interpolation of each of the interpolation points, and (e) converts the YUV scaled image into an RGB scaled image, and outputs the RGB scaled image. 2. The improved RGB image scaling method according to claim 1, wherein the step (a) is an R, G, and B component of each pixel in the RGB image by the following expression ([/? G5] Converted to the Y, U, V component of the YUV image ([Ft/P]): 200904206 -0.148 0.615 -0.289 -0.515 0.437 -0.100 3. The improved rgb image scaling method as described in the scope of the patent application , wherein the step (c) is based on the position of each pixel in the YUV image by the following operation formula (Xi, y tree computing _ scaling the coordinates of each pixel point in the image (know, y〇): {\! ratio 〇 〇 〇 \iratio 0 〇 0 1· I 其中,係為該縮放參數值;且該整數運算方式係 當1 / raizo之值為浮點數並可用整數m及η表示為m*l〇-n 時’先以m計算座標位置(Xg, y())再除以ι〇η。{\! ratio 〇〇〇\iratio 0 〇0 1· I where is the scaling parameter value; and the integer operation is when the value of 1 / raizo is a floating point number and can be expressed as m* by the integers m and η L〇-n 'First calculate the coordinate position (Xg, y()) with m and divide by ι〇η. 0.299 〇 Β] 0.587 0.1140.299 〇 Β] 0.587 0.114 4.如申請專利範圍第1項所述之改良之RGB影像縮放方 法,其中該高階插值運算係指以各插值點相鄰之各像素 點作為關聯像素點,並以此些關聯像素點之Y分量進行 至少一階以上插值運算作為各插值點之γ分量。 5.如申請專利範圍第4項所述之改良之RGB影像縮放方 法,其中該至少一階以上插值運算係以接近插值點的程 度分配權重係數給該些關聯像素點,並以加權後的關聯 像素點之Y分量進行插值運算。 6.如申請專利範圍第5項所述之改良之RGB影像縮放方 法,其中該至少一階以上插值運算係為雙線性插值運算 法(bilinear interpolation)及雙立方插值運算法(bicubic 17 200904206 interpolation)。 . 7.如申請專利範圍第1項所述之改良之RGB影像縮放方 法,其中該直接插值運算係指以相鄰之像素點作為關聯 像素點,並以此關聯像素點之U、v分量作為各插值點 之U、V分量。 8. 如申請專利範圍第7項所述之改良之RGB影像縮放方 法’其中該直接插值運算係以最接近插值點之關聯像素 點的U、V分量進行插值。 9. 如申請專利範圍第1項所述之改良之RGB影像縮放方 法’其中該步驟(e)係透過下列運算式將該YUV縮放影 像中各像素之γ、U、V分量([F ¢/ η)轉換為該RGB縮 放影像之R、〇、B分量([及G5]): Γ 1 1 1 G = t/ Π 0 -0.39 2.03 。 1.14-0.58 0 184. The improved RGB image scaling method according to claim 1, wherein the high-order interpolation operation refers to each pixel point adjacent to each interpolation point as an associated pixel point, and Y of the associated pixel points. The component performs at least one or more interpolation operations as the γ component of each interpolation point. 5. The improved RGB image scaling method of claim 4, wherein the at least one-order interpolation operation assigns weight coefficients to the associated pixels at a degree close to the interpolation point, and the weighted correlation The Y component of the pixel is interpolated. 6. The improved RGB image scaling method according to claim 5, wherein the at least one order interpolation operation is bilinear interpolation and bicubic interpolation (bicubic 17 200904206 interpolation) ). 7. The improved RGB image scaling method according to claim 1, wherein the direct interpolation operation refers to using adjacent pixel points as associated pixel points, and using the U and v components of the associated pixel points as U and V components of each interpolation point. 8. The improved RGB image scaling method of claim 7, wherein the direct interpolation operation interpolates with U and V components of the associated pixel closest to the interpolation point. 9. The improved RGB image scaling method as described in claim 1 wherein the step (e) is to scale the gamma, U, and V components of each pixel in the YUV by the following expression ([F ¢ / η) is converted to the R, 〇, and B components of the RGB scaled image ([and G5]): Γ 1 1 1 G = t/ Π 0 -0.39 2.03 . 1.14-0.58 0 18
TW96124554A 2007-07-05 2007-07-05 Improved RGB images scaling or resizing method TW200904206A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW96124554A TW200904206A (en) 2007-07-05 2007-07-05 Improved RGB images scaling or resizing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW96124554A TW200904206A (en) 2007-07-05 2007-07-05 Improved RGB images scaling or resizing method

Publications (1)

Publication Number Publication Date
TW200904206A true TW200904206A (en) 2009-01-16

Family

ID=44722298

Family Applications (1)

Application Number Title Priority Date Filing Date
TW96124554A TW200904206A (en) 2007-07-05 2007-07-05 Improved RGB images scaling or resizing method

Country Status (1)

Country Link
TW (1) TW200904206A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI629892B (en) * 2016-05-09 2018-07-11 國立成功大學 Method and circuit for converting and de-converting RGB format and YUV format of depth of field packaging and unpacking

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI629892B (en) * 2016-05-09 2018-07-11 國立成功大學 Method and circuit for converting and de-converting RGB format and YUV format of depth of field packaging and unpacking

Similar Documents

Publication Publication Date Title
CN102881000B (en) A kind of super-resolution method, device and equipment of video image
CN109840881B (en) 3D special effect image generation method, device and equipment
JP4295340B2 (en) Enlarge and pinch 2D images
JP4657367B2 (en) Image processing apparatus, imaging apparatus, and image distortion correction method
EP1347410B1 (en) Edge-based enlargement and interpolation of images
CN110223232A (en) A kind of video image amplifying method based on bilinear interpolation algorithm
JP2004153668A (en) Image processing apparatus and method, recording medium, and program
TW200919366A (en) Image generation method and apparatus, program therefor, and storage medium for string the program
TW201246124A (en) Image generation apparatus
WO2018113224A1 (en) Picture reduction method and device
CN101490708A (en) Image processing apparatus, image processing method, and program
CN101345887B (en) Improved RGB image scaling method
CN101795350A (en) Non-linear image double amplifying method based on relevance detection
CN101639932B (en) Method and system for enhancing digital image resolution
CN112990263B (en) A Data Augmentation Method for High-Resolution Images of Dense Small Objects
WO2010051719A1 (en) Method for magnifying video image 4/3 times
CN116309033A (en) Super-resolution image generation method, device and storage medium
CN112396554A (en) Image super-resolution algorithm based on generation countermeasure network
TW200904206A (en) Improved RGB images scaling or resizing method
CN104853059A (en) Super-resolution image processing method and device
CN103177420A (en) Image amplification method and image application device based on local-area feature correlations
CN115082355B (en) Fisheye camera full pixel image correction method, device, fisheye camera and medium
CN100401741C (en) Weight adjusting device and weight adjusting method
JP2005266918A (en) Image processing apparatus and method, recording medium, and program
CN101572827A (en) Method and device for synthesizing stereo image