TW526668B - Fast gamma correction method of image reading device - Google Patents

Fast gamma correction method of image reading device Download PDF

Info

Publication number
TW526668B
TW526668B TW90113340A TW90113340A TW526668B TW 526668 B TW526668 B TW 526668B TW 90113340 A TW90113340 A TW 90113340A TW 90113340 A TW90113340 A TW 90113340A TW 526668 B TW526668 B TW 526668B
Authority
TW
Taiwan
Prior art keywords
function
gamma correction
interval
image reading
reading device
Prior art date
Application number
TW90113340A
Other languages
Chinese (zh)
Inventor
Jung-Yan Chiou
Original Assignee
Silitek 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 Silitek Corp filed Critical Silitek Corp
Priority to TW90113340A priority Critical patent/TW526668B/en
Application granted granted Critical
Publication of TW526668B publication Critical patent/TW526668B/en

Links

Landscapes

  • Picture Signal Circuits (AREA)
  • Processing Of Color Television Signals (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

There is provided a fast gamma correction method of image reading device, which comprises combining original standard output signal ranges into several combined ranges, in which the real color correction function in each combined range is replaced by a simple approximation function; reading inputted standard signal X and defining its combined range; and using an approximation function corresponding to the combined range to determine a corrected standard signal Y. The method of the present invention can decrease the storage space of gamma correction table and increase the processing speed.

Description

526668 五、發明說明(1) 發明領域 2著網際網路的風潮及電腦硬體的進 置2描器、數位相機或是數位攝影機也隨之== 如取裝置之物理^件特性和其他電腦硬體 真,即需要對於原有影像資料做色彩校正, 之影像呈現。 ;以付到較真貫及較豐富 :用X代表輸入圖素資料,而“戈表輸出圖辛資 可以用指數函射十代表伽馬校正修是用盆 數在硬體的實施上較為困難,因此習用的技術色二= (1厂UP table)以加快資料處理的速度,然而伽馬校正 :屮C〇Jr:Ctl〇n taMe)之檔案大小和輸入圖素編碼 負科及輸出圖素編碼資料之解析度(即位元數)相關 於12-bit輸入、8-bit輸出的解析度而言,伽表兩、 要4K word的儲存空間,然而對於16_bu輸入、8^t表輸而 的解析度而言,伽馬校正表則需要64K㈣以的 此種大小的伽馬5正表就無法應用到-般的產品上, 另方面,貧料讀取的速度亦會限制查表法的使 ;:外f〇nS DRAM來儲存伽馬校正表為例,^圖/資用料 資:::用分頁模式(Ρ_ —Ο來讀取資料 ,項取筆貝枓的時間約為12〇ns,且很難有改進空 权正作之冲异及貧料儲存部份亦交由功能較為強大 526668 五、發明說明(2) 之平口來作,例如我們 描下來的影像,但是在 個人電腦來處理掃描器掃 具有強大之計算了;料許多平台(如PDA)不 大限制。 子此力,因此此種做法亦受到極 因此本發明之一目的 表儲存空間之修正方法。隹於徒供一種可減少伽馬校正 因此I本於明> y 度之修正方法。 目的即在於提供一種可加快處理速 為達此目的,本發明之影 方法包含下列步驟: 〜像續取裝置之快速伽馬校正 3·假設校正後的標準化訊沪y禕s几达 度,將原有標準化輸出訊號的=, 併區間,其中Μ$2η ,曰哀一^個£間加以合併成Μ個合 狄τ τ奴 母個合併區間中的直實的色彩 修正函數士可以用一個簡易的近似函數來取代Υ貝的“ b. 項取輸入的標準化訊號义,並# f ^ ^ 在哪個合併區間; ,I役索輸入訊唬X是洛 c. 使用對應於該合併區間之近似 的標準化訊號X,卩求得已校正的標準化訊號γ。代入輸入 為使本發明之步驟,功效及特點更為人 實例並配合附圖,說明本發明之較佳實現方式。肝 炫牛 發明詳細說明 $ 工 由於伽馬校正函數一般而言是單調遞增函數,因 以將輸入圖素資料或輸出圖素資料的動態範圍分成 間,每一區間可以用一個較為簡易的函數,例如線性函: 526668526668 V. Description of the invention (1) Field of invention 2 The trend of the Internet and the installation of computer hardware 2 Scanners, digital cameras or digital cameras will follow == such as the physical characteristics of the device and other computers The hardware is true, that is, the original image data needs to be color corrected for the image presentation. To pay for more consistent and richer: use X to represent the input pixel data, and "Go table output map Xin Zi can use the index function to shoot ten representative gamma correction repair is basing on the implementation of hardware is more difficult, Therefore, the conventional technology color two = (1 factory UP table) to speed up the data processing speed, but the gamma correction: 屮 C〇Jr: Ctl〇n taMe) file size and input pixel encoding negative section and output pixel encoding The resolution of the data (that is, the number of bits) is related to the resolution of 12-bit input and 8-bit output. Gamma table two requires 4K word storage space, but for 16_bu input and 8 ^ t table input analysis In terms of degrees, the gamma correction table requires a gamma 5 positive table of this size that is less than 64K, and cannot be applied to ordinary products. On the other hand, the speed of reading lean materials will also limit the use of table lookup methods; : External fonS DRAM to store the gamma correction table as an example. ^ Picture / materials ::: Use the paging mode (P_ —0 to read the data. The time for the item to be taken is about 12ns. And it is difficult to improve the originality of the air right and the poor material storage part is also handed over to the more powerful 526668 Note (2) is based on a flat mouth, such as the image we have described, but it has a powerful calculation to handle the scanner scan on a personal computer; it is expected that many platforms (such as PDA) are not limited. Therefore, this is the way to do this. It is also subject to the correction method of table storage space, which is one of the objectives of the present invention. The user provided a correction method that can reduce the gamma correction and therefore the I > y degree. The purpose is to provide a method that can speed up the processing speed. For this purpose, the shadow method of the present invention includes the following steps: ~ Fast gamma correction like a continuous pick-up device 3. Assuming the corrected normalized signal y 祎 s, the original normalized output signal =, and the interval, Among them, M $ 2η and Y ^^^ are merged to form a direct and solid color correction function in M merged τ τ slaves. A simple approximation function can be used to replace the "b. The term takes the input normalized signal meaning, and # f ^ ^ in which merge interval; I input the input signal X is Luo c. Using the approximate normalized signal X corresponding to the merge interval, get the corrected normalization No. γ. Substitute the input to make the steps, effects, and features of the present invention more practical and to illustrate the preferred implementation of the present invention with the accompanying drawings. The liver-hyun cattle invention detailed description Monotonically increasing function, because the dynamic range of input pixel data or output pixel data is divided into intervals, each interval can use a simpler function, such as a linear function: 526668

或是夕項式函數來逼近,只要近似函數和真實校正函數的 誤差在可以容忍的範圍,此近似函數可以為我們所接受。 即使伽馬校正函數並非為單調遞增函t,但是如果適宜的 選擇區間’仍可以在這些區間將伽馬校正函數用簡易函數 參考第一圖,為說明使用線性函數近似伽馬校正函數 的一個範例,其中X座標代表待校正的標準化訊號( nonndized signal),且γ座標代表校正後的標準化訊號 。為簡化說明,假設校正後的標準化訊號γ量化為2—bit的 解析度。參見此圖,對於γ座標的臨限值(thresh〇ld)分別 為〇, 0.25, 0.5’ 0.75, 1,亦即在(〇, 〇·25)之間的輸出Or it can be approximated by the xi term function. As long as the error between the approximate function and the true correction function is within a tolerable range, this approximate function can be accepted by us. Even if the gamma correction function is not a monotonically increasing function t, you can still use the simple function of the gamma correction function in these intervals if you choose appropriate intervals. Refer to the first figure for an example of using the linear function to approximate the gamma correction function. , Where the X coordinate represents the non-nized signal to be corrected, and the γ coordinate represents the corrected normalized signal. To simplify the description, it is assumed that the corrected normalized signal γ is quantized to a 2-bit resolution. Referring to this figure, the thresholds for the γ coordinates (thresh〇ld) are 0, 0.25, 0.5 '0.75, 1, respectively, that is, the output between (0, 〇 · 25)

對應到Υ0 (編碼00),而(0·25, 〇·5)之間的輸出對應到A (編碼0 1 ).·餘此類推。由此圖可以看出,實線部份為真 貫杈正函數,將Y座標的臨限值(threshold) 0,0·25,0·5, 〇· 75, 1由函數映射可以得到Χ座標之臨限值χ^,χ^,Corresponds to Υ0 (code 00), and the output between (0 · 25, 〇 · 5) corresponds to A (code 0 1). · And so on. It can be seen from the figure that the solid line part is a true positive positive function. The X coordinate is obtained by mapping the threshold of the Y coordinate to 0,0 · 25,0 · 5, 〇 · 75, 1 Threshold χ ^, χ ^,

Χτ4。而虛線部份則代表用折線函數所表示的近似函數。因 此進行伽馬校正工作需要決定輸入圖素資料义是落在哪一 個X座;j:示之限值XTQ,XT1,Xu,Χτ3,ΧΤ4範圍内,及選取適當的 近似函數以降低誤差。以第一圖為例,使用b i n a r y search,僅需做兩次比較即可得到輸入圖素資料x之區間 ’並且可以得到對應的輸出編碼。然而輸出資料γ有個 位準時,即需做η次搜尋,極為耗時,本發明是利用區間 合併之方法,以減少搜尋的時間。 為方便說明故’下面說明先對本發明所使用的符號做Χτ4. The dotted line represents the approximate function represented by the polyline function. Therefore, to perform gamma correction work, it is necessary to determine which X block the input pixel data falls in; j: the limits shown in the range XTQ, XT1, Xu, χτ3, and XT4, and an appropriate approximation function is selected to reduce the error. Taking the first picture as an example, using bi n a r y search, only two comparisons are needed to obtain the interval ′ of the input pixel data x and the corresponding output code can be obtained. However, when the output data γ has a certain level, it needs to perform η search, which is extremely time-consuming. The present invention uses the method of interval merging to reduce the search time. For the sake of convenience, the following explanation is made on the symbols used in the present invention.

第6頁 526668 五、發明說明(5) 如若區間Th到Tk合併成一個合併區間,則在此合併區間之 色彩修正函數可以用F(h,k) (·)近似,其可以為一簡易函數 ,例如線性或是指數函數。 - 參見第二圖,為本發明區間合併之範例,其中F(h,k) (.)為一線性函數,且由虛線表示,實線部份為真實的色 彩修正函數。在此範例中,m = 3,η = 2,因此輸出訊號共有 四個區間。當我們試圖合併區間(Τ2, Τ3)及(Τ3,Τ4),並用F (.)近似,會發現此合併區間中,量化的輸入Χ4發生矛盾 的狀況,因為Q(F(24) (Χ4)) = Υ2,而Q(G (Χ4))=Υ3,因此區 間(Τ2,Τ3)及(Τ3, Τ4)無法合併。相反的在合併區間(TG,Ί\) ι§ 及(Ί\,Τ2)時,卻沒有錯誤發生,故區間(TG,Ί\ )及(Ί\,Τ2) 可以合併為(TQ,Τ2),且用F(g,2) (_)近似以求得我們所想 要的正確輸出值。 以下為區間合併之步驟: 步驟0 : 設定k = 0 ; 步驟1 : 設定h = k ; 步驟2 : 設定k = k+l ; 步驟3 : 如果k = 2n,則停止; 步驟4:若3屬於(}1,1〇,且在(〇-1(1;),^1(1^1))中所 有XT,T = 0. . 2m-l,等於(F'uJTs), · F_1(h,k) (Ts+1))中所有Χτ,Τ = 0· · 2m-l,則回至 步驟2 ; 步驟5:合併(Th,Th+1)〜(Th,Tk)為(Th,Tk),並記錄 F(h,k)(.),Page 6 526668 V. Description of the invention (5) If the interval Th to Tk is merged into a merge interval, the color correction function in this merge interval can be approximated by F (h, k) (·), which can be a simple function , Such as a linear or exponential function. -See Figure 2 for an example of interval merging in the present invention, where F (h, k) (.) Is a linear function and is represented by a dashed line, and the solid line part is the true color correction function. In this example, m = 3 and η = 2, so the output signal has four intervals. When we try to merge the intervals (T2, T3) and (T3, T4) and approximate them with F (.), We will find that the quantized input X4 has a contradiction in this merged interval, because Q (F (24) (χ4) ) = Υ2, and Q (G (χ4)) = Υ3, so the intervals (T2, T3) and (T3, T4) cannot be merged. On the contrary, when the intervals (TG, Ί \) ι§ and (Ί \, T2) are merged, no error occurs, so the intervals (TG, Ί \) and (Ί \, T2) can be merged into (TQ, Τ2) , And use F (g, 2) (_) to get the correct output value we want. The following are the steps for interval merging: Step 0: Set k = 0; Step 1: Set h = k; Step 2: Set k = k + l; Step 3: Stop if k = 2n; Step 4: If 3 belongs to (} 1,1〇, and all XTs in (〇-1 (1;), ^ 1 (1 ^ 1)), T = 0. .2m-1, equal to (F'uJTs), F_1 (h , K) (Ts + 1)) for all Xτ, T = 0 · · 2m-1, then go back to Step 2; Step 5: Combine (Th, Th + 1) ~ (Th, Tk) to (Th, Tk) ) And record F (h, k) (.),

526668526668

五、發明說明(6) 步驟6 :回至步驟1。 由j的流程可以看出,區間合併的依據,是檢查在 該口併區間中,所有透過真實色彩校正函數反映射得到的 輸入訊號臨限值,與所有透過近似校正函數反映射得到的 輸入訊號臨限值,是否完全符合,如果完全符合,則可以 將這些區間合併;#否’則處理下—區間,檢查是否可與 其後續之區間加以合併。V. Description of the invention (6) Step 6: Return to step 1. It can be seen from the flow of j that the basis of interval merging is to check the threshold value of all input signals obtained through inverse mapping of the true color correction function and the input signals obtained through inverse mapping of the approximate correction function. Threshold value, whether it meets completely. If it meets completely, you can merge these intervals; #No 'then process the next-interval and check whether it can be merged with its subsequent intervals.

第三圖所示為利用本發明方法實現伽馬修正之方塊圖 ,其中X代表待校正的標準化訊號,γ代表校正後的標準化 訊號。此功能方塊圖包含一搜尋(searching)單元1〇2、一 個儲存(storage)單元104及一個匹配及輸出映射(curve fitting and output mapping)單元 1〇6。此搜尋單元 1〇2 用以搜索輸入訊號X是落在哪個區間,儲存單元1〇4是儲存 已,分類的區間(Xj, Xj + 1), j = 0..2m —丨,而匹配及輸出映 射單元1 06則可產生近似函數並且將輸入訊號χ映射成輸出 Λ旎Y。配合月ij述步驟,可以看出在使用本發明步驟得出 各合併區間,及在此合併區間之近似函數後,對於一個輸 ^的待校正的標準化訊號χ,先由搜尋單元丨〇 2用搜索輸入 机,X是落在哪個區間,在此過程中搜尋單元丨〇 2會要求儲 存單元104提,=儲存的資料進行比對。待搜尋單元1〇2找 出輪入訊號X是落在哪個區間後,匹配及輸出映射單元丨〇 6 可以產生對應此合併區間之對應函數,並求得對應的已校 正的標準化訊號Υ。 綜上所述’本發明之影像讀取裝置之快速伽馬校正方The third figure shows a block diagram of gamma correction using the method of the present invention, where X represents the standardized signal to be corrected and γ represents the standardized signal after correction. The functional block diagram includes a searching unit 102, a storage unit 104, and a curve fitting and output mapping unit 106. This search unit 102 is used to search in which interval the input signal X falls, and the storage unit 104 is a stored and classified interval (Xj, Xj + 1), j = 0..2m — 丨, and matches and The output mapping unit 106 can generate an approximate function and map the input signal χ to an output Λ 旎 Y. In conjunction with the steps described in month ij, it can be seen that after using the steps of the present invention to obtain each merged interval, and after the approximate function of this merged interval, the normalized signal χ to be corrected for an input ^ is first used by the search unit 丨 〇2 Search the input machine, in which section X falls, in the process the search unit 〇 02 will ask the storage unit 104 to mention, = stored data for comparison. After the search unit 102 finds out which interval the round-in signal X falls, the matching and output mapping unit 6 can generate a corresponding function corresponding to this merged interval, and obtain the corresponding corrected standardized signal Υ. In summary, the fast gamma correction method of the image reading device of the present invention

第9頁 526668 五、發明說明(7) 法綜上所述,可減少伽馬校正表儲存空間,及可加快處理 速度,乃一不可多得之發明,爰依法提出申請之,請詳查 並准于本案專利,以保障該創作者之權益,若 鈞局貴審 查委員有任何稽疑,請不吝來函指示。 按,以上所述,僅為本發明之一具體實施例,因此任 何熟悉此項技藝者在本發明之領域内,所實施之變化或修 飾皆被涵蓋在本案之專利範圍内。Page 9 526668 V. Description of the invention (7) In summary, the method can reduce the storage space of the gamma correction table and speed up the processing speed. It is a rare invention. If you apply for it according to the law, please check it carefully. The patent in this case is allowed to protect the rights and interests of the creator. If there is any suspicion on the review committee of the Bureau, please write to us. According to the above, it is only one specific embodiment of the present invention, so any person skilled in the art in the field of the present invention, the changes or modifications implemented are covered by the scope of the patent of this case.

第10頁 526668 圖式簡單說明 第一圖為說明使用線性函數近似伽馬校正函數的一個範例 〇 第二圖為本發明區間合併之範例。 第三圖所示為利用本發明方法實現伽馬修正之方塊圖。 圖號說明 102 搜尋單元 104 儲存單元 106 匹配及輸出映射單元Page 10 526668 Brief description of the diagram The first diagram is an example of the approximate gamma correction function using a linear function. The second diagram is an example of interval merging in the present invention. The third figure shows a block diagram of gamma correction by the method of the present invention. Figure number description 102 Search unit 104 Storage unit 106 Matching and output mapping unit

第11頁Page 11

Claims (1)

526668 六、申請專利範圍 1. 一種影像讀取裝置之快速伽馬校正方法,包含下列 步驟: a. 假設校正後的標準化訊號Y係量化為n-bit的解析度 ,將原有標準化輸出訊號的2n個區間加以合併成Μ個合併 區間,其中Μ $ 2η,且每一個合併區間中的真實的色彩修 正函數可以用一個簡易的近似函數來取代; b. 讀取輸入的標準化訊號X,並搜索輸入訊號X是落在 哪個合併區間; ❿ c. 使用對應於該合併區間之近似函數,並代入輸入的 標準化訊號X,以求得已校正的標準化訊號Y。 2. 如申請專利範圍第1項之影像讀取裝置之快速伽馬 校正方法,其中步驟a的區間合併,包含下列步驟: aO a 1 a2 a 3 a4 a5 設定k = 0 ; 設定h = k ; 設定k = k + l ; 如果k = 2n,則停止; 若s屬於(h,k),且在(GH),GUd)中所有Χτ ,丁 = 0··Μ-1,等於(Ts+1))中 所有XT,T = 0..2ffl-1,則回至步驟2 ; 合併(Th,Th+1)〜(Tk」,Tk)為(Th,Tk),並 §己錄 F(h,k) a 6 : 回至步驟a 1 ; 其中 m : 輸入訊號解析度526668 6. Scope of patent application 1. A fast gamma correction method for an image reading device, including the following steps: a. Assuming that the corrected standardized signal Y is quantized to n-bit resolution, the original standardized output signal 2n intervals are merged into M merged intervals, where M $ 2η, and the true color correction function in each merged interval can be replaced with a simple approximation function; b. Read the input normalized signal X and search Which merge interval the input signal X falls in; ❿ c. Use an approximate function corresponding to the merge interval and substitute the input normalized signal X to obtain a corrected normalized signal Y. 2. For the fast gamma correction method of the image reading device of the scope of application for patent, the interval merge of step a includes the following steps: aO a 1 a2 a 3 a4 a5 set k = 0; set h = k; Set k = k + l; if k = 2n, stop; if s belongs to (h, k) and all χτ in (GH), GUd), D = 0 ·· M-1, equal to (Ts + 1 )) All XT, T = 0..2ffl-1, then go back to step 2; merge (Th, Th + 1) ~ (Tk ", Tk) to (Th, Tk), and § F (h , K) a 6: go back to step a 1; where m: input signal resolution 第12頁 526668 六、申請專利範圍 Y二G(X):真實的色彩修正函數 F(h,k) (·)為區間(Th,Tk)之近似函數。 3. 如申請專利範圍第1項之影像讀取裝置之快速伽馬 校正方法,其中步驟a的簡易的近似函數為多項式函數或 是指數函數等非超越函數。 4. 如申請專利範圍第1項之影像讀取裝置之快速伽馬 校正方法,其中影像讀取裝置可以為掃描器、數位相機或 )是數位攝影機。Page 12 526668 6. Scope of patent application Y2G (X): True color correction function F (h, k) (·) is an approximate function of the interval (Th, Tk). 3. For the fast gamma correction method of the image reading device such as the item 1 of the scope of patent application, the simple approximate function of step a is a polynomial function or a non-transcendental function such as an exponential function. 4. The fast gamma correction method of the image reading device as described in the first patent application scope, wherein the image reading device may be a scanner, a digital camera or a digital camera. 第13頁Page 13
TW90113340A 2001-06-01 2001-06-01 Fast gamma correction method of image reading device TW526668B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW90113340A TW526668B (en) 2001-06-01 2001-06-01 Fast gamma correction method of image reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW90113340A TW526668B (en) 2001-06-01 2001-06-01 Fast gamma correction method of image reading device

Publications (1)

Publication Number Publication Date
TW526668B true TW526668B (en) 2003-04-01

Family

ID=28450584

Family Applications (1)

Application Number Title Priority Date Filing Date
TW90113340A TW526668B (en) 2001-06-01 2001-06-01 Fast gamma correction method of image reading device

Country Status (1)

Country Link
TW (1) TW526668B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI387318B (en) * 2006-05-17 2013-02-21 Sony Corp Image correction circuit, image correction method and image display

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI387318B (en) * 2006-05-17 2013-02-21 Sony Corp Image correction circuit, image correction method and image display

Similar Documents

Publication Publication Date Title
US20200005518A1 (en) Point cloud mapping
TW419612B (en) Common image processing architecture for use in digital camera and compression/scaling technique for video and still modes
CN102160369B (en) Minimally processing displayed images captured from a burst
US8787659B2 (en) Automatic adaptation to image processing pipeline
US20140212033A1 (en) Image compression mehtod, image compression device and mobile terminal
WO2003003300A2 (en) Automatic digital picture enhancement
JP2002535751A (en) Image storage and retrieval system based on region
US10819876B2 (en) Video-based document scanning
CN107038695A (en) A kind of image interfusion method and mobile device
WO2020029883A1 (en) Method and device for generating video fingerprint
US20190213711A1 (en) Color image authentication method based on palette compression technique
JP2010191954A (en) Method and apparatus for processing sequence of image, device for processing image data, and computer program product
TW526668B (en) Fast gamma correction method of image reading device
US20200105023A1 (en) Packing strategy signaling
US11445136B2 (en) Processing circuitry for processing data from sensor including abnormal pixels
Besser Introduction to imaging
Hong et al. A recoverable AMBTC authentication scheme using similarity embedding strategy
US7853087B2 (en) High-speed binary image compression method
US20180063362A1 (en) Serial data transfer using transfer type information to select a storage unit
CN1224937C (en) Quick gamma correction method for image reading device
US10567616B2 (en) Image processing apparatus
TWI799050B (en) Electronic device and method for detecting and recognizing character
JP6785930B2 (en) Mobile devices, image processing methods, and programs
WO2018003090A1 (en) Image processing device, image processing method, and program
US20230164362A1 (en) Camera module, image processing device and image compression method

Legal Events

Date Code Title Description
GD4A Issue of patent certificate for granted invention patent
MM4A Annulment or lapse of patent due to non-payment of fees