W 26591twf.doc/n 201003568 v / i\j Ly L· 九、發明說明: 【發明所屬之技術領域】 本發明是有關於一種影像的調整方法與系統,且特別 是有關於一種調整影像之飽和度的方法與系統。 【先前技術】 在影像處理技術中,飽和度(saturation )及亮度 (illumination)的調整對於影像的色彩表現多半會造成最 直接的影響。一般來說,顯示器的製造商會在顯示晶片上 實作色彩的調整電路,進而讓使用者可以根據習慣或需求 來調整影像晝面的飽和度或亮度,據以取得最佳的輪出效 果。 ^ 傳統的影像飽和度調整方法中,在保持晝面之整體亮 度的A提下’若希望提南影像的鮮盤程度,首先必須對景< 像進行色彩空間的轉換動作,據以將每個像素的三原色 (RGB)訊號轉換為色差訊號(例如γυν訊號,其中γ 表示亮度,而u、v則是色彩資訊)。接著將每個u、v 訊號乘上相同的調整參數以取得新的U值與乂值。最後再W 26591 twf.doc/n 201003568 v / i\j Ly L· IX. Description of the Invention: [Technical Field] The present invention relates to an image adjustment method and system, and more particularly to an image saturation Degree method and system. [Prior Art] In image processing technology, the adjustment of saturation and illumination has the most direct effect on the color performance of an image. In general, the manufacturer of the display implements a color adjustment circuit on the display wafer, thereby allowing the user to adjust the saturation or brightness of the image surface according to custom or demand, in order to achieve the best rounding effect. ^ In the traditional image saturation adjustment method, in the case of maintaining the overall brightness of the kneading surface, if you want to increase the degree of the fresh disk of the image, you must first perform a color space conversion operation on the scene. The three primary color (RGB) signals of the pixels are converted into color difference signals (for example, γυν signals, where γ represents brightness, and u and v are color information). Then multiply each u and v signal by the same adjustment parameters to obtain new U and 乂 values. Last
將調整過的YUV訊號轉換回RGB訊號,據以完成影像之 飽和度的調整動作。 V 在這樣的作法中是以相同的調整參數來對影像中的 所有像素進行處裡。然㈣是,在纽本身就具 有較高飽和度(即㈣輕)的像料,紅 作、 該像素變得過於飽和。因此在對整張影像做處理 日守,若完全以_的調整參數來對每個晝素進行調整,則 5 201〇〇3568w2659itw£d〇c/n 很可此會使彳于部分屬於高飽和度且僅具有細微差異的像素 全部變得過度飽和,因而喪失影像中的細節,並可能造成 影像色純過於濃烈,而導致不自然的色彩效果。 —透過上述方法來增加影像的飽和度除了可能造成細 節的喪失之外’在電路的實作上也祕相#_。無論是 色衫空間的轉齡作’或是在γυν色彩㈣下所進行的 飽和度計算動作,均必彡貞侧大量娜學計算,這不 仁不利於私路的實現,同時必須耗費較多的硬體成本。這 些都是顯示ϋ製造商在研發時所不能忽視的議題。 【發明内容】 、本發明之目的是提供一種影像飽和度之調整方法,得 =不Γ過任何色$空間的轉軸作,便能完成影像飽和度 的調整。 本么月之另一目的是提供一種影像飽和度之調整系 πη^依據W像巾每個像素本身的色彩條件,對應地進行 5炎飽和度調整動作,進而確保影像飽和度的調整效果。 述或是其他目的’本發明提出—種影像飽和度 個:ΪΓ用以調整影像的飽和度,其中此影像包括多 r t 料提供外部調整餘,並根據每個像素 ,)分量’直接計算出各個像素的飽和度近 和产螂ΙΓ ’取得每個像素的飽和度調整量。其中,飽 值讀應射卜部輕雜與各像素之飽和度近似Convert the adjusted YUV signal back to the RGB signal to complete the image saturation adjustment. In this way, V uses the same adjustment parameters to align all the pixels in the image. However, (4), in the New Zealand itself, there is a higher saturation (ie, (four) light) image, red, the pixel becomes too saturated. Therefore, in the process of processing the entire image, if the adjustment of each element is completely adjusted by _, then 5 201〇〇3568w2659itw£d〇c/n can make the part belong to high saturation. All pixels with only slight differences become oversaturated, thus losing detail in the image, and may cause the image color to be too intense, resulting in an unnatural color effect. - Increasing the saturation of the image by the above method, in addition to the possibility of loss of detail, is also a secret ## in the implementation of the circuit. Whether it is the age of the color shirt space or the saturation calculation performed under the γυν color (4), there must be a large amount of calculations on the side, which is not conducive to the realization of the private road, and must be more expensive. Hardware cost. These are all issues that manufacturers can't ignore when developing. SUMMARY OF THE INVENTION The object of the present invention is to provide an image saturation adjustment method, which can achieve image saturation adjustment without bypassing the rotation axis of any color space. Another purpose of this month is to provide an image saturation adjustment system πη^ according to the color condition of each pixel of the W towel, correspondingly perform 5 inflammation saturation adjustment operation, thereby ensuring the image saturation adjustment effect. Or other purposes 'The present invention proposes a kind of image saturation: ΪΓ is used to adjust the saturation of the image, wherein the image includes multiple rt materials to provide external adjustment, and according to each pixel, the component 'directly calculates each The saturation of the pixel is near and the 螂ΙΓ 'obtains the amount of saturation adjustment for each pixel. Among them, the saturation reading should be light and the saturation of each pixel is similar.
RGB 6 2〇l〇〇3568.W2659itwfd〇c/n 在本發明之一實施例中,根據像素的RGB分量直接 計算出像素之飽和度近似值的步驟,包括根據RGB分量 中的最大值與最小值來計算飽和度近似值。 在本發明之一實施例中,其中在取得各像素之飽和度 調整量的步驟之前,更包括提供第一飽和度臨界值與第二 飽和度臨界值。其中,第一飽和度臨界值小於第二飽和度 臨界值。接著,比較第一飽和度臨界值、第二飽和度臨界 值以及飽和度近似值的大小,據以判斷飽和度近似值係屬 於高飽和度範圍、中飽和度範圍,或低飽和度範圍。 在本發明之一實施例中,其中取得像素之飽和度調整 量的步驟包括在飽和度近似值屬於高飽和度範圍或低飽和 度範圍時’令飽和度調整量為預設調整常數。然而在飽和 度近似值屬於中飽和度範圍時,依據第一飽和度臨界值、 第二飽和度臨界值、飽和度近似值,以及外部調整係數來 計算飽和度調整量。 在本發明之一實施例中,判斷飽和度近似值係屬於高 飽和度範圍、中飽和度範圍,或低飽和度範圍的步驟包括 在飽和度近似值小於第一飽和度臨界值時,判斷飽和度近 似值屬於低飽和度範圍。而在飽和度近似值介於第一飽和 度臨界值及第二飽和度臨界值之間時,判斷飽和度近似值 屬於中飽和度範圍。並且在飽和度近似值大於第二飽和度 臨界值時’判斷飽和度近似值係屬於高飽和度範圍。 在本發明之一實施例中,外部調整係數包括介於〇至 2之間的數值。 7 201003568 \ji ι\/χ^_«λα W 26591twf.doc/n ^從另了觀點來看,本發明提出一種影像飽和度之調整 系統。此系統包括調整幅度決策模組及飽和度調整模組。 其中,調整幅度決策模組包括飽和度近似值計算模組與飽 和度調整量取得模組,用以接收影像及外部調整係數。其 中,所接收之影像包括多個像素。飽和度近似值計算模組 是用以根據每個像素的RGB分量,直接計算出各像素的 飽和度近似值;飽和度調整量取得模組則是連接至飽和度 近似值計算模組,用以根據外部調整係數與像素之飽和度 近似值的大小,分別取得每個像素的飽和度調整量。與調 整幅度決策模組相連的飽和度調整模組係用以依據飽和度 調整量及RGB分量,對應地調整影像中的每個像素。 在本發明之一實施例中,其中飽和度近似值計算模組 用以根據RGB分量中的最大值與最小值’來計算所對應 之像素的飽和度近似值。 在本發明之一實施例中,其中飽和度調整量取得模組 用以提供第一飽和度臨界值與第二飽和度臨界值。其中, 第一飽和度臨界值小於第二飽和度臨界值。飽和度調整量 取得模組將比較第一飽和度臨界值、第二飽和度臨界值以 及飽和度近似值的大小,據以判斷飽和度近似值係屬於高 飽和度範圍、中飽和度範圍,或低飽和度範圍。 在本發明之一實施例中,其中飽和度調整量取得模組 用以在飽和度近似值屬於高饱和度範圍或低飽和度範圍 時,令飽和度調整量為預設調整常數。而在飽和度近似值 屬於中飽和度範圍時,依據第一飽和度臨界值、第二飽和 W 26591twf.doc/n 201003568 V f 1 V 1 / 夏·!· 度臨界值、飽和度近似值’以及外部調整係數來計算飽和 度調整量。 在本發明之一實施例中,其中飽和度調整量取得模組 用以在飽和度近似值小於第一飽和度臨界值時,判斷飽和 度近似值屬於低飽和度範圍;而在飽和度近似值介於第一 飽和度臨界值及第二飽和度臨界值之間時,判斷飽和度近 似值屬於中飽和度範圍;並且在飽和度近似值大於第二飽 和度臨界值時,判斷飽和度近似值屬於高飽和度範圍。 在本發明之一實施例中,外部調整係數包括介於0至 2之間的數值。 本發明在RGB色彩空間下,根據影像中每個像素本 身的RGB分量直接計算飽和度近似值,並判斷是否需要 對該像素進行飽和度的調整,以及取得對應的飽和度調整 幅度。在不以固定之調整參數來對整張影像進行調整的情 況之下’將可以確保影像的細節不會因飽和度的調整動作 而消失,進而確保整張影像的色彩表現。 ▲為讓本發明之上述和其他目的、特徵和優點能更明顯 易丨董下文特舉較佳實施例,並配合所附圖式,作詳細說 明如下。 【實施方式】 ^ 般來說’由顯示器面板(panel)之驅動電路所產生 说係屬於三原色(RGB)色彩空間的RGB訊號。因 在、在調整影像的飽和度時,若能直接在RGB色彩空間 進行凋整而不需進行色彩空間的轉換,勢必能降低實作 9 201003568 --------W 26591twf.doc/n 轉換色衫空間所需要的硬體電路成本。本發明便是基於上 这觀點進而發展出的一種影像飽和度之調整方法及系統。 為了使本發明之内容更為明瞭,以下特舉實施例做為本發 明確實能夠據以實施的範例。 圖1是依照本發明之一實施例所繪示之影像飽和度之 調整系統的方塊圖。請參閱圖丨,影像飽和度之調整系統 1〇〇可根據所接收之影像中各像素的鮮盤程度來進行對應 的飽和度調整動作。在本實施例巾,影像飽和度之調整系 、’先100包括調整幅度決策模組110以及飽和度調整模组 120。 · '其^,調整幅度決策模組110會透過内部的飽和度近 似值計算模組111與飽和度碰量轉模組113,以根據RGB 6 2〇l〇〇3568.W2659itwfd〇c/n In one embodiment of the invention, the step of directly calculating the saturation approximation of the pixel based on the RGB components of the pixel, including the maximum and minimum values according to the RGB component To calculate the saturation approximation. In an embodiment of the invention, before the step of obtaining the saturation adjustment amount of each pixel, the method further includes providing a first saturation threshold and a second saturation threshold. Wherein the first saturation threshold is less than the second saturation threshold. Next, the first saturation threshold, the second saturation threshold, and the saturation approximation are compared to determine whether the saturation approximation belongs to the high saturation range, the medium saturation range, or the low saturation range. In an embodiment of the invention, the step of obtaining the saturation adjustment amount of the pixel includes: making the saturation adjustment amount a preset adjustment constant when the saturation approximation is in the high saturation range or the low saturation range. However, when the saturation approximation is in the medium saturation range, the saturation adjustment amount is calculated based on the first saturation threshold, the second saturation threshold, the saturation approximation, and the external adjustment coefficient. In an embodiment of the present invention, the step of determining that the saturation approximation belongs to the high saturation range, the medium saturation range, or the low saturation range comprises determining the saturation approximation when the saturation approximation is less than the first saturation threshold It belongs to the low saturation range. When the saturation approximation is between the first saturation threshold and the second saturation threshold, it is determined that the saturation approximation belongs to the medium saturation range. And when the saturation approximation is greater than the second saturation threshold, the judgment saturation approximation belongs to the high saturation range. In an embodiment of the invention, the external adjustment factor comprises a value between 〇 and 2. 7 201003568 \ji ι\/χ^_«λα W 26591twf.doc/n ^ From another point of view, the present invention proposes an image saturation adjustment system. The system includes an adjustment range decision module and a saturation adjustment module. The adjustment range decision module includes a saturation approximation calculation module and a saturation adjustment amount acquisition module for receiving images and external adjustment coefficients. The received image includes a plurality of pixels. The saturation approximation calculation module is configured to directly calculate the saturation approximation value of each pixel according to the RGB component of each pixel; the saturation adjustment amount acquisition module is connected to the saturation approximation calculation module for external adjustment. The magnitude of the saturation of the coefficient and the saturation of the pixel respectively obtains the saturation adjustment amount of each pixel. The saturation adjustment module connected to the adjustment amplitude decision module is configured to adjust each pixel in the image correspondingly according to the saturation adjustment amount and the RGB component. In an embodiment of the invention, the saturation approximation calculation module is configured to calculate a saturation approximation of the corresponding pixel based on the maximum and minimum values in the RGB components. In an embodiment of the invention, the saturation adjustment amount acquisition module is configured to provide a first saturation threshold and a second saturation threshold. The first saturation threshold is less than the second saturation threshold. The saturation adjustment acquisition module compares the first saturation threshold, the second saturation threshold, and the saturation approximation to determine whether the saturation approximation belongs to a high saturation range, a medium saturation range, or a low saturation. Degree range. In an embodiment of the invention, the saturation adjustment amount acquisition module is configured to make the saturation adjustment amount a preset adjustment constant when the saturation approximation is in the high saturation range or the low saturation range. When the saturation approximation is in the middle saturation range, according to the first saturation threshold, the second saturation W 26591twf.doc/n 201003568 V f 1 V 1 / summer · · · degree threshold, saturation approximation ' and external Adjust the coefficient to calculate the saturation adjustment. In an embodiment of the present invention, the saturation adjustment amount acquisition module is configured to determine that the saturation approximation belongs to a low saturation range when the saturation approximation is less than the first saturation threshold; and the saturation approximation is between When a saturation threshold value and a second saturation threshold value are between, it is judged that the saturation approximation value belongs to the middle saturation range; and when the saturation approximation value is greater than the second saturation degree threshold value, it is judged that the saturation approximation value belongs to the high saturation range. In an embodiment of the invention, the external adjustment factor comprises a value between 0 and 2. In the RGB color space, the present invention directly calculates the saturation approximation value according to the RGB component of each pixel in the image, and determines whether it is necessary to adjust the saturation of the pixel and obtain the corresponding saturation adjustment range. In the case where the entire image is not adjusted with a fixed adjustment parameter, it will ensure that the details of the image will not disappear due to the saturation adjustment action, thereby ensuring the color performance of the entire image. The above and other objects, features, and advantages of the present invention will become more apparent from the description of the appended claims. [Embodiment] ^ Generally speaking, the RGB signal belonging to the three primary color (RGB) color space is generated by the driving circuit of the display panel. Because the image saturation can be adjusted directly in the RGB color space without the need to convert the color space, it is bound to reduce the implementation 9 201003568 --------W 26591twf.doc/ n The hardware circuit cost required to convert the color shirt space. The present invention is an image saturation adjustment method and system developed based on the above viewpoint. In order to make the content of the present invention more comprehensible, the following specific embodiments are illustrative of the embodiments of the present invention. 1 is a block diagram of an image saturation adjustment system in accordance with an embodiment of the present invention. Referring to the figure, the image saturation adjustment system 1 can perform the corresponding saturation adjustment operation according to the degree of fresh disk of each pixel in the received image. In the embodiment, the image saturation adjustment system, the first 100 includes an adjustment amplitude decision module 110 and a saturation adjustment module 120. · '^, the adjustment range decision module 110 passes the internal saturation approximation value calculation module 111 and the saturation touch rotation module 113 to
=接收到的外部調整係數與影像巾各個像素的刪分 直接在RGB色彩空間下計算各個像素^她和度近似 值,並依據飽和度近似值取得對應的飽和度調整量。而與 凋整幅度決紐組U0相連的飽和度 , 會根據每解素_和度織量,分簡各個像素進= 和廑調答動祚。 為了更近-步的說明影像飽和度之調整系統剛的運 下特舉另—實施例來對本發明進行更詳細的說 Μ敕照本發明之—實_崎示之影像飽和度之 I方法的流程圖。請同時參_丨與圖2 :度之調整系統觸對所接收到的影像進行調整之前,首 先如步驟⑽卿’提供—外侧整倾。在本實施例中, 201003568 …w 〜1 * W 2659 ltwf.doc/n 外部調整係數例如是介於〇至2之間的數值。使用者可以 根據本身的喜好來輸入大小不同的外部調整係數。舉例來 說,倘若使用者習慣於較為鮮豔的顯示效果,則可將數值 較高的外部調整係數(例如1.5)輸入至調整幅度決策模 組110 ;然而倘若使用者不希望晝面過於鮮豔,則可以將 數值較小的外部調整係數(例如h2)輸入至調整幅度決 策模組110。 ' (' 接著在步驟22〇中,飽和度近似值計算模組111將根 據影像中每個像素的RGB分量,直接計算出各個像素的 飽和度近似值。在本實施例中,飽和度近似值計算模組Ui 係利用RGB分量中的最大值與最小值來計算像素的飽和 度近似值。舉例來說,倘若一像素的RGB分量為(R,G,B), 那麼在本實施例中例如是以下列公式來計算飽和度近似 值: 飽和度近似值 其中’ MAX(R,G,B)即RGB分量中的最大值,MIN(R,G,B) 則表示RGB分量中的最小值。n則是用以量化飽和度近似 值的量化係數(N例如是2的冪次方)。在一實施例中, 若以8個位元來表示影像中的各個像素,那麼當n為1時, 飽和度近似值的範圍係介於〇至255之間(亦即需要以8 個位元來表示一飽和度近似值)。而當N為2時,飽和度 近似值的範圍則會介於〇至127.5之間,因此僅需要7個 位元便能表示各像素的飽和度近似值。為了方便說明,在 以下的實施例中均假設N為2,因此影像中各像素的飽和 11 201003568 W 26591twf.doc/n 度近似值為介於0至127.5之間的數值。 圖3所示之表格是記錄紅色飽和度由最高降至最低 時,所對應之飽和度以及飽和度近似值的數值變化。其中, R、G、B攔位分別表示一像素的紅色、綠色以及藍色分量, 而Y ' I、Q欄位則是記錄在美國國家規格委員會(Nati〇nal Television System Committee,NTSC)規格下,分別用以表 示党度以及色彩的資訊。請參閱圖3,飽和度搁位所記錄 的資料係在YIQ色彩空間下,透過公式所計算之像 素飽和度。而飽和度近似值欄位所記錄的資料則是由飽和 度近似值計算模組111直接根據像素之RGB分量中的最 大值與最小值所計算的數值。 睛參閱圖3之第二橫排’當一像素的RGB分量為 (255,0,0)時,表示此像素只有紅色而無其他色彩。也就是 說’對顯示器面板來說紅色飽和度最大時其RGB分量為 (255,0,0)。在經過RGB至YIQ的色彩空間轉換動作後,其 對應的飽和度為162.1005938 (即λ/Ϊ532 +53.55γ ),而由飽和 度近似值計算模組111直接利用RGB分量所計算出的飽 和度近似值則為127.5(即[^^^(255,0,0)-黯^(255,0,0)]/2)。 隨著紅色分量的減少以及綠色與藍色分量的增加,紅 色的飽和度也會逐步地下降。如圖3中最後一橫排所示, 當一像素的RGB分量由(255,0,0)改變至(128,127,127)時, 表示此像素已十分地接近白色,如圖3所示,此時該像素 所對應的飽和度與飽和度近似值均降低到趨近於〇的數 值。 12 201003568 …rw 26591 twf.d〇c/n 圖4A是根據圖3的内容所繪製之各種尺(}]8分量與飽 和度之對應關係的曲線圖,而圖4B則是RGB分量與飽和 度近似值之對應關係的曲線圖。同時比較圖4A及圖4B便 可發現,曲線41〇及曲線420僅在起始點的位置以及斜率 上具有些微的不同,但都屬於逐漸遞減至〇的斜直線。因 此可以推斷,由飽和度近似值計算模組111所計算出的飽 和度近似值,應當能確實地反應出像素之飽和度的變化量。 而在此必須強調的是,飽和度近似值計算模組111係 直接在RGB色彩空間下進行飽和度的計算動作,而不需 經,任何的色彩空間轉換程序。換句話說,飽和度近似值 計算模組111所需要的運算量將遠小於傳統的飽和度計算 方法。在所需電路較為簡單的前提之下,本實施例可達到 降低電路成本的目的。 在飽和度近似值計算模組Hi計算出每個像素的飽和 度近似值後,如步驟230所示,飽和度調整量取得模組U3 會根據使用者所提供的外部調整係數以及飽和度近似值的 大小’計算各像素的飽和度調整量。也就是說,飽和度調 整量取得模組113會根據每個像素之飽和度近似值的大 小’對應地給予最適當的飽和度調整量。 舉例來說,當像素本身的飽和度近似值過高時,為了 避免調整後的像素變的過於飽和,因此影像飽和度之調整 系統100將不會對該像素進行飽和度的調整。此外,由於 對飽和度近似值過低的像素進行調整,可能會對影像的亮 度造成負面影響,因此為了避免上述情況的產生,影像飽 13 201003568 I 26591twf.doc/n 和度之調整系統100同樣不會對飽和度近似值過低的像素 進行調整動作。唯有當像素的飽和度近似值屬於中間值 時’影像飽和度之調整系統100才會依據像素本身的鮮豔 程度來對像素的飽和度進行對應的調整。 因此在本實施例中,飽和度調整量取得模組113首先 將提供第一飽和度臨界值與第二飽和度臨界值(第一飽和 度臨界值小於第二飽和度臨界值)。接著對第一飽和度臨 界值、第二飽和度臨界值以及每個像素之飽和度近似值的 大小進行比較。在一像素的飽和度近似值小於第一飽和度 臨界值時,判斷其飽和度近似值屬於低飽和度範圍。而在 飽和度近似值介於第一飽和度臨界值及第二飽和度臨界值 之間時,判斷飽和度近似值係屬於中飽和度範圍。以及在 飽和度近似值大於第二飽和度臨界值時,判斷飽和度近似 值是屬於高飽和度範圍。 延續上述實施例,由飽和度近似值計算模組111所計 算之飽和度近似值的範圍係介於〇至127.5之間的數值, 在本實施例中,第一飽和度臨界值與第二飽和度臨界值例 如可以是12.75及114.75。也就是說,在飽和度近似值屬 於前10%的像素(即飽和度近似值介於114.75至127.5之 間的像素)將被歸類至高飽和度範圍,而屬於後10%的像 素(即飽和度近似值介於〇至12.75之間的像素)則屬於 低飽和度範圍,其餘的像素則屬於中飽和度範圍。在本實 施例中雖然是以12.75及114.75做為第一飽和度臨界值與 第二飽和度臨界值的範例’但並不用以限制本發明的範圍。 14 2〇l〇〇3568w2659i_/n 在像素的飽和度近似值屬於高飽和度範圍或低飽和 度範圍時,飽和度調整量取得模組113將給予該像素—個 符合預設調整常數(例如1)的飽和度調整量。而在像素 的飽和度近似值屬於中飽和度範圍時,飽和度調整量取得 模組113會依據第一飽和度臨界值、第二飽和度臨界值、 飽和度近似值,以及外部調整係數來計算像素的飽和度調 整量。 在一實施例中,飽和度調整量取得模組113是以下列 公式計算一像素的餘和度調整量Km : if ZXST, if ST^/^STc if STc<£»<ST2= Received external adjustment coefficient and the deletion of each pixel of the image towel directly calculate the approximate value of each pixel and the degree in the RGB color space, and obtain the corresponding saturation adjustment amount according to the saturation approximation. The saturation connected with the fading amplitude group U0 will be divided into individual pixels and 廑 答 祚 according to the amount of _ _ and the amount of woven. In order to more closely describe the image saturation adjustment system, the following is a detailed description of the present invention. The present invention is described in more detail with reference to the I method of the image saturation of the present invention. flow chart. Please refer to _丨 and Figure 2: Before adjusting the received image, adjust the system first, as shown in step (10). In the present embodiment, 201003568 ... w 〜 1 * W 2659 ltwf.doc / n The external adjustment coefficient is, for example, a value between 〇 and 2. The user can input external adjustment factors of different sizes according to their own preferences. For example, if the user is accustomed to a more vivid display effect, a higher value external adjustment factor (for example, 1.5) may be input to the adjustment range decision module 110; however, if the user does not want the face to be too bright, then An external adjustment factor (eg, h2) having a smaller value may be input to the adjustment range decision module 110. ' (Next, in step 22, the saturation approximation calculation module 111 will directly calculate the saturation approximation of each pixel according to the RGB component of each pixel in the image. In this embodiment, the saturation approximation calculation module Ui uses the maximum and minimum values in the RGB components to calculate the saturation approximation of the pixel. For example, if the RGB component of a pixel is (R, G, B), then in the present embodiment, for example, the following formula To calculate the saturation approximation: the saturation approximation where 'MAX(R, G, B) is the maximum value in the RGB component, and MIN(R, G, B) is the minimum value in the RGB component. n is used to quantize The quantization coefficient of the saturation approximation (N is, for example, a power of 2.) In one embodiment, if each pixel in the image is represented by 8 bits, then when n is 1, the range of saturation approximation is Between 〇 and 255 (that is, it needs to represent an saturation approximation by 8 bits). When N is 2, the saturation approximation range is between 〇 and 127.5, so only 7 is needed. One bit can represent the saturation of each pixel For convenience of description, in the following embodiments, N is assumed to be 2, so the saturation of each pixel in the image 11 201003568 W 26591 twf.doc/n degree is approximately a value between 0 and 127.5. The table is a numerical change in the saturation and saturation approximation when the red saturation is reduced from the highest to the lowest, where the R, G, and B intercepts represent the red, green, and blue components of a pixel, respectively. The Y'I and Q fields are recorded under the Nati's National Television System Committee (NTSC) specifications to indicate party and color. See Figure 3, Saturation Placement The recorded data is the pixel saturation calculated by the formula in the YIQ color space, and the data recorded by the saturation approximation field is calculated by the saturation approximation calculation module 111 directly according to the maximum value of the RGB components of the pixel. The value calculated by the minimum value. See the second horizontal row of Figure 3. When the RGB component of a pixel is (255, 0, 0), it means that the pixel is only red and has no other color. For the display panel, the RGB component is (255,0,0) when the red saturation is maximum. After the RGB to YIQ color space conversion operation, the corresponding saturation is 162.1005938 (ie λ/Ϊ532 +53.55γ) The saturation approximation calculated by the saturation approximation calculation module 111 directly using the RGB component is 127.5 (ie, [^^^(255,0,0)-黯^(255,0,0)]/2 As the red component decreases and the green and blue components increase, the saturation of the red gradually decreases. As shown in the last horizontal row in Figure 3, when the RGB component of a pixel is changed from (255, 0, 0) to (128, 127, 127), it indicates that the pixel is very close to white, as shown in Figure 3. At this time, the saturation and saturation approximation corresponding to the pixel are reduced to a value close to 〇. 12 201003568 ...rw 26591 twf.d〇c/n Figure 4A is a graph of the corresponding relationship between the various scales (}] 8 components and saturation plotted according to the content of Figure 3, and Figure 4B is the RGB component and saturation. A graph of the correspondence between the approximations. At the same time, comparing FIG. 4A and FIG. 4B, it can be found that the curves 41〇 and 420 have only slightly different positions and slopes at the starting point, but all belong to an oblique line that gradually decreases to 〇. Therefore, it can be inferred that the saturation approximation calculated by the saturation approximation calculation module 111 should be able to positively reflect the amount of change in saturation of the pixel. However, it must be emphasized that the saturation approximation calculation module 111 The calculation of the saturation is performed directly in the RGB color space without any need for any color space conversion procedure. In other words, the calculation amount required by the saturation approximation calculation module 111 will be much smaller than the conventional saturation calculation. Method: Under the premise that the required circuit is relatively simple, the embodiment can achieve the purpose of reducing the circuit cost. The saturation calculation module Hi calculates the saturation of each pixel. After the degree approximation, as shown in step 230, the saturation adjustment amount acquisition module U3 calculates the saturation adjustment amount of each pixel according to the external adjustment coefficient provided by the user and the magnitude of the saturation approximation value. That is, the saturation degree. The adjustment amount acquisition module 113 correspondingly gives the most appropriate saturation adjustment amount according to the magnitude of the saturation approximation value of each pixel. For example, when the saturation value of the pixel itself is too high, in order to avoid the adjusted pixel It is too saturated, so the image saturation adjustment system 100 will not adjust the saturation of the pixel. In addition, since the adjustment of the pixel with too low saturation approximation may have a negative impact on the brightness of the image, In order to avoid the above situation, the image adjustment system 100 does not adjust the pixels whose saturation approximation is too low. Only when the saturation approximation of the pixel belongs to the intermediate value. 'Image saturation adjustment system 100 will be based on the brightness of the pixel itself to the saturation of the pixel Therefore, in the embodiment, the saturation adjustment amount obtaining module 113 first provides a first saturation threshold and a second saturation threshold (the first saturation threshold is less than the second saturation threshold) Then, the first saturation threshold, the second saturation threshold, and the saturation approximation of each pixel are compared. When the saturation approximation of a pixel is less than the first saturation threshold, the saturation is judged. The approximation is in the low saturation range, and when the saturation approximation is between the first saturation threshold and the second saturation threshold, the saturation approximation is determined to be in the mid-saturation range, and the saturation approximation is greater than the second. When the saturation threshold is used, it is judged that the saturation approximation belongs to the high saturation range. Continuing the above embodiment, the range of the saturation approximation calculated by the saturation approximation calculation module 111 is a value between 〇 and 127.5. In this embodiment, the first saturation threshold and the second saturation threshold are used. Values can be, for example, 12.75 and 114.75. That is, pixels with a saturation approximation that belongs to the top 10% (ie, pixels with an saturation approximation between 114.75 and 127.5) will be classified into the high saturation range and belong to the last 10% of the pixels (ie, the saturation approximation) Pixels between 〇 and 12.75 are in the low saturation range, and the remaining pixels are in the mid-saturation range. In the present embodiment, 12.75 and 114.75 are used as examples of the first saturation threshold and the second saturation threshold, but are not intended to limit the scope of the present invention. 14 2〇l〇〇3568w2659i_/n When the saturation approximation of the pixel belongs to the high saturation range or the low saturation range, the saturation adjustment amount acquisition module 113 will give the pixel a preset adjustment constant (for example, 1). The amount of saturation adjustment. When the saturation approximation of the pixel belongs to the middle saturation range, the saturation adjustment amount obtaining module 113 calculates the pixel according to the first saturation threshold, the second saturation threshold, the saturation approximation, and the external adjustment coefficient. The amount of saturation adjustment. In one embodiment, the saturation adjustment amount acquisition module 113 calculates the remainder adjustment amount Km of a pixel by the following formula: if ZXST, if ST^/^STc if STc<£»<ST2
Km: STc - ST, STC-ST,,Km: STc - ST, STC-ST,,
ST2-STC ST2-STC ^ if D>ST2 其中,D表示像素的飽和度近似值,而K為外部調整係數。 呂乃與ST2分別為第一飽和度臨界值及第二飽和度臨界 值,而STC則是STAST2的中間值。圖5是在35、 1.5這二種不同的外部調整係數下,以上述公式所計算出 飽和度調整量與飽和度近似值之間的對應關係曲線。 ^圖5可以發現,外部調整係數的大小可決定飽和度 調整罝的最大值,並且會對上述對應關係曲線的斜率造成 汾響在中飽和度範圍中,只有飽和度近似值屬於中間值 STC的像素,其飽和度調整量會等於使用者所提供的外部 調整係數,其餘像素的飽和度調整量則會呈現線性衰減。 而由於影像飽和度之調整系統⑽不會對屬於高飽和度範 15 201003568 , ________1W 26591twf.doc/n 圍以及低飽和度範圍中的像素進行任何飽和度調整動作, 因此飽和度調整量取得模組113將給予這些像素一個屬於 預設調整常數(例如1)的餘和度調整量。 值得一提的是,在另一實施例中,餘和度調整量與飽 和度近似值的對應關係可透過查表的方式來實作之。也就 疋說,預先建立多組查找表(l〇〇k_Up table),其中每個查 找表記錄在各種不同的外部調整係數下,飽和度近似值所 n 對應的飽和度調整量。在取得使用者所輸入的外部調整係 數並計算出像素的飽和度近似值之後,便可透過查表的方 式直接在對應於外部調整係數的查找表中取得像素的飽和 度調整量。 最後,如步驟240所示,飽和度調整模組12〇將依據 調整幅度決策模組110所傳送之各像素的飽和度調整量及 RGB分量,對應地調整影像中的每個像素。在本實施例 中,任何飽和度調整的電路實作方式均可用來進行像素的 . 飽和度調整動作,在此並不限制其範圍。而當一像素的飽 ^ 和度調整量為預設調整常數時,飽和度調整模組12〇將不 會對該像素進行飽和度的調整動作,進而維持像素本身的 飽和度大小。 綜上所述,本發明所述之影像飽和度之調整方法及系 統,係在RGB色彩空間下直接計算每個像素的飽和度近 似值,並根據各個像素之飽和度近似值的大小,給予最適 當的飽和度調整量,並且在飽和度近似值過高或過低時, 維持像素本身的飽和度,如此一來可避免產生細節消失或 16 ^ 26591twf.doc/n 201003568 ,真的影像。此外,在rGB色彩空間下進行飽和度的計 异也能大幅地減少數學運算量,進而節省飽和度調整電路 的硬體實作成本。 雖然本發明已以較佳實施例揭露如上,然其並非用以 限定本發明,任何熟習此技藝者’在不脫離本發明之精神 和範圍内,當可作些許之更動與潤飾,因此本發明之保護 範圍當視後附之申請專利範圍所界定者為準。 【圖式簡單說明】 圖1是依照本發明之一實施例所繪示之影像飽和度之 調整系統的方塊圖。 圖2是依照本發明之一實施例所繪示之影像飽和度之 調整方法的流程圖。 圖3是依照本發明之一實施例所繪示之紅色飽和度由 最高降至最低時,飽和度及飽和度近似值的數值變化量。 圖4A是依照本發明之一實施例所繪示之紅色飽和度 由最高降至最低時,飽和度的變化曲線。 圖4B是依照本發明之一實施例所繪示之紅色飽和度 由最高降至最低時,飽和度近似值的變化曲線。 圖5是依照本發明之一實施例所繪示之飽和度調整量 與飽和度近似值的對應關係。 【主要元件符號說明】 100 :影像飽和度之調整系統 110 :調整幅度決策模組 111 :飽和度近似值計算模組 17 'W 26591twf.doc/n 201003568 113 :飽和度調整量取得模組 120 :飽和度調整模組 210〜240 :本發明之一實施例所述之影像飽和度之調 整方法的各步驟 410 :曲線 420 :曲線 SI\ :第一飽和度臨界值 ST2 :第二飽和度臨界值 STC :中間值ST2-STC ST2-STC ^ if D>ST2 where D represents the saturation approximation of the pixel and K is the external adjustment factor. Lu Nai and ST2 are the first saturation threshold and the second saturation threshold, respectively, and STC is the intermediate value of STAST2. Fig. 5 is a graph showing the correspondence between the saturation adjustment amount and the saturation approximation calculated by the above formula under the two different external adjustment coefficients of 35 and 1.5. ^ Figure 5 can be found that the size of the external adjustment coefficient can determine the maximum value of the saturation adjustment ,, and will cause the slope of the above corresponding relationship curve to squeak in the middle saturation range, only the saturation approximation belongs to the pixel of the intermediate value STC The saturation adjustment will be equal to the external adjustment factor provided by the user, and the saturation adjustment of the remaining pixels will exhibit linear attenuation. Since the image saturation adjustment system (10) does not perform any saturation adjustment operation on pixels in the high saturation range 15 201003568, ________1W 26591twf.doc/n and the low saturation range, the saturation adjustment acquisition module 113 will give these pixels a margin adjustment amount belonging to a preset adjustment constant (for example, 1). It is worth mentioning that in another embodiment, the correspondence between the amount of adjustment of the remainder and the approximation of the saturation can be implemented by means of a look-up table. That is to say, a plurality of sets of lookup tables (l〇〇k_Up table) are created in advance, wherein each lookup table records the saturation adjustment amount corresponding to the saturation approximation n under various external adjustment coefficients. After obtaining the external adjustment factor input by the user and calculating the saturation approximation of the pixel, the saturation adjustment amount of the pixel can be directly obtained in the lookup table corresponding to the external adjustment coefficient by looking up the table. Finally, as shown in step 240, the saturation adjustment module 12 对应 adjusts each pixel in the image correspondingly according to the saturation adjustment amount and the RGB component of each pixel transmitted by the adjustment amplitude decision module 110. In this embodiment, any saturation adjustment circuit implementation can be used to perform the pixel saturation adjustment operation, and the scope is not limited herein. When the saturation adjustment of a pixel is a preset adjustment constant, the saturation adjustment module 12〇 does not perform saturation adjustment on the pixel, thereby maintaining the saturation level of the pixel itself. In summary, the image saturation adjustment method and system of the present invention directly calculates the saturation approximation value of each pixel in the RGB color space, and gives the most appropriate according to the saturation approximation of each pixel. The amount of saturation adjustment, and when the saturation approximation is too high or too low, maintain the saturation of the pixel itself, so as to avoid the loss of detail or 16 ^ 26591 twf.doc / n 201003568, true image. In addition, the saturation measurement in the rGB color space can greatly reduce the amount of mathematical operations, thereby saving the hardware implementation cost of the saturation adjustment circuit. While the present invention has been described in its preferred embodiments, the present invention is not intended to limit the invention, and the invention may be modified and modified without departing from the spirit and scope of the invention. The scope of protection is subject to the definition of the scope of the patent application. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of an image saturation adjustment system in accordance with an embodiment of the present invention. 2 is a flow chart of a method for adjusting image saturation according to an embodiment of the invention. Figure 3 is a graphical representation of the numerical variation in saturation and saturation approximation when the red saturation is reduced from highest to lowest in accordance with an embodiment of the present invention. 4A is a graph showing saturation as a function of saturation of red saturation from highest to lowest in accordance with an embodiment of the present invention. Figure 4B is a graph showing the saturation approximation as the red saturation is reduced from highest to lowest in accordance with an embodiment of the present invention. Figure 5 is a diagram showing the correspondence between the saturation adjustment amount and the saturation approximation according to an embodiment of the present invention. [Description of main component symbols] 100: Image saturation adjustment system 110: Adjustment amplitude decision module 111: Saturation approximation calculation module 17 'W 26591twf.doc/n 201003568 113 : Saturation adjustment acquisition module 120: Saturation Degree adjustment modules 210 to 240: Step 410 of the image saturation adjustment method according to an embodiment of the present invention: curve 420: curve SI\: first saturation threshold ST2: second saturation threshold STC :Median
1818