TWI693535B - Mouse cursor image detection comparison and feedback state judgment method - Google Patents
Mouse cursor image detection comparison and feedback state judgment method Download PDFInfo
- Publication number
- TWI693535B TWI693535B TW108108085A TW108108085A TWI693535B TW I693535 B TWI693535 B TW I693535B TW 108108085 A TW108108085 A TW 108108085A TW 108108085 A TW108108085 A TW 108108085A TW I693535 B TWI693535 B TW I693535B
- Authority
- TW
- Taiwan
- Prior art keywords
- image
- mouse cursor
- cursor
- mouse
- comparison
- Prior art date
Links
Images
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
本發明係提供一種滑鼠游標影像偵測比對與回饋狀態判斷方法,其係基於非侵入式資料擷取系統架構下,以影像處理單元讀取機台控制器所輸出操作畫面中的滑鼠游標影像進行偵測比對,該方法包含先取得使用者設定的游標前景圖像與背景圖像,並選用演算法將前景圖像與背景圖像生成一游標遮罩後,再讀取滑鼠游標影像套用游標遮罩作樣型比對,可將比對結果的資訊與滑鼠游標回饋狀態回傳至軟體控制系統,提供後續修正系統進行對應的滑鼠游標處理程序,同時可確認滑鼠游標的移動是否符合回饋與修正系統所操控的位置,以完成滑鼠游標的閉迴路控制,提供更精確的機台控制程序,也可用來記錄使用者操作流程或是提供擷取大量使用者介面資訊的中間媒介。 The invention provides a mouse cursor image detection comparison and feedback state judgment method, which is based on a non-intrusive data acquisition system architecture and uses an image processing unit to read the mouse in the operation screen output by the machine controller Cursor image detection and comparison, the method includes first obtaining the cursor foreground image and background image set by the user, and using an algorithm to generate a cursor mask from the foreground image and background image, and then reading the mouse The cursor image is applied with the cursor mask as a sample comparison, which can return the information of the comparison result and the feedback status of the mouse cursor to the software control system, provide the subsequent correction system for the corresponding mouse cursor processing procedure, and confirm the mouse Whether the movement of the cursor conforms to the position controlled by the feedback and correction system to complete the closed-loop control of the mouse cursor, provide a more accurate machine control program, and can also be used to record the user operation process or provide a large number of user interfaces Intermediary of information.
Description
本發明係提供一種滑鼠游標影像偵測比對與回饋狀態判斷方法,尤指可透過影像處理單元讀取機台操作畫面中的滑鼠游標影像進行偵測比對,並將比對結果的資訊與滑鼠游標回饋狀態提供給後續修正系統進行對應的處理程序,以完成滑鼠游標的閉迴路控制。 The invention provides a mouse cursor image detection comparison and feedback state judgment method, in particular, the mouse cursor image in the operation screen of the machine can be read through the image processing unit for detection and comparison, and the comparison result The information and the feedback status of the mouse cursor are provided to the subsequent correction system for corresponding processing procedures to complete the closed-loop control of the mouse cursor.
按,現今資訊科技的進步、網路的發達與電腦運算能力的大幅提升,以及資料蒐集和儲存技術持續地改進,也加速了大數據的累積、記錄與取得,並在工業生產機台利用雲端開發大數據應用時,其中一個重要任務即是在產線機台(或稱為雲端終點端)處蒐集相關機台的資料,由於許多重要資料來自於機台軟體的使用者介面,操作員會在使用者介面上進行許多畫面的操控,這類的操作行為將有助於了解目前操作員正在進行的機台數據調整、機台程式介面相關數據擷取及程式相關參數設定等資料蒐集與分析應用。 According to the press, the advancement of information technology, the development of the network and the substantial improvement of computer computing power, and the continuous improvement of data collection and storage technology have also accelerated the accumulation, recording and acquisition of big data, and the use of cloud in industrial production machines When developing big data applications, one of the important tasks is to collect relevant machine data at the production line machine (or cloud end point). Since many important data come from the machine software user interface, the operator will Manipulate many screens on the user interface, this kind of operation behavior will help to understand the current data collection and analysis of the machine data adjustment, machine program interface related data acquisition and program related parameter settings currently being performed by the operator application.
一般機台的使用者介面是系統和操作員之間進行互動和資訊交換的媒介,包含人機互動與圖形使用者介面,使系統可透過操作員對鍵盤、滑鼠、觸控板等資料輸入的裝置操作所傳送的信號來控制機台上的操作畫面,惟該透過滑鼠單向傳送的信號控制時,常會因欲操作的作業系 統資源的限制而遺失信號,導致無法正確操控滑鼠之游標;若是舊型機台要升級時亦會有其硬體設備擴充與軟體系統修改的困難性,並在蒐集這類機台上的滑鼠操控資料時,除了會影響到其處理器的負載之外,電腦配備上的資源也容易受到許多限制,包括現行機台程式的處理程序與效能等;此外,基於商業機密、軟硬體保密協定、運算資源等限制,並無法以侵入式資料擷取的方式在目標系統上裝載相關滑鼠操控之回饋程式,且滑鼠游標移動之速度亦很可能因對方系統設定上之差異而出現非一致性的移動,以致使滑鼠游標移動之速度無法正確預測而產生誤差,上述種種因素均將不利於進行取得使用者介面上大量的資料之蒐集,則有待從事於此行業者重新設計來加以有效解決。 The user interface of the general machine is the medium for interaction and information exchange between the system and the operator, including human-machine interaction and graphical user interface, so that the system can input data such as keyboard, mouse, touch pad, etc. through the operator The device operates the transmitted signal to control the operation screen on the machine, but when it is controlled by the signal transmitted unidirectionally with the mouse, it often depends on the operation system to be operated. Due to the limitation of system resources, the signal is lost, which makes it impossible to control the cursor of the mouse correctly. If the old machine is to be upgraded, it will also have difficulty in expanding its hardware equipment and modifying the software system. When the mouse controls data, in addition to affecting the load of its processor, the resources on the computer are also subject to many restrictions, including the processing procedures and performance of current machine programs; in addition, based on trade secrets, hardware and software Restrictions such as confidentiality agreements and computing resources cannot load the feedback program controlled by the relevant mouse on the target system by intrusive data acquisition, and the speed of the mouse cursor movement may also appear due to differences in the system settings of the other party Inconsistent movements cause the speed of the mouse cursor movement to be incorrectly predicted and cause errors. The above-mentioned factors will not be conducive to the collection of a large amount of data on the user interface. It needs to be redesigned by those engaged in this industry. To be effectively resolved.
故,發明人有鑑於上述習用在蒐集機台資料時,除了會影響到其處理器的負載之外,舊型機台配備的系統資源上也容易受到許多的限制而不利於取得使用者介面上大量的資料之問題與缺失,經由多方的評估及考量,並利用從事於此行業之多年研發經驗,始有此種滑鼠游標影像偵測比對與回饋狀態判斷方法發明專利誕生。 Therefore, in view of the above-mentioned practice in collecting machine data, in addition to affecting the load of the processor, the system resources of the old machine are also subject to many restrictions and are not conducive to obtaining the user interface A large number of data problems and deficiencies, after many evaluations and considerations, and using years of research and development experience in this industry, this kind of mouse cursor image detection comparison and feedback status judgment method invention patent was born.
本發明之主要目的乃在於基於非侵入式資料擷取系統可以不介入任何生產機台的條件下,透過影像處理單元偵測出目標機台端實際操控滑鼠於操作畫面中的滑鼠游標影像,並套用游標遮罩作樣型比對後,可將比對結果的資訊與滑鼠游標回饋狀態回傳至軟體控制系統,提供後續修正系統進行對應的處理程序,可確保其傳送與控制滑鼠移動的正確性,以完成滑鼠游標的閉迴路控制,如此不但不影響目前機台的生產與負載, 並在滑鼠游標的控制與監控上可提供一個回饋的修正機制,讓滑鼠游標在中央處理器或作業系統調配資源的同時,提供更為正確且可靠的滑鼠游標位置資訊,以及更精確的機台控制程序,也可用來記錄使用者操作流程、行為,或是提供擷取大量使用者介面資訊的中間媒介。 The main purpose of the present invention is that the non-intrusive data acquisition system can detect the mouse cursor image that the target machine side actually controls the mouse in the operation screen through the image processing unit without interfering with any production machine. After applying the cursor mask for sample comparison, the information of the comparison result and the feedback status of the mouse cursor can be returned to the software control system, and the subsequent correction system can be provided for corresponding processing procedures to ensure its transmission and control of the mouse. The correctness of the movement to complete the closed loop control of the mouse cursor, which not only does not affect the current production and load of the machine, It also provides a feedback correction mechanism in the control and monitoring of the mouse cursor, allowing the mouse cursor to provide more accurate and reliable mouse cursor position information and more accurate while allocating resources in the central processor or the operating system. The machine control program can also be used to record the user's operation flow and behavior, or provide an intermediate medium to retrieve a large amount of user interface information.
本發明之次要目的乃在於影像處理單元可搭配比對運算提供單一或多個位置、個數與穩定程度資訊來設計滑鼠游標位置回饋狀態與修正流程,包含使用者設定的游標前景與背景圖像,並套用一游標遮罩,在意區域與不在意區域之設計、透過圖像直方圖於橫軸上的各亮度值區間的間距取得預設門檻值的概念、比對單元設計流程與線掃描的比對方式,而滑鼠游標回饋狀態機制的判斷流程中,係透過影像處理單元提供之比對結果移動滑鼠游標,包含整個設計流程中檢測滑鼠游標的穩定程度、多重位置、多個滑鼠游標判斷、過去滑鼠游標移動之分析、滑鼠游標返回起始位置再移動至目標位置的復原方式、安全區域的使用方式、滑鼠游標位置補償、錯誤分析或其他相關滑鼠游標狀態等。 The secondary object of the present invention is that the image processing unit can be matched with the comparison operation to provide single or multiple position, number and stability information to design the mouse cursor position feedback state and correction process, including the cursor foreground and background set by the user Image, and apply a cursor mask, the concept of the area of concern and the area of inconsistency, the concept of obtaining the preset threshold through the interval of each brightness value interval on the horizontal axis of the image histogram, the design process and line of the comparison unit The comparison method of scanning, and in the judgment process of the feedback state mechanism of the mouse cursor, the mouse cursor is moved through the comparison result provided by the image processing unit, including the detection of the stability, multiple positions, and multiple positions of the mouse cursor in the entire design process. Mouse cursor judgment, analysis of past mouse cursor movements, recovery method of the mouse cursor returning to the starting position and then moving to the target position, use of the safe area, mouse cursor position compensation, error analysis, or other related mouse cursors Status etc.
本發明之另一目的乃在於影像處理單元可偵測機台操作畫面中的滑鼠游標影像,取代原本人眼的功能,並由現場可程式邏輯閘陣列執行滑鼠游標影像偵測比對的流程,不須透過目標機台端之中央處理器,除了可減低運作的負載外,並保證影像處理的即時性,且影像處理單元所回傳偵測比對的結果,亦不須預先取得目標機台端系統的滑鼠游標移動速度等設定,透過回饋與修正系統操控滑鼠游標的座標記錄,即可正確得知目前滑鼠游標的位置、個數與影像的穩定程度等回饋狀態資訊,以提供傳統非侵入式資料擷取系統更精確的機台控制程序。 Another object of the present invention is that the image processing unit can detect the image of the mouse cursor in the operation screen of the machine, instead of the function of the original human eye, and the field programmable logic gate array performs the comparison and detection of the image of the mouse cursor The process does not need to pass through the central processor of the target machine, in addition to reducing the operating load, and ensuring the real-time image processing, and the image processing unit returns the detection and comparison results, nor does it need to obtain the target machine in advance The movement speed of the mouse cursor on the platform system can be controlled by the coordinate record of the mouse cursor through the feedback and correction system, so that the current feedback status information such as the position, number and stability of the image of the mouse cursor can be correctly obtained to provide The traditional non-invasive data acquisition system has more accurate machine control procedures.
100‧‧‧機台控制器 100‧‧‧machine controller
101‧‧‧螢幕 101‧‧‧ screen
102‧‧‧鍵盤/滑鼠 102‧‧‧Keyboard/Mouse
200‧‧‧非侵入式資料擷取系統 200‧‧‧ Non-intrusive data retrieval system
201‧‧‧影像擷取裝置 201‧‧‧Image capture device
202‧‧‧影像處理單元 202‧‧‧Image processing unit
203‧‧‧軟體控制系統 203‧‧‧ software control system
204‧‧‧影像輸出裝置 204‧‧‧Image output device
205‧‧‧信號接收裝置 205‧‧‧Signal receiving device
206‧‧‧人機介面模擬裝置 206‧‧‧Human-machine interface simulation device
300‧‧‧游標遮罩 300‧‧‧Cursor mask
301‧‧‧Care區域 301‧‧‧Care area
302‧‧‧Don‘t care區域 302‧‧‧Don’t care area
303‧‧‧箭頭游標 303‧‧‧arrow cursor
304‧‧‧I字形游標 304‧‧‧I-shaped cursor
305‧‧‧陰影 305‧‧‧Shadow
第一圖 係為本發明在非侵入式資料擷取系統架構下擷取機台控制器資料之系統架構圖。 The first figure is a system architecture diagram of the present invention for retrieving machine controller data under a non-invasive data retrieval system architecture.
第二圖 係為本發明影像處理單元作滑鼠游標影像偵測比對之步驟流程圖。 The second figure is a flow chart of the steps of the image processing unit of the present invention as a mouse cursor image detection comparison.
第三圖 係為本發明將游標遮罩套在操作畫面中的滑鼠游標影像上之示意圖。 The third figure is a schematic diagram of the present invention in which the cursor mask is placed on the mouse cursor image in the operation screen.
第四圖 係為本發明游標遮罩作優化處理之步驟流程圖。 The fourth figure is a flow chart of the steps of the optimization process of the cursor mask of the present invention.
第五A圖 係為本發明游標遮罩透過門檻值進行圖像二值化及區域成長來將箭頭游標內部標定出來之示意圖。 The fifth figure A is a schematic diagram of the cursor mask of the present invention through the threshold value to perform image binarization and area growth to calibrate the inside of the arrow cursor.
第五B圖 係為本發明I字形游標在X軸作像素填補之示意圖。 Fig. 5B is a schematic diagram of pixel filling of the I-shaped cursor of the present invention on the X axis.
第六圖 係為本發明影像處理單元讀取滑鼠游標影像透過樣型比對輸出比對結果與回饋狀態判斷之流程圖。 The sixth figure is a flow chart of the image processing unit of the present invention reading the mouse cursor image and outputting the comparison result and the feedback status judgment through pattern comparison.
第七圖 係為本發明影像處理單元讀取滑鼠游標影像透過樣型比對輸出比對結果與回饋狀態判斷之方塊圖。 The seventh figure is a block diagram of the image processing unit of the present invention reading the mouse cursor image and outputting the comparison result and the feedback status judgment through pattern comparison.
第八A圖 係為本發明影像處理單元作滑鼠游標回饋狀態的判斷之步驟流程圖(一)。 Figure 8A is a flowchart (1) of the steps of the image processing unit of the present invention for determining the feedback state of the mouse cursor.
第八B圖 係為本發明影像處理單元作滑鼠游標回饋狀態的判斷之步驟流程圖(二)。 Figure 8B is a flowchart (2) of the steps of the image processing unit of the present invention for determining the feedback state of the mouse cursor.
第八C圖 係為本發明影像處理單元作滑鼠游標回饋狀態的判斷之步驟流程圖(三)。 Figure 8C is a flowchart (3) of the steps of the image processing unit of the present invention for determining the feedback state of the mouse cursor.
第八D圖 係為本發明影像處理單元作滑鼠游標回饋狀態的判斷之步驟流程圖(四)。 Figure 8D is a flowchart (4) of the steps of the image processing unit of the present invention for determining the feedback state of the mouse cursor.
為達成上述目的及功效,本發明所採用之技術手段及其構造,茲繪圖就本發明之較佳實施例詳加說明其構造與功能如下,俾利完全瞭解。 In order to achieve the above-mentioned objectives and effects, the technical means and the structure adopted by the present invention, the drawings and the detailed description of the preferred embodiment of the present invention, the structure and function of which are as follows, fully understand.
請參閱第一圖所示,係為本發明在非侵入式資料擷取系統架構下擷取機台控制器資料之系統架構圖,由圖中可清楚看出,本發明之機台控制器100安裝之機台操作程式可產生控制機台原始的操作畫面,並基於非侵入式資料擷取系統200架構下,可利用影像擷取裝置201擷取機台控制器100輸出的操作畫面,再分別傳送至非侵入式資料擷取系統200及影像處理單元202擷取操作畫面中的資訊,以供軟體控制系統203同時建構出提供給現場操作員的機台模擬操作畫面,且該機台模擬操作畫面中還可增加客製化的操作介面,便可藉由影像輸出裝置204來將後製的機台模擬操作畫面顯示在機台所屬的螢幕101,也可透過信號接收裝置205接收鍵盤/滑鼠102的控制信號傳送至軟體控制系統203處理,使人機介面模擬裝置206可以模擬鍵盤/滑鼠102傳送對應的控制信號給機台控制器100。
Please refer to the first figure, which is a system architecture diagram of the present invention for capturing machine controller data under a non-invasive data acquisition system architecture. It can be clearly seen from the figure that the
在本實施例中,影像處理單元202係該影像擷取裝置201所擷取的機台操作畫面影像的後級處理單元,可將影像處理相關的演算法建構於包含現場可程式邏輯閘陣列(FPGA)、特殊應用積體電路(ASIC)/特定用途晶片(ASSP)、微處理器或其他晶片內部,
但不限於實體的層級,亦可為應用程式或其他中介軟硬體,提供高速影像辨識、比對、運動偵測及滑鼠游標位置的定位等功能,而機台控制器100連接之機台除了包括產線上之機器或設備,更具有提供使用者介面的電腦系統或嵌入式系統,其包含但不限於處理模組、記憶體或通訊模組等,並採用圖形介面視窗之任何作業系統(如Windows、Linux、Unix或其他的作業系統)。
In this embodiment, the
請參閱第二至七圖所示,係分別為本發明影像處理單元作滑鼠游標影像偵測比對之步驟流程圖、將游標遮罩套在操作畫面中的滑鼠游標影像上之示意圖、游標遮罩作優化處理之步驟流程圖、游標遮罩透過門檻值進行圖像二值化及區域成長來將箭頭游標內部標定出來之示意圖、I字形游標在X軸作像素填補之示意圖、影像處理單元讀取滑鼠游標影像透過樣型比對輸出比對結果與回饋狀態判斷之流程圖及方塊圖,由圖中可清楚看出,當影像處理單元202進行操作畫面中的滑鼠游標影像偵測比對方法時,該偵測比對方法包含下列之步驟:
Please refer to the second to seventh figures, which are flow charts of the steps of the image processing unit of the present invention as a mouse cursor image detection comparison, a schematic diagram of the cursor mask on the mouse cursor image in the operation screen, The flow chart of the steps of the cursor mask for optimization processing, the schematic diagram of the cursor mask through the threshold value to binarize the image and the area growth to mark the inside of the arrow cursor, the schematic diagram of the I-shaped cursor for pixel filling on the X axis, and image processing The unit reads the mouse cursor image through the sample comparison output comparison result and the feedback status judgment flowchart and block diagram. It can be clearly seen from the figure that when the
(S101)取得使用者設定的游標前景圖像。 (S101) Acquire the cursor foreground image set by the user.
(S102)取得使用者設定的游標背景圖像。 (S102) Acquire the cursor background image set by the user.
(S103)選用游標特徵擷取演算法將前景圖像與背景圖像生成一游標遮罩300(Select cursor contour extraction algorithm to obtain the cursor mask)。 (S103) A cursor feature extraction algorithm is used to generate a cursor mask 300 (Select cursor contour extraction algorithm to obtain the cursor mask) from the foreground image and the background image.
(S104)比對單元讀取滑鼠游標影像,並套用游標遮罩300作樣型比對。
(S104) The comparison unit reads the mouse cursor image, and applies the
(S105)影像處理單元202提供比對結果的資訊與滑鼠游標回饋狀態。
(S105) The
由上述之實施步驟可知,在步驟S101、S102中之影像處理單元202係先取得系統提供使用者預先設定的游標前景圖像與背景圖像,其圖像大小由系統建議為20x16,但是實際的大小可依使用者需求變更,並不以此為限,且該游標的背景圖像係前景圖像中不含游標的部分;在步驟S103中係先將上述之前景圖像與背景圖像透過相關游標特徵擷取(如點擷取、線擷取、邊擷取、輪廓連結和角擷取等)演算法來生成一比對的游標遮罩300,其中演算法可依使用者預先設定的前景圖像與背景圖像內容的複雜程度來作擴充,使用者也可根據所提取之游標遮罩300作調整,以利於滑鼠游標偵測的精準度,而游標遮罩300則包含第三圖中左方上半部與下半部圖像所分割成的箭頭及I字形游標遮罩300,並於箭頭及I字形游標遮罩300中的白色區塊(如白色像素構成的部分)為Care(在意)區域301,且黑色區塊(如黑色像素構成的部分)為Don‘t care(不在意)區域302。
It can be known from the above implementation steps that the
在步驟S104中,當影像處理單元202接收影像擷取裝置201所傳送的機台原始的操作畫面時,可透過比對單元讀取操作畫面中的滑鼠游標影像,並套用游標遮罩300作樣型比對,如第三圖中之右方上半部與下半部圖像所表示的是左方箭頭及I字形游標遮罩300分別套在滑鼠游標影像上之預覽結果,並於游標遮罩300中的紅色區塊(如紅色像素構成的部分)為Don‘t care區域302,而其他非紅色區塊部位則為Care區域301。
In step S104, when the
如第四圖所示,比對單元在進行滑鼠游標影像比對之前,首先針對游標遮罩300作優化處理包含下列之步驟:(S201)將游標遮罩300中之Care區域301作圖像直方圖(Image histogram)運算,並對橫軸上的各亮度值區間(Bin)之間作間距的計算。
As shown in the fourth figure, before performing the mouse cursor image comparison, the optimization processing for the
(S202)從最大的間距中取一個預設門檻值(Threshold value)。 (S202) Take a preset threshold value (Threshold value) from the maximum distance.
(S203)透過預設門檻值進行圖像二值化擷取出箭頭游標303及I字形游標304樣型,再將陰影305處濾除。
(S203) Perform image binary extraction through a preset threshold to extract the
(S204)將箭頭游標303之箭頭區域內部透過區域成長標定出來。
(S204) The inside of the arrow area of the
(S205)I字形游標304在X軸作像素填補。
(S205) The I-shaped
由上述之實施步驟可知,影像處理單元202可將游標遮罩300中之Care區域301作圖像直方圖運算,並繪出圖像中每個亮度值(如灰階值或色彩值)的像素數,例如圖像中每個像素可以由0(黑)到255(白)範圍的亮度值表示,其中橫軸0~255為表示不同的灰階值,縱軸為表示此灰階值的像素佔圖像的比例,便可藉由圖像直方圖了解要如何調整亮度分佈的狀況,並將橫軸上的各亮度值區間之間作間距的計算,再從最大的間距中取一個預設門檻值,即可透過預設門檻值進行圖像二值化(Binarization)的處理,也就是像素的灰階值設置為0或255,使整個圖像呈現出明顯的黑白效果,通常是以灰階值超過預設門檻值的像素當作背景圖像,反之,則為前景圖像,並於去除 背景圖像擷取出箭頭游標303及I字形游標304樣型,便可將游標樣型的陰影305處濾除後,再使用擴散法處理將箭頭游標303之箭頭區域內部透過區域成長標定出來,I字形游標304在X軸方向作像素填補之動作(如第五A、五B圖所示)。 As can be seen from the above implementation steps, the image processing unit 202 can use the Care area 301 in the cursor mask 300 as an image histogram operation, and draw each pixel of the brightness value (such as grayscale value or color value) in the image Number, for example, each pixel in the image can be represented by a brightness value in the range of 0 (black) to 255 (white), where the horizontal axis 0~255 represents different grayscale values, and the vertical axis represents the pixels of this grayscale value The proportion of the image, you can use the image histogram to understand how to adjust the brightness distribution, and calculate the distance between the brightness value intervals on the horizontal axis, and then choose a preset from the maximum distance Threshold value, you can use the preset threshold value to perform image binarization (Binarization), that is, the grayscale value of the pixel is set to 0 or 255, so that the entire image shows a clear black and white effect, usually gray The pixels whose order value exceeds the preset threshold are regarded as the background image, otherwise, they are the foreground image and are removed The background image is extracted from the arrow cursor 303 and the I-shaped cursor 304, and the shadow 305 of the cursor can be filtered out, and then the interior of the arrow area of the arrow cursor 303 is calibrated through the area growth using the diffusion method, I The glyph cursor 304 performs pixel padding in the X-axis direction (as shown in Figures 5A and 5B).
如第六、七圖所示,影像處理單元202可透過比對單元讀取上述之機台原始操作畫面中的滑鼠游標影像,如影像大小可為Pix(20,W)的圖像,即指圖像水平軸方向長20個像素,垂直軸方向長W個像素,並將游標遮罩300套在滑鼠游標影像上,再透過影像處理及相關演算法以顏色邊界搭配圖像二值化進行滑鼠游標影像分割,以及線掃描的方式逐行掃完整個滑鼠游標影像後,便可藉由比對分割樣型的矩陣作樣型比對,同時計算得到如下表1所示之分數區間(如比對矩陣20x16為1~320),並根據分數之門檻值可透過實驗決定出判斷是否為穩定的滑鼠游標影像的決定分數,則由表1可看出箭頭游標影像穩定的分數門檻值為落在302~314之間,若是I字形游標影像,則落在314~316之間,而影像處理單元202除了可作滑鼠游標影像樣型比對,並將比對結果資訊回傳至軟體控制系統203解析的同時,也可提供滑鼠游標在操作畫面中的位置、個數與影像的穩定程度等資訊,以確認滑鼠游標的移動是否符合回饋與修正系統所操控的位置。
As shown in the sixth and seventh figures, the
此外,當影像處理單元202之比對單元讀取滑鼠游標影像時,可透過編碼器將滑鼠游標影像編碼出與游標遮罩300格式相同的20x16矩陣圖像,並由線緩衝區存放游標遮罩300的圖像資料後,再將游標遮罩300的圖像資料以不同速率依序寫入比對單元,藉此提供
比對單元可將滑鼠游標影像套用游標遮罩300透過線掃描的比對方式作樣型比對,並計算出上述之滑鼠游標的分數。
In addition, when the comparison unit of the
請參閱第八A至八D圖所示,係分別為本發明影像處理單元作滑鼠游標回饋狀態的判斷之步驟流程圖(一)、步驟流程圖(二)、步驟流程圖(三)及步驟流程圖(四),當影像處理單元202進行滑鼠游標回饋狀態的判斷方法時,該判斷方法包含下列之步驟:(S301)系統開始執行滑鼠游標的移動。
Please refer to Figures 8A to 8D, which are the flowchart (a), the flowchart (b), and the flowchart (c) of the step of judging the feedback state of the mouse cursor of the image processing unit of the present invention. Step flow chart (4), when the
(S302)等待影像處理單元202回報滑鼠游標狀態已穩定或已超過等待時間,再繼續執行步驟S303。
(S302) Wait for the
(S303)判斷是否有找到滑鼠游標?若有,則執行步驟S304;若無,則執行步驟S310。 (S303) Determine whether a mouse cursor is found? If yes, go to step S304; if no, go to step S310.
(S304)判斷滑鼠游標是否有多重位置?若有,則執 行步驟S305;若無,則執行步驟S306。 (S304) Determine whether the mouse cursor has multiple positions? If yes, then hold Go to step S305; if not, go to step S306.
(S305)提供滑鼠游標多重位置的警報訊息,再繼續執行步驟S306。 (S305) Provide an alarm message for multiple positions of the mouse cursor, and then continue to perform step S306.
(S306)判斷滑鼠游標的位置是否正確?若是,則執行步驟S307;若否,則執行步驟S315。 (S306) Determine whether the position of the mouse cursor is correct? If yes, go to step S307; if no, go to step S315.
(S307)判斷是否有多個滑鼠游標?若有,則執行步驟S308;若無,則執行步驟S309。 (S307) Determine whether there are multiple mouse cursors? If yes, go to step S308; if no, go to step S309.
(S308)提供多個滑鼠游標的警報訊息,再繼續執行步驟S309。 (S308) Provide alarm information of multiple mouse cursors, and then continue to perform step S309.
(S309)判定為滑鼠游標移動成功。 (S309) It is determined that the mouse cursor moves successfully.
(S310)判斷是否為第一次執行?若是,則執行步驟S311;若否,則執行步驟S312。 (S310) Is it the first execution? If yes, go to step S311; if no, go to step S312.
(S311)進行滑鼠游標補償的動作,再重複執行步驟S302。 (S311) Perform the mouse cursor compensation operation, and then repeat step S302.
(S312)取得上一次滑鼠游標移動的位置資訊,再繼續執行步驟S313。 (S312) Acquire the position information of the last mouse cursor movement, and then proceed to step S313.
(S313)判斷是否為第二次或第三次執行?若是,則執行步驟S314;若否,則執行步驟S316。 (S313) Is it the second or third execution? If yes, go to step S314; if no, go to step S316.
(S314)滑鼠游標返回起始位置再移動至目標位置,再重複執行步驟S302。 (S314) The mouse cursor returns to the starting position and then moves to the target position, and then repeats step S302.
(S315)判斷滑鼠游標重試次數是否已到達或已超過等待時間?若是,則重複執行步驟S307;若否,則重複執行步驟S3 11。 (S315) Determine whether the number of mouse cursor retries has reached or exceeded the waiting time? If yes, repeat step S307; if no, repeat step S3 11.
(S316)等待影像處理單元202回報滑鼠游標狀態已穩定或已超過等待時間,再繼續執行步驟S317。
(S316) Wait for the
(S317)滑鼠游標移動至安全區域,再繼續執行步驟S318。 (S317) The mouse cursor moves to a safe area, and then step S318 is continued.
(S318)等待影像處理單元202回報滑鼠游標狀態已穩定或已超過等待時間,再繼續執行步驟S319。
(S318) Wait for the
(S319)取得上一次滑鼠游標移動的位置資訊,再繼續執行步驟S320。 (S319) Acquire the position information of the last mouse cursor movement, and then proceed to step S320.
(S320)判斷是否有找到滑鼠游標?若無,則執行步驟S321;若有,則執行步驟S322。 (S320) Determine whether a mouse cursor is found? If not, go to step S321; if yes, go to step S322.
(S321)提供沒有找到滑鼠游標的錯誤訊息。 (S321) Provide an error message that the mouse cursor was not found.
(S322)判斷滑鼠游標上二次移動的位置之間是否有差異?若是,則執行步驟S323;若否,則執行步驟S324。 (S322) Determine whether there is a difference between the positions of the second movement on the mouse cursor? If yes, go to step S323; if no, go to step S324.
(S323)提供無法控制滑鼠游標的錯誤訊息。 (S323) Provide an error message that the mouse cursor cannot be controlled.
(S324)提供失去滑鼠游標位置的錯誤訊息。 (S324) Provide an error message that the position of the mouse cursor is lost.
由上述之實施步驟可知,當操作員對機台所屬的鍵盤/滑鼠操控時,系統會開始執行滑鼠游標的移動,並由影像處理單元202偵測機台控制器100所輸出操作畫面中的滑鼠游標影像後,再將滑鼠游標影像比對結果的資訊(包含位置、個數、穩定程度與分數等)回傳至軟體控制系統203解析,以完成滑鼠游標的閉迴路控制,當軟體控制系統203執行滑鼠游標移動流程時,先等待影像處理單元202回報滑鼠游標
狀態已穩定或已超過等待時間,再判斷是否有找到滑鼠游標,若是有找到滑鼠游標,則進入多重位置的判斷;若是多重位置成立,則影像處理單元202提供滑鼠游標多重位置的警報訊息(Warning multi-position)給軟體控制系統203,再進入滑鼠游標位置正確性的判斷,若是位置正確,則進入多個滑鼠游標的判斷;若是有多個滑鼠游標成立,則影像處理單元202提供多個滑鼠游標的警報訊息(Warning multi-cursor)給軟體控制系統203,並判定為滑鼠游標移動成功,以完成滑鼠游標之移動。
It can be seen from the above implementation steps that when the operator controls the keyboard/mouse to which the machine belongs, the system will start to move the mouse cursor, and the
反之,上述判斷是否有找到滑鼠游標之步驟中,若是沒有找到滑鼠游標,則進入是否為第一次執行的判斷;若是第一次執行,則回饋與修正系統進行滑鼠游標補償的動作,再回到上述之等待影像處理單元202回報滑鼠游標狀態已穩定或已超過等待的時間之步驟中;若判斷不是第一次執行,則取得上一次進入系統所執行滑鼠游標移動的位置資訊,再判斷是否為第二次或第三次執行滑鼠游標移動流程,若是為第二次或第三次執行,則先將滑鼠游標返回起始位置(Go to zero position),再移動至目標位置(target position),再回到上述之等待影像處理單元202回報滑鼠游標狀態已穩定或已超過等待的時間之步驟中。
On the contrary, in the above step of judging whether the mouse cursor is found, if it is not found, it enters the judgment of whether it is the first execution; if it is the first execution, the feedback and correction system performs the mouse cursor compensation action , And then return to the step of waiting for the
此外,上述之判斷滑鼠游標位置是否正確之步驟中,若是位置不正確,則判斷是否已到達重試次數或已超過等待時間;若是已到達重複次數或已超過等待時間,則回到上述之多個滑鼠游標判斷之步驟中,反之,則進行滑鼠游標補償的動作後,再回到上述之等待影像處理單元2
02回報滑鼠游標狀態已穩定或已超過等待時間之步驟中。
In addition, in the above step of determining whether the position of the mouse cursor is correct, if the position is incorrect, it is determined whether the number of retries has been reached or the waiting time has been exceeded; if the number of repetitions has been reached or the waiting time has been exceeded, return to the above In the step of judging multiple mouse cursors, otherwise, after performing the mouse cursor compensation operation, it returns to the aforementioned waiting
再者,上述之判斷是否為第二次或第三次執行之步驟中,若判斷為不是第二次或第三次執行,則會進行後續滑鼠游標的錯誤分析,當軟體控制系統203執行錯誤分析流程時,先等待影像處理單元202回報滑鼠游標狀態已穩定或已超過等待時間,然後將滑鼠游標移動至安全區域,再執行一次等待影像處理單元202回報滑鼠游標狀態已穩定或已超過等待時間,並取得上一次所執行滑鼠游標移動的位置資訊,再判斷是否有找到滑鼠游標,若是沒有找到滑鼠游標,則影像處理單元202提供沒有找到滑鼠游標(Cannot detect cursor)的錯誤訊息給軟體控制系統203;若是有找到滑鼠游標,則進入滑鼠游標上二次移動的位置之間是否有差異的判斷,若是有差異,則影像處理單元202提供無法控制滑鼠游標的錯誤訊息(Cannot control cursor);若是沒有差異,則影像處理單元202提供失去滑鼠游標位置的錯誤訊息(Lost cursor position),藉此可提供後續偵測回饋與修正系統進行對應的處理程序。
Furthermore, in the step of determining whether it is the second or third execution, if it is determined that it is not the second or third execution, the subsequent error analysis of the mouse cursor will be performed. When the
是以,本發明之滑鼠游標影像偵測比對與回饋狀態判斷方法係基於非侵入式資料擷取系統200的架構在不介入任何生產機台的條件下,可透過影像處理單元202讀取機台控制器100於鍵盤/滑鼠102實際操控所輸出操作畫面中的滑鼠游標影像,並套用一游標遮罩300作樣型比對,且搭配比對運算後所提供單一或多個位置、個數與穩定程度資訊來設計滑鼠游標位置回饋狀態與修正流程,其中偵測比對流程包含使用者設定的游標前景與背景圖像的方式(如前景與背景圖像取得、游標 遮罩300生成概念與游標樣型之調校等),並使用游標遮罩300作樣型比對的方式,包含Care區域301與Don‘t care區域302設計、透過圖像直方圖於橫軸上的各亮度值區間的間距取得預設門檻值的概念、比對單元的設計流程與線掃描的比對方式,而滑鼠游標回饋狀態機制的判斷流程中,係透過影像處理單元202提供之比對結果來移動滑鼠游標,包含整個設計流程中檢測滑鼠游標的穩定程度、滑鼠游標多重位置、多個滑鼠游標判斷、過去滑鼠游標移動之分析、滑鼠游標返回起始位置再移動至目標位置的復原方式、安全區域的使用方式、滑鼠游標位置補償、錯誤分析或其他相關滑鼠游標狀態等。 Therefore, the mouse cursor image detection comparison and feedback status judgment method of the present invention is based on the architecture of the non-invasive data acquisition system 200 and can be read by the image processing unit 202 without interfering with any production machine The machine controller 100 actually controls the mouse cursor image in the operation screen output by the keyboard/mouse 102, and applies a cursor mask 300 for sample comparison, and provides single or multiple positions after matching operation , Number and stability information to design the mouse cursor position feedback status and correction process, where the detection and comparison process includes the user-set cursor foreground and background image methods (such as foreground and background image acquisition, cursor Mask 300 generates concepts and adjusts the cursor pattern, etc.), and uses the cursor mask 300 as a pattern comparison method, including the design of Care area 301 and Don't care area 302, through the image histogram on the horizontal axis The interval of each brightness value interval on the above is the concept of obtaining a preset threshold, the design process of the comparison unit and the comparison method of line scanning, and the judgment process of the feedback state mechanism of the mouse cursor is provided by the image processing unit 202 Compare the results to move the mouse cursor, including detecting the stability of the mouse cursor in the entire design process, multiple positions of the mouse cursor, judgment of multiple mouse cursors, analysis of past mouse cursor movements, mouse cursor return to the starting position Then move to the target position recovery method, safe area usage method, mouse cursor position compensation, error analysis or other related mouse cursor status, etc.
本發明上述之滑鼠游標影像偵測比對與回饋狀態判斷方法與先前技術相比,具有下列之有益效果: Compared with the prior art, the aforementioned mouse cursor image detection comparison and feedback state judgment method of the present invention has the following beneficial effects:
(一)本發明可由影像處理單元202所回傳的機台操作畫面中的滑鼠游標影像偵測比對的回饋結果,提供後續修正系統進行對應的滑鼠游標處理程序。
(1) In the present invention, the feedback result of the mouse cursor image detection and comparison in the machine operation screen returned by the
(二)本發明若是影像處理單元202執行滑鼠游標影像偵測比對的流程係由現場可程式邏輯閘陣列(FPGA)處理,不須透過目標機台端系統主機中之中央處理器(CPU),除了可減低中央處理器運作的負載外,還可保證影像處理的即時性。
(2) In the present invention, if the
(三)本發明係由影像處理單元202偵測機台操作畫面中的滑鼠游標影像,可取代原本人眼的功能,確認滑鼠游標的移動是否符合回饋與修正系統操控的位置,以完成滑鼠游標的閉迴路控制。
(3) In the present invention, the
(四)本發明透過影像處理單元202所回傳偵測比對的
結果回饋與修正系統的滑鼠游標所在的位置座標記錄,可提供傳統非侵入式資料擷取系統更精確的機台控制程序。
(4) The present invention detects and compares through the
(五)本發明不須預先取得目標機台端系統的滑鼠游標移動速度等設定,即可正確地透過影像處理單元202來即時得知目前滑鼠游標位置、個數與穩定程度等回饋狀態資訊。
(5) The present invention does not need to obtain the setting of the mouse cursor movement speed of the target machine end system in advance, and can correctly obtain the current feedback status information of the current mouse cursor position, number and stability level through the
(六)本發明影像處理單元202所提供的滑鼠游標回饋狀態資訊可用來記錄使用者操作流程、行為,或是後續擷取大量使用者介面資訊進行蒐集與分析應用的中間媒介。
(6) The feedback status information of the mouse cursor provided by the
上述詳細說明為針對本發明一種較佳之可行實施例說明而已,惟該實施例並非用以限定本發明之申請專利範圍,凡其他未脫離本發明所揭示之技藝精神下所完成之均等變化與修飾變更,均應包含於本發明所涵蓋之專利範圍中。 The above detailed description is for the description of a preferred feasible embodiment of the present invention, but this embodiment is not intended to limit the scope of the patent application of the present invention. Any other changes and modifications that have been completed without departing from the spirit of the art disclosed by the present invention Changes should be included in the scope of patents covered by the present invention.
綜上所述,本發明上述之滑鼠游標影像偵測比對與回饋狀態判斷方法於使用時為確實能達到其功效及目的,故本發明誠為一實用性優異之發明,實符合發明專利之申請要件,爰依法提出申請,盼 審委早日賜准本案,以保障發明人之辛苦發明,倘若 鈞局有任何稽疑,請不吝來函指示,發明人定當竭力配合,實感德便。 In summary, the above mouse cursor image detection comparison and feedback status judgment method of the present invention can indeed achieve its efficacy and purpose when used, so the present invention is an invention with excellent practicability, which is in line with the invention patent You must file an application in accordance with the law. I hope that the review committee will grant the case as soon as possible to protect the inventor’s hard invention. If the Bureau has any doubts, please send me a letter and instruct the inventor to try their best to cooperate.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108108085A TWI693535B (en) | 2019-03-11 | 2019-03-11 | Mouse cursor image detection comparison and feedback state judgment method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108108085A TWI693535B (en) | 2019-03-11 | 2019-03-11 | Mouse cursor image detection comparison and feedback state judgment method |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI693535B true TWI693535B (en) | 2020-05-11 |
TW202034132A TW202034132A (en) | 2020-09-16 |
Family
ID=71896087
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW108108085A TWI693535B (en) | 2019-03-11 | 2019-03-11 | Mouse cursor image detection comparison and feedback state judgment method |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI693535B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI747666B (en) * | 2020-12-16 | 2021-11-21 | 台灣松下電器股份有限公司 | Application program automatic detection method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040100503A1 (en) * | 2002-11-26 | 2004-05-27 | Ge Medical Systems Information Technologies, Inc. | Synchronized magnification system and method for images |
TW200419369A (en) * | 2002-09-20 | 2004-10-01 | American Megatrends Inc | Systems and methods for establishing interaction between a local computer and a remote computer |
US20120098854A1 (en) * | 2010-10-21 | 2012-04-26 | Canon Kabushiki Kaisha | Display control apparatus and display control method |
TW201546698A (en) * | 2014-06-10 | 2015-12-16 | Aten Int Co Ltd | Method of auto-recognizing for cursor in monitors |
CN105573577A (en) * | 2014-10-15 | 2016-05-11 | 航天信息股份有限公司 | Remote monitoring method, device and system |
-
2019
- 2019-03-11 TW TW108108085A patent/TWI693535B/en active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200419369A (en) * | 2002-09-20 | 2004-10-01 | American Megatrends Inc | Systems and methods for establishing interaction between a local computer and a remote computer |
US20040100503A1 (en) * | 2002-11-26 | 2004-05-27 | Ge Medical Systems Information Technologies, Inc. | Synchronized magnification system and method for images |
US20120098854A1 (en) * | 2010-10-21 | 2012-04-26 | Canon Kabushiki Kaisha | Display control apparatus and display control method |
TW201546698A (en) * | 2014-06-10 | 2015-12-16 | Aten Int Co Ltd | Method of auto-recognizing for cursor in monitors |
CN105573577A (en) * | 2014-10-15 | 2016-05-11 | 航天信息股份有限公司 | Remote monitoring method, device and system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI747666B (en) * | 2020-12-16 | 2021-11-21 | 台灣松下電器股份有限公司 | Application program automatic detection method and system |
Also Published As
Publication number | Publication date |
---|---|
TW202034132A (en) | 2020-09-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111028213B (en) | Image defect detection method, device, electronic equipment and storage medium | |
Deng et al. | Automatic indoor construction process monitoring for tiles based on BIM and computer vision | |
CN103065134B (en) | A kind of fingerprint identification device and method with information | |
CN103207987B (en) | A kind of registration recognition methods of pointer instrument | |
CN111507200A (en) | Body temperature detection method, body temperature detection device and dual-optical camera | |
CN113111817B (en) | Semantic segmentation face integrity measurement method, system, equipment and storage medium | |
CN103400139A (en) | Method for identifying concrete crack characteristic information | |
US10395090B2 (en) | Symbol detection for desired image reconstruction | |
CN111831135B (en) | Mouse cursor image detection comparison and feedback state judgment method | |
TWI693535B (en) | Mouse cursor image detection comparison and feedback state judgment method | |
CN110288040B (en) | Image similarity judging method and device based on topology verification | |
US11114060B2 (en) | Cursor image detection comparison and feedback status determination method | |
CN112561885B (en) | YOLOv 4-tiny-based gate valve opening detection method | |
CN113052234A (en) | Jade classification method based on image features and deep learning technology | |
CN117330582A (en) | Polymer PE film surface crystal point detecting system | |
JP2019087050A (en) | Structure maintenance management job support system | |
CN116229236A (en) | Bacillus tuberculosis detection method based on improved YOLO v5 model | |
CN113822836A (en) | Method of marking an image | |
CN113807191B (en) | Non-invasive visual test script automatic recording method | |
CN110286825B (en) | Mechanical full-automatic mouse operating device based on machine vision | |
CN116703803A (en) | Method, device and system for detecting burrs at edges of battery pole pieces | |
CN110286780B (en) | Electromechanical hybrid unattended computer operating device based on machine vision | |
CN106980863A (en) | A kind of unit exception diagnostic model in transformer substation video monitoring | |
CN109145930A (en) | It is a kind of based on semi-supervised image significance detection method | |
CN107977974A (en) | A kind of light concentrator boundary detection method and system |