TWI845445B - System and method of training symbol recognition model and system and method of detecting display device - Google Patents
System and method of training symbol recognition model and system and method of detecting display device Download PDFInfo
- Publication number
- TWI845445B TWI845445B TW112143223A TW112143223A TWI845445B TW I845445 B TWI845445 B TW I845445B TW 112143223 A TW112143223 A TW 112143223A TW 112143223 A TW112143223 A TW 112143223A TW I845445 B TWI845445 B TW I845445B
- Authority
- TW
- Taiwan
- Prior art keywords
- image
- symbol
- display device
- display
- recognition model
- Prior art date
Links
- 238000012549 training Methods 0.000 title claims abstract description 64
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000001514 detection method Methods 0.000 claims description 81
- 238000012360 testing method Methods 0.000 claims description 16
- 238000002372 labelling Methods 0.000 claims 3
- 238000010586 diagram Methods 0.000 description 14
- 239000008186 active pharmaceutical agent Substances 0.000 description 13
- 230000002159 abnormal effect Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 5
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 4
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 4
- 230000011218 segmentation Effects 0.000 description 4
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 3
- 101150013335 img1 gene Proteins 0.000 description 3
- 238000012015 optical character recognition Methods 0.000 description 3
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 230000001186 cumulative effect Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000003702 image correction Methods 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
本發明係關於一種符號辨識模型訓練方法及系統以及顯示裝置檢測方法及系統。The present invention relates to a symbol recognition model training method and system and a display device detection method and system.
為了檢測工廠內使用的顯示裝置是否異常,許多工廠採用光學字元辨識(optical character recognition,OCR)辨識顯示裝置上顯示的內容,並由使用者框選需要比對的區域,及設定相似度閾值,以進行檢測。In order to detect whether the display devices used in the factory are abnormal, many factories use optical character recognition (OCR) to identify the content displayed on the display device. The user selects the area to be compared and sets the similarity threshold for detection.
然而,由於顯示裝置上有多個顯示區域,上述的檢測方式相當耗時,且可能因人工的框選失誤而產生錯誤的檢測結果。並且,現有的光學字元辨識利用樣式、距離、色彩等影像特徵來檢測目標字元是數字、文字或特殊符號,而這樣的方式容易受到環境光線影響,需經常調整靈敏度或容許值來補償辨識結果。However, since there are multiple display areas on the display device, the above detection method is very time-consuming and may produce erroneous detection results due to manual frame selection errors. In addition, the existing optical character recognition uses image features such as pattern, distance, color, etc. to detect whether the target character is a number, text or special symbol. This method is easily affected by ambient light and requires frequent adjustment of sensitivity or tolerance to compensate for the recognition result.
鑒於上述,本發明提供一種以解決上述問題的符號辨識模型訓練方法及系統以及顯示裝置檢測方法及系統。In view of the above, the present invention provides a symbol recognition model training method and system and a display device detection method and system to solve the above problems.
依據本發明一實施例的符號辨識模型訓練方法,包含藉由運算裝置執行:輸出多個影像控制訊號至顯示裝置並控制攝影機拍攝顯示裝置以取得分別對應於所述多個影像控制訊號的多幀訓練影像;將所述多幀訓練影像的每一者作為目標影像並執行標記程序,標記程序包含:依據顯示裝置的多個預設顯示區域分割目標影像以取得多個符號影像區塊;以及分別賦予所述多個符號影像區塊多個目標標籤,其中所述多個目標標籤各包含第一子標籤及第二子標籤,第一子標籤關聯於所述多個影像控制訊號中對應於目標影像的一者,第二子標籤指示有效狀態或無效狀態;以及利用所述多個符號影像區塊及所述多個目標標籤進行訓練以產生符號辨識模型。According to an embodiment of the present invention, a symbol recognition model training method includes executing, by a computing device: outputting a plurality of image control signals to a display device and controlling a camera to shoot the display device to obtain a plurality of frames of training images respectively corresponding to the plurality of image control signals; using each of the plurality of frames of training images as a target image and executing a marking procedure, the marking procedure including: segmenting the target image according to a plurality of preset display areas of the display device to obtain A plurality of symbol image blocks are obtained; and a plurality of target labels are respectively assigned to the plurality of symbol image blocks, wherein the plurality of target labels each include a first sub-label and a second sub-label, the first sub-label is associated with one of the plurality of image control signals corresponding to the target image, and the second sub-label indicates a valid state or an invalid state; and the plurality of symbol image blocks and the plurality of target labels are used for training to generate a symbol recognition model.
依據本發明一實施例的顯示裝置檢測方法,藉由運算裝置執行,包含:輸出影像控制訊號至顯示裝置並控制攝影機拍攝顯示裝置以取得對應於影像控制訊號的測試影像;依據顯示裝置的多個預設顯示區域分割測試影像以取得多個符號影像區塊;將所述多個符號影像區塊輸入至符號辨識模型以取得所述多個符號影像區塊的多個預測標籤,其中所述多個預測標籤各包含第一子標籤及第二子標籤,第一子標籤指示預測符號,第二子標籤指示有效狀態或無效狀態;以及依據影像控制訊號與所述多個預測標籤之間的匹配程度產生顯示裝置的檢測結果。A display device detection method according to an embodiment of the present invention is executed by a computing device, including: outputting an image control signal to the display device and controlling a camera to shoot the display device to obtain a test image corresponding to the image control signal; segmenting the test image according to multiple preset display areas of the display device to obtain multiple symbol image blocks; inputting the multiple symbol image blocks into a symbol recognition model to obtain multiple prediction labels of the multiple symbol image blocks, wherein the multiple prediction labels each include a first sub-label and a second sub-label, the first sub-label indicates a predicted symbol, and the second sub-label indicates a valid state or an invalid state; and generating a detection result of the display device according to the degree of matching between the image control signal and the multiple prediction labels.
綜上所述,依據本發明一或多個實施例的符號辨識模型訓練方法及系統,可自動化收集訓練資料,且經訓練的符號辨識模型可準確檢測實際運作中的顯示裝置的顯示功能是否異常。並且,依據本發明一或多個實施例的顯示裝置檢測方法及系統,可有效檢測顯示裝置是否有異常。In summary, the symbol recognition model training method and system according to one or more embodiments of the present invention can automatically collect training data, and the trained symbol recognition model can accurately detect whether the display function of the display device in actual operation is abnormal. In addition, the display device detection method and system according to one or more embodiments of the present invention can effectively detect whether the display device is abnormal.
以上之關於本揭露內容之說明及以下之實施方式之說明係用以示範與解釋本發明之精神與原理,並且提供本發明之專利申請範圍更進一步之解釋。The above description of the disclosed content and the following description of the implementation methods are used to demonstrate and explain the spirit and principle of the present invention, and provide a further explanation of the scope of the patent application of the present invention.
以下在實施方式中詳細敘述本發明之詳細特徵以及優點,其內容足以使任何熟習相關技藝者了解本發明之技術內容並據以實施,且根據本說明書所揭露之內容、申請專利範圍及圖式,任何熟習相關技藝者可輕易地理解本發明相關之目的及優點。以下之實施例係進一步詳細說明本發明之觀點,但非以任何觀點限制本發明之範疇。The detailed features and advantages of the present invention are described in detail in the following embodiments, and the contents are sufficient to enable any person skilled in the relevant art to understand the technical contents of the present invention and implement them accordingly. Moreover, according to the contents disclosed in this specification, the scope of the patent application and the drawings, any person skilled in the relevant art can easily understand the relevant purposes and advantages of the present invention. The following embodiments are to further illustrate the viewpoints of the present invention, but are not to limit the scope of the present invention by any viewpoint.
請參考圖1,圖1係依據本發明一實施例所繪示的符號辨識模型訓練系統的方塊圖。如圖1所示,符號辨識模型訓練系統1包括運算裝置10、顯示裝置11及攝影機12。運算裝置10連接於顯示裝置11及攝影機12。Please refer to FIG1, which is a block diagram of a symbol recognition model training system according to an embodiment of the present invention. As shown in FIG1, the symbol recognition model training system 1 includes a
運算裝置10預存有顯示裝置11的多個預設顯示區域,且用於控制所述攝影機12拍攝顯示裝置11的顯示畫面,利用所述多個預設顯示區域處理攝影機12拍攝的影像,並利用處理後的影像進行訓練以產生符號辨識模型,其中符號辨識模型係用於預測顯示裝置顯示的符號及該符號為有效或無效符號。The
運算裝置10可以包含一或多個處理器以及通訊元件。所述處理器例如為中央處理器、繪圖處理器、微控制器、可程式化邏輯控制器或其他具有訊號處理功能的處理器。所述通訊元件用於供運算裝置10與顯示裝置11進行通訊。舉例而言,運算裝置10可包括紅外線控制器,顯示裝置11可包括紅外線接收器;或者,運算裝置10及顯示裝置11可各自包括藍牙元件或無線網路(Wi-Fi)等無線通訊元件;或者,運算裝置10及顯示裝置11可各自包含有線連接埠以相互連接並通訊。顯示裝置11例如為具有上述通訊元件的液晶顯示器、發光二極體顯示器等。以應用情境來舉例說明,顯示裝置11可為工廠內用於顯示加工資訊的顯示器。顯示裝置11受運算裝置10控制以顯示影像。進一步來說,顯示裝置11可以是放置在暗箱內,攝影機12可拍攝暗箱內的顯示裝置11的顯示畫面,以取得更為清晰的影像供運算裝置10進行模型訓練。The
為了更詳細說明產生符號辨識模型的方法,請一併參考圖1、圖2及圖3,其中圖2係依據本發明一實施例所繪示的符號辨識模型訓練方法的流程圖,圖3係繪示依據預設顯示區域分割目標影像的示意圖。如圖2所示,符號辨識模型訓練方法包括:步驟S101:輸出多個影像控制訊號至顯示裝置並控制攝影機拍攝顯示裝置以取得分別對應於所述多個影像控制訊號的多幀訓練影像;將訓練影像中的每一者作為目標影像以執行步驟S103及步驟S105,其中步驟S103為:依據顯示裝置的多個預設顯示區域分割目標影像以取得多個符號影像區塊,且步驟S105為:分別賦予所述多個符號影像區塊多個目標標籤,其中所述多個目標標籤各包含第一子標籤及第二子標籤,第一子標籤關聯於所述多個影像控制訊號中對應於目標影像的一者,第二子標籤指示有效狀態或無效狀態;以及進行步驟S107:利用所述多個符號影像區塊及所述多個目標標籤進行訓練以產生符號辨識模型。圖2所示的步驟可以由圖1的符號辨識模型訓練系統1執行,特別係由運算裝置10執行。以下示例性地以圖1的符號辨識模型訓練系統1之運作來說明圖2的各步驟。In order to explain the method of generating a symbol recognition model in more detail, please refer to FIG. 1, FIG. 2 and FIG. 3, wherein FIG. 2 is a flow chart of a symbol recognition model training method according to an embodiment of the present invention, and FIG. 3 is a schematic diagram showing segmentation of a target image according to a preset display area. As shown in FIG. 2, the symbol recognition model training method includes: step S101: outputting a plurality of image control signals to a display device and controlling a camera to shoot the display device to obtain a plurality of training images corresponding to the plurality of image control signals; using each of the training images as a target image to execute steps S103 and S105, wherein step S103 is: segmenting the target image according to a plurality of preset display areas of the display device to obtain a plurality of symbol images; Image blocks, and step S105 is: assigning multiple target tags to the multiple symbol image blocks respectively, wherein the multiple target tags each include a first sub-tag and a second sub-tag, the first sub-tag is associated with one of the multiple image control signals corresponding to the target image, and the second sub-tag indicates a valid state or an invalid state; and performing step S107: using the multiple symbol image blocks and the multiple target tags for training to generate a symbol recognition model. The steps shown in FIG2 can be executed by the symbol recognition model training system 1 of FIG1, in particular, by the
於步驟S101,運算裝置10輸出多個影像控制訊號至顯示裝置11,及控制攝影機12拍攝運算裝置10顯示的影像以取得對應的多幀訓練影像。具體來說,一個影像控制訊號可對應一幀訓練影像。影像控制訊號可用於控制顯示裝置11的背光及顯示的文字、符號等。In step S101, the
接著,運算裝置10將每幀訓練影像作為目標影像並執行標記程序,其中標記程序包括步驟S103及S105。於步驟S103,運算裝置10依據顯示裝置11的多個預設顯示區域分割目標影像以取得多個符號影像區塊,其中所述多個預設顯示區域各可為用於顯示七段顯示器、英文字母、電子轉盤、單位、通訊介面的圖式及標點符號中的一者的區域。一個符號影像區塊可包括一個符號,且所述符號可為數字、文字、標點符號、圖案及其組合等,本發明不予以限制。Next, the
步驟S101所取得的多幀訓練影像中的一者可如圖3所示的目標影像IMG1,且由於運算裝置10預存有顯示裝置11的多個預設顯示區域,運算裝置10可據以分割目標影像IMG1以產生多個符號影像區塊A1~A11。One of the multiple training images obtained in step S101 may be the target image IMG1 as shown in FIG. 3 , and since the
於步驟S105,運算裝置10賦予符號影像區塊A1~A11中的每一者對應的目標標籤,所述目標標籤包含第一子標籤及第二子標籤。運算裝置10是根據影像控制訊號賦予符號影像區塊對應的第一子標籤及第二子標籤。第一子標籤係影像控制訊號指示的符號代碼,第二子標籤係影像控制訊號指示的有效狀態或無效狀態。如圖3所示,符號影像區塊A1可以對應於七段顯示器的顯示區域,符號影像區塊A2、A3可以對應於英文字母的顯示區域,符號影像區塊A4可以對應於需量時段(EOI)的顯示區域,符號影像區塊A5可以對應於交替模式(ALT)的顯示區域,符號影像區塊A6可以對應於標點符號的顯示區域,符號影像區塊A7可以對應於電子轉盤(table)的顯示區域,符號影像區塊A8可以對應於介面圖示的顯示區域,例如RS485、紅外線等通訊圖示,符號影像區塊A9可以對應於連續(Continue,Cont)的顯示區域,符號影像區塊A10可以對應於累計需量(Cumulative,Cum)的顯示區域,及符號影像區塊A11可以對應於單位圖示的顯示區域。各符號影像區塊與對應的標籤如下表1示例性所示,其中P代表第二標籤指示有效狀態,F代表第二標籤指示無效狀態,而P/F後接的數字及/或英文字母為第一標籤。In step S105, the
表1
以符號影像區塊A1為例,第一子標籤為代碼「7058」,第二子標籤為有效狀態,則符號影像區塊A1中顯示的是有效數字。此外,同樣以符號影像區塊A1為例,假設第一子標籤為代碼「7002」,第二子標籤為無效狀態,則符號影像區塊A1中可能顯示亂碼。換言之,若影像控制訊號控制一個預設顯示區域顯示該區域可能會呈現的符號,則對應的第二子標籤為有效狀態;反之,若影像控制訊號控制一個預設顯示區域顯示該區域不會呈現的符號(例如,亂碼),則對應的第二子標籤為無效狀態。Taking symbol image block A1 as an example, if the first sub-tag is the code "7058" and the second sub-tag is in a valid state, then a valid number is displayed in symbol image block A1. In addition, taking symbol image block A1 as an example, assuming that the first sub-tag is the code "7002" and the second sub-tag is in an invalid state, garbled characters may be displayed in symbol image block A1. In other words, if the image control signal controls a preset display area to display a symbol that may appear in the area, the corresponding second sub-tag is in a valid state; conversely, if the image control signal controls a preset display area to display a symbol that will not appear in the area (for example, garbled characters), the corresponding second sub-tag is in an invalid state.
此外,運算裝置10可利用各符號及對應的目標標籤命名多個資料夾,並將各符號影像區塊及對應的目標標籤存入對應的資料夾,以更有效分類訓練資料。於此要特別說明的是,圖3及表1示例性地呈現多種顯示區域及標籤,然其種類可依實際所需增減或變換,本發明不予限制。於一實施例中,運算裝置10所發出的影像控制訊號中的一或多者可以指示顯示裝置11不顯示畫面,並賦予攝影機12所拍攝到的影像螢幕不顯示的標籤,例如為NA。In addition, the
於步驟S107,運算裝置10利用每一幀訓練影像的符號影像區塊及對應的目標標籤進行訓練以產生符號辨識模型。符號辨識模型可以是利用遷移(transfer)學習。進行訓練時,預訓練模型(即已經過訓練後的模型)連接於輸入層及分類器之間。輸入層為訓練影像的長、寬及通道數量,分類器的輸出為與目標標籤相同形式的標籤(例如,後述的預測標籤)。預訓練模型可為卷積神經網路(convolutional neural network,CNN)模型,例如,MobileNet-v2。輸入層及分類器的權重在訓練時可被據以更新。In step S107, the
另外,在步驟S107前,運算裝置10可依據至少一隨機影像參數調整所述多幀訓練影像以產生多幀擴充影像,及將擴充影像的每一者作為目標影像並執行標記程序(步驟S103及步驟S105)。所述至少一隨機影像參數包含亮度、飽和度及對比度中的至少一者。據此,可以在不需多次執行步驟S101到步驟S105的情況下,即可得到較多的訓練影像。In addition, before step S107, the
由於依據本發明的符號辨識模型訓練方法收集顯示裝置11上可能顯示的所有文字、數字及符號等,並賦予有效及無效標籤,經上述訓練產生的符號辨識模型可準確判斷實際運作中的顯示裝置11或與顯示裝置11相同的其他顯示裝置的顯示畫面所顯示的文字、符號、圖式等,可供進一步確認實際顯示結果是否符合控制訊號對應的預設顯示結果以判斷顯示功能是否異常。Since the symbol recognition model training method according to the present invention collects all the text, numbers, symbols, etc. that may be displayed on the
請一併參考圖1、圖4及圖5,其中圖4係依據本發明一實施例所繪示的符號辨識模型訓練方法中的顯示螢幕區域擷取的流程圖,圖5係繪示取得顯示螢幕區域的示意圖。圖4的步驟執行在圖2的步驟S101之前,且可由圖1的符號辨識模型訓練系統1執行,特別係由運算裝置10執行。如圖4所示,取得顯示螢幕區域的方法包括:步驟S201:控制顯示裝置顯示預設符號並控制攝影機拍攝顯示裝置以取得初始影像;步驟S203:校正初始影像以產生校正影像;以及步驟S205:根據預設符號的預設顯示位置及預設尺寸,從校正影像取得顯示螢幕區域。Please refer to FIG. 1, FIG. 4 and FIG. 5, wherein FIG. 4 is a flowchart of display screen area capture in a symbol recognition model training method according to an embodiment of the present invention, and FIG. 5 is a schematic diagram of obtaining a display screen area. The step of FIG. 4 is executed before step S101 of FIG. 2, and can be executed by the symbol recognition model training system 1 of FIG. 1, especially by the
於步驟S201,運算裝置10控制顯示裝置11顯示預設符號DS,及控制攝影機12拍攝顯示裝置11的顯像畫面以取得初始影像。如圖5所示,預設符號DS可為「7」。步驟S201的執行方式可與圖2的步驟S101相似。In step S201, the
於步驟S203,運算裝置10校正初始影像以產生校正影像IMG。運算裝置10可以旋轉初始影像,以使校正影像IMG的至少一邊平行於顯示裝置11的對應的一邊。In step S203 , the
於步驟S205,運算裝置10根據預設符號DS的輔助框DA1及預設尺寸,從校正影像IMG取得顯示螢幕區域DA,其中預設顯示區域DA包含顯示螢幕區域。運算裝置10可以是根據預設符號DS在校正影像中的多個座標之間的座標差與預設符號DS的預設尺寸的多個預設比例取得顯示螢幕區域。In step S205, the
以下以圖5說明步驟S205。運算裝置10可根據影像控制訊號判斷預設符號DS包括多個基準點C2及C3,例如為「7」的右下角點及左上角點,其中基準點C2的座標為(x2,y2),且基準點C3的座標為(x3,y3)。運算裝置10計算基準點C2與基準點C3之間的水平座標差w(即x2-x3),及計算基準點C2與基準點C3之間的垂直座標差h(即y2-y3),並依據以下公式(1)取得基準點C4的座標(x4,y4),及依據以下公式(2)取得另一基準點C5的座標(x5,y5),進而依據基準點C4及基準點C5得到顯示螢幕區域DA。公式(1)及(2)中的R1、R2、R3及R4分別為多個預設比例值,可以公式(3)到公式(6)取得,其中shiftx指示預設符號DS的基準點C1與基準點C3之間的預設長度,shifty指示預設符號DS的基準點C1至基準點C2之間的預設長度。舉例來說,預設比例值R1、R2、R3及R4可以分別設定為4.22、1.23、6.28及1.75。
公式(1)
公式(2)
公式(3)
公式(4)
公式(5)
公式(6)
The following is an explanation of step S205 with reference to FIG5. The
藉由上述取得顯示螢幕區域的方式,運算裝置10分割目標影像而取得的符號影像區塊可以更準確。於此要特別說明的是,圖5示例性地呈現預設符號DS可為「7」,然於其他實施例中,預設符號DS可以為包含基準點C2及C3的其他種符號。By the above method of obtaining the display screen area, the
請一併參考圖1、圖5及圖6,其中圖6係依據本發明一實施例所繪示的符號辨識模型訓練方法中的影像校正的流程圖。圖6的步驟執行在圖2的步驟S103之前,可視為圖4之步驟S203的一實施例的細部流程圖,且可由圖1的符號辨識模型訓練系統1執行,特別係由運算裝置10執行。如圖6所示,校正影像的方法包括:步驟S301:取得二基準點在初始影像中的第一座標及第二座標;步驟S303:根據第一座標與第二座標取得第一角度;以及步驟S305:基於第一角度與基準角度之間的差旋轉初始影像以取得校正影像。Please refer to FIG. 1 , FIG. 5 and FIG. 6 , wherein FIG. 6 is a flowchart of image correction in a symbol recognition model training method according to an embodiment of the present invention. The steps of FIG. 6 are executed before step S103 of FIG. 2 , and can be regarded as a detailed flowchart of an embodiment of step S203 of FIG. 4 , and can be executed by the symbol recognition model training system 1 of FIG. 1 , especially by the
需先說明的是,相似於前述,運算裝置10可根據影像控制訊號判斷預設符號包括二基準點,且該二基準點之間的連線對應於顯示裝置11的邊框。以圖5為例,預設符號DS包括二基準點C1及C2,基準點C1及C2之間的連線,且連線平行於顯示裝置11的短邊框(或/及垂直於顯示裝置11的長邊框)。另外,基準點C2及C3亦可作為預設符號DS的二基準點。以下是以基準點C1及C2作為預設符號DS的二基準點進行說明。It should be noted that, similar to the above, the
於步驟S301,運算裝置10取得基準點C1及C2在初始影像中的第一座標(x1,y1)及第二座標(x2,y2)。具體而言,運算裝置10根據初始影像的中心點,依據預定比例的初始影像的長度及寬度向外延伸而得到輔助框DA1。預定比例例如為25%,本發明不予以限制。接著,運算裝置10抓取輔助框DA1內的輪廓的第一座標(x1,y1)及第二座標(x2,y2)。In step S301, the
於步驟S303,運算裝置10根據第一座標與第二座標取得第一角度。運算裝置10可先基於以下公式(7)計算第二座標相對於第一座標的斜率m,再基於以下公式(8)將斜率m轉換為第一角度
。
公式(7)
公式(8)
In step S303, the
於步驟S305,運算裝置10基於第一角度與基準角度之間的差旋轉初始影像以取得校正影像。基準角度例如為
。運算裝置10可取得基準角度減第一角度的角度差,及將初始影像旋轉該角度差以得到校正影像。若所述角度差為負值,則順時針旋轉初始影像;若所述角度差為正值,則逆時針旋轉初始影像。
In step S305, the
請接著參考圖7,圖7係依據本發明一實施例所繪示的顯示裝置檢測系統的方塊圖。如圖7所示,顯示裝置檢測系統2包括運算裝置20、顯示裝置21及攝影機22。運算裝置20連接於顯示裝置21及攝影機22。Please refer to FIG. 7, which is a block diagram of a display device detection system according to an embodiment of the present invention. As shown in FIG. 7, the display
運算裝置20用於控制所述攝影機22拍攝顯示裝置21的顯示畫面,及利用攝影機22拍攝的影像判斷顯示裝置21是否異常。運算裝置20可以包含一或多個處理器,所述處理器例如為中央處理器、繪圖處理器、微控制器、可程式化邏輯控制器或其他具有訊號處理功能的處理器。顯示裝置21與圖1的顯示裝置11為同一類型的顯示裝置。顯示裝置21受運算裝置20控制以顯示影像。運算裝置20及圖1的運算裝置10可為同一運算裝置或不同運算裝置,顯示裝置21及圖1的顯示裝置11可為同一顯示裝置或不同顯示裝置。The
為了更詳細說明顯示裝置檢測方法,請一併參考圖7及圖8,其中圖8係依據本發明一實施例所繪示的顯示裝置檢測方法的流程圖。圖8所示的步驟係由圖7的顯示裝置檢測系統2執行,特別係由運算裝置20執行。如圖8所示,顯示裝置檢測方法包括:步驟S401:輸出影像控制訊號至顯示裝置並控制攝影機拍攝顯示裝置以取得對應於影像控制訊號的測試影像;步驟S403:依據顯示裝置的多個預設顯示區域分割測試影像以取得多個符號影像區塊;步驟S405:將所述多個符號影像區塊輸入至符號辨識模型以取得所述多個符號影像區塊的多個預測標籤,其中所述多個預測標籤各包含第一子標籤及第二子標籤,第一子標籤指示預測符號,第二子標籤指示有效狀態或無效狀態;以及步驟S407:依據影像控制訊號與所述多個預測標籤之間的匹配程度產生顯示裝置的檢測結果。To explain the display device detection method in more detail, please refer to FIG. 7 and FIG. 8 , wherein FIG. 8 is a flow chart of the display device detection method according to an embodiment of the present invention. The steps shown in FIG. 8 are executed by the display
於步驟S401,運算裝置20輸出影像控制訊號至顯示裝置21並控制攝影機22拍攝顯示裝置21以取得對應於影像控制訊號的測試影像。如前所述,顯示裝置21包括多個預設顯示區域,運算裝置20輸出的影像控制訊號是用於控制預設顯示區域顯示該區域可能或不可能呈現的符號。In step S401, the
於步驟S403,運算裝置20依據顯示裝置21的預設顯示區域以取得符號影像區塊。步驟S403與圖2的步驟S103相同,且可同樣包括圖4及/或圖5的實施例。In step S403, the
於步驟S405,運算裝置20將符號影像區塊輸入至符號辨識模型以取得符號影像區塊的預測標籤,其中符號辨識模型可以是依據以上一或多個實施例所述的符號辨識模型訓練方法及系統產生的符號辨識模型。每個預測標籤包括第一子標籤及第二子標籤,第一子標籤指示預測符號對應的代碼,第二子標籤指示預測符號的代碼為有效狀態或無效狀態。換言之,符號辨識模型產生的第一子標籤是用於預測該符號影像區塊顯示的符號,符號辨識模型產生的第二子標籤是用於預測所述符號為有效符號或無效符號。In step S405, the
於步驟S407,運算裝置20依據影像控制訊號與預測標籤之間的匹配程度產生顯示裝置21的檢測結果。以圖3的符號影像區塊A1為例,若影像控制訊號指示符號影像區塊A1顯示的符號為「5」,符號辨識模型產生的第一子標籤為符號「5」的代碼,第二子標籤指示有效狀態,則對應於符號影像區塊A1的影像控制訊號與預測標籤之間的匹配程度高。若影像控制訊號指示符號影像區塊A1顯示的符號為「5」,而符號辨識模型產生的第一子標籤為亂碼的代碼,第二子標籤指示無效狀態,則對應於符號影像區塊A1的影像控制訊號與預測標籤之間的匹配程度低。相似地,若影像控制訊號指示符號影像區塊A1顯示的符號為亂碼,符號辨識模型產生的第一子標籤指示的預測符號為亂碼的代碼,第二子標籤指示無效狀態,則對應於符號影像區塊A1的影像控制訊號與預測標籤之間的匹配程度高。In step S407, the
換言之,預測標籤用於指示測試影像中顯示的符號是否與影像控制訊號指示的符號一致,若不一致,則表示顯示裝置的顯示功能可能異常。據此,藉由上述的顯示裝置檢測方法及系統,可有效檢測顯示裝置是否有異常。In other words, the prediction tag is used to indicate whether the symbol displayed in the test image is consistent with the symbol indicated by the image control signal. If not, it means that the display function of the display device may be abnormal. Accordingly, the above display device detection method and system can effectively detect whether the display device is abnormal.
請接著一併參考圖7、圖9及圖10(a)到圖10(b),其中圖9係依據本發明一實施例所繪示的顯示裝置檢測方法中的邊框檢測的流程圖,圖10(a)係繪示空白測試影像及邊框檢測區塊的示意圖,圖10(b)係繪示圖10(a)的檢測結果。圖9的步驟可由圖7的顯示裝置檢測系統2執行,特別係由運算裝置20執行。如圖9所示,顯示裝置的邊框檢測方法包括:步驟S501:輸出空白影像訊號至顯示裝置並控制攝影機拍攝顯示裝置以取得對應於空白影像訊號的空白測試影像;步驟S503:依據預設寬度分割空白測試影像以取得多個邊框檢測區塊;步驟S505:分別計算所述多個邊框檢測區塊的多個灰度值;步驟S507:判斷所述多個灰度值的每一者是否高於對應的閾值;若步驟S507的判斷結果為「是」,執行步驟S509:輸出正面的邊框檢測結果;以及若步驟S507的判斷結果為「否」,執行步驟S511:輸出負面的邊框檢測結果。Please refer to FIG. 7, FIG. 9 and FIG. 10(a) to FIG. 10(b) together, wherein FIG. 9 is a flowchart of the border detection in the display device detection method according to an embodiment of the present invention, FIG. 10(a) is a schematic diagram showing a blank test image and a border detection block, and FIG. 10(b) is a diagram showing the detection result of FIG. 10(a). The steps of FIG. 9 can be executed by the display
於步驟S501,運算裝置20輸出的空白影像訊號是用於控制顯示裝置21顯示背光而不顯示任何符號,運算裝置20控制攝影機22拍攝顯示裝置21以取得空白測試影像。In step S501, the blank image signal output by the
以圖10(a)為例,於步驟S503,運算裝置20將空白測試影像分割為第一邊框檢測區塊BDX1到第n邊框檢測區塊BDXn,其中n是大於1的正整數。第一邊框檢測區塊BDX1到第n邊框檢測區塊BDXn中的每一者的寬度可等於預設寬度。Taking FIG. 10( a) as an example, in step S503, the
於步驟S505,在圖10(a)及圖10(b)的例子中,運算裝置20計算第一邊框檢測區塊BDX1到第n邊框檢測區塊BDXn中的每一者的灰度值。由於第一邊框檢測區塊BDX1及第n邊框檢測區塊BDXn皆對應於顯示裝置21的整條邊框,故兩者的灰度值皆較高,而第二邊框檢測區塊BDX2對應於顯示裝置21的部分邊框,故灰度值較低。In step S505, in the examples of FIG. 10(a) and FIG. 10(b), the
於步驟S507,運算裝置20判斷各灰度值是否高於對應的閾值,其中不同邊框檢測區塊可對應不同的閾值。以圖10(a)及圖10(b)為例,第一邊框檢測區塊BDX1及第n邊框檢測區塊BDXn的閾值高於第二邊框檢測區塊BDX2的閾值。例如,第一邊框檢測區塊BDX1及第n邊框檢測區塊BDXn的閾值可為200,第二邊框檢測區塊BDX2的閾值可為20。In step S507, the
以第二邊框檢測區塊BDX2為例,若運算裝置20判斷第二邊框檢測區塊BDX2的灰度值不高於閾值,表示第二邊框檢測區塊BDX2未顯示其他內容。因此,於步驟S509,運算裝置20輸出正面的邊框檢測結果,其中正面的邊框檢測結果可指示第二邊框檢測區塊BDX2的位置及其顯示功能正常。Taking the second border detection block BDX2 as an example, if the
以第二邊框檢測區塊BDX2為例,若運算裝置20判斷第二邊框檢測區塊BDX2的灰度值高於閾值,表示第二邊框檢測區塊BDX2可能顯示了非空白影像訊號指示的其他內容,而有較高的灰度值。因此,於步驟S511,運算裝置20輸出負面的邊框檢測結果,其中負面的邊框檢測結果可指示第二邊框檢測區塊BDX2的位置及其顯示功能異常。Taking the second border detection block BDX2 as an example, if the
請參考圖10(c)及圖10(d),圖10(c)係繪示空白測試影像及邊框檢測區塊的示意圖,圖10(d)係繪示圖10(c)的檢測結果。除了檢測如圖10(a)及圖10(b)所示的沿橫軸分割得到的邊框檢測區塊,亦可檢測如圖10(c)及圖10(d)所示的沿縱軸分割得到的邊框檢測區塊。圖9所述的檢測方式亦可應用於,圖10(c)及圖10(d),詳細內容不再於此贅述。Please refer to FIG. 10(c) and FIG. 10(d). FIG. 10(c) is a schematic diagram showing a blank test image and a border detection block, and FIG. 10(d) is a diagram showing the detection result of FIG. 10(c). In addition to detecting the border detection block obtained by segmentation along the horizontal axis as shown in FIG. 10(a) and FIG. 10(b), the border detection block obtained by segmentation along the vertical axis as shown in FIG. 10(c) and FIG. 10(d) can also be detected. The detection method described in FIG. 9 can also be applied to FIG. 10(c) and FIG. 10(d). The details are not repeated here.
根據以上的邊框檢測方法,即使顯示裝置僅有些微的瑕疵,亦可有效檢測出瑕疵的存在及其位置。According to the above border detection method, even if the display device has only a slight defect, the existence and location of the defect can be effectively detected.
另需說明的是,圖8所示的檢測方法可執行在圖9的檢測方法之前或之後,本發明不予以限制。It should also be noted that the detection method shown in FIG. 8 can be executed before or after the detection method shown in FIG. 9 , and the present invention is not limited thereto.
綜上所述,依據本發明一或多個實施例的符號辨識模型訓練方法及系統,可自動化收集訓練資料,且經訓練的符號辨識模型可準確檢測實際運作中的顯示裝置的顯示功能是否異常。並且,透過擴充訓練資料的數量,可改善進行訓練時模型的收斂速度。依據本發明一或多個實施例的顯示裝置檢測方法及系統,可有效檢測顯示裝置是否有異常。此外,依據以上一或多個實施例的影像分割方法,可自動框選符號的外框。In summary, according to the symbol recognition model training method and system of one or more embodiments of the present invention, training data can be automatically collected, and the trained symbol recognition model can accurately detect whether the display function of the display device in actual operation is abnormal. In addition, by expanding the amount of training data, the convergence speed of the model during training can be improved. According to the display device detection method and system of one or more embodiments of the present invention, it is possible to effectively detect whether the display device is abnormal. In addition, according to the image segmentation method of one or more embodiments above, the outer frame of the symbol can be automatically selected.
雖然本發明以前述之實施例揭露如上,然其並非用以限定本發明。在不脫離本發明之精神和範圍內,所為之更動與潤飾,均屬本發明之專利保護範圍。關於本發明所界定之保護範圍請參考所附之申請專利範圍。Although the present invention is disclosed as above with the aforementioned embodiments, it is not intended to limit the present invention. Any changes and modifications made within the spirit and scope of the present invention are within the scope of patent protection of the present invention. Please refer to the attached patent application for the scope of protection defined by the present invention.
1:符號辨識模型訓練系統
2:顯示裝置檢測系統
10,20:運算裝置
11,21:顯示裝置
12,22:攝影機
A1,A2:符號影像區塊
IMG0:初始影像
IMG1:目標影像
C1,C2,C3,C4,C5:基準點
DA:顯示螢幕區域
DA1:輔助框
BDX1,BDX2,BDXn,BDY1,BDYn:邊框檢測區塊
S101,S103,S105,S107,S201,S203,S205,S301,S303,S305,S401,S403,S405,S407,S501,S503,S505,S507,S509,S511:步驟
1: Symbol recognition model training system
2: Display
圖1係依據本發明一實施例所繪示的符號辨識模型訓練系統的方塊圖。 圖2係依據本發明一實施例所繪示的符號辨識模型訓練方法的流程圖。 圖3係繪示依據預設顯示區域分割目標影像的示意圖。 圖4係依據本發明一實施例所繪示的符號辨識模型訓練方法中的顯示螢幕區域擷取的流程圖。 圖5係繪示取得顯示螢幕區域的示意圖。 圖6係依據本發明一實施例所繪示的符號辨識模型訓練方法中的影像校正的流程圖。 圖7係依據本發明一實施例所繪示的顯示裝置檢測系統的方塊圖。 圖8係依據本發明一實施例所繪示的顯示裝置檢測方法的流程圖。 圖9係依據本發明一實施例所繪示的顯示裝置檢測方法中的邊框檢測的流程圖。 圖10(a)到圖10(d)係繪示對應圖9的示意圖。 FIG. 1 is a block diagram of a symbol recognition model training system according to an embodiment of the present invention. FIG. 2 is a flow chart of a symbol recognition model training method according to an embodiment of the present invention. FIG. 3 is a schematic diagram showing segmentation of a target image according to a preset display area. FIG. 4 is a flow chart of display screen area capture in a symbol recognition model training method according to an embodiment of the present invention. FIG. 5 is a schematic diagram showing acquisition of a display screen area. FIG. 6 is a flow chart of image correction in a symbol recognition model training method according to an embodiment of the present invention. FIG. 7 is a block diagram of a display device detection system according to an embodiment of the present invention. FIG8 is a flow chart of a display device detection method according to an embodiment of the present invention. FIG9 is a flow chart of a border detection in a display device detection method according to an embodiment of the present invention. FIG10(a) to FIG10(d) are schematic diagrams corresponding to FIG9.
S101,S103,S105,S107:步驟 S101, S103, S105, S107: Steps
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW112143223A TWI845445B (en) | 2023-11-09 | 2023-11-09 | System and method of training symbol recognition model and system and method of detecting display device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW112143223A TWI845445B (en) | 2023-11-09 | 2023-11-09 | System and method of training symbol recognition model and system and method of detecting display device |
Publications (1)
Publication Number | Publication Date |
---|---|
TWI845445B true TWI845445B (en) | 2024-06-11 |
Family
ID=92541591
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW112143223A TWI845445B (en) | 2023-11-09 | 2023-11-09 | System and method of training symbol recognition model and system and method of detecting display device |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI845445B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108351712A (en) * | 2015-09-21 | 2018-07-31 | 株式会社Ip舍路信 | device and card-type device |
WO2020125839A1 (en) * | 2018-12-18 | 2020-06-25 | GRID INVENT gGmbH | Electronic element and electrically controlled display element |
TWI749714B (en) * | 2020-08-17 | 2021-12-11 | 宜谷京科技實業有限公司 | Method for defect detection, method for defect classification and system thereof |
TWI767439B (en) * | 2020-01-03 | 2022-06-11 | 國立臺灣大學 | Medical image analyzing system and method thereof |
-
2023
- 2023-11-09 TW TW112143223A patent/TWI845445B/en active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108351712A (en) * | 2015-09-21 | 2018-07-31 | 株式会社Ip舍路信 | device and card-type device |
WO2020125839A1 (en) * | 2018-12-18 | 2020-06-25 | GRID INVENT gGmbH | Electronic element and electrically controlled display element |
TWI767439B (en) * | 2020-01-03 | 2022-06-11 | 國立臺灣大學 | Medical image analyzing system and method thereof |
TWI749714B (en) * | 2020-08-17 | 2021-12-11 | 宜谷京科技實業有限公司 | Method for defect detection, method for defect classification and system thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11238613B2 (en) | Dynamical camera calibration | |
US9646370B2 (en) | Automatic detection method for defects of a display panel | |
WO2019208036A1 (en) | Reading system, reading method, program, and storage medium | |
JP6750500B2 (en) | Information processing apparatus and recognition support method | |
CN109240572A (en) | A kind of method obtaining picture, method and device that picture is handled | |
JP2018500647A (en) | Mapping images to items | |
CN111325717A (en) | Mobile phone defect position identification method and equipment | |
JP6953178B2 (en) | Image processing device, image processing method, program | |
KR20060046328A (en) | Display device which enables information to be inputted by use of beams of light | |
TWI845445B (en) | System and method of training symbol recognition model and system and method of detecting display device | |
CN113269728B (en) | Visual edge-tracking method, device, readable storage medium and program product | |
TW201715472A (en) | Image segmentation determining method, gesture determining method, image sensing system and gesture determining system | |
CN112051920B (en) | Sight line falling point determining method and device | |
CN116452468B (en) | Deformation correction method and device for silica gel process | |
US10943109B2 (en) | Electronic apparatus, method for controlling thereof and the computer readable recording medium | |
US11494944B2 (en) | Automatic low contrast detection | |
JP2015032261A (en) | Display device and control method | |
KR101447570B1 (en) | Board inspection method and board inspection apparatus using the same | |
JP5901680B2 (en) | Portable terminal device and display device | |
TWI469089B (en) | Image determining method and object coordinate computing apparatus | |
CN107316293B (en) | LED fuzzy picture identification and judgment method and system | |
JP6614029B2 (en) | ROBOT HAND POSITION DETECTION DEVICE, ROBOT DEVICE, AND ROBOT HAND POSITION DETECTION METHOD | |
TWI795921B (en) | Image detection method, computer device, and storage medium | |
CN105989587A (en) | Automatic calibration method of multifunctional OCT (optical coherence tomography) system | |
EP4421739A1 (en) | Electronic device and control method therefor |