TW202121118A - Electronic device and method for identifying press on virtual keyboard - Google Patents
Electronic device and method for identifying press on virtual keyboard Download PDFInfo
- Publication number
- TW202121118A TW202121118A TW108141964A TW108141964A TW202121118A TW 202121118 A TW202121118 A TW 202121118A TW 108141964 A TW108141964 A TW 108141964A TW 108141964 A TW108141964 A TW 108141964A TW 202121118 A TW202121118 A TW 202121118A
- Authority
- TW
- Taiwan
- Prior art keywords
- average difference
- button
- virtual
- difference map
- electronic device
- Prior art date
Links
Images
Abstract
Description
本發明的實施例是關於一種影像辨識之方法與電子裝置。更具體而言,本發明的實施例是關於一種辨識虛擬鍵盤上之按壓的電子裝置與方法。 The embodiment of the present invention relates to an image recognition method and electronic device. More specifically, the embodiments of the present invention relate to an electronic device and method for recognizing presses on a virtual keyboard.
虛擬鍵盤為一種透過電腦程序所建立的好比存在於一真實空間的非實體鍵盤。一般而言,為了辨識使用者輸入的內容,傳統的方法會先定義好虛擬鍵盤上的每一個虛擬按鍵在該真實空間中的座標,然後根據使用者的手指指尖在該真實空間中的絕對位置,來判斷使用者的輸入是由哪一個虛擬按鍵所產生。為了讓手指指尖觸碰到該真實空間中任一個虛擬按鍵的絕對位置,使用者必須使用推壓的方式來移動其手指。然而,推壓動作(手指往前)與一般操作電腦用實體鍵盤所用的按壓動作(手指往下)並不協調,故會不利於使用者的手勢操作,進而降低使用虛擬鍵盤輸入資料的效率。除此之外,為了避免誤判,只有當使用者的手指指尖觸碰到該真實空間中任一個虛擬按鍵的絕對位置時,才會判斷該虛擬按鍵被觸發,這使得使用者的操作範圍相當受限,進而也降低了使用虛擬鍵盤輸入資料的效率。有鑑於此,如何提升使用虛擬鍵盤輸入資料的效率,在所屬技術領域中將是相 當重要的。 A virtual keyboard is a non-physical keyboard created by a computer program, which is like a real space. Generally speaking, in order to identify the content input by the user, the traditional method will first define the coordinates of each virtual key on the virtual keyboard in the real space, and then according to the absolute value of the user’s fingertips in the real space. Position, to determine which virtual button the user's input is generated by. In order for the fingertip of the finger to touch the absolute position of any virtual key in the real space, the user must use a push method to move his finger. However, the pushing action (finger forward) is not coordinated with the general pressing action (finger down) used to operate the physical keyboard of the computer, which is not conducive to the user's gesture operation, thereby reducing the efficiency of using the virtual keyboard to input data. In addition, in order to avoid misjudgment, only when the user’s fingertip touches the absolute position of any virtual key in the real space, will it be judged that the virtual key is triggered, which makes the user’s operating range comparable Restriction, which in turn reduces the efficiency of using the virtual keyboard to input data. In view of this, how to improve the efficiency of using the virtual keyboard to input data will be relevant in the technical field. When it matters.
為了解決至少上述的問題,本發明的實施例提供了一種辨識一虛擬鍵盤上之按壓的電子裝置,其可包含互相電性連結的一儲存器、一攝影機、一顯示器、以及一處理器。該儲存器可用以儲存一影像分類模型。該攝影機可用以擷取多張連續的影像。該顯示器可用以依序顯示該多張連續的影像,且在顯示該多張連續的影像的期間,顯示包含多個虛擬按鍵的該虛擬鍵盤。該處理器可用以:根據該多張連續的影像,針對各該多個虛擬按鍵產生一按鍵平均差分圖;以及透過該影像分類模型來分析該多個按鍵平均差分圖的全部或一部分,以判斷該多個虛擬按鍵中的哪一個被按壓。 In order to solve at least the above-mentioned problems, embodiments of the present invention provide an electronic device for recognizing presses on a virtual keyboard, which may include a memory, a camera, a display, and a processor that are electrically connected to each other. The storage can be used to store an image classification model. The camera can be used to capture multiple consecutive images. The display can be used to sequentially display the multiple continuous images, and during the display of the multiple continuous images, display the virtual keyboard including multiple virtual keys. The processor can be used to: generate a button average difference map for each of the plurality of virtual keys according to the plurality of continuous images; and analyze all or part of the plurality of button average difference maps through the image classification model to determine Which one of the multiple virtual keys is pressed.
為了解決至少上述的問題,本發明的實施例還提供了一種辨識一虛擬鍵盤上之按壓的方法,該方法可包含以下步驟:由一攝影機,擷取多張連續的影像;由一顯示器,依序顯示該多張連續的影像,且在顯示該多張連續的影像的期間,顯示包含多個虛擬按鍵的該虛擬鍵盤;由一處理器,根據該多張連續的影像,針對各該多個虛擬按鍵產生一按鍵平均差分圖;以及由該處理器,透過一影像分類模型來分析該多個按鍵平均差分圖的全部或一部分,以判斷該多個虛擬按鍵中的哪一個被按壓。 In order to solve at least the above-mentioned problems, embodiments of the present invention also provide a method for recognizing presses on a virtual keyboard. The method may include the following steps: capturing multiple continuous images from a camera; Sequentially display the multiple continuous images, and during the display of the multiple continuous images, display the virtual keyboard including multiple virtual keys; a processor, according to the multiple continuous images, for each of the multiple The virtual key generates a key average difference map; and the processor analyzes all or a part of the plurality of key average difference maps through an image classification model to determine which of the plurality of virtual keys is pressed.
在本發明的實施例中,因每一個按鍵平均差分圖可反映出相對應的虛擬按鍵在多張連續的影像中的變化,故影像分類模型可以根據每一個虛擬按鍵的按鍵平均差分圖,辨識出哪一個虛擬按鍵被手指按壓了。換言之,在本發明的實施例中,可藉由辨識手指的真實按壓動作來判斷哪一個虛擬按鍵被按壓,這與一般操作電腦用實體鍵盤所用的按壓動作(手指往 下)一致,故有利於使用者的手勢操作。除此之外,不同於傳統的方法,在本發明的實施例中,不用依賴於手指指尖觸碰到該真實空間中任一個虛擬按鍵的絕對位置來辨識使用者的輸入,故能擴大使用者的操作範圍。據此,在本發明的實施例中,明顯地提升了使用虛擬鍵盤輸入資料的效率。 In the embodiment of the present invention, because the average difference map of each button can reflect the changes of the corresponding virtual button in multiple consecutive images, the image classification model can identify the average difference map of each virtual button according to the button average difference map. Find out which virtual button was pressed by the finger. In other words, in the embodiment of the present invention, the actual pressing action of the finger can be recognized to determine which virtual key is pressed. Bottom) is consistent, so it is beneficial to the user's gesture operation. In addition, unlike the traditional method, in the embodiment of the present invention, the absolute position of the fingertip touching any virtual key in the real space is not required to identify the user's input, so it can be expanded to use Operator’s operating range. Accordingly, in the embodiment of the present invention, the efficiency of using the virtual keyboard to input data is significantly improved.
以上內容並非為了限制本發明,而只是概括地敘述了本發明可解決的技術問題、可採用的技術手段以及可達到的技術功效,以讓本發明所屬技術領域中具有通常知識者初步地瞭解本發明。根據檢附的圖式及以下的實施方式所記載的內容,本發明所屬技術領域中具有通常知識者便可進一步瞭解本發明的各種實施例的細節。 The above content is not intended to limit the present invention, but only briefly describes the technical problems that can be solved by the present invention, the technical means that can be adopted, and the technical effects that can be achieved, so that those with ordinary knowledge in the technical field to which the present invention belongs can have a preliminary understanding of the present invention. invention. According to the attached drawings and the content described in the following embodiments, those with ordinary knowledge in the technical field to which the present invention belongs can further understand the details of the various embodiments of the present invention.
如下所示: As follows:
1‧‧‧電子裝置 1‧‧‧Electronic device
11‧‧‧處理器 11‧‧‧Processor
13‧‧‧儲存器 13‧‧‧Storage
15‧‧‧攝影機 15‧‧‧Camera
17‧‧‧顯示器 17‧‧‧Display
MD‧‧‧影像分類模型 MD‧‧‧Image Classification Model
IM‧‧‧影像 IM‧‧‧Image
2‧‧‧電子裝置辨識虛擬鍵盤上之按壓之流程 2‧‧‧The process of identifying the pressing on the virtual keyboard by the electronic device
201、203、205、207、209、211、213‧‧‧操作 201, 203, 205, 207, 209, 211, 213‧‧‧Operation
USR‧‧‧使用者 USR‧‧‧User
X、Y、Z‧‧‧軸線 X, Y, Z‧‧‧axis
KBD‧‧‧虛擬鍵盤 KBD‧‧‧Virtual keyboard
VK、VK1、VK2‧‧‧虛擬按鍵 VK, VK1, VK2‧‧‧Virtual buttons
SZ1、SZ2‧‧‧影像尺寸 SZ1, SZ2‧‧‧Image size
3‧‧‧辨識虛擬鍵盤上之按壓的方法 3‧‧‧The method of recognizing the press on the virtual keyboard
301、303、305、307‧‧‧步驟 301, 303, 305, 307‧‧‧ steps
第1圖例示了根據某些實施例之一種辨識虛擬鍵盤上之按壓的電子裝置。 Figure 1 illustrates an electronic device that recognizes a press on a virtual keyboard according to some embodiments.
第2A圖例示了第1圖所示的電子裝置如何辨識虛擬鍵盤上之按壓的示意圖。 Fig. 2A illustrates how the electronic device shown in Fig. 1 recognizes a press on the virtual keyboard.
第2B圖例示了第1圖所示的電子裝置擷取影像的環境。 Figure 2B illustrates the environment in which the electronic device shown in Figure 1 captures images.
第2C圖例示了第1圖所示的顯示器所顯示的影像。 Figure 2C illustrates an image displayed on the display shown in Figure 1.
第3圖例示了根據某些實施例之一種辨識虛擬鍵盤上之按壓的方法。 Figure 3 illustrates a method of recognizing presses on a virtual keyboard according to some embodiments.
以下將透過多個實施例來說明本發明,惟這些實施例並非用以限制本發明只能根據所述操作、環境、應用、結構、流程或步驟來實施。與本發明非直接相關的元件並未繪示於圖式中,但可隱含於圖式中。於圖式 中,各元件(element)的尺寸以及各元件之間的比例僅是範例,而非用以限制本發明。除了特別說明之外,在以下內容中,相同(或相近)的元件符號可對應至相同(或相近)的元件。在可被實現的情況下,如未特別說明,以下所述的每一個元件的數量可以是一個或多個。 Hereinafter, the present invention will be described through a number of embodiments, but these embodiments are not intended to limit the present invention to only be implemented according to the operation, environment, application, structure, process or steps. Elements that are not directly related to the present invention are not shown in the drawings, but may be implicit in the drawings. Yu Schema Here, the size of each element and the ratio between each element are only examples, and are not intended to limit the present invention. Except for special instructions, in the following content, the same (or similar) component symbols may correspond to the same (or similar) components. In the case of being realized, the number of each element described below may be one or more unless otherwise specified.
本揭露使用之用語僅用於描述實施例,並不意圖限制本發明。除非上下文另有明確說明,否則單數形式「一」也旨在包括複數形式。「包括」、「包含」等用語指示所述特徵、整數、步驟、操作、元素及/或元件的存在,但並不排除一或多個其他特徵、整數、步驟、操作、元素、元件及/或前述之組合之存在。用語「及/或」包含一或多個相關所列項目的任何及所有的組合。 The terms used in this disclosure are only used to describe the embodiments and are not intended to limit the present invention. Unless the context clearly dictates otherwise, the singular form "one" is also intended to include the plural form. Terms such as "including" and "including" indicate the existence of the features, integers, steps, operations, elements, and/or elements, but do not exclude one or more other features, integers, steps, operations, elements, elements, and/or Or the existence of the aforementioned combination. The term "and/or" includes any and all combinations of one or more related listed items.
第1圖例示了根據某些實施例之一種辨識虛擬鍵盤上之按壓的電子裝置的示意圖。第1圖所示內容僅是為了舉例說明本發明的實施例,而非為了限制本發明。第1圖所示的電子裝置1可以是具有計算機功能的各種電子裝置,例如但不限於:一伺服器、一筆記型電腦、一平板電腦、一桌上型電腦、一行動裝置等。電子裝置1基本上可包含互相電性連結(直接或間接)的處理器11、儲存器13、攝影機15以及顯示器17。
Figure 1 illustrates a schematic diagram of an electronic device that recognizes a press on a virtual keyboard according to some embodiments. The content shown in Figure 1 is only for illustrating the embodiments of the present invention, not for limiting the present invention. The
處理器11可以包含一或多個具備訊號處理功能的微處理器(microprocessor)或微控制器(microcontroller)。微處理器或微控制器是一種可程式化的特殊積體電路,其具有運算、儲存、輸出/輸入等能力,且可接受並處理各種編碼指令,藉以進行各種邏輯運算與算術運算,並輸出相應的運算結果。處理器11可將攝影機15擷取的複數影像IM儲存於儲存器13中並進行各種運算,處理器11亦可根據影像IM的各種運算結果來辨識一虛擬
鍵盤上之按壓(容後詳述)。
The processor 11 may include one or more microprocessors or microcontrollers with signal processing functions. A microprocessor or microcontroller is a special programmable integrated circuit, which has the capabilities of calculation, storage, output/input, etc., and can accept and process various coding instructions, so as to perform various logic operations and arithmetic operations, and output The corresponding calculation result. The processor 11 can store the complex images IM captured by the
儲存器13可包含各種儲存單元。舉例而言,儲存器13可包含第一級記憶體(又稱主記憶體或內部記憶體),其可被處理器11直接存取。除了第一級記憶體,在某些實施例中,儲存器13還可包含第二級記憶體(又稱外部記憶體或輔助記憶體),其透過記憶體的I/O通道來與處理器11連結。第二級記憶體可例如是硬碟、光碟等固定儲存實體。除了第一級記憶體與第二級記憶體,在某些實施例中,儲存器13亦可包含可攜式的儲存裝置,例如隨身碟。於某些實施例中,儲存器13還可包含雲端儲存單元。儲存器13可儲存電子裝置1本身產生的資料以及由外部輸入至電子裝置1的各種資料,例如:由攝影機15所擷取的複數影像IM、影像分類模型MD、建立影像分類模型MD所需的雛形、系統、程式碼或資訊等等。
The storage 13 may include various storage units. For example, the storage 13 may include a first-level memory (also called main memory or internal memory), which can be directly accessed by the processor 11. In addition to the first-level memory, in some embodiments, the storage 13 may also include a second-level memory (also called external memory or auxiliary memory), which communicates with the processor through the I/O channel of the memory. 11 link. The secondary memory may be a fixed storage entity such as a hard disk, an optical disk, etc. In addition to the first-level memory and the second-level memory, in some embodiments, the storage 13 may also include a portable storage device, such as a flash drive. In some embodiments, the storage 13 may also include a cloud storage unit. The storage 13 can store the data generated by the
攝影機15可以是各種具有動態擷取影像及/或靜態擷取影像的功能的裝置,例如但不限於:數位相機、錄影機、或各種具有攝影功能的行動裝置等。另外,攝影機15可以透過一有線介面及/或一無線介面與處理器11連結。攝影機15可用以擷取與使用者操作虛擬鍵盤相關的複數連續的影像IM,以供處理器11進行分析與計算,且根據分析與計算的結果辨識虛擬鍵盤的按壓。
The
顯示器17可以是各種具有顯示影像及色彩的功能的各種輸出裝置、螢幕或面板,例如但不限於:液晶顯示器(Liquid crystal display,LCD)、發光二極體顯示器(Light-emitting diode display,LED display)、有機發光二極體顯示器(Organic LED display,OLED display)、微發光二極體顯示器(micro LED display)、電漿顯示器(Plasma Display Panel)、投影式
顯示器...等。顯示器17可用以依序顯示攝影機15擷取的多張影像IM,且在顯示該些影像IM的期間,同時顯示包含多個虛擬按鍵的虛擬鍵盤。
The
以下將以第2A-2C圖為例,說明第1圖所示的電子裝置1的操作細節,其中第2A圖例示了電子裝置1如何辨識一虛擬鍵盤KBD上之按壓,第2B圖例示了電子裝置1擷取多張連續影像IM的環境,且第2C圖例示了顯示器17所顯示的影像。第2A-2C圖所示內容僅是為了舉例說明本發明的實施例,而非為了限制本發明。
The following will take Figures 2A-2C as an example to illustrate the operation details of the
參照第2A圖,在電子裝置1辨識虛擬鍵盤KBD上之按壓之流程2中,首先,電子裝置1的攝影機15擷取多張連續的影像IM(標示為操作201),且該些影像IM可被儲存至儲存器13。參照第2B圖,攝影機15可以被設置在電子裝置1上,且其鏡頭面對使用者USR的手部,以在一時間區間內針對使用者USR的手部姿態擷取多張連續的影像IM。在某些實施例中,在攝影機15的鏡頭仍面對使用者USR的手部的情況下,攝影機15可以不設置在電子裝置1上,而是透過一有線或無線的方式與電子裝置1連結。
Referring to Figure 2A, in the
如同第2C圖所示,每當攝影機15擷取一影像IM時,處理器11可將該影像IM顯示於顯示器17上。另外,在顯示器17依序顯示多張連續的影像IM的期間,可同時顯示包含多個虛擬按鍵VK的虛擬鍵盤KBD。根據不同的需求,虛擬鍵盤KBD可以有不同的形式以及不同數量的虛擬按鍵VK,並不以第2C圖所示內容為限。以第2B圖為例,顯示器17可以設置在電子裝置1上,以供使用者USR觀看。然而,在某些實施例中,在使用者USR仍可觀看到顯示器17的顯示內容的情況下,顯示器17也可以不設置在電子裝置1上,而是透過一有線或無線的方式與電子裝置1連結。
As shown in FIG. 2C, whenever the
使用者USR可以根據顯示器17的顯示畫面來確認自己的手與虛擬鍵盤KBD的相對位置,進而移動手的位置或手指的位置來針對某一個虛擬按鍵VK進行按壓。因此,透過攝影機15與顯示器17,使用者USR可在不觸碰任何實體的設備或元件的情況下,操作虛擬鍵盤KBD。
The user USR can confirm the relative position of his hand and the virtual keyboard KBD according to the display screen of the
繼續參照第2A圖,在完成操作201後,處理器11可根據該多張連續的影像IM,基於第k個虛擬按鍵VK的位置,產生與第k個虛擬按鍵VK對應的一按鍵平均差分圖(標示為操作203),其中k為介於1~j的正整數,且j為虛擬鍵盤KBD所包含的虛擬按鍵VK的總數。
Continuing to refer to FIG. 2A, after completing
在操作203中,處理器11可先確認多張影像IM是否是灰階影像,若不是的話,處理器11會將該多張影像IM轉換為灰階影像。接著,在某些實施例中,處理器11可以基於第k個虛擬按鍵VK的位置來裁切該多張連續的灰階影像,以取得與第k個虛擬按鍵VK相對應的一組連續的按鍵影像,其中該組按鍵影像具有相同的影像尺寸。以第3C圖為例,與虛擬按鍵VK1相對應的該組按鍵影像具有相同的尺寸SZ1,且尺寸SZ1大於虛擬按鍵VK1的影像尺寸,而與虛擬按鍵VK2相對應的該組按鍵影像具有相同的尺寸SZ2,且尺寸SZ2大於虛擬按鍵VK2的影像尺寸。
In
接著,處理器11可根據該組連續的按鍵影像產生與第k個虛擬按鍵VK對應的一張按鍵平均差分圖,其中該按鍵平均差分圖的影像尺寸與該組連續的按鍵影像的影像尺寸相同,且大於或等於第k個虛擬按鍵VK的影像尺寸。舉例而言,處理器11可針對該組連續的按鍵影像中對應相同位置的每一組像素值計算一個平均差分值(standard deviation),並將這些平均差分值依照對應的像素位置組合成第k個虛擬按鍵VK的按鍵平均差分圖。 Then, the processor 11 may generate a key average difference map corresponding to the k-th virtual key VK according to the group of continuous key images, wherein the image size of the key average difference map is the same as the image size of the group of continuous key images , And greater than or equal to the image size of the k-th virtual key VK. For example, the processor 11 may calculate an average difference value (standard deviation) for each group of pixel values corresponding to the same position in the group of consecutive button images, and combine these average difference values into the kth according to the corresponding pixel positions. The average difference map of the virtual keys VK.
另外,在某些其他的實施例中,處理器11也可以先基於該多張連續的灰階影像計算一張影像平均差分圖,也就是,處理器11先針對該多張連續的灰階影像中對應相同位置的每一組像素值計算一個平均差分值,並將這些平均差分值依照對應的像素位置組合成該影像平均差分圖,然後將該影像平均差分圖儲存至儲存器13。然後,處理器11基於第k個虛擬按鍵VK的位置來裁切該影像平均差分圖,以取得與第k個虛擬按鍵VK對應的一張按鍵平均差分圖,其中該按鍵平均差分圖的影像尺寸可大於或等於第k個虛擬按鍵VK的影像尺寸。在這些實施例中,因首次執行操作203時,處理器11就已將該影像平均差分圖儲存至儲存器13,故當需要再次執行操作203時,便可不用重複計算該影像平均差分圖,而只需基於其他虛擬按鍵VK的位置來裁切該影像平均差分圖,就可以產生對應的按鍵平均差分圖。
In addition, in some other embodiments, the processor 11 may first calculate an image average difference map based on the multiple continuous gray-scale images, that is, the processor 11 first calculates an image average difference map based on the multiple continuous gray-scale images. An average difference value is calculated for each group of pixel values corresponding to the same position in the corresponding pixel position, and these average difference values are combined into the image average difference map according to the corresponding pixel positions, and then the image average difference map is stored in the storage 13. Then, the processor 11 cuts the image average difference map based on the position of the k-th virtual button VK to obtain a button average difference map corresponding to the k-th virtual button VK, wherein the image size of the button average difference map is It can be greater than or equal to the image size of the k-th virtual key VK. In these embodiments, since the processor 11 has already stored the image average difference map in the storage 13 when the
在某些實施例中,每一個按鍵平均差分圖的長與寬可以各是與其對應的虛擬按鍵VK1的長與寬的三倍。在某一按鍵平均差分圖的影像尺寸超出影像IM的邊界的情況下,可以將超出的像素值皆設定為一預設值(例如「0」)。 In some embodiments, the length and width of each key average difference map may be three times the length and width of the corresponding virtual key VK1. In the case that the image size of a key average difference map exceeds the boundary of the image IM, the excess pixel values can be set to a preset value (for example, "0").
繼續參照第2A圖,在某些實施例中,在完成操作203之後,處理器11可以執行操作205與操作207,以決定是否要透過影像分類模型MD來分析與第k個虛擬按鍵對應的按鍵平均差分圖。詳言之,在操作205中,處理器11可以二值化(binarizing)該按鍵平均差分圖,以產生一二值化按鍵平均差分圖。以灰階影像為例,處理器11可以將該按鍵平均差分圖中大於一二值化門檻值(例如「127」)的那些像素值調整為上極值「1」,且將該按鍵平均差分圖中不大於該二值化門檻值的那些像素值調整為下極值「0」,藉此產
生該二值化按鍵平均差分圖。
Continuing to refer to FIG. 2A, in some embodiments, after completing
接著,在操作207中,處理器11可判斷該二值化按鍵平均差分圖的像素值之平均值(即,將二值化按鍵平均差分圖的像素值總和除以像素數量所產生的值)是否大於一動量門檻值(例如「0.5」)。若是,則表示相對應的虛擬按鍵VK可能剛被使用者USR按壓,故接著執行操作209;若否,則表示相對應的虛擬按鍵VK可能沒有被使用者USR按壓,故使當下的k值加一,然後再次執行操作203(也就是,產生下一個虛擬按鍵的按鍵平均差分圖)。透過操作205和207,可以先粗略地將可能沒有被按壓的虛擬按鍵的剔除,以節省執行操作209的次數,進而降低計算量,提升計算效率。換言之,可透過判斷每一個虛擬按鍵VK的二值化按鍵平均差分圖的像素值之平均值是否大於一動量門檻值,來決定是否需要透過影像分類模型MD來分析該虛擬按鍵VK的按鍵平均差分圖。
Then, in
在某些其他的實施例中,在完成操作203之後,處理器11可以不執行操作205,且操作207可以替換成:處理器11判斷與第k個虛擬按鍵VK相對應的按鍵平均差分圖之像素的總和或平均值是否大於一動量門檻值,並以此來決定是否分析該按鍵平均差分圖。
In some other embodiments, after the
在某些實施例中,在完成操作203之後,處理器11可以不執行操作205與操作207,而是直接執行操作209。
In some embodiments, after completing
在操作209中,處理器11可透過儲存器13所儲存的影像分類模型MD來分析與第k個虛擬按鍵對應的按鍵平均差分圖。詳言之,處理器11可以將與第k個虛擬按鍵對應的按鍵平均差分圖輸入預先透過機器訓練而產生的影像分類模型MD,並根據影像分類模型MD的分類結果,判斷第k
個虛擬按鍵是否被按壓。
In
在某些實施例中,影像分類模型MD可以是以多張非按壓按鍵平均差分圖以及多張按壓按鍵平均差分圖作為機器學習之訓練資料集而建立的。該機器學習可以透過例如但不限於卷積神經網路(Convolutional Neural Network,CNN)、支援向量機模型(Support Vector Machine Model)、循環神經網路模型(Recurrent Neural Network Model)等方式來實現。舉例而言,可在卷積神經網路中使用輕量型六層卷積層搭配全連結層與SoftMax分類層來建立影像分類模型MD。 In some embodiments, the image classification model MD may be established by using multiple non-pressed button average difference maps and multiple pressed button average difference maps as a training data set for machine learning. The machine learning can be implemented by means such as but not limited to Convolutional Neural Network (CNN), Support Vector Machine Model (Support Vector Machine Model), Recurrent Neural Network Model (Recurrent Neural Network Model), etc. For example, a lightweight six-layer convolutional layer combined with a fully connected layer and a SoftMax classification layer can be used in a convolutional neural network to build an image classification model MD.
在某些實施例中,可由電子裝置1自行建立影像分類模型MD。舉例而言,可以預先反覆地由顯示器17隨機或按一預設規則顯示虛擬鍵盤KBD上的一個虛擬按鍵VK,並隨機或按一預設規則顯示一個1到10之間的數值,其中該數值代表使用者USR的手指之編號(舉例而言,「1」代表左手小拇指、「2」代表左手無名指、...、「10」代表右手小拇指等)。每當顯示器17顯示一個虛擬按鍵VK與1到10之間的一個數值,則使用者USR可將該數值所指定的手指移動到該虛擬按鍵VK的位置上,然後進行按壓,以便攝影機15擷取與該虛擬按鍵VK相對應的一組按壓按鍵影像。每當攝影機15擷取一組按壓按鍵影像,則處理器11便可根據該組按壓按鍵影像,計算與一虛擬按鍵VK相對應的按壓按鍵平均差分圖。類似地,每當顯示器17顯示一個虛擬按鍵VK與1到10之間的一個數值,則使用者USR可將該數值所指定的手指移動到該虛擬按鍵VK的位置上,但不進行按壓,以便攝影機15擷取與該虛擬按鍵VK相對應的一組非按壓按鍵影像。每當攝影機15擷取一組非按壓按鍵影像,則處理器11便可根據該組非按壓按鍵影像,計算與一虛擬按鍵
VK相對應的非按壓按鍵平均差分圖。在產生足夠的按壓按鍵平均差分圖以及非按壓按鍵平均差分圖之後,處理器11便可將這些按鍵平均差分圖作為訓練資料集來進行機器學習,以建立影像分類模型MD。根據不同的需求,非按壓按鍵平均差分圖之數量以及按壓按鍵平均差分圖之數量是可變動的。舉例而言,在某些實施例中,非按壓按鍵平均差分圖之數量可以是按壓按鍵平均差分圖之數量的至少三倍。
In some embodiments, the image classification model MD can be established by the
在某些實施例中,也可由外部裝置預先建立影像分類模型MD,並預先將其儲存至電子裝置1的儲存器13中。
In some embodiments, the image classification model MD can also be pre-built by an external device and stored in the storage 13 of the
繼續參照第2A圖,當處理器11完成操作209之後,可以接著判斷影像分類模型MD的分類結果是否為「0」(標示為操作211)。若分類結果為「0」,則表示第k個虛擬按鍵VK沒有被按壓,故使當下的k值加一,並重新執行操作203(也就是,產生下一個虛擬按鍵VK的按鍵平均差分圖)。若分類結果不為「0」,則表示第k個虛擬按鍵VK被使用者USR的某一根手指按壓了,故處理器11可產生第k個虛擬按鍵VK之對應內容(標示為操作213)。
Continuing to refer to FIG. 2A, after the processor 11 completes
第3圖例示了根據某些實施例之一種辨識虛擬鍵盤上之按壓的方法的示意圖。第3圖所示內容僅是為了舉例說明本發明的實施例,而非為了限制本發明。 Figure 3 illustrates a schematic diagram of a method for recognizing a press on a virtual keyboard according to some embodiments. The content shown in Figure 3 is only for illustrating the embodiments of the present invention, not for limiting the present invention.
參照第3圖,一種辨識虛擬鍵盤上之按壓的方法3可包含以下步驟:由一攝影機,擷取多張連續的影像(標示為步驟301);由一顯示器,依序顯示該多張連續的影像,且在顯示該多張連續的影像的期間,顯示包含多個虛擬按鍵的該虛擬鍵盤(標示為步驟303);由一處理器,根據該多張連
續的影像,針對各該多個虛擬按鍵產生一按鍵平均差分圖(標示為步驟305);以及由該處理器,透過一影像分類模型來分析該多個按鍵平均差分圖的全部或一部分,以判斷該多個虛擬按鍵中的哪一個被按壓(標示為步驟307)。
Referring to Figure 3, a
第3圖所示的步驟順序並非限制,在仍可以實施的情況下,第3圖所示的步驟順序可以任意被調整。 The order of the steps shown in Figure 3 is not a limitation, and the order of the steps shown in Figure 3 can be arbitrarily adjusted if it can still be implemented.
在某些實施例中,在步驟307中,該影像分類模型是一卷積神經網路模型、一支援向量機模型、與一循環神經網路模型其中之一。
In some embodiments, in
在某些實施例中,除了步驟301~307之外,辨識虛擬鍵盤上之按壓的方法3還可以包含以下步驟:每當產生該多個按鍵平均差分圖其中之一時,二值化該按鍵平均差分圖,以產生一二值化按鍵平均差分圖;以及判斷該二值化按鍵平均差分圖的像素值之平均值是否大於一預設門檻值,以決定是否透過該影像分類模型來分析與其相對應的按鍵平均差分圖。
In some embodiments, in addition to
在某些實施例中,其中該影像分類模型是以多張非按壓按鍵平均差分圖以及多張按壓按鍵平均差分圖作為機器學習之訓練資料集而建立的。 In some embodiments, the image classification model is established by using multiple non-pressed button average difference maps and multiple pressed button average difference maps as a training data set for machine learning.
在某些實施例中,其中各該多個按鍵平均差分圖的尺寸大於與其相對應的虛擬按鍵的影像尺寸。 In some embodiments, the size of the average difference map of each of the plurality of buttons is larger than the image size of the corresponding virtual button.
辨識虛擬鍵盤上之按壓的方法3基本上包含了與電子裝置1的上述所有實施例相對應的實施例。因此,除了辨識虛擬鍵盤上之按壓的方法3的上述實施例之外,辨識虛擬鍵盤上之按壓的方法3還可以包含其他實施例,而因本發明所屬技術領域中具有通常知識者可以根據上文針對電子
裝置1的說明而直接瞭解這些其他實施例,故不再贅述。
The
上述實施例只是舉例來說明本發明,而非為了限制本發明。任何針對上述實施例進行修飾、改變、調整、整合而產生的其他實施例,只要是本發明所屬技術領域中具有通常知識者不難思及的,都涵蓋在本發明的保護範圍內。本發明的保護範圍以申請專利範圍為準。 The above-mentioned embodiments are only examples to illustrate the present invention, but not to limit the present invention. Any other embodiments resulting from modification, change, adjustment, and integration of the above-mentioned embodiments, as long as those with ordinary knowledge in the technical field of the present invention are not difficult to think of, are covered by the protection scope of the present invention. The scope of protection of the present invention is subject to the scope of the patent application.
3‧‧‧辨識虛擬鍵盤上之按壓的方法 3‧‧‧The method of recognizing the press on the virtual keyboard
301、303、305、307‧‧‧步驟 301, 303, 305, 307‧‧‧ steps
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108141964A TW202121118A (en) | 2019-11-19 | 2019-11-19 | Electronic device and method for identifying press on virtual keyboard |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108141964A TW202121118A (en) | 2019-11-19 | 2019-11-19 | Electronic device and method for identifying press on virtual keyboard |
Publications (1)
Publication Number | Publication Date |
---|---|
TW202121118A true TW202121118A (en) | 2021-06-01 |
Family
ID=77516487
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW108141964A TW202121118A (en) | 2019-11-19 | 2019-11-19 | Electronic device and method for identifying press on virtual keyboard |
Country Status (1)
Country | Link |
---|---|
TW (1) | TW202121118A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI789283B (en) * | 2022-03-31 | 2023-01-01 | 群光電子股份有限公司 | Inputting system for children assisted teaching and teaching order inputting device thereof |
-
2019
- 2019-11-19 TW TW108141964A patent/TW202121118A/en unknown
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI789283B (en) * | 2022-03-31 | 2023-01-01 | 群光電子股份有限公司 | Inputting system for children assisted teaching and teaching order inputting device thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10001838B2 (en) | Feature tracking for device input | |
WO2021120834A1 (en) | Biometrics-based gesture recognition method and apparatus, computer device, and medium | |
US20160274788A1 (en) | Method and device for building virtual keyboard | |
US20110193778A1 (en) | Device and method for controlling mouse pointer | |
TWI471815B (en) | Gesture recognition device and method | |
WO2016206279A1 (en) | Touch control display device and touch control method therefor | |
TWI397840B (en) | A trajectory-based control method and apparatus thereof | |
CN103927000A (en) | Input apparatus, output apparatus, and storage medium | |
CN104714637B (en) | Polygonal gesture detection and interaction method, device and computer program product | |
TWI731442B (en) | Electronic apparatus and object information recognition method by using touch data thereof | |
WO2020215719A1 (en) | Keyboard-based operation processing method and apparatus, device, and medium | |
CN106919326A (en) | A kind of image searching method and device | |
Yin et al. | CamK: Camera-based keystroke detection and localization for small mobile devices | |
CN106155552A (en) | One is automatically adjusted font method and mobile terminal | |
TW202121118A (en) | Electronic device and method for identifying press on virtual keyboard | |
US9727233B2 (en) | Touch device and control method and method for determining unlocking thereof | |
US20210158031A1 (en) | Gesture Recognition Method, and Electronic Device and Storage Medium | |
Liang et al. | Turn any display into a touch screen using infrared optical technique | |
CN109670507A (en) | Image processing method, device and mobile terminal | |
US20150026626A1 (en) | Software keyboard input device, input method and electronic apparatus | |
TWI505173B (en) | System and method for improving recognition of a touch keyboard in an electronic device | |
US9189075B2 (en) | Portable computer having pointing functions and pointing system | |
US20170085784A1 (en) | Method for image capturing and an electronic device using the method | |
US20220050528A1 (en) | Electronic device for simulating a mouse | |
WO2019134606A1 (en) | Terminal control method, device, storage medium, and electronic apparatus |