TWI377044B - Method for reconstructing color images - Google Patents

Method for reconstructing color images Download PDF

Info

Publication number
TWI377044B
TWI377044B TW98137687A TW98137687A TWI377044B TW I377044 B TWI377044 B TW I377044B TW 98137687 A TW98137687 A TW 98137687A TW 98137687 A TW98137687 A TW 98137687A TW I377044 B TWI377044 B TW I377044B
Authority
TW
Taiwan
Prior art keywords
image
spectrum
color
value
original
Prior art date
Application number
TW98137687A
Other languages
Chinese (zh)
Other versions
TW201116248A (en
Inventor
Hsiang Chen Wang
Fu Jie Hsu
Zih Hao Ye
Fang Hsuan Cheng
Original Assignee
Nat Univ Chung Cheng
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 Nat Univ Chung Cheng filed Critical Nat Univ Chung Cheng
Priority to TW98137687A priority Critical patent/TWI377044B/en
Publication of TW201116248A publication Critical patent/TW201116248A/en
Application granted granted Critical
Publication of TWI377044B publication Critical patent/TWI377044B/en

Links

Description

1377044 八、發明說明: 【發明所屬之技術領域】 本發明係關於一 變換光源頻譜,使一 的光源頻譜而改變, 像。 —不丹現方法,尤指一種藉由 原始數位彩色寻彡後^ ^ 像之各像素依據變換 藉此重現出不同 、 ]視覺效果的彩色影 【先前技術】 絲燈 '氙燈、鹵素燈為 述各種照明燈源使用, 環保、體積小、光強度1377044 VIII. Description of the Invention: [Technical Field to Which the Invention Is Applicable] The present invention relates to a spectrum of a light source that is changed such that a spectrum of a light source changes. - Bhutan's current method, especially a color image in which the pixels of the image are reproduced by the original digital color image according to the transformation, and the visual effect is reproduced. [Prior Art] The silk lamp's xenon lamp and halogen lamp are Use various lighting sources, environmental protection, small size, light intensity

一般在醫學上的照明燈源為鎢 主,而發光二極體(LED)相較於前 具備省電 '發光效率高、壽命長、 可調和色域豐富等眾多優點。 -pi 土 丁 η二β ,凡夂設備運用各種 不同的夕頻譜光源來產生不同的 时1 , 王物衫像’該也生物影傻 將可提供予醫護人員作Λ夂去彳六祕 一王视々像 m S Α 作為參考依據,以判斷待診斷區域有 無發生異常病變。 丨 4句 lL m …”分”丨购赞的病變如:各 性咽喉炎、泡疹性咽峽炎或是 f - 〜丁涡等為近年來僂 甚強的一種典型症狀,尤苴 ’、 ’、t對五歲以下的幼兒更具威 性,若能在腸病毒的初期進 、 至 , 逛仃,。療了以減少重症發生的機 率’一般小兒科醫生的辨岬古斗、& + 、、 ㈣識方式此疾病的方式之-為喉頭 以及手、口診視,由於串.氣从〇 .〇 ^ ^ , …為幼兒,所以在診視時一般醫 生八此在極短的時間來 4问氓御膜疋否有破洞,若能設 §1·出一種特別的光源,利 ^ M 先源可以增加病變區域與周 此手術光源备μ“的辨識月匕力°進—步地,若能將 4 1377044 結合,醫生即可以在電腦螢幕上仔細的判讀或是應用影像 辨,軟體而快速辨識是否有罹患腸病毒,這樣可以使醫護 人員更能確定幼兒是否罹患疾病。 當使用不同頻譜光源照射在待診斷區域時,將會 不同效果的影像,然而,若是真的準備多種照明儀器以提 供不同頻譜光源,將衍生許多問題,如昂貴的硬體添置成 本、維護保養、要求足夠擺置空間、人員操作不熟練等, 如此/一來,以不同頻譜光源照明進行檢測的作法將相當滯 礙難行。 【發明内容】 為解決實際多頻譜光源照明設備不易獲得等問題,本 發明之主要目的係提供一種彩色影像再現方法,其藉由變 換光源頻譜’可使一原始數位彩色影像之各像素依據變換 的光源頻譜而改變’藉此模擬產生不同光源頻譜效果的彩 色影像以作為檢測判斷依據。 為達成前述目的,本發明之方法包含有: ”以一頻譜擷取裝置對複數樣本色塊擷取其頻譜資料, 運异求出該樣本色塊之基底函數係數; 、數位相機擷取該複數樣本色塊之影像擷取值; 車根據該基底函數係數及影像擷取值運算求出一轉換矩 以該數位相機對一原始影像擷取其影像擷取值, »亥原始〜像之影像擷取值及該轉換矩一 $开展王再現影 豕, 依據一新照明光源變換該轉換矩陣,依據原始影像之 "◦44 影像擷取值及該變換後之轉換矩陣可運算產生一對應該新 照明光源之再現影象。 x'Generally, the source of illumination in medicine is tungsten, and the light-emitting diode (LED) has many advantages such as high luminous efficiency, long life, adjustable and rich color gamut compared with the previous one. -pi Tuding η II β, where the 夂 equipment uses a variety of different ray spectrum light sources to produce different time 1 , Wang Wu shirt like 'The creature shadow will be available to the medical staff to go to the six secrets and one king The visual image m S Α is used as a reference to determine whether an abnormal lesion has occurred in the area to be diagnosed.丨 4 sentences lL m ... "分分" 丨 赞 的 的 的 如 如 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各 各', t is more powerful for children under the age of five, if you can go in the early stages of the enterovirus, go shopping. The treatment is to reduce the chance of serious illnesses. 'General pediatrician's identification of cockroaches, & +,, (4) Ways to understand the disease - for the throat and hand, oral examination, due to string. Gas from 〇.〇 ^ ^ , ... for young children, so in the doctor's consultation, the general doctor will ask for a short time to ask if there is a hole in the membrane. If you can set a special light source, you can increase the lesion. The area and the weekly surgical light source can be used to identify the monthly force. If the 4 1377044 can be combined, the doctor can carefully interpret or apply image recognition on the computer screen, and quickly identify whether there is any problem. Enterovirus, which allows health care workers to determine if a child is suffering from a disease. When using different spectral sources to illuminate the area to be diagnosed, there will be different effects of the image, however, if a variety of lighting instruments are really prepared to provide different spectral sources, Will lead to a number of problems, such as expensive hardware purchase costs, maintenance, requiring adequate space, unskilled personnel, etc., so that different spectrum sources are illuminated The detection method will be quite difficult to solve. [Invention] In order to solve the problem that the actual multi-spectral light source illumination device is not easy to obtain, the main object of the present invention is to provide a color image reproduction method, which can make an original by changing the spectrum of the light source. Each pixel of the digital color image is changed according to the spectrum of the converted light source', thereby simulating a color image that produces spectral effects of different light sources as a basis for detecting and determining. To achieve the foregoing objective, the method of the present invention comprises: "a spectrum capturing device" Obtaining the spectral data of the plurality of sample patches, and obtaining the basis function coefficients of the sample patches; and the digital camera capturing the image values of the plurality of sample patches; the vehicle is based on the basis function coefficients and the image capture The value operation finds a conversion moment by which the digital camera captures an image capture value of an original image, and the image value of the original image and the conversion moment are reproduced by the king, according to a new illumination source. Transforming the transformation matrix, and calculating according to the original image"◦44 image capture value and the transformed transformation matrix Students one pair of images to be reproduced new source of illumination. x'

其中,當依據新照明光源變換該轉換矩陣,係 + 包含: V 以該頻譜操取裝置對複數樣本色塊擁取其頻譜 以獲得一組原始頻譜; 、, 以該數位相機複數樣本色塊操取其頻講資料 一組近似頻譜; 獲付 八,該組原始頻譜及近似頻譜同時除以一原光源頻错, -別付到-組原始反射頻譜與一組近似反射頻譜; 日3 $ Λ '且原始反射頻譜與該組近似反射頻譜再同乘竽新 照明光源之頻譜,w4 ^ 这新 料; 產生该複數樣本色塊之新的頻譜資 新的轉 換矩。i據。複數樣本色塊之新的頻譜資料運算求出 於運鼻求出該;Α ώ 分析法計算求出/基底函數係數時,係以主軸 當根據該基底函龢总 陣時,係以多重::影像插取值運算求出轉換矩 •=夕重線性迴歸分析法計算求出。 .於忒數位相機對—片 數位相機係先經過色彩校正°广像擷取其影像擷取值時,該 .於該數位相機對— 數位相機經過彩务淹、。〜居取其影像擷取值時,該 值。 /〜片對該原始影像擷取其影像擷取 藉由前述方式,本發 明可藉由更換不同光源之頻譜, 6 Γ377044 使所拍攝出來之影像能隨著改變不同光源頻譜而產生不一 樣效果之彩色影像,因此可設計所需要的色彩再現效果, 例如提高彩色影像的亮度、声、A * & 度色'胤色差等,來獲得想要的 光源頻譜,如此可降低真實光源上的取得與成本,當本發 明應用在生醫或是半導體檢測時,藉由更換不同光源頻譜 能使人眼或儀器能直接觀察到組織病變處或產品瑕範處。 【實施方式】 本發明主要是藉由以多頻譜為基礎(Μ_…加丨 baSeC0以達到高準確度的色彩量測及色彩重現之技術,並 利用隨手可得之數位相機當做多頻譜影像縣系統中的取 樣设備’ Μ直接把數位相機感測到的值當成是影像操取 = _al C〇_s, Dc),在過程中還搭配數個彩色遽光片 (c〇i〇「Fme「〉來操取影像並增加其近似頻譜的擬合度,因 此在數位相機所拍攝到彩色影像中每個像素之數據值,可 糟由本發明而直接變換成任—光源頻譜1重建出彩色影 像之每個像素的頻譜值隨著光源頻譜的不同而改變 頻譜色彩再現技術、絲分析法及多重線性迴歸分 析法先加以介紹。 A·多頻譜色彩再現技術 色彩再現是指依據配色原理,對被攝物體或 Π原始影像製作複製影像。配色又分為頻譜配色和條: 你 '、中頻W配色因為要求原始影像和再現% 的頻譜特性達成—致’而條件等色配色必須在特= 下追求色外貌—致’若特定條件發生改變,則不—定能 7 1377044 • 保證維持等色,如彩色印刷、照相、電視等的配色皆屬條 件等色配色,除非在特殊的狀·況下,其頻譜配色是很難實 現的》 多頻譜擷取的方法最早是在1993年National Gallery, UK 的 VASARI system 中所被提出的,在 VASARI system 令是利用一台掃描器並搭配著七個獨立的濾片組合而成七 個頻道數目的取樣設備’進而去擷取藝術作品的影像,而 掃描器上的感測器是一個單色且高解析度之數位相機,在 _ 取得影像後接著透過一些適當的訊號處理這些擷取到的影 像並儲存紀錄下來。 因此’接下來要說明的是頻譜再現方法之色彩再現, : 其可以獲取每一像素的頻譜去做色彩再現。由於National : Gallery成功的將其圖書館内的藝術影像實現數位化典藏, 因此這樣的方法受到一些研究單位的重視’其中比較著名 的是 Munse丨I Color Science Labtoratory (MCSL)。由於 :VASARI system需要發費大量的時間在掃描影像上,因此 • MCSL 提出利用單色 cCD(Charge-Coupled Device)數位取 ·:樣設備同樣搭配七個獨立的濾片去改善VASAR丨system中 的取樣設備,在同樣的訊號處理下MCSL實驗證明這樣的 • 方法也可以達到不錯的效果,並降低取樣時所需要花費的 .. 時間。另外’ MCSL認為不了定要利用單色的數位取樣設 備,若是二原色數位取樣設備也是可以達到不錯的效果。 多頻譜擷取系統主要分為兩個部份,第一個為影像的 擷取;另一個為多頻譜分析與頻譜再現。如附件一所示為 多頻譜影像的擷取過程示意圖,其作法是在一光源下,使 8 U77044 用數位相機拍攝經過彩色濾光片的影像,再經過電腦分析 f多頻譜影偉。附件二為多頻譜影像的分析與再現頻譜的 流程,μ是借m光谱儀來取樣色塊,並做頻譜分析 之後再與相機整合,最後才能達到色彩影像之再現。 B、主軸分析法 主袖分析法為多變量統計常用的方法,自196 =應用在色彩科技上重要的—環,主轴分析主要目的: '為兩個··第一個是定義出大量頻譜資訊的主轴方 —個是將資訊的數據精簡化, 第 古十笪M ^ — 要疋將原始貢料重組後, 出相關性尚且互相獨立之變數,再藉 成分’最後便可㈣解釋原始資料中 =主要 如附件三所示,假設(X1 77的變異性。 ;望能透過線性轉換,將變數並 座標二 獨立的變數,卻又可二相關連的變數,轉變成互相 轴分析法的中心觀合。、#料的變異性’這就是主 主轴分析模式推導: a2 假設有m個變量(χ1,χ2 .·, am)使得:: ·.,Xm) ’而想找出係數(a1, var(arx1+a,x2+..+Vx^ 的值為最大(Var·代表6旦 (2-10) 取原始資料群中的最大變數。里其的邊異數),以這種方式來抓 以下正規化條件: /、中(a” ..... am)必須滿足 (ai2+a22+...+am2)=:-i (2-11) 9 U/7044 a 11式之條件要使2,式為極大的-組(ai a2’ 、)’是巾維空間的-個單位向量’不僅如此(ai 且2中’代表—種方向向量的概念,也就是主轴之方向。 其中m維以〗主軸分析法可以下列式子表示: PCl=ailXl+ai2X2+-+a1mxm PC2=a21x1+a22x2+...+a2mXm 盆中 PC C ~ m (2-12) 八中PC^PC』PCm分別代表 以及第m主袖。其第-主軸係數(ai1 a 主轴 足m式,且能uar(ai”Xi+a 11χ+12,…,〜)必須滿 M. , ^ _ 12* X2 Xm)的值為 量㈣互“:主轴至¥ m主軸依此類推,且各個係數向 各個係數(a a "樣的m找出PUC^PCm 子巴…貝料寫成nXn的共變異矩陣(c〇va「iance m_X),此共變異矩陣的特徵向量代表的是(u %),而其對應的特徵值則代表2_1〇式中的變显數。|2’ , 戶^選擇的主軸係、數(ail,ai2aim)能夠使第—主軸% 八二Γ支異數’也就是說能夠用來解釋原始資料中大部 刀U第二主軸則是能對原始資料中未被第— 解釋的變異部份擁有最大 有敢大的解釋月“。通常原始資料有· m 出經職仍然可以找出m個主要成分。但 月&此找出p個主軸,传得 神便付p<m且P越小越好,卻可以用 始資料中9。%以上的變異性,這就是本發明將利 用主軸刀析法來分析資料之主要目的。 1377044 由前述說明得知,當一群資料群是非古陆 p乃p單之矩陣時, 並假設有一群隨機的向量X,如2-13 、所不,且其共變 異矩陣C(covariance matrix)可以2-14式表示之 X= (^, x2> , χη)τ _ _ (2-13) C=E[(X-X)(X-X)T] (2-14) 假設此共變異矩陣為一 Ρ維空間’那麼將會存在—個 Ρ組基底座標系統,並假設此η組基底矩隍丸_ _ π r平马U,以下列式 子表示: U=[x1t x2, ... ,χ ] (2-15) 變數X在Ρ維空間中所對映到的值域值可以下列 式子表示: (2-16)Wherein, when the conversion matrix is transformed according to a new illumination source, the system + comprises: V: the spectrum operation device takes the spectrum of the plurality of sample patches to obtain a set of original spectra; and, the digital sample camera uses the digital sample block Take a frequency spectrum of a set of approximate spectrum; receive eight, the original spectrum and the approximate spectrum of the group are divided by a primary source frequency error, - do not pay - the original reflection spectrum and a set of approximate reflection spectrum; day 3 $ Λ 'And the original reflection spectrum and the set of approximate reflection spectrum are multiplied by the spectrum of the new illumination source, w4 ^ this new material; the new spectrum of the new sample color block is generated. i according to. The new spectral data of the complex sample color block is calculated and found in the nose; when the ώ ώ analysis calculates the basis function, the main axis is based on the base and the total matrix, and is multiplied:: The image interpolation value is calculated and the conversion moment is calculated by the linear regression analysis method. In the digital camera, the digital camera first passes the color correction and the wide image captures the image capture value. The digital camera is used to capture the digital camera. ~ The value is taken when the image is taken from its image. / / The film captures the image of the original image. By the foregoing manner, the present invention can change the spectrum of different light sources, 6 Γ 377044, so that the captured image can produce different effects as the spectrum of different light sources is changed. Color image, so you can design the desired color reproduction effect, such as improving the brightness, sound, A* & color 胤 color difference of the color image to obtain the desired source spectrum, thus reducing the acquisition of the real light source. Cost, when the invention is applied to biomedical or semiconductor testing, by replacing the spectrum of different light sources, the human eye or instrument can directly observe the tissue lesion or the product. [Embodiment] The present invention mainly utilizes a multi-spectrum based method (Μ_...plusbaSeC0 to achieve high-accuracy color measurement and color reproduction technology, and utilizes a digital camera that is readily available as a multi-spectral image county. The sampling device in the system' Μ directly takes the value sensed by the digital camera as image manipulation = _al C〇_s, Dc), and also uses several color stencils in the process (c〇i〇 "Fme "> to manipulate the image and increase the approximation of its approximate spectrum. Therefore, the data value of each pixel in the color image captured by the digital camera can be directly converted into the light source spectrum 1 to reconstruct the color image. The spectral value of each pixel changes with the spectrum of the light source. The spectrum color reproduction technique, the silk analysis method and the multiple linear regression analysis method are first introduced. A·Multi-spectral color reproduction technology color reproduction refers to the color matching principle. Make a copy of the object or the original image. The color is divided into spectrum color and strip: You', IF W color matching requires the original image and the spectral characteristics of the reproduction % - and the condition Equivalent color matching must be in the pursuit of color appearance - "If the specific conditions change, then not - can be 7 1377044 • Guarantee to maintain the same color, such as color printing, photography, television, etc. are all color matching conditions, Unless it is in a special situation, its spectral color matching is difficult to achieve. The method of multi-spectral acquisition was first proposed in the VASARI system of the National Gallery, UK in 1993, and the VASARI system was used in one. The scanner is combined with seven separate filters to create a seven-channel sampling device' to capture images of the artwork, and the sensor on the scanner is a monochrome and high-resolution digital camera. After the image is acquired, the captured image is processed and recorded by some appropriate signals. Therefore, the next step is to illustrate the color reproduction of the spectrum reproduction method: it can acquire the spectrum of each pixel. Color reproduction. Because National : Gallery successfully digitalized the art images in its library, this method is subject to some research The importance of 'the most famous is Munse丨I Color Science Labtoratory (MCSL). Because: VASARI system needs to spend a lot of time on the scanned image, so MCSL proposed to use monochrome cCD (Charge-Coupled Device) digital bit · The sample device is also equipped with seven independent filters to improve the sampling device in the VASAR system. Under the same signal processing, the MCSL experiment proves that such a method can also achieve good results and reduce the cost of sampling. . Time. In addition, 'MCSL does not think it is necessary to use a monochrome digital sampling device. If it is a two-primary digital sampling device, it can achieve good results. The multi-spectral acquisition system is mainly divided into two parts, the first one is image acquisition and the other is multi-spectral analysis and spectrum reproduction. As shown in Annex 1, a schematic diagram of the multi-spectral image capture process is performed by using a digital camera to capture an image of a color filter with a digital camera and then analyzing the image by a computer. Annex 2 shows the process of analyzing and reproducing the spectrum of multi-spectral images. μ is to sample the color patches by m spectrometer, and then perform spectrum analysis and then integrate with the camera to achieve the reproduction of color images. B. Spindle analysis method The main sleeve analysis method is a commonly used method for multivariate statistics. Since 196 = application is important in color technology - the main purpose of the spindle analysis: 'For the first one, the first one is to define a large amount of spectrum information. The main axis of the project is to simplify the data of the information. The first ten 笪 M ^ — to reorganize the original tribute, the relevant and independent variables, and then by the component 'final (4) to explain the original data = Mainly as shown in Annex III, hypothesis (X1 77 variability. ; can be transformed into a central view of the mutual axis analysis method by linear transformation, variable and coordinate two independent variables, but two related variables The variability of the material. This is the main spindle analysis mode derivation: a2 Suppose there are m variables (χ1, χ2 .·, am) such that:: ·.,Xm) 'and want to find the coefficient (a1, var (arx1+a, the value of x2+..+Vx^ is the largest (Var· represents 6 deniers (2-10) takes the largest variable in the original data group. The side-extinguishes in it), in this way, the following Normalization conditions: /, medium (a" ..... am) must be satisfied (ai2+a22+...+am2)=:- i (2-11) 9 U/7044 a 11 condition is to make 2, the formula is very large - group (ai a2',) 'is the unit space vector of the towel space' not only that (ai and 2 in ' Represents the concept of the direction vector, that is, the direction of the main axis. The m-dimensional analysis of the spindle can be expressed by the following equation: PCl=ailXl+ai2X2+-+a1mxm PC2=a21x1+a22x2+...+a2mXm PC C in the basin ~ m (2-12) 八中PC^PC』PCm stands for and m main sleeve. Its first-spindle coefficient (ai1 a spindle is m-type, and can be uar(ai)Xi+a 11χ+12,..., ~) Must be full M. , ^ _ 12* X2 Xm) The value is (4) Mutual ": Spindle to ¥ m spindle and so on, and each coefficient to each coefficient (aa "like m find PUC^PCm Ba... The material is written as a covariation matrix of nXn (c〇va "iance m_X", the eigenvector of this covariation matrix represents (u%), and its corresponding eigenvalue represents the variable eigenvalue in 2_1〇 .|2', the spindle system selected by the user ^, the number (ail, ai2aim) can make the first-spindle % 八八 Γ 异 ' ' 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说 也就是说Ability to source material The mutated part that is not explained by the first - has the largest interpretation of the month." Usually the original data has · m can still find m main components. But the month & this finds p spindles, passed God pays p<m and P is as small as possible, but it can be used in the beginning of the data. More than % variability, this is the main purpose of the present invention to analyze data using a spindle knife analysis method. 1377044 It is known from the foregoing that when a group of data sets is a matrix of non-ancient land p is a single matrix, and a group of random vectors X, such as 2-13, and not, and the covariance matrix C (covariance matrix) can be assumed X= (^, x2> , χη)τ _ _ (2-13) C=E[(XX)(XX)T] (2-14) Assume that the covariation matrix is a Ρ dimension The space 'then will exist' - a group base base system, and assume that the η group base moment _ _ _ π r Ping Ma U, expressed by the following formula: U = [x1t x2, ..., χ ] ( 2-15) The value range to which the variable X is mapped in the dimensional space can be expressed by the following equation: (2-16)

y=UTX 因此,可計算y之共變異矩陣C·: C· =E[(y-y>( y-y)T] (2-17)y=UTX Therefore, the covariation matrix C of y can be calculated: C· =E[(y-y>( y-y)T] (2-17)

=UTE[(X-X)(X-X)T]U =U^GU 新的共變異矩陣c,可以利用特徵方程式表示(Αλ = λ X,其中Α為:任一方陣,又為特徵值,χ為特徵向量),型 式如2-18式表示,另外此主轴基底互為正交之關係(un丨以 vector) ’可以2-19式表示。 COW、…,C-xp] -[λ ·|Χΐ,λ 2 X2,. _ · I 入 pXp】 11 X\ Γ377044=UTE[(XX)(XX)T]U =U^GU The new covariance matrix c can be represented by the characteristic equation (Αλ = λ X, where Α is: any square matrix, also the eigenvalue, χ is characteristic Vector), the pattern is represented by the formula 2-18, and the relationship between the spindle bases is orthogonal to each other (un 丨 vector) ' can be expressed as 2-19. COW,...,C-xp] -[λ ·|Χΐ,λ 2 X2,. _ · I into pXp] 11 X\ Γ377044

=[入 1 , =AU λ λρ]=[in 1 , =AU λ λρ]

Xp UTU=I 最後結合2-18式與2_19式, 方程式求得’其式子如下表示因 主轴。 C'=UTCU=A」。,-礼〇 c·多重線性迴歸分析法 (2-18) (2-19) 其特徵值;I i可經由特徵 此符合的特徵向量即為 (2-20) '線性騎分析法是—種廣泛應用在統計分析上的 「法’其主要目的是要了解「目的變數」是否能夠用-些 自變數」的線性方程式來表示,並用它來解釋目的變數 :特》·生,’亦即變數X和γ的關係是否密切最後透過此多 重線性迴歸方程式,即可由變數X的值求出γ值。. 應用在本發明時,根據數位相機所拍攝一張影像之影 /取值Dc(digita|C()unts)值,經由運算得到該影像的頻 :值,再將此系統特性化並了解Dc值與頻譜值之間的關係 後,利用多重線性迴歸法求出一轉換矩陣。 夕垔 因此在多重線性迴歸分析之前,要先了解數位相機之 Dc值與分光光譜儀之頻譜值之間的關係。本發明先探討分 光光譜儀之頻譜值,假設拍攝丨組頻譜數據,且每一組反 射頻譜函數經主軸分析精簡後之反射頻譜r( Λ )可以採用下 12 述形式表示: 「1⑴=a”Xl⑴〜2u)+...+aiXU) 「2⑴=祕⑴%舞·二Xp UTU=I Finally combines 2-18 and 2_19, and the equation is obtained. The equation is as follows. C'=UTCU=A". , - Li C, multiple linear regression analysis (2-18) (2-19) its eigenvalues; I i can be characterized by this feature vector (2-20) 'linear riding analysis is a kind The main purpose of the "law", which is widely used in statistical analysis, is to understand whether the "objective variable" can be expressed by a linear equation of some self-variables, and use it to explain the purpose variable: special ", ", that is, variable Whether the relationship between X and γ is close. Finally, the γ value can be obtained from the value of the variable X through the multiple linear regression equation. In the present invention, according to the image/value Dc (digita|C()unts) value of an image taken by the digital camera, the frequency value of the image is obtained through operation, and then the system is characterized and the Dc is understood. After the relationship between the value and the spectral value, a transformation matrix is obtained by multiple linear regression. Xi Xi Therefore, before the multiple linear regression analysis, it is necessary to understand the relationship between the Dc value of the digital camera and the spectral value of the spectroscopic spectrometer. The present invention firstly investigates the spectral value of the spectroscopic spectrometer, assuming that the spectral data of the 丨 group is taken, and the reflection spectrum r( Λ ) of each set of reflected spectral functions after the spindle analysis is reduced can be expressed in the following 12 states: "1(1)=a"Xl(1) ~2u)+...+aiXU) "2(1)=secret (1)% dance·two

n(A)=aMxl(A)+ai2X2U)+ +ajnXnU) W :中:為在主軸分析中,對映“組最大主要 之係數,並可間化2·21式’以下列式子表示: 時n(A)=aMxl(A)+ai2X2U)+ +ajnXnU) W: Medium: For the principal axis analysis, the mapping "the largest major coefficient of the group, and the interval 2·21 formula" is expressed by the following equation: Time

=aX 其中 (2-22) (2-23) (2-24) (2-25) Γ=Ι Γ1. r2.....η]τ a=[ai, a2(..., a n]=a.ln=aX where (2-22) (2-23) (2-24) (2-25) Γ=Ι Γ1. r2.....η]τ a=[ai, a2(..., an] =a.ln

X=lW-,xn]T 另一方面,在做完分光光譜儀之主軸分析之後,捿著 將計算數位相機所拍攝到影像之,則Dg值可以心 式表示。3外’敫位相機經過k個彩色濾光片所拍攝到的 Dc值以2-27表示。 (2-26) (2-27) 〇〇=|Ρ(λ>(λ)5(λ)^λX=lW-,xn]T On the other hand, after the spindle analysis of the spectroscopic spectrometer is performed, the Dg value can be expressed in the heart by calculating the image captured by the digital camera. The Dc value of the 3 outer 'camera cameras captured by k color filters is indicated by 2-27. (2-26) (2-27) 〇〇=|Ρ(λ>(λ)5(λ)^λ

Dc k = iP(X)r(X)Fk(X)S(X)dk 其中S(A)為數位相機敏感度分佈矩陣,ρ(λ)為光源 頻譜的分布矩陣,r( λ )為物體反射頻譜分佈矩陣,Fk(又) 為彩色渡片之頻譜分佈矩陣。另外,為了簡化2_27式,假 設D(A )為2-28式,並代入2-27式可得2-29式。 D( λ ) = iP(X)Fm(X)S(X)dk (2-28)Dc k = iP(X)r(X)Fk(X)S(X)dk where S(A) is the digital camera sensitivity distribution matrix, ρ(λ) is the distribution matrix of the source spectrum, and r( λ ) is the object Reflective spectral distribution matrix, Fk (also) is the spectral distribution matrix of the color crossings. In addition, in order to simplify the 2_27 type, it is assumed that D(A) is a 2-28 type, and a 2-29 type can be obtained by substituting the 2-27 type. D( λ ) = iP(X)Fm(X)S(X)dk (2-28)

Dck=r(A)DU)Dck=r(A)DU)

=rD (2-29) 13 1377044 矩陣常數22式代入2-29式可得2-30式。並將XD整理成 矩車吊數mk ’即可得到2_31式。=rD (2-29) 13 1377044 The matrix constant 22 is substituted into the 2-29 type to obtain the 2-30 type. The X_D can be obtained by arranging the XD into the number of the car cranes mk ’.

DCk=aXD (2-30) 义 a mkDCk (2-31) 组最夫主轴分析得知,3 ^在主軸分析中,對映前n 由最二主要,時之係數’而Dc為數位相機之數值,因此 知’在分光光譜儀與數位相機中間存在著一轉 換矩陣mk ’因此要計算 分析法來求得。 ㈣矩料,〇重線性迴歸 月參考第-圖所示’在本發明中主要包含以下 ^頻譜擷取裝置對複數樣本色㈣取其頻譜資料·, 運"求出該樣本色塊之基底函數係數(1〇1〉; (1〇2)以;ϋ相機操取該複數樣本色4之影像操取值 根據該基底函數係數及影像擷取值運算求出-轉換矩 陣(103); ^ 以該數位相機對-原始影像操取其影像操取值,依據 該原始影像之影像擷取值及該轉換矩陣運算產生一 象(104); 叻 依據-新照明光源變換該轉換矩陣,依據原始影像之 影像榻取值及該變換後之轉換矩陣可運算產生一對應該新 照明光源之再現影象(1 05)。 請參考附件四所示,首先以一頻谱掏取置,例如分光 光言普儀(MiMOLTA CS1000A)量測樣本色棟的頻譜數據本 實施例中U 24色的樣本色塊且量測每紐數據以〜 14 U77044 隔,故具有201個頻譜樣本,單一色塊量測到的頻譜樣本 以向量與矩陣形式表示如下: (3-1)DCk=aXD (2-30) sense a mkDCk (2-31) The analysis of the most master axis of the group shows that 3 ^ in the spindle analysis, the n before the mapping is the second most important, the time coefficient ' and Dc is the digital camera The numerical value, therefore, knows that there is a conversion matrix mk between the spectroscopic spectrometer and the digital camera, so it is calculated by calculation. (4) Moment material, 〇 heavy linear regression month reference - Figure 'In the present invention, the following is mainly included in the spectrum acquisition device for the complex sample color (4) to take its spectrum data ·, transport " find the base of the sample color block The function coefficient (1〇1>; (1〇2) to; ϋ the camera fetches the image sample value of the complex sample color 4 according to the basis function coefficient and the image capture value operation to find a conversion matrix (103); Taking the image capture value of the original image by the digital camera, generating an image according to the image capture value of the original image and the conversion matrix operation (104); converting the conversion matrix according to the new illumination source, according to the original The image reading value of the image and the transformed conversion matrix can be calculated to generate a pair of reconstructed images of the new illumination source (1 05). Referring to the attachment shown in Figure 4, first, a spectrum is used, such as spectroscopic light. MiMOLTA CS1000A measures the spectral data of the sample color ridge. In this embodiment, the U 24 color sample color block and the measurement of each data are separated by ~ 14 U77044, so there are 201 spectrum samples, single color block measurement. Spectral samples to vector and matrix Represented by the following formula: (3-1)

Sr(A)=[Sr(A1)ISr(A2)lSr(A3)…….,Sr(Aj] 其中m = 201。另外,量測到24色樣本色塊可以以下 列式子表示:Sr(A)=[Sr(A1)ISr(A2)lSr(A3).......,Sr(Aj] where m = 201. In addition, the 24-color sample patch can be measured by the following formula:

Sr. (M,Sr,^2),Sn(X3), Sr2 (h),Sr2(X2),Sr2(h),Sr^A) =A = ,Sr】 (λ加) .,Sl*2 (入201) (3-2) ,8:24(入201)Sr. (M,Sr,^2),Sn(X3), Sr2 (h),Sr2(X2),Sr2(h),Sr^A) =A = ,Sr] (λ plus) .,Sl*2 (in 201) (3-2), 8:24 (in 201)

SnA丨)χλ2)χλ3), 其中i = 1〜24,獲得這24組頻譜數據後,接著用主輪 分析法來做分析,經主軸分析後,可以得到一組主軸成分, 如3-3式所示,而這些成分又可當基底函數來線性組合每SnA丨)χλ2)χλ3), where i = 1~24, after obtaining the 24 sets of spectral data, then using the main wheel analysis method for analysis, after the spindle analysis, a set of spindle components can be obtained, such as 3-3 As shown, these components can be used as a basis function to linearly combine each

〜筆頻譜數據,如.3-4式所示《其代表對應每一基底 函數之係數。 (3-3) (3-4) δη( λ)=α Μ λ,)+α 2χ2( λ 2)+···.+ α 201χ201( λ 201) α但由於Sr>( λ )不是方矩陣,因此必須利用虛擬反矩陣 來做運算。首先’先取ΑτΑ為共變異矩陣(G〇varjance ^trix),並以特徵函數(BXm=5mXm)求解特徵向量,其中 d m為特徵值,Xm為特徵向量,可以以下列式子表示 Let B = ATA, then (3-5) ’ m=1 〜201 15 ^77044 及過3-5式之計算,可得到2〇1個特徵值⑺咱扣…丨叶) 所對應之201組特徵向量(ejgenvect〇|>),因此主軸分析 主要目的在於找出少數幾組最大之特徵向量,來構成頻譜 數據之主軸成分,並且以少數成分來近似原來之頻譜。有 了特徵函數數據之後,便可以進行主轴分析,在此挑選前 幾個最大特徵值來選擇主轴成分(特徵向量),因此計算了累 積成長貝獻比,其中代表第〇1個特徵值,方程式如3_6~ Pen spectrum data, as shown in the equation 3-4, which represents the coefficient corresponding to each basis function. (3-3) (3-4) δη( λ)=α Μ λ,)+α 2χ2( λ 2)+····+ α 201χ201( λ 201) α But since Sr>( λ ) is not a square matrix Therefore, you must use the virtual inverse matrix to do the operation. Firstly, we first take ΑτΑ as the covariance matrix (G〇varjance^trix), and solve the eigenvectors with the eigenfunction (BXm=5mXm), where dm is the eigenvalue and Xm is the eigenvector, which can be expressed by the following formula: Let B = ATA , then (3-5) ' m=1 ~ 201 15 ^77044 and over the 3-5 formula, you can get 2 〇 1 eigenvalue (7) 咱 buckle ... 丨 leaf) corresponding to the 201 sets of eigenvectors (ejgenvect〇 |>), so the main purpose of the spindle analysis is to find a few sets of the largest eigenvectors to form the principal component of the spectral data, and approximate the original spectrum with a few components. After the eigenfunction data is available, the spindle analysis can be performed. Here, the first few eigenvalues are selected to select the spindle component (feature vector), so the cumulative growth ratio is calculated, which represents the first eigenvalue, the equation Such as 3_6

式表不。並且根據3-6式,計算出了特徵向量數量與累積 成長貢獻比之比較,如表3 —彳所示。 ^The table is not. And according to Equation 3-6, the comparison between the number of feature vectors and the cumulative growth contribution ratio is calculated, as shown in Table 3 - 彳. ^

(3-6) 特徵向量數 累積成長比(%) 1 84.87 2 94.59 3 99.10 4 99.61 _ 5 99.84 --6 99.90 --_____1 99.94 —__8 99.97 ---9 99.983 ____ 10 99.99 表3-1 由表3-1得知,特徵向量數在6.:.組以上時累積成長 貝獻比可達到99_9%以上,當特徵向量數達到6組或6組 :上即可表達原始頻譜’因此本發明將採用前六組特徵向 里來當頻譜之基底函數。由前面累積成長貢獻比得知,選 用前六組的特徵向量來當重建頻譜之基底函數,其基底函 1377044 數向量以下列式子表示: :η (λΐ) :η (λϊ) for η=1 〜6 (3-7) [η (λ:5) η (λ20ΐ) 因此取得前六組最大特徵向量為基底函數後,可線性 組合成每筆資料的原始頻譜數據,以第一組數據為例,可 以3 - 8式表示,其中a (i)為未知的線性組合前面之係數。(3-6) Cumulative growth ratio of feature vector number (%) 1 84.87 2 94.59 3 99.10 4 99.61 _ 5 99.84 --6 99.90 --_____1 99.94 —__8 99.97 ---9 99.983 ____ 10 99.99 Table 3-1 3-1 knows that when the number of feature vectors is above 6.:., the cumulative growth rate can reach 99_9% or more. When the number of feature vectors reaches 6 or 6 groups, the original spectrum can be expressed. Use the first six sets of features to inward as the basis function of the spectrum. It is known from the previous cumulative growth contribution ratio that the eigenvectors of the first six groups are used to reconstruct the basis function of the spectrum, and the basis vector 1377044 number vector is expressed by the following equation: :η (λΐ) :η (λϊ) for η=1 ~6 (3-7) [η (λ:5) η (λ20ΐ) Therefore, after obtaining the first six sets of maximum eigenvectors as basis functions, they can be linearly combined into the original spectrum data of each data, taking the first set of data as an example. , can be expressed as 3 - 8 where a (i) is the coefficient preceding the unknown linear combination.

S^C λ )= 'Sr, (λ.)" Srz (λ2) =CL ! Xi (λι) X 1 (λ2) + a 2 X 2(λΐ) X 2 (λ2) + . · _ + CK i X 6 (λΐ) X 6 (λ2) Sr201 (λ201) X 1 (入201) X 2 (λ20ΐ) X 6 (λ20ΐ) (3-8) 再以24組為例,整理成3-9式,並可簡化成3-10式。S^C λ )= 'Sr, (λ.)" Srz (λ2) =CL ! Xi (λι) X 1 (λ2) + a 2 X 2(λΐ) X 2 (λ2) + . · _ + CK i X 6 (λΐ) X 6 (λ2) Sr201 (λ201) X 1 (into 201) X 2 (λ20ΐ) X 6 (λ20ΐ) (3-8) Then, taking 24 groups as an example, sorting into 3-9, Can be simplified to 3-10.

8ΐΐ(λΐ), 8Γΐ(λ2) , Sri(A,3).......,Sri(X201)8ΐΐ(λΐ), 8Γΐ(λ2), Sri(A,3).......,Sri(X201)

Sr2(Xi),8Γ2(λ2),Sn(X、).......,Sr2(X2〇i) 8η( λ)= . … . 8Γ24(λΐ),Sr24(X2) , Sf24(X3).......,8犷24(入2。1) — ‘· 17 1377044 ai⑴,ai(2),·.· 5 a旧· Χι(λι),Χι(λζ),...,(入2〇1) 〇C2(l), (X2(2),···,a2⑹ • · • Χ2(λΐ),Χ2(λ2),_ · ·,χ2(入2〇1) _a24(i),a24(2),...ja24(6) _Χ6(λ|),Χ6(λ2),· · ·,沿(人沏) (3-9)Sr2(Xi), 8Γ2(λ2), Sn(X,).......,Sr2(X2〇i) 8η( λ)= . . . 8Γ24(λΐ), Sr24(X2) , Sf24(X3 ).......,8犷24(into 2.1) — '· 17 1377044 ai(1), ai(2),··· 5 a old · Χι(λι),Χι(λζ),... , (in 2〇1) 〇C2(l), (X2(2),···, a2(6) • · • Χ2(λΐ), Χ2(λ2), _ · ·, χ2 (in 2〇1) _a24( i), a24(2),...ja24(6) _Χ6(λ|), Χ6(λ2), · · ·, along (human brew) (3-9)

Sri(A)=a(i)nx(Xn)Ti f〇r n=1-6, i=l~24 原先特徵向量之維度為201 ’然而經主軸分析後把特 徵向量降為6組’因Xn在計算上並非方矩陣,故對應係數 之a得經由虛擬反矩陣求得,以3-11式表示,最後可整理 出24色塊之係數,其中a jXi〇-4,丨=卜6。Sri(A)=a(i)nx(Xn)Ti f〇rn=1-6, i=l~24 The dimension of the original eigenvector is 201 ' However, after the spindle analysis, the eigenvector is reduced to 6 groups' due to Xn It is not a square matrix in calculation, so the corresponding coefficient a is obtained through the virtual inverse matrix, represented by the formula 3-11, and finally the coefficients of the 24 color patches can be arranged, where a jXi 〇 -4, 丨 = 卜 6.

α (ί)η_δπ( λ )x[(Xn)T]1 1J 當利用主轴分析得到前六組特徵向量之係數α後,將 與數位相機所拍攝到之Dc值,做多重線性迴歸分析來取得 系統間的轉換矩陣。α (ί)η_δπ( λ )x[(Xn)T]1 1J When the coefficient α of the first six sets of eigenvectors is obtained by the principal axis analysis, the Dc value captured by the digital camera is obtained by multiple linear regression analysis. The transformation matrix between systems.

(3-10) 而數位相機Dc值可根據前述說明而得到,因此將數位 相機之Dc值與3-10式結合,可整理成3_i2式。 ^n(i)=/77n(k) XDCk(i) (3-12) 其中n = 1〜6,ι=1〜24,k=1〜3。並且可以矩陣型式表示 成3-1 3,因此將可計算出轉換矩陣m。 OU(l),OC2(l), ···,CX24(1) ai(2), OC2(2) , ... ,0124(2) • · • · · a 1(6) ,a2(6) , ... ,a24(6) , mm, .,,m3〇)~ mip), mip),..., ni3p) jni(6), πΐ2(6),..., mi(6)(3-10) The digital camera Dc value can be obtained according to the above description. Therefore, the Dc value of the digital camera can be combined with the 3-10 type to be sorted into the 3_i2 type. ^n(i)=/77n(k) XDCk(i) (3-12) where n = 1~6, ι=1~24, k=1~3. And it can be expressed as a matrix type of 3-1 3, so the conversion matrix m can be calculated. OU(l), OC2(l), ···, CX24(1) ai(2), OC2(2) , ... , 0124(2) • · • · · a 1(6) , a2(6 ) , ... , a24(6) , mm, .,,m3〇)~ mip), mip),..., ni3p) jni(6), πΐ2(6),..., mi(6)

Dci(l),DC2(1),. . ·,〇C24(l) Dci(2) , DC2(2) , . . . } DC24(2) •DCl(3),DC2(3),. · .,DC24(3) 1377044 3-13) 根據以上計算出之轉換矩陣m,便能重建頻譜。 實際測量範例說明: 本發明係以CANON 860is數位相機為取樣設備,在量 測時分為兩部分作業,一是不經過彩色濾光片,另一是經 過六塊彩色濾光片組,所選用之六塊彩色濾光片為光穿透 率30%之紅(R)、綠(G)、藍(B) '青藍(C)、紫(M)和黃(Y)等 色為辅助。Dci(l),DC2(1),. . ·,〇C24(l) Dci(2) , DC2(2) , . . . } DC24(2) •DCl(3),DC2(3),. .DC24(3) 1377044 3-13) According to the conversion matrix m calculated above, the spectrum can be reconstructed. Description of actual measurement examples: The present invention uses a CANON 860is digital camera as a sampling device, and is divided into two parts during measurement, one without passing through a color filter, and the other through six color filter groups, selected The six color filters are auxiliary for red (R), green (G), blue (B) 'blue (C), purple (M), and yellow (Y) light transmittances of 30%.

以該數位相機對24色樣本色塊拍攝所獲得之Dc值如 下表二所示: Patch R G B 1 104.08 66.411 54.813 2 201.83 155.7 142.88 3 114.84 139.35 182.09 4 95.15 112.88 64.94 5 155.88 153.47 202.82 6 133.79 195.34 193.77 7 190.99 114.91 37.858 8 80.117 109.12 185.45 9 207.67 98.618 112.48 10 100.82 64.912 117.44 11 168.33 198.68 78.457 12 205.31 164.18 53.654 13 38.078 63.097 149.52 14 79.889 150.62 83.039 15 193.97 58.711 73.967 16 219.7 200.96 72.81 17 210.81 104.7 171.05 18 73.928 150.3 199.81 19 227.59 225.94 228.03 20 207 205.45 208.7 21 178.78 175.71 180.64 22 141.1 140.57 145.04 19 1377044 23 88.684 89.358 93.089 24 37.341 38.522 38.997The Dc values obtained by shooting the 24-color sample patch with the digital camera are shown in Table 2 below: Patch RGB 1 104.08 66.411 54.813 2 201.83 155.7 142.88 3 114.84 139.35 182.09 4 95.15 112.88 64.94 5 155.88 153.47 202.82 6 133.79 195.34 193.77 7 190.99 114.91 37.85 8 80.117 109.12 185.45 9 207.67 98.618 112.48 10 100.82 64.912 117.44 11 168.33 198.68 78.457 12 205.31 164.18 53.654 13 38.078 63.097 149.52 14 79.889 150.62 83.039 15 193.97 58.711 73.967 16 219.7 200.96 72.81 17 210.81 104.7 171.05 18 73.928 150.3 199.81 19 227.59 225.94 228.03 20 207 205.45 208.7 21 178.78 175.71 180.64 22 141.1 140.57 145.04 19 1377044 23 88.684 89.358 93.089 24 37.341 38.522 38.997

表二 以分光光譜儀測量該樣本色塊之前六組基底函數係 數,如下列表三所示: Patch α, α, α4 cts a, 1 -0.6723 0.1118 0.5625 1.6133 -4.8543 18.270 2 -1.7122 3.2687 0.0853 4.7085 -11.328 67.173 3 -0.7310 -0.6049 1.4018 5.9270 20.077 40.559 4 0.6744 -2.1668 -1.7588 -6.3965 0.1159 20.868 5 -0.0247 -2.9428 1.7070 13.964 18.983 57.203 6 -0.9590 0.3607 -6.9596 -13.680 26.902 67.953 7 -2.2466 3.2048 7.5213 1.9661 -30.202 51.268 8 -1.4700 -4.4197 3.8500 13.346 22.860 34.135 9 -1.4106 4.2025 -0.4818 18.274 -24.391 47.891 10 ‘ -4.6785 -7.7265 -1.3346 11.473 0.3157 21.199 11 -0.9082 -3.9695 -6.7682 -27.958 -8.4103 61.083 12 -1.3483 -0.8906 9.6877 -10.747 -32.743 66.842 13 1.4111 -1.7274 4.5895 10.296 17.891 19.922 14 -1.2473 0.1020 -6.0084 -15.582 5.3700 28.320 15 1.2031 0.6855 -11.3066 24.043 -33.293 40.404 16 1.1547 -1.9846 -1.3881 -22.084 -37.591 89.291 17 1.5127 -3.0763 -4.3986 32.295 -16.284 60.110 18 -3.1543 7.3086 -4.7347 3.6128 30.537 41.791 19 •2,1356 1.6207 2.3801 -2.1104 20.022 151.79 20 1.6075 0.4445 2.2658 -0.7335 16.250 102.02 21 1.0377 0.2140 1.8616 -0.3239 10.260 63.040 22 0.6697 0.0252 1.1264 -0.3098 6.6471 36.000 23 0.3190 -0.0989 0.5747 0.0034 3.3792 16.984 24 0.0615 -0.0542 0.1616 0.0778 1.0591 5.9856 表三 因此,根據前述3-13式所示,系%之轉換矩陣可計 算出來,如下表四所示: 〇.〇〇〇〇〇〇398 -0.000000428 -0.000000105 -0.000001141 0.000001919 -0.000000752 -0.000001256 0.000002503 -0.000001204 0.000061688 -0.000062193 〇.〇〇〇〇〇〇114 -0.000027045 0.000024268 0.000002589 20 1377044 0.000022440 0.000019460 -0.000001860 表四 為了更進一步使數位相機能提供較佳的拍攝效果,可 對相機進行一色彩校正步驟。色彩校正的標準是把相機之 Dc值仿該分光光譜儀(CS1000A)拍攝刭24色樣本色塊的 RGB值,其校正方式主要是對相機與分光光譜儀量測該樣 本色塊最下排之六組灰階色塊,分別得到其RGB之Gamma 曲線,並以相機當橫座標,分光光度計為縱座標,便可得 到一擬合方程式,最後再把相機量測到24色塊之值對應到 分光光度計,而求得一組新的相機數據,有了分光光譜儀 與相機之Gamma曲線圖之後,便可進行相機與分光光譜 儀之RG B色彩校正,相機校正後之Dc值如下列表五所示, 其新的轉換矩陣如下列表六所示。Table 2 shows the six sets of basis function coefficients of the sample color block by spectroscopic spectrometer, as shown in the following three lists: Patch α, α, α4 cts a, 1 -0.6723 0.1118 0.5625 1.6133 -4.8543 18.270 2 -1.7122 3.2687 0.0853 4.7085 -11.328 67.173 3 -0.7310 -0.6049 1.4018 5.9270 20.077 40.559 4 0.6744 -2.1668 -1.7588 -6.3965 0.1159 20.868 5 -0.0247 -2.9428 1.7070 13.964 18.983 57.203 6 -0.9590 0.3607 -6.9596 -13.680 26.902 67.953 7 -2.2466 3.2048 7.5213 1.9661 -30.202 51.268 8 -1.4700 -4.4197 3.8500 13.346 22.860 34.135 9 -1.4106 4.2025 -0.4818 18.274 -24.391 47.891 10 ' -4.6785 -7.7265 -1.3346 11.473 0.3157 21.199 11 -0.9082 -3.9695 -6.7682 -27.958 -8.4103 61.083 12 -1.3483 -0.8906 9.6877 -10.747 -32.743 66.842 13 1.4111 -1.7274 4.5895 10.296 17.891 19.922 14 -1.2473 0.1020 -6.0084 -15.582 5.3700 28.320 15 1.2031 0.6855 -11.3066 24.043 -33.293 40.404 16 1.1547 -1.9846 -1.3881 -22.084 -37.591 89.291 17 1.5127 -3.0763 -4.3986 32.295 -16.284 60.110 18 - 3.1543 7.3086 -4.7347 3.6128 30.537 41 .791 19 •2,1356 1.6207 2.3801 -2.1104 20.022 151.79 20 1.6075 0.4445 2.2658 -0.7335 16.250 102.02 21 1.0377 0.2140 1.8616 -0.3239 10.260 63.040 22 0.6697 0.0252 1.1264 -0.3098 6.6471 36.000 23 0.3190 -0.0989 0.5747 0.0034 3.3792 16.984 24 0.0615 -0.0542 0.1616 0.0778 1.0591 5.9856 Table 3 Therefore, according to the above formula 3-13, the conversion matrix of % can be calculated as shown in the following Table 4: 〇.〇〇〇〇〇〇398 -0.000000428 -0.000000105 -0.000001141 0.000001919 -0.000000752 - 0.000001256 0.000002503 -0.000001204 0.000061688 -0.000062193 〇.〇〇〇〇〇〇114 -0.000027045 0.000024268 0.000002589 20 1377044 0.000022440 0.000019460 -0.000001860 Table 4 In order to further enable the digital camera to provide better shooting results, a color correction step can be performed on the camera. . The standard of color correction is to take the Dc value of the camera as the RGB value of the 24-color sample color block of the spectroscopic spectrometer (CS1000A). The correction method is mainly to measure the six groups of the lowermost row of the sample color block for the camera and the spectroscopic spectrometer. Gray-scale color blocks, respectively, get their RGB Gamma curve, and take the camera as the abscissa, the spectrophotometer as the ordinate, you can get a fitting equation, and finally measure the value of the 24-color block to the splitting The photometer can be used to obtain a new set of camera data. After the gamma curve of the spectrometer and the camera, the RG B color correction of the camera and the spectroscopic spectrometer can be performed. The Dc value after the camera calibration is shown in the following table 5. Its new conversion matrix is shown in Listing 6.

Patch R G B 1 57 40 19 2 190 121 102 3 66 100 157 4 52 66 28 5 118 119 193 6 90 183 175 7 170 68 0 8 45 62 162 9 204 55 67 10 55 39 72 11 125 • 189 39 12 198 134 18 13 0 39 109 14 45 115 44 15 175 36 36 16 229 194 35 21 1377044 17 210 59 138 18 43 114 187 19 252 254 255 20 202 204 205 21 151 153 154 22 100 102 104 23 48 50 52 24 0 0 0 表五 0.0000008 〇.〇〇〇〇〇〇〇 -0.0000007 0.0000055 -0.0000055 〇.〇〇〇〇〇〇〇 0.0000091 -0.0000096 〇.〇〇〇〇〇〇2 0.0001389 -0.0001640 0.0000266 -0.0001768 0.0000847 0.0001032 0.0001338 0.0000343 0.0000089Patch RGB 1 57 40 19 2 190 121 102 3 66 100 157 4 52 66 28 5 118 119 193 6 90 183 175 7 170 68 0 8 45 62 162 9 204 55 67 10 55 39 72 11 125 • 189 39 12 198 134 18 13 0 39 109 14 45 115 44 15 175 36 36 16 229 194 35 21 1377044 17 210 59 138 18 43 114 187 19 252 254 255 20 202 204 205 21 151 153 154 22 100 102 104 23 48 50 52 24 0 0 0 Table 5 0.0000008 〇.〇〇〇〇〇〇〇-0.0000007 0.0000055 -0.0000055 〇.〇〇〇〇〇〇〇0.0000091 -0.0000096 〇.〇〇〇〇〇〇2 0.0001389 -0.0001640 0.0000266 -0.0001768 0.0000847 0.0001032 0.0001338 0.0000343 0.0000089

表六 請參考附件五所示,係顯示數位相機在未做色彩校正 前與分光光譜儀對所拍攝到的樣本色塊,兩者之間的色差 比較表,此色差表為Lab色差公式所計算得知。反之,如 附件六所示,經過色彩校正後之色差·比較表,由這兩張表 可以發現,校正後之平均色差相較於校正前還小,顯示以 數位相機為拍攝設備應屬可行。 請參考附件七所示,若已進行色彩校正之數位相機進 一步結合彩色濾光片進行拍攝時,可發現平均色差能降至 更低,為 5.9797。.·. 本發明其中一種實際應用方式係以普遍的三原色數位 相機來拍攝一待判斷的生物影像,並可藉由改變光源來增 強拍攝到生物影像之正常區域與病變區域之色差、對比。 首先以分光光譜儀與數位相機拍攝24色樣本色塊之頻 22 1377044 可刀別獲得組原始頻譜及-組近似頻譜,兩組頻 -再同時除以當時拍攝實驗環境中的原光源頻譜便可得 到該破拍攝物(樣本色塊)@一組原始反射頻譜與一組近 似反射頻譜。接著,該组原始反射頻講與該組近似反射頻 譜再同乘欲置換的新光源頻譜後,便會得到_組新的24色 塊頻譜’帛著便能求得置換光源後之新的轉換矩陣。換言 之,只要變換不同光源頻譜,便會有新的轉換矩陣,進而 可產生對應該新光源的新影像。Table 6 is shown in Appendix V. It shows the color difference comparison table between the two samples before the color correction and the spectroscopic spectrometer. The color difference table is calculated by the Lab color difference formula. know. Conversely, as shown in Annex VI, the color-corrected color difference comparison table can be found from these two tables. The corrected average color difference is smaller than that before the correction, and it should be feasible to display the digital camera as the shooting device. Please refer to Appendix VII. If the digital camera with color correction is further combined with a color filter, the average color difference can be found to be lower, at 5.9797. One of the practical applications of the present invention is to capture a biological image to be judged by a universal three-primary digital camera, and to enhance the color difference and contrast between the normal region and the lesion region of the biological image by changing the light source. Firstly, the spectrum of the 24-color sample color block 22 1377044 can be obtained by the spectroscopic spectrometer and the digital camera. The original spectrum and the -group approximate spectrum can be obtained, and the two sets of frequencies can be divided by the spectrum of the original source in the experimental environment at that time. The broken shot (sample patch) @ a set of raw reflection spectra and a set of approximate reflection spectra. Then, after the original reflection frequency of the group and the set of approximate reflection spectrum are multiplied by the spectrum of the new light source to be replaced, the new 24-color block spectrum of the group can be obtained, and the new conversion after the replacement of the light source can be obtained. matrix. In other words, as long as the spectrum of the different sources is transformed, a new conversion matrix is created, which in turn produces a new image corresponding to the new source.

附件所示係日光燈當光源照射口腔内之破洞處, 再操取所關心的部位,其中榻取下來的影像為470x672之 解析度I著如附件九所示,以附件八為基準做置換其他 光源的口腔影像’附件九所示為採用偏藍之白% led光源 頻譜加不同彩色濾光片之口腔重建影像,各圖為: (A):光源為黃光照明裝置,因其為寬頻光源因此演色 性較高,使得病變範圍處與正常無病變處也不易有太大的 色差表現。 .,... (B) :-光源為偏藍之白光LED,目其在藍色波段信號較 強,且演色性相較於寬頻咣源差,因此在色差表現上會比 圖(A)中顯著。 (C) :光源為偏藍之白光|_ED搭配紅色(R)濾光片,.口 腔影像更趨於紅色,使得原本口腔影像就呈現紅色再加:上 二色濾光.片時顏色會更加飽和,因此肉眼較不易觀察出病 變處。 (D):光源為偏藍之白光LED搭配綠色(G)渡光片,所 示可以清楚看出其病變周圍處會呈現暗紅色,因其病變處 23 1377044 對此波段的吸故較大,所以在顏色表現上會較暗沉。 …(E)' (F):光源為偏藍之白光LED搭配藍色(Β)濾光片 與偏藍之白光LED搭配黃色(γ)濾光片,可以看到經過藍色 濾光片時,其週遭正常範圍處會呈現較白之效果因背景 口腔組織為紅色較長之波段,所以當加入藍色濾光片時之 波長差距會比加上黃光濾光片來的大,因此才會在視覺上 產生此效果。 零 【圖式簡單說明】 第一圖:本發明之流程圖。 附件一:多頻譜影像的擷取過程示意圖。 - 附件二:多頻譜影像的分析與再現頻譜的流程。 : 附件三:主軸示意圖。 附件四:24'色樣本色塊示意圖。 附件五··數位相機與分光光譜儀之色差值比較表。 附件六:數位相機經過色彩校正後與分光光譜儀之色 馨·差值比較表。.... ' 附件七:被位相機經過彩色濾光片及色彩.校正後與分 ’光光譜儀之色差值比較表。 附件八:以led手電筒擷取口腔破洞處之原始影像 , 附件九:置換黃光手電筒與偏藍之白光tED搭配不同 彩色渡光片之口腔影像。 【主要元件符號說明】 24The attached part shows the fluorescent lamp. When the light source illuminates the hole in the oral cavity, the position of interest is taken. The resolution of the image taken at the couch is 470x672. As shown in Annex IX, the replacement is based on Annex VIII. The oral image of the light source is shown in Annex IX as the oral reconstruction image using the blue light white LED source spectrum plus different color filters. The figures are: (A): The light source is a yellow light illumination device because it is a broadband light source. Therefore, the color rendering is higher, so that the lesion range and the normal lesion-free area are not easy to have too much chromatic aberration. .,... (B) :- The light source is a bluish white LED. The signal is stronger in the blue band, and the color rendering is worse than the broadband source. Therefore, the color difference will be better than the figure (A). Significantly. (C): The light source is bluish white light |_ED with red (R) filter, the oral image is more red, so the original oral image will be red plus: the upper two colors filter. The color will be more Saturated, so the lesion is less likely to be observed by the naked eye. (D): The light source is a bluish white LED with a green (G) light beam. It can be clearly seen that there is a dark red color around the lesion, because the lesion 23 2377044 has a larger suction for this band. Therefore, the color performance will be dull. ...(E)' (F): The white light LED with a blue light source is matched with a blue (Β) filter and a blue light white LED with a yellow (γ) filter, which can be seen when passing through the blue filter. The normal range of the surrounding area will have a whiter effect. Because the background oral tissue is a longer red band, the wavelength difference when adding a blue filter will be larger than that of the yellow filter. This effect will be visually produced. Zero [Simplified description of the drawings] First figure: A flow chart of the present invention. Annex 1: Schematic diagram of the acquisition process of multi-spectral images. - Annex II: The process of analyzing and reproducing the spectrum of multi-spectral images. : Annex 3: Schematic diagram of the main shaft. Annex IV: Schematic diagram of the 24' color sample color block. Annex V · Comparison table of color difference between digital camera and spectroscopic spectrometer. Annex 6: Comparison of the color and difference of the digital camera after the color correction and the spectroscopic spectrometer. .... ' Attachment 7: The color difference between the digital camera and the color corrected by the camera. Attachment 8: Use the led flashlight to capture the original image of the cavity at the hole. Attachment 9: Replace the yellow light flashlight with the bluish white light tED with different color image of the color light film. [Main component symbol description] 24

Claims (1)

丄j/7044 Q?·1 ] 七、申請專利範圍: 1 ·種杉色影像再現方法’包含 以一頻譜顯取裝置對複數樣本色 運算求出該樣本色塊之基底函數係數;料’ 二據ΪΓΓ掏取該複數樣本色塊之影像操取值; 陣;根據該基底函數係數及影像操取值運算求出—轉換矩 U 目機對—原始影像操取其影㈣取值, =始影像之影_取值及該轉換㈣運算產生—再現= 依據一新照明光源變換該轉換矩陣,根據原始影像之 ㈣褐取值及該變換後之轉換矩陣可運算產生 照明光源之再現彰务..上 丁您这新 換矩陣時传勺: 1依據新照明光源變換該轉 換矩皁時,係包含以下步驟: 以該頻譜擷取裝置對複數樣本色塊擷取其頻譜資 料’以獲得一組原始頻譜; 以該數位相機複數樣本色塊擷取其頻譜資料以 獲得一組近似頻譜; 將該組原始頻譜及近似頻譜同時除以一原光源頻 譜,分別得到一組原始反射頻譜與一組近似反射頻譜; 將該組原始反射頻譜與該組近似反射頻譜再同乘 該新照明光源之頻譜,以產生該複數樣本色塊之新的 頻譜資料; 依據該複數樣本色塊之新的頻譜資料運算求出新 的轉換矩陣。 25 1377044 2·如申請專利範圍第j項; 异求出該樣本色塊之基底函數係數時 方法於運 算求出。 ’、 轴分析法計 3·如申請專利範圍第1項所述彩色影像再現方一 據該基底函數係數及影㈣取值運算 =法’當根 以多重線性迴歸分析法計算求出。_換矩陣時,係 4.如申請專利範圍第彳項所述彩色 數位相地#4· ,V象再現方法,於該 機對一原始影像擷取其影像擷取值 、 係先經過色彩校正。 ^,該數位相機 5·如申請專利範圍第!項所述彩色 位相機對-原始影像絲其影像願取 ,於該 經過彩色、清尖K +吁雇 夺’該數位相機 色慮先片S該原始影像掏取其影像擷取值。 八圖式:(如次頁) 26丄j/7044 Q?·1] VII. Patent application scope: 1 · The sap image reproduction method 'contains the basis function coefficient of the sample color block by using a spectrum display device for the complex sample color calculation; Obtaining the image operation value of the complex sample color block; arranging; calculating according to the basis function coefficient and the image manipulation value--converting moment U-head machine--the original image is taken (4), the value begins Image shadow_value and the conversion (4) operation generation-reproduction = transforming the conversion matrix according to a new illumination source, according to the (4) brown value of the original image and the transformed transformation matrix, the reproduction of the illumination source can be calculated. When you change the matrix to the spoon: 1 According to the new illumination source, the conversion method includes the following steps: The spectrum acquisition device extracts the spectrum data of the plurality of sample patches to obtain a group The original spectrum; taking the spectral data of the digital sample block of the digital camera to obtain a set of approximate spectra; dividing the original spectrum and the approximate spectrum by a spectrum of the original source simultaneously, respectively obtaining a set An original reflection spectrum and a set of approximate reflection spectra; the set of original reflection spectra and the set of approximate reflection spectra are then multiplied by the spectrum of the new illumination source to generate new spectral data of the plurality of sample patches; according to the plurality of sample colors The new spectral data of the block is computed to find a new transformation matrix. 25 1377044 2·If the scope of patent application is item j; the method for calculating the basis function coefficient of the sample color block is calculated by operation. ', Axis analysis method 3. The color image reproduction method according to item 1 of the patent application scope is based on the basis function coefficient and the shadow (4) value calculation = method 'Dong root is calculated by multiple linear regression analysis. _When changing matrix, the color image phase #4·, V image reproduction method according to the scope of the patent application, the image capture value of the original image is firstly corrected by the machine. . ^, the digital camera 5 · as claimed in the scope of patents! In the color camera pair, the original image is imaged, and the digital image is captured by the color camera. The digital camera captures the original image and captures the image capture value. Eight patterns: (such as the next page) 26
TW98137687A 2009-11-06 2009-11-06 Method for reconstructing color images TWI377044B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW98137687A TWI377044B (en) 2009-11-06 2009-11-06 Method for reconstructing color images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW98137687A TWI377044B (en) 2009-11-06 2009-11-06 Method for reconstructing color images

Publications (2)

Publication Number Publication Date
TW201116248A TW201116248A (en) 2011-05-16
TWI377044B true TWI377044B (en) 2012-11-21

Family

ID=44934747

Family Applications (1)

Application Number Title Priority Date Filing Date
TW98137687A TWI377044B (en) 2009-11-06 2009-11-06 Method for reconstructing color images

Country Status (1)

Country Link
TW (1) TWI377044B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9443322B2 (en) * 2013-09-09 2016-09-13 Mediatek Singapore Pte. Ltd. Method and associated apparatus for correcting color artifact of image
TWI645167B (en) * 2016-11-02 2018-12-21 熊亮原 Cloud optimization system for automatic color correction

Also Published As

Publication number Publication date
TW201116248A (en) 2011-05-16

Similar Documents

Publication Publication Date Title
Zhang et al. Detecting diabetes mellitus and nonproliferative diabetic retinopathy using tongue color, texture, and geometry features
KR101767270B1 (en) Dental shade mapping
JP5885344B2 (en) Method for characterizing skin or skin tone
US8027533B2 (en) Method of automated image color calibration
US7454046B2 (en) Method and system for analyzing skin conditions using digital images
US8285018B2 (en) Method for reconstructing color images
Tomatis et al. Automated melanoma detection with a novel multispectral imaging system: results of a prospective study
CN105636506B (en) Automatic camera for long-range photo-plethysmographic method is adjusted
CN108020519B (en) Virtual multi-light-source spectrum reconstruction method based on color constancy
KR20120006941A (en) Dental shade mapping
JP2008527350A (en) Cosmetic color measurement system with infrared detection
Quintana et al. A novel method for color correction in epiluminescence microscopy
JP2006254309A (en) Photographing system
Wang et al. Facial image medical analysis system using quantitative chromatic feature
TWI377044B (en) Method for reconstructing color images
Hsiao et al. Identified early stage mycosis fungoides from psoriasis and atopic dermatitis using non-invasive color contrast enhancement by LEDs lighting
JP3734741B2 (en) Blemish / freckle evaluation method
Zhang et al. Medical biometrics: computerized TCM data analysis
Aguilar et al. Biologically based sensor fusion for medical imaging
Beneducci et al. Dental shade matching assisted by computer vision techniques
CN106913304A (en) A kind of spectrum rigid pipe endoscope system
KR20230025656A (en) Image display system and image display method
TWI489306B (en) Health status assessment methods and the use of the method of health assessment system
CN107661087B (en) Medical imaging apparatus and method for imaging of photosensitive objects such as biological tissue
Litorja et al. Use of a spectrally tunable source to explore improvement in chromatic contrast for illumination of tissues