TWI490457B - System and method for detecting light intensity - Google Patents

System and method for detecting light intensity Download PDF

Info

Publication number
TWI490457B
TWI490457B TW099135834A TW99135834A TWI490457B TW I490457 B TWI490457 B TW I490457B TW 099135834 A TW099135834 A TW 099135834A TW 99135834 A TW99135834 A TW 99135834A TW I490457 B TWI490457 B TW I490457B
Authority
TW
Taiwan
Prior art keywords
image
gray value
gray
bit map
value
Prior art date
Application number
TW099135834A
Other languages
Chinese (zh)
Other versions
TW201217758A (en
Inventor
Chih Kuang Chang
Xiao-Guang Xue
Zhong-Kui Yuan
Li Jiang
Original Assignee
Hon Hai Prec Ind Co Ltd
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 Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW099135834A priority Critical patent/TWI490457B/en
Publication of TW201217758A publication Critical patent/TW201217758A/en
Application granted granted Critical
Publication of TWI490457B publication Critical patent/TWI490457B/en

Links

Description

光照強度檢測系統及方法Light intensity detection system and method

本發明涉及一種光照強度檢測系統及方法。The invention relates to a light intensity detecting system and method.

在當影像量測儀在進行影像量測時,配置了不同類型的光源(輪廓光,同軸光,環形光,圖案光),光源對於影像量測儀是至關重要的。當光源的亮度偏暗時,量測儀可能無法清楚的顯示待測工件的邊界或表面,當光源亮度偏亮時,又容易引入影像形變誤差,這樣光照強度對量測結果產生巨大的影響。因此適當的光源光照強度是非常重要的。When the image measuring instrument is performing image measurement, different types of light sources (contour light, coaxial light, ring light, pattern light) are configured, and the light source is crucial for the image measuring instrument. When the brightness of the light source is dark, the measuring instrument may not clearly display the boundary or surface of the workpiece to be tested. When the brightness of the light source is bright, it is easy to introduce image deformation error, so that the light intensity has a great influence on the measurement result. Therefore, proper light source illumination intensity is very important.

鑒於以上內容,有必要提供一種光照強度檢測系統及方法,準確計算光源光照強度的大小,以瞭解光源是否合適。In view of the above, it is necessary to provide a light intensity detecting system and method for accurately calculating the light intensity of the light source to know whether the light source is suitable.

一種光照強度檢測系統,運行於電腦中,該電腦包括儲存影像圖片的儲存裝置以及顯示裝置。該系統包括:創建模組,用於創建顏色條,並設定各灰度值在顏色條中所對應的顏色;讀取模組,用於讀取儲存裝置中的影像圖片;判斷模組,用於判斷所讀取的影像圖片是否為灰度位元映像;所述的讀取模組,還用於當所讀取的影像圖片是灰度位元映像時,讀取該灰度位元映像的位元映像資料,該位元映像資料包括該灰度位元映像的像素像素點總數以及各像素像素點所對應的灰度值,所述的灰度值表示光照強度;繪製模組,用於記錄各灰度值所對應的像素點的個數,並繪製各灰度值與各灰度值所對應的像素點個數的關係曲線圖;所述的繪製模組,還用於重新繪製該灰度位元映像,根據該灰度位元映像上各像素點的灰度值在顏色條中所對應的顏色,在對應的像素點上使用對應的顏色進行著色;顯示模組,在顯示裝置上顯示該關係曲線圖以及該重新著色的灰度位元映像。A light intensity detecting system runs in a computer, the computer comprising a storage device for storing image images and a display device. The system comprises: creating a module for creating a color bar, and setting a color corresponding to each gray value in the color bar; a reading module for reading an image image in the storage device; Determining whether the read image image is a grayscale bitmap; the reading module is further configured to read the grayscale bitmap image when the read image image is a grayscale bitmap image Bit map data, the bit map data includes the total number of pixel pixels of the gray scale bitmap and the gray value corresponding to each pixel pixel, the gray value represents the light intensity; the drawing module is used Recording the number of pixels corresponding to each gray value, and plotting the relationship between each gray value and the number of pixels corresponding to each gray value; the drawing module is also used to redraw The gray scale bitmap image is colored according to the color corresponding to the gray value of each pixel point in the gray scale image in the color strip, and the corresponding color is used for coloring on the corresponding pixel point; the display module is displayed The relationship graph is displayed on the device and the re Color gray bit map.

一種光照強度檢測方法,應用於電腦中,該電腦包括儲存影像圖片的儲存裝置以及顯示裝置。該方法包括如下步驟:創建顏色條,並設定各灰度值在顏色條中所對應的顏色;讀取儲存裝置中的影像圖片;判斷所讀取的影像圖片是否為灰度位元映像,當所讀取的影像圖片不是灰度位元映像時,返回讀取儲存裝置中的影像圖片的步驟;當所讀取的影像圖片是灰度位元映像時,讀取該灰度位元映像的位元映像資料,該位元映像資料包括該灰度位元映像的像素點總數以及各像素點所對應的灰度值,所述的灰度值表示光照強度;記錄各灰度值所對應的像素點的個數,並繪製各灰度值與各灰度值對應的像素點個數的關係曲線圖;重新繪製該灰度位元映像,根據該灰度位元映像上各像素點的灰度值在顏色條中所對應的顏色,在對應的像素點上使用對應的顏色進行著色;在顯示裝置上顯示該關係曲線圖以及該重新著色的灰度位元映像。A method for detecting light intensity is applied to a computer, and the computer includes a storage device for storing image images and a display device. The method comprises the steps of: creating a color bar, and setting a color corresponding to each gray value in the color bar; reading an image image in the storage device; determining whether the read image image is a gray bit image, when When the read image image is not a grayscale bitmap, the step of reading the image image in the storage device is returned; when the read image image is a grayscale bitmap image, the grayscale bitmap image is read. Bit map data, the bit map data includes the total number of pixels of the gray bit map and the gray value corresponding to each pixel, the gray value indicates the light intensity; and the corresponding gray value is recorded The number of pixels, and plot the relationship between each gray value and the number of pixels corresponding to each gray value; redraw the gray bit image, according to the gray of each pixel on the gray bit map The color corresponding to the color value in the color bar is colored on the corresponding pixel using the corresponding color; the relationship graph and the gray-colored bitmap image of the re-coloring are displayed on the display device.

相較於習知技術,本發明所述的光照強度檢測系統及方法,利用灰度值來表示光照強度,該灰度值有對應的顏色,然後用這些顏色對灰度位元映像的每個像素重新著色,並且統計出各個灰度值下像素的個數。準確計算了光源光照強度,並能一目了然地看出光源光照是否均勻,為光源檢測提供可靠的依據。Compared with the prior art, the illumination intensity detecting system and method of the present invention uses gray values to represent the light intensity, the gray values have corresponding colors, and then use these colors to map each of the gray bit images. The pixels are re-colored, 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.

如圖1所示,是本發明光照強度檢測系統較佳實施例的架構示意圖。在本實施例中,該光照強度檢測系統10運行於電腦1中。所述的電腦1可以為個人電腦(Personal Computer,PC)、筆記本電腦(Notebook)、伺服器(Server)等任意適用的計算裝置。該電腦1包括儲存裝置20以及顯示裝置30。所述的儲存裝置20用於儲存各類資料,在本較佳實施例中,所述的儲存裝置20中儲存有影像圖片。所述的顯示裝置30用於為電腦1顯示各類圖像等資料。FIG. 1 is a schematic structural view of a preferred embodiment of the illumination intensity detecting system of the present invention. In the present embodiment, the illumination intensity detecting system 10 operates in the computer 1. The computer 1 can be any suitable computing device such as a personal computer (PC), a notebook computer, or a server. The computer 1 includes a storage device 20 and a display device 30. The storage device 20 is configured to store various types of data. In the preferred embodiment, the storage device 20 stores image images. The display device 30 is configured to display various types of images and the like for the computer 1.

如圖2所示,是圖1中光照強度檢測系統10的功能模組圖。該光照強度檢測系統10包括創建模組200、讀取模組202、判斷模組204、計算模組206、顯示模組208以及繪製模組210。本發明所稱的模組是完成一特定功能的電腦程式段,比程式更適合於描述軟體在電腦中的執行過程,因此在本發明以下對軟體描述中都以模組描述。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 module 200, a reading module 202, a determination module 204, a calculation module 206, a display module 208, and a rendering 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.

創建模組200用於創建顏色條(Color Bar),該顏色條中預設定義了256種顏色。所述的創建模組200還設定了各灰度值(0~255)在顏色條中所對應的顏色。在本較佳實施例中,所述的灰度值表示光照強度,灰度為0(即光照強度最小)用藍色標記,灰度值為255(即光照強度最大)用紅色標記。The creation module 200 is used to create a color bar in which 256 colors are defined by default. The creation module 200 also sets the color corresponding to each gray value (0~255) in the color bar. In the preferred embodiment, the gray value indicates the illumination intensity, the gray level is 0 (ie, the light intensity is the smallest), the blue color is used, and the gray value is 255 (ie, the light intensity is the largest), which is marked in red.

讀取模組202用於讀取儲存裝置20中的影像圖片。The reading module 202 is configured to read image images in the storage device 20.

判斷模組204用於判斷該讀取的影像圖片是否是灰度位元映像。在本較佳實施例中,所述的判斷模組204可以根據該讀取的影像圖片的名稱的副檔名是否為“bmp”來判斷該影像圖片是否為灰度位元映像。當該影像圖片的副檔名是“bmp”時,所述的判斷模組204判斷該影像圖片是灰度位元映像,當該影像圖片的副檔名不是“bmp”時,所述的判斷模組204判斷該影像圖片不是灰度位元映像。The determining module 204 is configured to determine whether the read image image is a grayscale bitmap. In the preferred embodiment, the determining module 204 can determine whether the image image is a grayscale bitmap image according to whether the secondary 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 204 determines that the image picture is a gray bit map, and when the file name of the image picture is not "bmp", the determining The module 204 determines that the image picture is not a grayscale bitmap.

當所讀取的影像圖片是灰度位元映像時,所述的讀取模組202用於讀取該灰度位元映像的位元映像資料,所述的位元映像資料包括該灰度位元映像的像素點總數以及各像素點所對應的灰度值。When the read image is a grayscale bitmap, the reading module 202 is configured to read the bitmap image of the grayscale bitmap, and the bitmap image includes the grayscale The total number of pixels in the bitmap and the gray value corresponding to each pixel.

計算模組206用於從位元映像資料中獲取最大灰度值以及最小灰度值,並根據位元映像資料計算該灰度位元映像的平均灰度值。所述的平均灰度值等於各像素所對應的灰度值的總和與該灰度位元映像的像素點總數的商。The calculation 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.

顯示模組208在顯示裝置30上顯示所述得到的最大灰度值、最小灰度值以及平均灰度值。The display module 208 displays the obtained maximum gray value, minimum gray value, and average gray value on the display device 30.

繪製模組210用於記錄各灰度值所對應的像素點的個數,並繪製各灰度值與各灰度值所對應的像素點個數的關係曲線圖,以及顯示模組208在顯示裝置30上顯示該關係曲線圖。所述的繪製模組210繪製坐標系的步驟如下:根據預設的原點坐標,繪製該關係曲線圖的坐標原點,然後繪製X軸(水準向右為X軸正方向)與Y軸(垂直向上為Y軸正方向),以及X軸與Y軸的刻度。所述的刻度可以是預設的,例如,所述的X軸的刻度大小可以為15灰度值一個刻度,所述的Y軸的刻度大小可以為11846像素個數一個刻度。所述的繪製模組210根據該記錄的各灰度值所對應的像素點的個數,以灰度值作為X軸,以像素點個數為Y軸,在所繪製的坐標系上繪製各灰度值與各灰度值所對應的像素點個數的關係曲線圖。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 the display module 208 is displayed. The relationship graph is displayed on device 30. The drawing module 210 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 right direction is the X axis positive direction) and the Y axis ( The vertical direction is the positive direction of the Y axis), and the scales of the X and Y axes. The scale may be preset. For example, the scale of the X-axis may be a scale of 15 gray scales, and the scale of the Y-axis may be 11846 pixels. The drawing module 210 draws each pixel on the drawn coordinate system according to the number of pixels corresponding to each gray value of the record, with the gray value as the X axis and the pixel number as the Y axis. A graph showing the relationship between the gradation value and the number of pixels corresponding to each gradation value.

所述的繪製模組210還用於重新繪製該灰度位元映像,根據該灰度位元映像上各像素點的灰度值在顏色條中所對應的顏色,在對應的像素點上使用對應的顏色進行著色,以及將該重新著色的灰度位元映像顯示在顯示裝置30上。The drawing module 210 is further configured to redraw the gray bit map, and use the gray color value of each pixel on the gray bit map according to the color corresponding to the color bar, and use the corresponding pixel point. The corresponding color is colored, and the re-colored gradation bitmap is displayed on the display device 30.

應說明的是,通過在顯示裝置30上顯示重新繪製並著色的灰度位元映像、關係曲線圖、最大灰度值、最小灰度值以及平均灰度值,可準確地瞭解光照強度的情況,一目了然地看出光源光照是否均勻,為光源檢測提供可靠的依據。It should be noted that the light intensity can be accurately understood by displaying the redrawn and colored gray bit map, the relationship graph, the maximum gray value, the minimum gray value, and the average gray value on the display device 30. 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.

如圖3所示,是本發明光照強度檢測方法較佳實施例的流程圖。步驟S10,創建模組200創建顏色條,並設定各灰度值(0~255)在顏色條中所對應的顏色。在本較佳實施例中,所述的灰度值表示光照強度,灰度為0(即光照強度最小)用藍色標記,灰度值為255(即光照強度最大)用紅色標記。3 is a flow chart of a preferred embodiment of the illumination intensity detecting method of the present invention. In step S10, the creating module 200 creates a color bar and sets a color corresponding to each gray value (0~255) in the color bar. In the preferred embodiment, the gray value indicates the illumination intensity, the gray level is 0 (ie, the light intensity is the smallest), the blue color is used, and the gray value is 255 (ie, the light intensity is the largest), which is marked in red.

步驟S11,讀取模組202讀取儲存裝置20中的影像圖片。In step S11, the reading module 202 reads the image image in the storage device 20.

步驟S12,判斷模組204用於判斷該讀取的影像圖片是否是灰度位元映像。當所讀取的影像圖片是灰度位元映像時,進入步驟S13;當所讀取的影像圖片不是灰度位元映像時,返回步驟S11。In step S12, the determining module 204 is configured to determine whether the read image image is a grayscale bitmap. When the read image picture is a grayscale bitmap, the process proceeds to step S13; when the read image picture is not a grayscale bitmap, the process returns to step S11.

步驟S13,所述的讀取模組202讀取該灰度位元映像的位元映像資料,所述的位元映像資料包括該灰度位元映像的像素點總數以及各像素點所對應的灰度值。Step S13, the reading module 202 reads the bit map data of the gray bit map, the bit map data includes the total number of pixels of the gray bit map and corresponding to each pixel point. grayscale value.

步驟S14,計算模組206從位元映像資料中獲取最大灰度值以及最小灰度值,並根據位元映像資料計算該灰度位元映像的平均灰度值,以及所述的顯示模組208在顯示裝置30上顯示所述得到的最大灰度值、最小灰度值以及平均灰度值。所述的平均灰度值等於各像素所對應的灰度值的總和與該灰度位元映像的像素點總數的商。Step S14, the calculation module 206 obtains the maximum gray value and the 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 module. 208 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.

步驟S15,繪製模組210記錄各灰度值所對應的像素點的個數,並繪製各灰度值與各灰度值所對應的像素點個數的關係曲線圖,以及顯示模組208在顯示裝置30上顯示該關係曲線圖。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 pixels corresponding to each gray value, and the display module 208 The relationship graph is displayed on the display device 30.

步驟S16,所述的繪製模組210重新繪製該灰度位元映像,根據該灰度位元映像上各像素點的灰度值在顏色條中所對應的顏色,在對應的像素點上使用對應的顏色進行著色,以及將該重新著色的灰度位元映像顯示在顯示裝置30上。Step S16, the drawing module 210 redraws the gray bit map, and uses the color corresponding to the gray value of each pixel on the gray bit map in the color bar, and uses the corresponding pixel point. The corresponding color is colored, and the re-colored gradation bitmap is displayed on the display device 30.

如圖4所示,是本發明光照強度檢測方法繪製關係曲線圖的細化流程圖。As shown in FIG. 4, it is a detailed flowchart of the relationship diagram of the illumination intensity detection method of the present invention.

步驟S150,根據預設的原點坐標,繪製該關係曲線圖的坐標原點。In step S150, the coordinate origin of the relationship graph is drawn according to the preset origin coordinates.

步驟S151,繪製X軸(水準向右為X軸正方向)與Y軸(垂直向上為Y軸正方向),以及X軸與Y軸的刻度。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 X axis and the Y axis are plotted.

步驟S152,根據該記錄的各灰度值所對應的像素點的個數,以灰度值作為X軸,以各灰度值所對應的像素點個數作為Y軸,在所繪製的坐標系上繪製各灰度值與各灰度值所對應的像素點個數的關係曲線圖。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, and the drawn coordinate system is used. A graph plotting the relationship between each gray value and the number of pixels corresponding to each gray value is plotted.

綜上所述,本發明符合發明專利要件,爰依法提出專利申請。惟,以上所述者僅爲本發明之較佳實施例,本發明之範圍並不以上述實施例爲限,舉凡熟悉本案技藝之人士援依本發明之精神所作之等效修飾或變化,皆應涵蓋於以下申請專利範圍內。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.

1...電腦1. . . computer

10...光照強度檢測系統10. . . Light intensity detection system

20...儲存裝置20. . . Storage device

30...顯示裝置30. . . Display device

200...創建模組200. . . Create module

202...讀取模組202. . . Read module

204...判斷模組204. . . Judging module

206...計算模組206. . . Computing module

208...顯示模組208. . . Display module

210...繪製模組210. . . Drawing module

S10...創建顏色條,並預設各灰度值所對應的顏色S10. . . Create a color bar and preset the color corresponding to each gray value

S11...從儲存裝置中讀取影像圖片S11. . . Reading image images from the storage device

S12...判斷所讀取的影像圖片是否為灰度位元映像S12. . . Determine whether the read image is a grayscale bitmap

S13...獲取該灰度位元映像的位元映像資料S13. . . Obtaining the bitmap image of the grayscale bitmap

S14...得到該位元映像資料中的最大灰度值以及最小灰度值,以及計算該灰度位元映像的平均灰度值,並顯示在顯示裝置上S14. . . Obtaining a maximum gray value and a minimum gray value in the bit map data, and calculating an average gray value of the gray bit map, and displaying the same on the display device

S15...記錄各灰度值所對應的像素點的個數,以及繪製該各灰度值與各灰度值所對應的像素點個數的關係曲線圖,並顯示在顯示裝置上S15. . . Recording the number of pixels corresponding to each gray value, and plotting the relationship between each gray value and the number of pixels corresponding to each gray value, and displaying on the display device

S16...根據該灰度位元映像上各像素點在顏色條中的顏色,使用對應的顏色進行著色,將該重新著色的灰度位元映像顯示在顯示裝置上S16. . . According to the color of each pixel in the color bar on the grayscale bitmap, the color is colored by using the corresponding color, and the re-colored grayscale image is displayed on the display device.

圖1是本發明光照強度檢測系統較佳實施例的架構示意圖。1 is a schematic block diagram of a preferred embodiment of the illumination intensity detecting system of the present invention.

圖2是本發明光照強度檢測系統較佳實施例的功能模組圖。2 is a functional block diagram of a preferred embodiment of the illumination intensity detecting system of the present invention.

圖3是本發明光照強度檢測方法較佳實施例的流程圖。3 is a flow chart of a preferred embodiment of the illumination intensity detecting method of the present invention.

圖4是本發明光照強度檢測方法中繪製關係曲線圖的細化流程圖。4 is a detailed flow chart of drawing a relationship graph in the illumination intensity detecting method of the present invention.

S10...創建顏色條,並設定各灰度值所對應的顏色S10. . . Create a color bar and set the color corresponding to each gray value

S11...從儲存裝置中讀取影像圖片S11. . . Reading image images from the storage device

S12...判斷所讀取的影像圖片是否為灰度位元映像S12. . . Determine whether the read image is a grayscale bitmap

S13...獲取該灰度位元映像的位元映像資料S13. . . Obtaining the bitmap image of the grayscale bitmap

S14...得到該位元映像資料中的最大灰度值以及最小灰度值,以及計算該灰度位元映像的平均灰度值,並顯示在顯示裝置上S14. . . Obtaining a maximum gray value and a minimum gray value in the bit map data, and calculating an average gray value of the gray bit map, and displaying the same on the display device

S15...記錄各灰度值所對應的像素點的個數,以及繪製各灰度值與各灰度值所對應的像素點個數的關係曲線圖,並顯示在顯示裝置上S15. . . Recording the number of pixels corresponding to each gray value, and plotting the relationship between each gray value and the number of pixels corresponding to each gray value, and displaying on the display device

S16...根據該灰度位元映像上各像素點在顏色條中的顏色,使用對應的顏色進行著色,將該重新著色的灰度位元映像顯示在顯示裝置上S16. . . According to the color of each pixel in the color bar on the grayscale bitmap, the color is colored by using the corresponding color, and the re-colored grayscale image is displayed on the display device.

Claims (8)

一種光照強度檢測系統,運行於電腦中,該電腦包括儲存影像圖片的儲存裝置以及顯示裝置,該系統包括:
創建模組,用於創建顏色條,並設定各灰度值在顏色條中所對應的顏色;
讀取模組,用於讀取儲存裝置中的影像圖片;
判斷模組,用於判斷所讀取的影像圖片是否為灰度位元映像;
所述的讀取模組,還用於當所讀取的影像圖片是灰度位元映像時,讀取該灰度位元映像的位元映像資料,該位元映像資料包括該灰度位元映像的像素點總數以及各像素點所對應的灰度值,所述的灰度值表示光照強度;
繪製模組,用於記錄各灰度值所對應的像素點的個數,並繪各灰度值與各灰度值所對應的像素點個數的關係曲線圖;
所述的繪製模組,還用於重新繪製該灰度位元映像,根據該灰度位元映像上各像素點的灰度值在顏色條中所對應的顏色,在對應的像素點上使用對應的顏色進行著色;
顯示模組,在顯示裝置上顯示該關係曲線圖以及該重新著色的灰度位元映像。
A light intensity detecting system is operated in a computer, the computer comprising a storage device for storing image images and a display device, the system comprising:
Create a module for creating a color bar and setting a color corresponding to each gray value in the color bar;
a reading module for reading an image image in the storage device;
a determining module, configured to determine whether the read image image is a grayscale bitmap;
The reading module is further configured to: when the read image image is a grayscale bitmap, read the bitmap image of the grayscale bitmap, the bitmap image includes the grayscale The total number of pixels of the meta-image and the gray value corresponding to each pixel, the gray value indicating the light intensity;
The drawing module 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;
The drawing module is further configured to redraw the gray bit map, and use the color corresponding to the gray value of each pixel on the gray bit map in the color bar, and use the corresponding pixel point. Coloring the corresponding color;
The display module displays the relationship graph and the gray-scale bitmap image of the re-coloring on the display device.
如申請專利範圍第1項所述之光照強度檢測系統,該系統還包括:
計算模組,用於從位元映像資料中得到最大灰度值以及最小灰度值;
所述的計算模組,還用於根據位元映像資料計算該灰度位元映像的平均值,所述的平均灰度值等於各像素所對應的灰度值的總和與該灰度位元映像的像素點總數的商;及
所述顯示模組,還用於在顯示裝置上顯示所述得到的最大灰度值、最小灰度值以及平均灰度值。
The illumination intensity detecting system according to claim 1, wherein the system further comprises:
a calculation module for obtaining a maximum gray value and a minimum gray value from the bit map data;
The computing module is further configured to calculate an average value of the grayscale bitmap according to the bit map data, where the average grayscale value is equal to a sum of grayscale values corresponding to each pixel and the grayscale bit a quotient of the total number of pixels of the image; and the display module is further configured to display the obtained maximum gray value, minimum gray value, and average gray value on the display device.
如申請專利範圍第1項所述之光照強度檢測系統,所述繪製模組通過下述步驟繪製各灰度值與各灰度值所對應的像素點個數的關係曲線圖:
根據預設的原點坐標,繪製該關係曲線圖的坐標原點;
繪製X軸與Y軸,以及X軸與Y軸的刻度;
根據該記錄的各灰度值所對應的像素點的個數,以灰度值作為X軸,以各灰度值對應的像素點個數為Y軸,在所繪製的坐標系上繪製該關係曲線圖。
The illumination intensity detection system according to claim 1, wherein the drawing module draws a relationship diagram between each gray value and the number of pixel points corresponding to each gray value by the following steps:
Drawing the coordinate origin of the relationship graph according to the preset origin coordinates;
Plot the X and Y axes, and the X and Y axes;
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, and the relationship is drawn on the drawn coordinate system. Graph.
如申請專利範圍第1項所述之光照強度檢測系統,所述的判斷模組根據該讀取的影像圖片的副檔名是否為“bmp”來判斷該影像圖片是否為灰度位元映像。The illumination intensity detecting system according to claim 1, wherein the determining module determines whether the image image is a grayscale bitmap image according to whether the auxiliary file name of the read image image is “bmp”. 一種光照強度檢測方法,應用於電腦中,該電腦包括儲存影像圖片的儲存裝置以及顯示裝置,該方法包括:
創建顏色條,並設定各灰度值在顏色條中所對應的顏色;
讀取儲存裝置中的影像圖片;
判斷所讀取的影像圖片是否為灰度位元映像,當所讀取的影像圖片不是灰度位元映像時,返回讀取儲存裝置中的影像圖片的步驟;
當所讀取的影像圖片是灰度位元映像時,讀取該灰度位元映像的位元映像資料,該位元映像資料包括該灰度位元映像的像素點總數以及各像素點所對應的灰度值,所述的灰度值表示光照強度;
記錄各灰度值所對應的像素點的個數,並繪製各灰度值與各灰度值對應的像素點個數的關係曲線圖;
重新繪製該灰度位元映像,根據該灰度位元映像上各像素點的灰度值在顏色條中所對應的顏色,在對應的像素點上使用對應的顏色進行著色;
在顯示裝置上顯示該關係曲線圖以及該重新著色的灰度位元映像。
A method for detecting a light intensity is applied to a computer, the computer comprising a storage device for storing image images and a display device, the method comprising:
Create a color bar and set the color corresponding to each gray value in the color bar;
Reading image images in the storage device;
Determining whether the read image image is a grayscale bitmap, and returning to reading the image image in the storage device when the read image image is not a grayscale bitmap;
When the read image image is a gray bit map, the bit map data of the gray bit map is read, and the bit map data includes the total number of pixels of the gray bit map and each pixel point Corresponding gray value, the gray value represents light intensity;
Recording the number of pixels corresponding to each gray value, and plotting the relationship between each gray value and the number of pixels corresponding to each gray value;
Redrawing 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, using the corresponding color for coloring on the corresponding pixel;
The relationship graph and the gray-scale bitmap image of the re-coloring are displayed on the display device.
如申請專利範圍第5項所述之光照強度檢測方法,該方法還包括步驟:
從位元映像資料中得到最大灰度值以及最小灰度值;
根據位元映像資料計算該灰度位元映像的平均值,所述的平均灰度值等於各像素所對應的灰度值的總和與該灰度位元映像的像素點總數的商;及
在顯示裝置上顯示所述得到的最大灰度值、最小灰度值以及平均灰度值。
The method for detecting an illumination intensity according to claim 5, wherein the method further comprises the steps of:
Obtaining the maximum gray value and the minimum gray value from the bit map data;
Calculating an average value of the gray scale bitmap according to the bit map data, wherein the average gray value is equal to a quotient of a sum of gray values corresponding to each pixel and a total number of pixel points of the gray bit map; The obtained maximum gray value, minimum gray value, and average gray value are displayed on the display device.
如申請專利範圍第5項所述之光照強度檢測方法,繪製各灰度值與各灰度值對應的像素點個數的關係曲線圖包括步驟:
根據預設的原點坐標,繪製該關係曲線圖的坐標原點;
繪製X軸與Y軸,以及X軸與Y軸的刻度;
根據該記錄的各灰度值所對應的像素點的個數,以灰度值作為X軸,以各灰度值對應的像素點個數為Y軸,在所繪製的坐標系上繪製該關係曲線圖。
For example, the method for detecting the illumination intensity according to item 5 of the patent application scope, the relationship diagram of the number of pixels corresponding to each gray value corresponding to each gray value is included:
Drawing the coordinate origin of the relationship graph according to the preset origin coordinates;
Plot the X and Y axes, and the X and Y axes;
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, and the relationship is drawn on the drawn coordinate system. Graph.
如申請專利範圍第5項所述之光照強度檢測方法,所述判斷所讀取的影像圖片是否為灰度位元映像是根據該讀取的影像圖片的副檔名是否為“bmp”來判斷的。The method for detecting the illumination intensity according to claim 5, wherein determining whether the read image image is a grayscale bitmap is determined according to whether the read file name of the read image is "bmp" of.
TW099135834A 2010-10-20 2010-10-20 System and method for detecting light intensity TWI490457B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW099135834A TWI490457B (en) 2010-10-20 2010-10-20 System and method for detecting light intensity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW099135834A TWI490457B (en) 2010-10-20 2010-10-20 System and method for detecting light intensity

Publications (2)

Publication Number Publication Date
TW201217758A TW201217758A (en) 2012-05-01
TWI490457B true TWI490457B (en) 2015-07-01

Family

ID=46552294

Family Applications (1)

Application Number Title Priority Date Filing Date
TW099135834A TWI490457B (en) 2010-10-20 2010-10-20 System and method for detecting light intensity

Country Status (1)

Country Link
TW (1) TWI490457B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW540227B (en) * 2000-02-22 2003-07-01 Visualgold Com Inc System and method for image processing
TW200712627A (en) * 2005-09-22 2007-04-01 Au Optronics Corp Display panel and method to improve viewing quality thereof
TW200725569A (en) * 2005-12-30 2007-07-01 Ind Tech Res Inst A gray scale generation method and circuit for a digital display system and a digital display system using the same
JP3966691B2 (en) * 1997-12-05 2007-08-29 フォース・テクノロジー株式会社 Continuous tone compression apparatus and method, data processing apparatus and device, and recording medium on which program for executing the method is recorded
TW200813394A (en) * 2006-09-12 2008-03-16 Chung Shan Inst Of Science Method with the three dimensional outline measuring and the system of reconstruction which has a sub-pixel positing of coloring optical gratings and single monitor with main and sub-frame switching

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3966691B2 (en) * 1997-12-05 2007-08-29 フォース・テクノロジー株式会社 Continuous tone compression apparatus and method, data processing apparatus and device, and recording medium on which program for executing the method is recorded
TW540227B (en) * 2000-02-22 2003-07-01 Visualgold Com Inc System and method for image processing
TW200712627A (en) * 2005-09-22 2007-04-01 Au Optronics Corp Display panel and method to improve viewing quality thereof
TW200725569A (en) * 2005-12-30 2007-07-01 Ind Tech Res Inst A gray scale generation method and circuit for a digital display system and a digital display system using the same
TW200813394A (en) * 2006-09-12 2008-03-16 Chung Shan Inst Of Science Method with the three dimensional outline measuring and the system of reconstruction which has a sub-pixel positing of coloring optical gratings and single monitor with main and sub-frame switching

Also Published As

Publication number Publication date
TW201217758A (en) 2012-05-01

Similar Documents

Publication Publication Date Title
US10169857B2 (en) Image inspection apparatus, image inspection method, image inspection program, and computer-readable recording medium and recording device
CN106097361B (en) Defect area detection method and device
CN111428373A (en) Product assembly quality detection method, device, equipment and storage medium
JPWO2016174926A1 (en) Image processing apparatus, image processing method, and program
CN114782451B (en) Workpiece defect detection method and device, electronic equipment and readable storage medium
CN114299070B (en) Method and related device for detecting mura defects of display screen
CN111428374A (en) Part defect detection method, device, equipment and storage medium
CN102445269B (en) Illumination intensity detection system and method
JP2015158626A (en) Calibration device, calibration method and program
CN112419229A (en) Display screen linear defect detection method and device and storage medium
CN108831358B (en) Method for evaluating brightness measurement precision of DeMura equipment
KR20230042706A (en) Neural network analysis of LFA test strips
TWI490457B (en) System and method for detecting light intensity
US7961931B2 (en) Positioning measurement apparatus and method
JP2020184001A (en) Display device, visibility evaluation method and viewing object size determination method
MX2022005210A (en) Method and apparatus for displaying target object, electronic device and computer-readable storage medium.
CN115705807A (en) Method, device, equipment and medium for testing low-gray display effect of display screen
CN114283138A (en) Display screen defect marking method and device, electronic equipment and storage medium
KR20180009013A (en) Pixel compensating apparatus and display system having the same
KR101344495B1 (en) Method and apparatus for rendering
EP4187217A1 (en) Mobile computing device for performing color fastness measurements
KR20200002590A (en) Inspection result presenting apparatus, inspection result presenting method and inspection result presenting program
WO2022208620A1 (en) Information processing device, information processing method, and information processing program
TWI409433B (en) System and method for drawing image measuring apparatus automatically
TWI421466B (en) Method for measurement of clothes sizes by video device

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees