201217758 六、發明說明: 【發明所屬之技術領域】 [0001]本發明涉及一種光照強度檢測系統及方法。 【先前技術】 [_在當影像量測儀在進行影像量㈣,配置了不同類型的 光源(輪廊光,同轴光,環形光,圖案光),光源對於 影像量測儀疋至關重要的。當錢的亮度偏暗時,量測 儀可能無法清楚的知待心件的邊界絲面,當光源 亮度偏亮時’又容易引人影像形變誤差,這樣光照強卢 對量測結果產生巨大的詩1此適㈣光源光照強; 是非常重要的。 【發明内容】 [0003] ; 内今,有必要提供一種光照強度檢測系統及方 法準確。十算光源光照強度的大小,以瞭解光源是否合 闺種光照強度檢測系統,運行於電腦中,該電腦包括館 存景W象圖片的儲存裝置以及顧示裝置。該系統包括:創 建板、、且,用於㈣顏色條,並設定各灰度值在顏色條中 所對應的顏色;讀取模組,用於讀取儲存裝置中的影像 圖片’判斷模組’用於判斷所讀取的影像®片是否為灰 度位元映像’所述的讀取模組,還用於當所讀取的影像 圖片疋灰度位70映像時,讀取該灰度位元映像的位元映 像貝料’該位S映像資料包括該灰度位元映像的像素像 素點總數以及各像素像素點所對 應的灰度值,所述的灰 度值表不光照強度;繪製模組,用於記錄各灰度值所對 099135834 表單編號A0101 第4頁/共19頁 0992062618-0 201217758 應的像素點的個數’並繪製各灰度值與各灰度值所對應 的像素點數的關係曲線圖;所述的纟會製模組,還用於 重新緣製該灰度位元映像,根據該灰度位元映像上各像 素點的灰度值麵色條巾所㈣的顏色,在對應的像素 點上使用對應的顏色進行著色;顯示模組,在顯示裝置 上顯示該關係曲線圖以及該重新著色的灰度位元映像。 [0005] ❹ Ο [0006] 一種光照強度檢測方法,顧於電腦巾,該電腦包括儲 存影像圖片的儲存裝置以及顯示裝置。該方法包括如下 步驟:創_色條,並設定各灰度值在顏色條中所對應 的顏色;讀㈣錄置中的影像圖片;判斷所讀取的影 像圖片是否為灰度位元映像’當所讀取的影像圖片不是 灰度位元映像時’返回讀取儲存裝置中的影像圖片的步 驟;當所讀取的影像⑽是灰度位元離時讀取該灰 度位元映像的位元映像資料,該位元映像資料包括該灰 度位兀映像的像素_數収各像素輯對應的灰度值 ,所述的灰度值絲絲強度;記錄各灰度值所對應的 像素點的織,晨齡灰度值與各灰度值對應的像素 點個數的關係曲線圖;重崎製該灰度位it映像,根據 該灰度位元映像上各像素點的灰度值在顏色條中所對應 的顔色,在對應的像素點上使用對應的顏色進行著色; 在顯示裝置上顯示該關係曲線圖以及該重新著色的灰度 位元映像。 相較於習知技術’本發明所述的光照強度檢測系統及方 法’利歧度值來表示光照強度,該灰度值有對應的顏 色’然後用廷些顏色對灰度位元映像的每個像素重新著 099135834 表穿·嫉號A0101 第5頁/共19頁 0992062618-0 201217758 色,並且統計出各個灰度值下像素的個數。準確計算了 光源光照強度,並能一目了然地看出光源光照是否均勻 ,為光源檢測提供可靠的依據。 【實施方式】 [0007] [0008] [0009] 如圖1所示,是本發明光照強度檢測系統較佳實施例的架 構不意圖。在本實施例中,該光照強度檢測系統10運行 於電腦1中。所述的電腦1玎以為個人電腦(Pers〇nal201217758 VI. Description of the Invention: [Technical Field of the Invention] [0001] The present invention relates to a light intensity detecting system and method. [Prior Art] [_When the image measuring instrument is performing image volume (4), different types of light sources (wheel light, coaxial light, ring light, pattern light) are configured, and the light source is crucial for the image measuring instrument. of. When the brightness of the money is too dark, the measuring instrument may not be able to clearly know the boundary silk surface of the heart piece. When the brightness of the light source is bright, it is easy to introduce image deformation error, so that the light intensity is huge for the measurement result. Poetry 1 This (4) light source is strong; it is very important. SUMMARY OF THE INVENTION [0003] Nowadays, it is necessary to provide an illumination intensity detection system and method accurate. The light intensity of the light source is calculated to understand whether the light source is combined with the light intensity detection system and is operated in a computer. The computer includes a storage device for the image of the museum and a display device. The system comprises: creating a board, and for (4) a color bar, and setting a color corresponding to each gray value in the color bar; the reading module is configured to read the image picture in the storage device. The reading module for determining whether the read image of the image is a grayscale bitmap is also used to read the grayscale when the read image is mapped to the grayscale 70. The bitmap image of the bit map includes the total number of pixel pixels of the gray bit map and the gray value corresponding to each pixel pixel, and the gray value indicates no light intensity; Draw a module for recording each gray value to 099135834 Form No. A0101 Page 4 / Total 19 Page 0992062618-0 201217758 The number of pixels to be 'and draw each gray value corresponding to each gray value The relationship between the number of pixels; the 纟 制 module is also used to re-make the gradation bitmap, according to the gradation value of each pixel on the gradation map (4) The color is colored on the corresponding pixel using the corresponding color Display module, and a graph showing the relationship between the image of the re-bit gray colored on the display device. [0005] 0006 Ο [0006] A method for detecting a light intensity, which is a computer towel, and includes a storage device for storing image images and a display device. The method comprises the following steps: creating a color strip, and setting a color corresponding to each gray value in the color bar; reading (four) the image image in the recording; determining whether the read image image is a gray bit image The step of returning to the image image in the storage device when the read image image is not a grayscale bitmap; reading the grayscale image when the read image (10) is a grayscale bit Bit map data, the bit map data includes the gray level value corresponding to each pixel series of the pixel number of the gray level image, the gray value of the gray line intensity; and the pixel corresponding to each gray value is recorded Point woven, the relationship between the gray value of the morning age and the number of pixels corresponding to each gray value; the gradation of the gray level it image, according to the gray value of each pixel on the gray bit map The color corresponding to the color bar is colored by using a corresponding color on the corresponding pixel; the relationship graph and the gray-colored bitmap image of the re-coloring are displayed on the display device. Compared with the prior art 'light intensity detection system and method of the present invention', the difference value indicates the illumination intensity, and the gray value has a corresponding color 'and then uses the color of each color to map each of the gray bit maps. The pixels are re-entered with 099135834, 嫉号 A0101, page 5/19 pages 0992062618-0 201217758, and the number of pixels under each gray value is counted. Accurately calculate the light intensity of the light source, and can see at a glance whether the light source illumination is uniform, providing a reliable basis for light source detection. [Embodiment] [0007] [0009] As shown in Fig. 1, the architecture of the preferred embodiment of the illumination intensity detecting system of the present invention is not intended. In the present embodiment, the illumination intensity detecting system 10 operates in the computer 1. The computer is considered to be a personal computer (Pers〇nal
Computer,Pc)、筆記本電腦(Noteb〇〇k)、伺服器 (Server )等任意適用的計算裝置。該電腦1包括儲存擎 置2 0以及顯示裝置3 0。所述的儲存裝置2 0用於儲存各類 μ料,在本較佳實施例中,所述的儲存裝置2〇中儲存有 影像圖片。所述的顯示裝置30用於為電腦1顯示各類圖像 等資料。 如圖2所示,是圖1中光照強度檢測系統10的功能模組圖 。該光照強度檢測系統10包括創S|建模組2〇〇、讀取模組 202、判斷模組2〇4、計算模紐_206、顯示模組2〇8以及繪 製模組210。本發明所稱的模組是完成一特定功能的電腦 程式段,比程式更適合於描述軟體在電腦中的執行過程 ,因此在本發明以下對軟體描述中都以模組描述。 創建模組200用於創建顏色條(col〇I_ Bar),該顏色條 中預設定義了 256種顏色。所述的創建模組2〇〇還設定了 各灰度值(0〜255 )在顏色條中所對應的顏色。在本較佳 實施例中,所述的灰度值表示光照強度,灰度為〇 (即光 照強度最小)用藍色標記,灰度值為255 (即光照強度最 大)用紅色標記。 099135834 表單編號A0101 第6頁/共19頁 0992062618-0 201217758 酬魏馳m狀讀取料裝置财㈣像圖片。 []#斷拉組204用於判斷該讀取的影像圖片是否是灰度位元 映像。在本較佳實施例中,所述的判斷模組2〇4可以根據 該讀取的影像圖片的名稱的副檔名是否為“bmp”來判斷 «玄影像圖片是否為灰度位元映像。當該影像圖片的副檔 名疋bmp時,所述的判斷模組2〇4判斷該影像圖片是 灰度位元映像,當該影像圖片的副檔名不是“bmp”時, 所述的判斷模組2 04判斷該影像圖片不是灰度位元映像。 〇 [0012]當所讀取的影像圖片是灰度位元映像時,所述的讀取模 組202用於讀取^^灰度位元映像的位元映像資料,所述的 位元映像資料包括該灰度位元映像的像素點總數以及各 像素點所對應的灰度值。 [0013] 计异模組206用於從位元映像資料中獲取最大灰度值以及 最小灰度值,並根據位元映像資料計算該灰度位元映像 的平均灰度值。所述的平均灰度值等於各像素所對應的 灰度值的總和與該灰度位元映像的像素點總數的商。 〇 [0014] 顯示模組2〇8在顯示裝置3〇上顯示所述得到的最大灰度值 、最小灰度值以及平均灰度值。 [0015] 繪製模組210用於記錄各灰度值所對應的像素點的個數, 並繪製各灰度值與各灰度值所對應的像素點個數的關係 曲線圖,以及顯示模組2〇8在顯示裝置3〇上顯示該關係曲 線圖。所述的繪製模組21〇繪製坐標系的步驟如下:根據 預設的原點坐標,繪製該關係曲線圖的坐標原點,然後 繪製X軸(水準向右為X轴正方向)與γ轴(垂直向上為γ 099135834 表單編號A0101 第7頁/共19頁 0992062618-0 201217758 方向),以及X輛與γ軸的刻度。所述的刻度可以是 ,設的,财如’所述的X抽的刻度大小可以為15灰度值一 ^刻度,所述的γ轴的刻度大小可以為1 1 846像素個數一 個刻度。所述_輯組21G根據航錄的各灰度值所對 ,的像素點的減’ ,χ灰度值作為冰,以像素點個數為 在所緣製的坐標系上繪製各灰度值與各灰度值所對 應的像素點個數的關係曲線圖。 [0016] [0017] [0018] [0019] 所述的繪製模組2_用於重新繪製該灰度位元映像,根 據β灰度位元映像上各像素峡灰度值在顏色條中所對 應的顏色,在聽峰素點±使麟觸料進行著色 、將該重新著色的灰度位元映像顯示在顯示裝置3〇 上。 ’’、兒月的疋,通過在顯示裝置3〇上顯示重新繪製並著色 的灰度位元映像、關係曲線圖、最大灰度值、最小灰度 值以及平均灰度值,可準確地瞭梟泰照肆度的情況,一 目了然地看出光源光照是否均勻,為光源檢測提供可靠 的依據。 如圖3所示,是本發明光照強度檢測方法較佳實施例的流 程圖。步驟S1Q,創建模組2〇〇創建顏色條,並設定各灰 度值(〇〜255 )在顏色條中所對應的顏色。在本較佳實施 例中,所述的灰度值表示光照強度,灰度為〇 (即光照強 度最小)用藍色標記’灰度值為2 5 5 (即光照強度最大) 用红色標記。 步驟sii,讀取模組2〇2讀取儲存裝置2〇中的影像圖片。 099135834 表單蝙號Α0101 第8頁/共19頁 0992062618-0 201217758 [0020] [0021] [0022]Ο [0023] ❹ [0024] [0025] 少雜S12,判斷模組204用於判斷該讀取的影像圖片是否 是灰度位凡映像。當所讀取的影像圖片是灰度位元映像 時,進入步驟S13 ;當所讀取的影像圖片不是灰度位元映 像時,返回步驟S11。 夕驟S13,所述的讀取模組202讀取該灰度位元映像的位 元映像資料,所述的位元映像資料包括該灰度位元映像 的像素點總數以及各像素點所對應的灰度值。 少驟S14,計算模組206從位元映像資料中獲取最大灰度 值以及最小灰度值’並根據位元映像資料計算該灰度位 元映像的平均灰度值,以及所述的顯示模组2〇8在顯示裝 置30上顯示所述得到的最大灰度值、最小灰度值以及平 均灰度值。所述的平均灰度值等於各像素所對應的灰度 值的總和與該灰度位元映像的像素點總數的商。 步驟S15,繪製模組210記錄各灰度值所對應的像素點的 個數,並繪製各灰度值與各灰度值所對應的像素點個數 的關係曲線圖’以及顯示模組208在顯示裝置3〇上顯示該 關係曲線圖。 步驟S16,所述的繪製模組21〇重新繪製該灰度位元映像 ,根據該灰度位元映像上各像素點的灰度值在顏色條中 所對應的顏色,在對應的像素點上使用對應的顏色進行 著色,以及將該重新著色的灰度位元映像顯示在顯示裝 置30上。 如圖4所示,是本發明光照強度檢測方法繪製關係曲線圖 的細化流程圖。 099135834 表單編號A0101 第9頁/共19頁 0992062618- 201217758 [0026] 步驟SI 50,根據預設的原點坐標,繪製該關係曲線圖的 坐標原點。 [0027] 步驟S151,繪製X軸(水準向右為X軸正方向)與Y轴(垂 直向上為Y轴正方向),以及X轴與Y軸的刻度。 [0028] 步驟S152,根據該記錄的各灰度值所對應的像素點的個 數,以灰度值作為X軸,以各灰度值所對應的像素點個數 作為Y軸,在所繪製的坐標系上繪製各灰度值與各灰度值 所對應的像素點個數的關係曲線圖。 [0029] 綜上所述,本發明符合發明專利要件,爰依法提出專利 申請。惟,以上所述者僅爲本發明之較佳實施例,本發 明之範圍並不以上述實施例爲限,舉凡熟悉本案技藝之 人士援依本發明之精神所作之等效修飾或變化,皆應涵 蓋於以下申請專利範圍内。 【圖式簡單說明】 [0030] 圖1是本發明光照強度檢測系統較佳實施例的架構示意圖 〇 [0031] 圖2是本發明光照強度檢測系統較佳實施例的功能模組圖 〇 [0032] 圖3是本發明光照強度檢測方法較佳實施例的流程圖。 [0033] 圖4是本發明光照強度檢測方法中繪製關係曲線圖的細化 流程圖。 【主要元件符號說明】 [0034] 電腦 1 099135834 表單編號A0101 第10頁/共19頁 0992062618-0 201217758 [0035]光照強度檢測系統1〇 • [0036] 儲存裝置2〇 _7]顯示襞置3 〇 [0038] 創建模組200 [0039] 讀取模紐_ 202 [0040] 判斷模組204 [0041] 計算模組206 〇 [0042] 顯示模組2〇8 !: ·- :: [0_ 繪製模組210 i丨 [0044] 創建顏色條,並預設各灰度值所對應的顏色S10 [0045] 從儲存裝置中讀取影像圖片S11 [0046] 判斷所讀取的影像圖片是否為灰度位元映像S12 1 f. . . ">«« !i [0047] 獲取該灰度位元映像的位元映像資料S13 〇 [_得到該位元映像資料巾的最大灰度值以絲小灰度值, 以及計算該灰度位S映像的平均灰度值,並顯示在顯示 裝置上S14 國記料灰舰⑽應的料_錄,以錢製該各灰 度值與各灰度值所對應的像素點個數的關係曲線圖,並 顯示在顯示裝置上 [0050] 099135834 根據該灰度位元映像上 用對應的顏色進行著色⑽巾的顏色’使 表單編號A0101 第11頁/共 ^ 重新著色的灰度位元映像 、19頁 0992062618-0 201217758 顯示在顯示裝置上S16 099135834 表單編號A0101 第12頁/共19頁 0992062618-0Any suitable computing device such as Computer, Pc), notebook (Noteb〇〇k), and server (Server). The computer 1 includes a storage engine 20 and a display device 30. The storage device 20 is configured to store various types of materials. In the preferred embodiment, the storage device 2 is stored with image images. The display device 30 is used to display various types of images and the like for the computer 1. As shown in FIG. 2, it is a functional module diagram of the illumination intensity detecting system 10 of FIG. The illumination intensity detection system 10 includes a creation S|modeling group 2, a reading module 202, a determination module 2〇4, a calculation module _206, a display module 2〇8, and a drawing module 210. The module referred to in the present invention is a computer program segment for performing a specific function, and is more suitable for describing the execution process of the software in the computer than the program. Therefore, the following description of the software is described in the module. The creation module 200 is used to create a color bar (col〇I_Bar) in which 256 colors are defined by default. The creation module 2〇〇 also sets the color corresponding to each gray value (0~255) in the color bar. In the preferred embodiment, the gray value indicates the light intensity, the gray level is 〇 (i.e., the light intensity is the smallest), and the gray value is 255 (i.e., the light intensity is the largest). 099135834 Form No. A0101 Page 6 of 19 0992062618-0 201217758 Reward Wei Chi m-shaped reading device financial (four) like pictures. []# The break group 204 is used to determine whether the read image picture is a gray bit map. In the preferred embodiment, the determining module 2〇4 can determine whether the “hi-image image is a grayscale bitmap image” according to whether the auxiliary file name of the name of the read video image is “bmp”. When the file name of the image picture is 疋bmp, the determining module 2〇4 determines that the image picture is a gray bit map, and when the file name of the image picture is not “bmp”, the determining Module 2 04 determines that the image picture is not a grayscale bitmap.读取[0012] When the read image image is a grayscale bitmap, the reading module 202 is configured to read the bitmap image data of the grayscale bitmap image, the bitmap image The data includes the total number of pixels of the grayscale bitmap and the grayscale value corresponding to each pixel. [0013] The counting module 206 is configured to obtain a maximum gray value and a minimum gray value from the bit map data, and calculate an average gray value of the gray bit map according to the bit map data. The average gray value is equal to the quotient of the sum of the gray values corresponding to each pixel and the total number of pixels of the gray bit map. [0014] The display module 2〇8 displays the obtained maximum gray value, minimum gray value, and average gray value on the display device 3〇. [0015] The drawing module 210 is configured to record the number of pixels corresponding to each gray value, and draw a relationship diagram between each gray value and the number of pixels corresponding to each gray value, and a display module. 2〇8 displays the relationship graph on the display device 3〇. The drawing module 21 〇 draws the coordinate system as follows: according to the preset origin coordinates, draw the coordinate origin of the relationship graph, and then draw the X axis (the horizontal direction is the X axis positive direction) and the γ axis (Vertically upwards are γ 099135834 Form No. A0101 Page 7 / 19 pages 0992062618-0 201217758 Direction), and the scale of the X and γ axes. The scale may be set, and the scale of the X-pull may be 15 gray scale value and ^ scale, and the scale of the γ-axis may be 1 1 846 pixels. . The _set 21G is based on the gradation value of the transcript, and the pixel point minus ', χ gradation value is used as ice, and the number of pixels is used to draw each gradation value on the coordinate system of the edge. A graph of the relationship between the number of pixels corresponding to each gray value. [0019] [0019] The drawing module 2_ is used to redraw the gray bit map, according to the gray value of each pixel on the β gray bit map in the color bar. Corresponding colors are displayed on the display device 3A by listening to the peak point ± coloring the lining. '', 儿月疋, by displaying the redrawn and colored grayscale bitmap, relationship graph, maximum gray value, minimum gray value and average gray value on the display device 3〇, can be accurately In the case of the 枭泰照肆度, it is clear at a glance whether the illumination of the light source is uniform, which provides a reliable basis for the detection of the light source. As shown in Fig. 3, it is a flow chart of a preferred embodiment of the illumination intensity detecting method of the present invention. In step S1Q, the module 2 is created to create a color bar, and the color corresponding to each gray value (〇~255) in the color bar is set. In the preferred embodiment, the gray value indicates the intensity of the light, and the gray level is 〇 (i.e., the light intensity is the smallest). The blue mark is used. The gray value is 2 5 5 (i.e., the maximum light intensity) is marked in red. In step sii, the reading module 2〇2 reads the image image in the storage device 2〇. 099135834 Form bat number 101 0101 Page 8 / 19 pages 0992062618-0 201217758 [0020] [0022] [0023] [0024] [0025] [0025] Less than S12, the determination module 204 is used to determine the reading Whether the image image is a grayscale image. When the read image picture is a grayscale bitmap, the process proceeds to step S13; and when the read image picture is not a grayscale bitmap, the process returns to step S11. In the step S13, the reading module 202 reads the bit map data of the gray bit map, and the bit map data includes the total number of pixels of the gray bit map and corresponding to each pixel point. Gray value. In a small step S14, the calculation module 206 obtains a maximum gray value and a minimum gray value from the bit map data and calculates an average gray value of the gray bit map according to the bit map data, and the display mode. The group 2〇8 displays the obtained maximum gray value, minimum gray value, and average gray value on the display device 30. The average gray value is equal to the quotient of the sum of the gray values corresponding to each pixel and the total number of pixels of the gray bit map. In step S15, the drawing module 210 records the number of pixels corresponding to each gray value, and plots the relationship between each gray value and the number of pixel points corresponding to each gray value, and the display module 208 The relationship graph is displayed on the display device 3A. Step S16, the drawing module 21 〇 redraws the gray bit map, according to the color corresponding to the gray value of each pixel on the gray bit map in the color bar, at the corresponding pixel point The coloring is performed using the corresponding color, and the re-colored gradation bitmap is displayed on the display device 30. As shown in Fig. 4, it is a detailed flow chart of the relationship diagram of the illumination intensity detection method of the present invention. 099135834 Form No. A0101 Page 9 of 19 0992062618- 201217758 [0026] Step SI 50, according to the preset origin coordinates, draw the coordinate origin of the relationship graph. [0027] In step S151, the X axis (the right direction is the X axis positive direction) and the Y axis (the vertical direction is the Y axis positive direction), and the scales of the X axis and the Y axis are plotted. [0028] Step S152, according to the number of pixels corresponding to each gradation value of the record, the gradation value is taken as the X-axis, and the number of pixel points corresponding to each gradation value is taken as the Y-axis. The relationship between each gray value and the number of pixels corresponding to each gray value is plotted on the coordinate system. [0029] In summary, the present invention complies with the requirements of the invention patent, and submits a patent application according to law. The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited to the above-described embodiments, and equivalent modifications or variations made by those skilled in the art in light of the spirit of the present invention are It should be covered by the following patent application. BRIEF DESCRIPTION OF THE DRAWINGS [0030] FIG. 1 is a schematic diagram of a preferred embodiment of a light intensity detecting system of the present invention. [0031] FIG. 2 is a functional block diagram of a preferred embodiment of the light intensity detecting system of the present invention [0032] 3 is a flow chart of a preferred embodiment of the illumination intensity detecting method of the present invention. 4 is a detailed flow chart of drawing a relationship graph in the illumination intensity detecting method of the present invention. [Main component symbol description] [0034] Computer 1 099135834 Form No. A0101 Page 10 / Total 19 Page 0992062618-0 201217758 [0035] Light intensity detection system 1〇 [0036] Storage device 2〇_7] Display device 3创建[0038] Create Module 200 [0039] Read Module _ 202 [0040] Judgment Module 204 [0041] Computation Module 206 〇 [0042] Display Module 2 〇 8 !: ·- :: [0_ Draw The module 210 i丨[0044] creates a color bar and presets the color corresponding to each gray value S10 [0045] reads the image picture S11 from the storage device [0046] determines whether the read image image is grayscale Bit map S12 1 f. . . ">«« !i [0047] Obtain the bit map data S13 of the gray bit map [〇[_Get the maximum gray value of the bit map data towel to the wire a small gray value, and an average gray value of the image of the gray level S is calculated, and displayed on the display device, the material of the S14 national record gray ship (10) is recorded, and the gray value and each gray level are made by the money. A relationship diagram of the number of pixels corresponding to the value, and displayed on the display device [0050] 099135834 according to the grayscale bitmap corresponding to Color coloring (10) Color of the towel 'Make the form number A0101 Page 11 / Total ^ Gray-colored bitmap image, 19 pages 0992062618-0 201217758 Displayed on the display device S16 099135834 Form No. A0101 Page 12 of 19 0992062618-0