TWI499937B - Remote control method and remote control device using gestures and fingers - Google Patents

Remote control method and remote control device using gestures and fingers Download PDF

Info

Publication number
TWI499937B
TWI499937B TW102137131A TW102137131A TWI499937B TW I499937 B TWI499937 B TW I499937B TW 102137131 A TW102137131 A TW 102137131A TW 102137131 A TW102137131 A TW 102137131A TW I499937 B TWI499937 B TW I499937B
Authority
TW
Taiwan
Prior art keywords
palm
finger
center
skin color
processor
Prior art date
Application number
TW102137131A
Other languages
Chinese (zh)
Other versions
TW201514764A (en
Inventor
Yu Cheng Fan
Original Assignee
Univ Nat Taipei Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Univ Nat Taipei Technology filed Critical Univ Nat Taipei Technology
Priority to TW102137131A priority Critical patent/TWI499937B/en
Publication of TW201514764A publication Critical patent/TW201514764A/en
Application granted granted Critical
Publication of TWI499937B publication Critical patent/TWI499937B/en

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Image Analysis (AREA)

Description

利用手勢與手指的遙控方法及遙控裝置Remote control method using gesture and finger and remote control device

本發明是有關於一種遙控方法,特別是指一種利用手勢與手指的遙控方法及遙控裝置。The invention relates to a remote control method, in particular to a remote control method and a remote control device using gestures and fingers.

滑鼠與鍵盤是傳統上操作電腦的主要工具,隨著電子科技的演進,操作電腦的工具逐漸多樣化地演進,例如:Wii使用陀螺儀感測器操作遊戲、Kinect使用結構光深度攝影機偵測使用者的全身動作變化來進行操控遊戲,以及使用觸控面板來操控手機或是平板電腦。The mouse and keyboard are the main tools for traditionally operating computers. With the evolution of electronic technology, the tools for operating computers have gradually evolved. For example, Wii uses gyroscope sensors to operate games, and Kinect uses structured light depth camera to detect The user's overall movement changes to control the game, and use the touch panel to control the phone or tablet.

電子科技進步至今,一般傳統的操控方法已經不能夠滿足大眾了,現代的人機介面(Human Computer Interface,HCI)越來越走向簡單化、直覺化及自然化,現有一種自然使用者介面(Natural User Interface,NUI)即是可以藉由人本身自然的行為(手勢或是語言)來與電子類產品互動的介面,其NUI與傳統方法最大的差別在於其使用上相當的直覺且不須要太多的學習即可輕鬆上手,適合任何年齡層的大眾使用。Since the advancement of electronic technology, the traditional control methods have not been able to satisfy the public. The modern Human Computer Interface (HCI) is becoming more and more simple, intuitive and natural. There is a natural user interface (Natural). User Interface (NUI) is the interface that can interact with electronic products through the natural behavior (gesture or language) of the person. The biggest difference between NUI and traditional methods is that they are quite intuitive and do not need too much. The learning is easy to use and is suitable for the public of any age.

以手勢為例而言,可區分為是否需於使用者手 上穿戴具有光源之手套的兩種類型方式,再透過攝影機擷取影像並經影像處理後,可分析出使用者的手勢並藉以操控電腦,然而,目前不需穿戴手套的方式,對於手勢的分析不夠精細,且多侷限於單手的操控,因此如何進行更精細的分析並適用到雙手的操控,就成為一值得研究的主題。Taking gestures as an example, it can be divided into whether it needs to be in the user's hand. Two types of gloves with light source are worn on the camera, and then the image is processed by the camera and processed by the image to analyze the user's gesture and manipulate the computer. However, the glove is not required to analyze the gesture. Not precise enough, and limited to one-handed manipulation, so how to perform more detailed analysis and apply to the manipulation of both hands becomes a subject worthy of study.

因此,本發明之目的,即在提供一種可適用雙手的利用手勢與手指的遙控方法及遙控裝置。Accordingly, it is an object of the present invention to provide a remote control method and a remote control device that utilize gestures and fingers that are applicable to both hands.

於是,本發明利用手勢與手指的遙控方法,由一遙控裝置配合一相連接的計算裝置執行,該遙控裝置包含一記憶體及一連接該記憶體的處理器,該記憶體儲存一程式碼,該處理器讀取該程式碼而執行該方法以輸出一縮放控制訊號,以控制該計算裝置所執行的一物件的大小,該方法包含以下步驟:Therefore, the present invention utilizes a remote control method of a gesture and a finger, and is executed by a remote control device in conjunction with a connected computing device. The remote control device includes a memory and a processor connected to the memory, and the memory stores a code. The processor reads the code and executes the method to output a zoom control signal to control the size of an object executed by the computing device. The method includes the following steps:

(A)該處理器自該計算裝置依序接收多張影像,並對每一影像進行後續步驟。(A) The processor sequentially receives a plurality of images from the computing device and performs subsequent steps for each image.

(B)該處理器對該影像中的二個不相重疊的偵測範圍進行膚色偵測,若該處理器於該二偵測範圍均偵測到一膚色區域,則進行後續步驟。(B) The processor performs skin color detection on the two non-overlapping detection ranges in the image. If the processor detects a skin color region in the two detection ranges, the subsequent steps are performed.

(C)該處理器對該二膚色區域分別進行形態分析,界定出每一膚色區域的一代表手掌的手掌區塊及一數量的代表單一手指的手指區塊,並判斷該數量是否等於2,若每一膚色區域的手指區塊的數量均等於2,則進行後續 步驟。(C) the processor separately performs morphological analysis on the two skin color regions, defining a palm block representing a palm of each skin color region and a number of finger blocks representing a single finger, and determining whether the number is equal to 2, If the number of finger blocks in each skin color area is equal to 2, follow-up step.

(D)該處理器計算每一手指區塊的長度,並判斷每一膚色區域中,是否長度較長的該手指區塊與長度較短的該手指區塊之長度比例均大於一比例閾值,若是,則根據該二手掌區塊的位置計算出該縮放控制訊號並輸出該縮放控制訊號至該計算裝置。(D) the processor calculates the length of each finger block, and determines whether the ratio of the length of the finger block and the shorter length of the finger block in each skin color region is greater than a proportional threshold. If yes, the zoom control signal is calculated according to the position of the second-hand palm block and the zoom control signal is output to the computing device.

較佳地,其中,步驟(D)中在判斷是否長度比例大於比例閾值之後,若判斷為是,則會將一計數器的數值加一,否則將該計數器的數值減一,而在計數器大於一計數閾值時,才計算及輸出該縮放控制訊號,否則回到步驟(A),其中,該計數器並設有一計數最大值,若該計數器之數值已等於該計數最大值,則該數值不再增加。Preferably, in step (D), after determining whether the length ratio is greater than the proportional threshold, if the determination is yes, the value of a counter is incremented by one, otherwise the value of the counter is decremented by one, and the counter is greater than one. When the threshold is counted, the zoom control signal is calculated and output, otherwise, the process returns to step (A), wherein the counter is further provided with a count maximum value, and if the counter value is equal to the count maximum value, the value is no longer increased. .

較佳地,其中,該計數最大值為該計數閾值的兩倍。Preferably, wherein the maximum value of the count is twice the threshold of the count.

較佳地,其中,步驟(C)中該形態分析是對該二膚色區域分別進行侵蝕濾波,將面積過小的部分濾除,得到二手掌區塊,再比對每一膚色區塊及對應的該手掌區塊之差異,得到每一膚色區塊中的至少一手指可能區域,最後再於該手指可能區域中進行連續膚色偵測,得到各手指區塊。Preferably, in the step (C), the morphological analysis is performed by performing erosion filtering on the two skin color regions, filtering out the area having too small area, obtaining the second hand palm block, and comparing each skin color block and corresponding The difference between the palm blocks is obtained by at least one finger possible area in each skin color block, and finally, the continuous skin color detection is performed in the possible area of the finger to obtain each finger block.

較佳地,其中,步驟(D)是先計算各該手掌區塊的一手掌中心,再計算該二手掌中心的距離的變化,並據以轉換為該縮放控制訊號,各該手掌中心的計算方式為:第一次計算或前次未計算該手掌中心時,計算各該手掌區 塊的幾何中心做為各該手掌中心;在前次已有計算出各該手掌中心時,則以前次各該手掌中心為基礎,先進行一第一方向的掃瞄,找出膚色區域的在第一方向上的二邊界點,並計算該二邊界點的中心點,藉此找到本次各該手掌中心的第一方向上的座標,接著依照第一方向掃描的結果進行第二方向的掃瞄,找出膚色區域的第二方向上的二邊界點,並計算其中心點,藉此找到本次各該手掌中心的第二方向上的座標,該第一方向上的座標及該第二方向上的座標,即定義為本次各該手掌中心座標,其中,該第一方向為水平方向及垂直方向其中的一方向,該第二方向為水平方向及垂直方向其中的另一方向。Preferably, in step (D), the palm center of each palm block is calculated first, and then the change of the distance of the second-hand palm center is calculated, and converted into the zoom control signal, and the calculation of each palm center is performed. The method is: when the palm of the hand is calculated for the first time or the previous time, the palm area is calculated. The geometric center of the block is used as the center of each of the palms; when the center of the palm has been calculated in the previous time, the center of the palm is used for the previous time, and a first direction scan is performed to find out the color of the skin region. a second boundary point in the first direction, and calculating a center point of the two boundary points, thereby finding a coordinate in the first direction of the center of each of the palms, and then performing a second direction sweep according to the result of the scanning in the first direction Sighting, finding the two boundary points in the second direction of the skin color region, and calculating the center point thereof, thereby finding the coordinates in the second direction of the center of the palms, the coordinates in the first direction and the second The coordinates in the direction are defined as the center coordinates of the palms, wherein the first direction is one of a horizontal direction and a vertical direction, and the second direction is the other of the horizontal direction and the vertical direction.

於是,本發明利用手勢與手指的遙控裝置,包含一記憶體及一連接該記憶體的處理器,該記憶體儲存一程式碼,該處理器讀取並執行該程式碼,並配合一相連接的計算裝置執行所述利用手勢與手指的遙控方法。Therefore, the present invention utilizes a gesture and finger remote control device, including a memory and a processor connected to the memory, the memory stores a code, the processor reads and executes the code, and cooperates with a phase connection. The computing device performs the remote control method using gestures and fingers.

本發明之功效在於:由於本發明可透過偵測手指區塊及手掌區塊,細緻地偵測出手指的形態,再分析手指區塊的長度來判定是否輸出縮放控制訊號,使得使用者能便利的使用雙手進行縮放的操控。The effect of the invention is that: the invention can detect the shape of the finger by detecting the finger block and the palm block, and then analyze the length of the finger block to determine whether to output the zoom control signal, so that the user can conveniently Use the two-handed zoom control.

1‧‧‧遙控裝置1‧‧‧Remote control

11‧‧‧記憶體11‧‧‧ memory

12‧‧‧處理器12‧‧‧ Processor

2‧‧‧攝影機2‧‧‧ camera

3‧‧‧螢幕3‧‧‧ screen

31‧‧‧偵測範圍31‧‧‧Detection range

4‧‧‧計算裝置4‧‧‧ Computing device

S1-S8‧‧‧步驟S1-S8‧‧‧ steps

S41-S47‧‧‧步驟S41-S47‧‧‧Steps

S71-S78‧‧‧步驟S71-S78‧‧‧Steps

P1‧‧‧前次手掌中心P1‧‧‧ Previous Palm Center

P2‧‧‧水平中心點P2‧‧‧ horizontal center point

P3‧‧‧垂直中心點P3‧‧‧ vertical center point

本發明之其他的特徵及功效,將於參照圖式的較佳實施例詳細說明中清楚地呈現,其中:圖1是一方塊圖,說明本發明利用手勢與手指的遙控方法的一較佳實施例; 圖2是一流程圖,說明該較佳實施例;圖3是一示意圖,說明一螢幕顯示二偵測範圍;圖4是一示意圖,說明於其中一偵測範圍中所偵測到的一膚色區域;圖5是一流程圖,說明步驟S4的子步驟;圖6是一示意圖,說明偵測到的一手掌區塊;圖7是一示意圖,說明於該膚色區域四周所畫之九宮格,用於手指掃瞄;圖8是一示意圖,說明於該手掌區塊四周所畫之九宮格,用於手指掃瞄;圖9是一示意圖,說明垂直方向的手指掃瞄;圖10是一示意圖,說明水平方向的手指掃瞄;圖11是一示意圖,說明判定的各手指區塊的起點與終點;圖12是一示意圖,說明該手掌區塊之中心的更新方式;圖13是一示意圖,說明該較佳實施例的使用狀態;圖14是一流程圖,說明步驟S7的子步驟;及圖15是一座標圖,說明一計數器的運作方式。Other features and advantages of the present invention will be apparent from the following detailed description of the preferred embodiments of the accompanying drawings. FIG. 1 is a block diagram illustrating a preferred embodiment of the present invention utilizing a gesture and finger remote control method. example; 2 is a flow chart illustrating the preferred embodiment; FIG. 3 is a schematic diagram showing a screen display two detection ranges; and FIG. 4 is a schematic diagram illustrating a skin color detected in one of the detection ranges Figure 5 is a flow chart illustrating the sub-steps of step S4; Figure 6 is a schematic diagram illustrating the detected palm block; Figure 7 is a schematic diagram showing the nine squares painted around the skin color region, FIG. 8 is a schematic diagram illustrating a nine-square grid drawn around the palm block for finger scanning; FIG. 9 is a schematic diagram illustrating a vertical finger scan; FIG. 10 is a schematic diagram illustrating a horizontal direction finger scan; FIG. 11 is a schematic diagram illustrating the determined start and end points of each finger block; FIG. 12 is a schematic diagram illustrating the update manner of the center of the palm block; FIG. 13 is a schematic diagram illustrating the The state of use of the preferred embodiment; FIG. 14 is a flow chart illustrating the sub-steps of step S7; and FIG. 15 is a diagram illustrating the operation of a counter.

參閱圖1至圖3,本發明利用手勢與手指的遙控方法之較佳實施例,由一遙控裝置1配合一攝影機2、一螢幕3及一計算裝置4執行,該遙控裝置1包含一儲存一程式碼的記憶體11及一連接該記憶體11的處理器12。在本實施 例中,該遙控裝置1是一數位晶片,安裝於該計算裝置4中而與該計算裝置4連接,該計算裝置4並分別與該攝影機2及該螢幕3連接,但不以此為限,也可以是將該方法編譯為程式軟體,而由該計算裝置4執行,但以數位晶片的方式可以有較佳的運算速度。該遙控裝置1的該處理器12讀取並執行該程式碼以輸出一縮放控制訊號至該計算裝置4,用以控制該計算裝置4所執行之一物件(未圖示)的大小,該物件例如是一圖片、一影片、一文字或一軟體使用介面等等,該物件本身並非本發明重點,而只是一受控之標的。該方法包含以下步驟:Referring to FIG. 1 to FIG. 3, the preferred embodiment of the present invention utilizes a remote control device for gestures and fingers. The remote control device 1 is implemented by a camera 2, a screen 3, and a computing device 4. The remote control device 1 includes a storage device. The memory 11 of the code and a processor 12 connected to the memory 11. In this implementation For example, the remote control device 1 is a digital chip, and is connected to the computing device 4 and connected to the computing device 4. The computing device 4 is connected to the camera 2 and the screen 3 respectively, but not limited thereto. It is also possible to compile the method into a program software, which is executed by the computing device 4, but may have a better computing speed in the form of a digital chip. The processor 12 of the remote control device 1 reads and executes the code to output a zoom control signal to the computing device 4 for controlling the size of an object (not shown) executed by the computing device 4, the object For example, a picture, a movie, a text or a software use interface, etc., the object itself is not the focus of the present invention, but only a controlled subject. The method includes the following steps:

步驟S1一該處理器12依序接收該攝影機2所擷取的多張影像,並對每一影像進行後續步驟。Step S1: The processor 12 sequentially receives the plurality of images captured by the camera 2, and performs subsequent steps for each image.

步驟S2一該處理器12對該影像中二個不相重疊的偵測範圍31進行膚色偵測。詳細而言,該處理器12預先定義該二偵測位置的初始範圍大小及位置,並傳送到該計算裝置4,該計算裝置4於該螢幕3輸出該攝影機2所擷取的影像,並該影像上疊合顯示該二個偵測範圍31(實際操作中狀況可參閱圖13)所在的區域,並提示使用者將雙手伸入該二偵測範圍31,而該處理器12持續對該二偵測範圍31進行膚色偵測。Step S2: The processor 12 performs skin color detection on the two non-overlapping detection ranges 31 in the image. In detail, the processor 12 pre-defines the initial range size and location of the two detection locations, and transmits the image to the computing device 4, and the computing device 4 outputs the image captured by the camera 2 on the screen 3, and The image overlays the area where the two detection ranges 31 (see FIG. 13 in actual operation), and prompts the user to extend the two hands into the two detection ranges 31, and the processor 12 continues to The second detection range 31 performs skin color detection.

補充說明的是,該處理器12是先進行前景偵測,再對前景部分的畫素進行膚色偵測,在本實施例中,是使用漸進式背景影像生成法(Progressive Background Image Generation)(參閱李宗熹,基於移動 物件偵測實現二維對三 維視訊轉換技術與晶片設計 ,碩士論文,國立台北科技大學,台北,2012)進行前景偵測,並使用YCB CR 色彩空間的CB 與CR 分量來判斷是否為膚色(參閱Wu Yueming,He Hanwu,Ru Tong,and Zheng Detao,“Hand Segmentation for Augmented Reality System,”Second Workshop on Digital Media and its Application in Museum & Heritages ,Chongqing,China,December,2007,pp.395-401.),前景偵測及膚色偵測非本發明重點,在此不再贅述。It should be noted that the processor 12 performs foreground detection and then performs skin color detection on the pixels in the foreground portion. In this embodiment, progressive background image generation is used (see: Progressive Background Image Generation). Li Zongxi, moving object detection based on two-dimensional realization of 3D video conversion technology and chip design, master's thesis, National Taipei University of technology, Taipei, 2012) foreground detection, and use C B and C YC B C R color space The R component is used to determine whether it is skin color (see Wu Yueming, He Hanwu, Ru Tong, and Zheng Detao, "Hand Segmentation for Augmented Reality System," Second Workshop on Digital Media and its Application in Museum & Heritages , Chongqing, China, December, 2007, pp. 395-401.), foreground detection and skin color detection are not the focus of the present invention and will not be described herein.

步驟S3一該處理器12若於該二偵測範圍31均偵測到一膚色區域(如圖4中反白的手形區域),則進行後續步驟,否則回到步驟S1。詳細而言,本步驟還包括進行雙手偵測的起始步驟,起始步驟是用於確認是否開始後續步驟,因此該膚色區域必須持續存在一段時間,在本實施例中,該計算裝置4除了於該螢幕3上提示使用者將雙手移至偵測範圍31,還提示使用者將雙手向前「推」,做出一個「推動」的動作,而該處理器12則利用有限狀態機(Finite State Machine)的演算法來偵測該膚色區域的面積是否先逐漸增加,然後又逐漸減少,若是,才進行後續步驟。但不以上述方式為限,也可以在偵測到膚色區域後立即進行後續步驟。Step S3: If the processor 12 detects a skin color region (such as the reversed hand region in FIG. 4) in the two detection ranges 31, the subsequent steps are performed; otherwise, the process returns to step S1. In detail, the step further includes an initial step of performing two-hand detection, and the initial step is for confirming whether to start the subsequent step, and therefore the skin color region must continue to exist for a period of time. In this embodiment, the computing device 4 In addition to prompting the user to move his or her hands to the detection range 31 on the screen 3, the user is also prompted to "push" his hands forward to make a "push" action, and the processor 12 utilizes a finite state. The algorithm of the Fine State Machine detects whether the area of the skin color area is gradually increased first, then gradually decreases, and if so, the subsequent steps are performed. However, it is not limited to the above manner, and the subsequent steps can be performed immediately after the skin color region is detected.

其中,上述利用有限狀態機的方式為,偵測該膚色區域的面積連續增加達三次或超過三次之後,又連續減少三次,此時即判定已做出推動的動作。需說明的是,判定做出推動的動作後,該偵測範圍31的位置可能會有變 化,且再回到本步驟時不再進行上述起始步驟中推動動作的偵測,除非該偵測範圍31被重置,參考後述之步驟S47。接下來說明後續步驟。Wherein, the finite state machine is used to detect that the area of the skin color region is continuously increased by three times or more than three times, and then continuously decreased by three times. At this time, it is determined that the pushing action has been made. It should be noted that the position of the detection range 31 may change after the action of the push is determined. When it is returned to this step, the detection of the push action in the above initial step is not performed, unless the detection range 31 is reset, refer to step S47 described later. Next, the next steps are explained.

步驟S4─該處理器12對該二膚色區域分別進行形態分析,界定出每一膚色區域的一代表手掌的手掌區塊及一數量的代表單一手指的手指區塊。Step S4 - The processor 12 performs morphological analysis on the two skin color regions respectively, and defines a palm block representing a palm of each skin color region and a number of finger blocks representing a single finger.

參閱圖5及圖6,詳細而言,本步驟需先進行移除手指(步驟S41)的動作,其方式是主要利用數位影像處理當中的型態濾波器(Morphological Filter)的斷開濾波器(Opening Filter)來將相對於手掌而言面積較小的手指濾除。至此,得到該手掌區塊(如圖6反白部分),其中,還計算該手掌區塊的一手掌中心(如圖6所圈示之位置),手掌中心的計算方式容後說明。Referring to FIG. 5 and FIG. 6 , in detail, in this step, the action of removing the finger (step S41 ) is first performed by using a disconnect filter of a Morphological Filter mainly used in digital image processing ( Opening Filter) to filter out the smaller area of the finger relative to the palm. At this point, the palm block is obtained (as shown in the reverse part of FIG. 6), wherein the palm center of the palm block is also calculated (as shown in FIG. 6), and the calculation method of the palm center is described later.

參閱圖5、7、8,接著,進行手指可能區域偵測(步驟S42),找出手指大致上所在的區域,換言之,即排除並非手指所在的區域。此步驟的目的是為了避免在後述連續性偵測的情況中產生誤判的情形。首先,以手掌中心為中心點,將膚色區域附近劃分成3×3的九宮格,如此則中央的E格即可第一個被排除。而後,比較膚色區域與手掌區塊,而將相同的部分排除,在如圖7、8的示例中,H格的手臂部分即被排除;如此,僅存的膚色區域是落在B、D格,除了可避免後續發生誤判,亦可節省計算時間、提高效率。Referring to Figures 5, 7, and 8, then, the possible area detection of the finger is performed (step S42), and the area where the finger is substantially located is found, in other words, the area where the finger is not located is excluded. The purpose of this step is to avoid a situation in which a false positive is generated in the case of the continuity detection described later. First, the center of the palm is centered, and the vicinity of the skin color area is divided into 3×3 nine-squares, so that the central E-square can be excluded first. Then, the skin color area and the palm block are compared, and the same part is excluded. In the example of FIGS. 7 and 8, the arm part of the H cell is excluded; thus, the only remaining skin color area falls in the B and D cells. In addition to avoiding subsequent misjudgments, it can also save computing time and improve efficiency.

參閱圖5、9、10,在找出手指可能區域後,便 針對這些手指可能區域進行手指掃瞄(步驟S43),為了適應使用者不同旋轉角度的手指,將掃描分為水平掃描與垂直掃描。首先對手指可能區域進行連續膚色的垂直掃瞄,以垂直的方向逐一判斷各畫素是否為膚色,且計算膚色畫素連續出現的數目,並判斷連續膚色數目是否有大於門檻值若否則排除之,藉此排除掉長度過短的雜訊。對於各種方式擺放角度的手部膚色影像,可得到如圖9中(a)至(f)的結果。在垂直掃瞄結束後,再以類似的方式進行水平掃瞄,可得到如圖10中(a)至(f)的結果,由圖中可以看出垂直掃描與水平掃描具有互相補足缺陷的特點。將兩種掃描結果的合併,並將畫素數量過的區塊排除,即為最終得到的多個手指區塊。Referring to Figures 5, 9, and 10, after finding out the possible areas of the finger, Finger scanning is performed on these possible finger regions (step S43), and the scanning is divided into horizontal scanning and vertical scanning in order to accommodate the fingers of the user at different rotation angles. First, a vertical scan of the continuous skin color is performed on the possible areas of the finger, and each pixel is judged to be the skin color one by one in the vertical direction, and the number of consecutive occurrences of the skin color pixels is calculated, and whether the number of consecutive skin colors is greater than the threshold value is determined. In order to eliminate the noise that is too short. For the hand skin color images of various angles, the results of (a) to (f) in Fig. 9 can be obtained. After the vertical scanning is finished, the horizontal scanning is performed in a similar manner, and the results of (a) to (f) in Fig. 10 can be obtained. It can be seen from the figure that the vertical scanning and the horizontal scanning have complementary defects. . Combine the two scan results and exclude the blocks with the number of pixels, which is the resulting multiple finger blocks.

參閱圖5、11,最後,計算各個手指區塊的起點與終點,其中,起點為各手指區塊中最接近該手掌中心的一點,終點為最遠離該手掌中心的一點。圖11中標示各起點與終點的連線,連線長度代表各起點與對應各終點的距離,也代表各該手指區塊的長度。接著會進入步驟S5。Referring to Figures 5 and 11, finally, the start and end points of each finger block are calculated, wherein the start point is the point in the finger block closest to the center of the palm, and the end point is the point farthest from the center of the palm. In Fig. 11, the line connecting the starting point and the ending point is indicated, and the length of the line represents the distance between each starting point and the corresponding end point, and also represents the length of each finger block. Then it proceeds to step S5.

參閱圖5、12、13,需要說明的是,在第一次進行移除手指(步驟S41)的動作後,或前次未計算該手掌中心時,本步驟會計算手掌區塊的幾何中心,得到該手掌中心,而在前次已有計算出該手掌中心時,則是改用追蹤的方式減少計算量,其方式是以前次手掌中心P1為基礎(圖12(a)),先進行水平方向的掃瞄,找出膚色區域的左邊界與右邊界,並計算其水平中心點P2,藉此找到本次手掌中心 的水平座標(圖12(b)),接著依照水平掃描的結果進行垂直方向的掃瞄,找出膚色區域的上邊界與下邊界,並計算其垂直中心點P3,藉此找到本次手掌中心的垂直座標(圖12(c)),該水平中心座標與垂直中心座標,即定義為本次手掌中心的座標(即為P2所在)。Referring to Figures 5, 12, and 13, it should be noted that, after the first action of removing the finger (step S41), or when the center of the palm is not calculated, the step calculates the geometric center of the palm block. The center of the palm is obtained, and when the center of the palm has been calculated in the previous time, the amount of calculation is reduced by tracking, which is based on the previous palm center P1 (Fig. 12(a)), first level Sweep the direction, find the left and right borders of the skin color area, and calculate the horizontal center point P2 to find the center of the palm The horizontal coordinate (Fig. 12(b)), then scan in the vertical direction according to the result of the horizontal scan, find the upper and lower boundaries of the skin color region, and calculate the vertical center point P3, thereby finding the center of the palm The vertical coordinate (Fig. 12(c)), the horizontal center coordinate and the vertical center coordinate, which is defined as the coordinates of the center of the palm (that is, P2).

有了持續更新的手掌中心之後,便將該二偵測範圍31持續隨之更新(步驟S47),使該二偵測範圍31的中心移至新的手掌中心座標,如此便可持續使膚色區域落在偵測範圍31之中。需要說明的是,本步驟的更新會影響步驟S3的動作,在本實施例中,若有至少一偵測範圍31不再能偵測到膚色區域,則該偵測範圍31便會重置,回到原先預定的位置,並等待使用者進行「推動」的動作。After the palm center is continuously updated, the two detection ranges 31 are continuously updated (step S47), and the center of the two detection ranges 31 is moved to the new palm center coordinates, so that the skin color region can be continuously maintained. Falling within the detection range 31. It should be noted that the update of this step affects the action of step S3. In this embodiment, if at least one detection range 31 can no longer detect the skin color region, the detection range 31 is reset. Go back to the original reservation and wait for the user to "push".

參閱圖2、13,以下說明步驟S5。Referring to Figures 2 and 13, step S5 is explained below.

步驟S5─該處理器12計算手指區塊的數量,並判斷若每一膚色區域的手指區塊的數量均等於2,則進行步驟S6。Step S5 - The processor 12 calculates the number of finger blocks and determines that if the number of finger blocks of each skin color region is equal to 2, step S6 is performed.

步驟S6─該處理器12計算每一手指區塊的長度,進行步驟S7。Step S6 - The processor 12 calculates the length of each finger block, and proceeds to step S7.

步驟S7─該處理器12判斷每一膚色區域中,是否長度較長的與長度較短的該手指區塊,其長度比例大於一比例閾值,若是,則進入步驟S8啟動縮放功能,否則回到步驟S1。在本實施例中,該比例閾值為2,換言之,本步驟是判斷是否所伸出的該二手指中,長的手指是否超過短的手指的2倍。此方式是用以判斷所伸出的手指是否為 食指與拇指,因通常而言,較容易伸出的兩根手指的手勢之中,只有在伸出食指與拇指時其長度比例會達到2倍,其他的手勢不是難以伸出,便是手指長度較為接近。Step S7 - The processor 12 determines whether the length ratio of the finger block having a longer length and a shorter length in each skin color region is greater than a proportional threshold. If yes, the process proceeds to step S8 to start the zoom function, otherwise Step S1. In this embodiment, the ratio threshold is 2, in other words, this step is to determine whether the long finger is more than twice the length of the short finger among the two fingers that are extended. This method is used to judge whether the extended finger is Forefinger and thumb, because in general, the gesture of two fingers that are easier to reach out, the length ratio will be doubled when the index finger and thumb are extended. Other gestures are not difficult to extend, it is the length of the finger. Closer.

參閱圖14、15,進一步說明,由於使用者不見得會隨時保持手指與攝影機2的角度,影像中二手指的長度比例會變化,而需要容錯的機制。因此,在判斷是否長度比例大於比例閾值(步驟S71)之後,若判斷為是,則會將一計數器加一(步驟S73),否則將計數器減一(步驟S75),而在計數器大於一計數閾值時(步驟S76),才進行步驟S8中啟動縮放功能(步驟S77),否則回到步驟S1(步驟S78)。此外,該計數器並設有一計數最大值(步驟S72),避免計數器的數值過度增加後,需要過長時間才能反應出長度比例不再大於比例閾值的情形,在本實施例中該計數最大值為該比例閾值的2倍。類似的,計數器亦不應小於0(步驟S74),以便即時反應出長度比例大於比例閾值的情形。Referring to Figures 14 and 15, further explanation, since the user does not necessarily maintain the angle of the finger and the camera 2 at any time, the ratio of the length of the two fingers in the image changes, and a mechanism for fault tolerance is required. Therefore, after determining whether the length ratio is greater than the proportional threshold (step S71), if the determination is YES, a counter is incremented by one (step S73), otherwise the counter is decremented by one (step S75), and the counter is greater than a count threshold. At the time (step S76), the zoom function is started in step S8 (step S77), otherwise it returns to step S1 (step S78). In addition, the counter is further provided with a count maximum value (step S72). After the counter value is excessively increased, it takes a long time to reflect that the length ratio is no longer greater than the proportional threshold. In this embodiment, the maximum value is This ratio is twice the threshold. Similarly, the counter should not be less than 0 (step S74) to immediately reflect the case where the length ratio is greater than the proportional threshold.

如此一來,計數器的數值便會如圖15所示,首先在偵測到符合前述條件的正確手勢時,計數器的數值上升,超過了計數閾值,啟動縮放功能,然後數值不超過計數最大值。在手勢消失後,計數器的數值下降,降到了計數閾值以下,關閉縮放功能(不再進入步驟S8),並降至0為止。In this way, the value of the counter will be as shown in FIG. 15. First, when the correct gesture corresponding to the foregoing condition is detected, the value of the counter rises, exceeds the count threshold, and the zoom function is started, and then the value does not exceed the maximum value of the count. After the gesture disappears, the value of the counter drops, falls below the count threshold, turns off the zoom function (no longer proceeds to step S8), and falls to zero.

參閱圖2、13,以下說明步驟S8。Referring to Figures 2 and 13, step S8 is explained below.

步驟S8─計算並輸出該縮放控制訊號,以控制該計算裝置4所執行之該物件的大小。該處理器12是先記 錄目前的兩個手掌中心位置,計算兩者距離,並且若持續處在縮放功能,意即持續進入本步驟的情況下,則於該距離變大時,計算輸出一放大控制訊號,相反的,若該距離變小時,則計算輸出一縮小控制訊號。Step S8 - calculating and outputting the scaling control signal to control the size of the object executed by the computing device 4. The processor 12 is first remembered Record the current two palm center positions, calculate the distance between the two, and if it continues to be in the zoom function, that is, if you continue to enter this step, then when the distance becomes larger, calculate the output of an amplification control signal, on the contrary, If the distance becomes small, the output is reduced by a control signal.

前述該縮放控制訊號即包括該放大控制訊號及該縮小控制訊號。根據兩點距離計算該縮放控制訊號的方式為本領域技術人員所熟知,再此不再贅述。如此,該處理器12便能僅在使用者伸出特定手勢的情況下進行縮放,若使用者認為不需縮放時,只需不擺出該特定手勢即可,十分便利。The zoom control signal includes the amplification control signal and the reduction control signal. The manner of calculating the scaling control signal based on the two-point distance is well known to those skilled in the art and will not be described again. In this way, the processor 12 can zoom only when the user extends a specific gesture. If the user thinks that the zoom is not needed, it is convenient to not present the specific gesture.

綜上所述,由於本發明可透過偵測手指區塊及手掌區塊,細緻地偵測出手指的形態,再分析手指區塊的長度來判定是否輸出縮放控制訊號,並且具有容錯機制判斷,使得使用者能便利的使用雙手進行縮放的操控,故確實能達成本發明之目的。In summary, the present invention can detect the shape of the finger by detecting the finger block and the palm block, and then analyze the length of the finger block to determine whether to output the zoom control signal, and have a fault tolerance mechanism judgment. The user can conveniently use both hands to perform the manipulation of zooming, so that the object of the present invention can be achieved.

惟以上所述者,僅為本發明之較佳實施例而已,當不能以此限定本發明實施之範圍,即大凡依本發明申請專利範圍及專利說明書內容所作之簡單的等效變化與修飾,皆仍屬本發明專利涵蓋之範圍內。The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, that is, the simple equivalent changes and modifications made by the patent application scope and patent specification content of the present invention, All remain within the scope of the invention patent.

S1-S8‧‧‧步驟S1-S8‧‧‧ steps

Claims (3)

一種利用手勢與手指的遙控方法,由一遙控裝置配合一相連接的計算裝置執行,該遙控裝置包含一記憶體及一連接該記憶體的處理器,該記憶體儲存一程式碼,該處理器讀取該程式碼而執行該方法以輸出一縮放控制訊號,以控制該計算裝置所執行的一物件的大小,該方法包含以下步驟:(A)該處理器自該計算裝置依序接收多張影像,並對每一影像進行後續步驟;(B)該處理器對該影像中的二個不相重疊的偵測範圍進行膚色偵測,若該處理器於該二個不相重疊的偵測範圍均偵測到一膚色區域,也就是說,共偵測到二膚色區域,則進行後續步驟;(C)該處理器對該二膚色區域分別進行形態分析,也就是對該二膚色區域分別進行侵蝕濾波,作部分濾除,而界定出每一膚色區域的一代表手掌的手掌區塊,再比對每一膚色區塊及對應的該手掌區塊之差異,得到每一膚色區塊中的至少一手指可能區域,最後再於該手指可能區域中進行連續膚色偵測,而界定出每一膚色區域的一數量的代表單一手指的手指區塊,並判斷該數量是否等於2,若每一膚色區域的手指區塊的數量均等於2,也就是說,該處理器對該二膚色區域共界定出二個手掌區塊及四個手指區塊,則進行後續步驟;及(D)該處理器計算每一手指區塊的長度,並判斷每一 膚色區域中,是否長度較長的該手指區塊與長度較短的該手指區塊之長度比例均大於一比例閾值,若判斷為是,則會將一計數器的數值加一,否則將該計數器的數值減一,而在計數器大於一計數閾值時,則根據該二手掌區塊的位置計算出該縮放控制訊號並輸出該縮放控制訊號至該計算裝置,而在計數器不大於該計數閾值時,則回到步驟(A),其中,該計數器並設有一計數最大值,若該計數器之數值已等於該計數最大值,則該數值不再增加,該計數最大值為該計數閾值的兩倍。 A remote control method using gestures and fingers is performed by a remote control device in conjunction with a connected computing device, the remote control device comprising a memory and a processor connected to the memory, the memory storing a code, the processor Reading the code to execute the method to output a zoom control signal to control the size of an object executed by the computing device, the method comprising the steps of: (A) the processor sequentially receiving a plurality of sheets from the computing device Image, and performing subsequent steps for each image; (B) the processor performs skin color detection on the two non-overlapping detection ranges in the image, if the processor is in the two non-overlapping detections A range of skin regions is detected in the range, that is, a total of two skin regions are detected, and then a subsequent step is performed; (C) the processor separately performs morphological analysis on the two skin regions, that is, respectively Erosion filtering is performed to partially filter out, and a palm block representing each palm area is defined, and then each skin color block and the corresponding palm block are compared, and each is obtained. At least one finger possible area in the color block, and finally continuous skin color detection in the possible area of the finger, and defining a number of finger blocks representing a single finger of each skin color area, and determining whether the quantity is equal to 2, if the number of finger blocks in each skin color region is equal to 2, that is, the processor defines a total of two palm blocks and four finger blocks for the two skin color regions, then performing the following steps; (D) The processor calculates the length of each finger block and determines each In the skin color region, whether the length of the finger block and the short length of the finger block are greater than a proportional threshold, if the determination is yes, the value of a counter is incremented by one, otherwise the counter is The value is decremented by one, and when the counter is greater than a count threshold, the zoom control signal is calculated according to the position of the second-hand palm block and the zoom control signal is output to the computing device, and when the counter is not greater than the count threshold, Then, the process returns to step (A), wherein the counter is further provided with a count maximum value. If the counter value is equal to the count maximum value, the value is no longer increased, and the count maximum value is twice the count threshold value. 如請求項1所述利用手勢與手指的遙控方法,其中,步驟(D)是先計算各該手掌區塊的一手掌中心,再計算該二手掌中心的距離的變化,並據以轉換為該縮放控制訊號,各該手掌中心的計算方式為:第一次計算或前次未計算該手掌中心時,計算各該手掌區塊的幾何中心做為各該手掌中心;在前次已有計算出各該手掌中心時,則以前次各該手掌中心為基礎,先進行一第一方向的掃瞄,找出膚色區域的在第一方向上的二邊界點,並計算該二邊界點的中心點,藉此找到本次各該手掌中心的第一方向上的座標,接著依照第一方向掃描的結果進行第二方向的掃瞄,找出膚色區域的第二方向上的二邊界點,並計算其中心點,藉此找到本次各該手掌中心的第二方向上的座標,該第一方向上的座標及該第二方向上的座標,即定義為本次各該手掌中心座標,其中,該第一方向為水平方向及垂直方向其中的一方向,該第二方向為水 平方向及垂直方向其中的另一方向。 The remote control method using a gesture and a finger according to claim 1, wherein the step (D) is to first calculate a palm center of each of the palm blocks, and then calculate a change in the distance of the second-hand palm center, and convert the same to The control signal is scaled, and the calculation of each palm center is: when the first calculation or the previous calculation of the palm center is not performed, the geometric center of each palm block is calculated as the center of each palm; At the center of each palm, based on the previous palm center, a first direction scan is performed to find the two boundary points of the skin color region in the first direction, and the center point of the two boundary points is calculated. Thereby, finding the coordinates in the first direction of the center of the palm of the hand, and then scanning the second direction according to the result of the scanning in the first direction, finding the two boundary points in the second direction of the skin color region, and calculating a center point thereof, thereby finding a coordinate in the second direction of the center of the palm of the hand, the coordinate in the first direction and the coordinate in the second direction are defined as coordinates of the center of the palm of the hand, wherein The first The direction is one of a horizontal direction and a vertical direction, and the second direction is water The other direction is the flat direction and the vertical direction. 一種利用手勢與手指的遙控裝置,包含一記憶體及一連接該記憶體的處理器,該記憶體儲存一程式碼,該處理器讀取並執行該程式碼,並配合一相連接的計算裝置執行如請求項1至2中任一項所述利用手勢與手指的遙控方法。A remote control device using gestures and fingers includes a memory and a processor connected to the memory, the memory stores a code, the processor reads and executes the code, and cooperates with a connected computing device A remote control method using a gesture and a finger as described in any one of claims 1 to 2 is performed.
TW102137131A 2013-10-15 2013-10-15 Remote control method and remote control device using gestures and fingers TWI499937B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW102137131A TWI499937B (en) 2013-10-15 2013-10-15 Remote control method and remote control device using gestures and fingers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW102137131A TWI499937B (en) 2013-10-15 2013-10-15 Remote control method and remote control device using gestures and fingers

Publications (2)

Publication Number Publication Date
TW201514764A TW201514764A (en) 2015-04-16
TWI499937B true TWI499937B (en) 2015-09-11

Family

ID=53437639

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102137131A TWI499937B (en) 2013-10-15 2013-10-15 Remote control method and remote control device using gestures and fingers

Country Status (1)

Country Link
TW (1) TWI499937B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201120681A (en) * 2009-12-10 2011-06-16 Tatung Co Method and system for operating electric apparatus
CN102368290A (en) * 2011-09-02 2012-03-07 华南理工大学 Hand gesture identification method based on finger advanced characteristic
US20120200494A1 (en) * 2009-10-13 2012-08-09 Haim Perski Computer vision gesture based control of a device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120200494A1 (en) * 2009-10-13 2012-08-09 Haim Perski Computer vision gesture based control of a device
TW201120681A (en) * 2009-12-10 2011-06-16 Tatung Co Method and system for operating electric apparatus
CN102368290A (en) * 2011-09-02 2012-03-07 华南理工大学 Hand gesture identification method based on finger advanced characteristic

Also Published As

Publication number Publication date
TW201514764A (en) 2015-04-16

Similar Documents

Publication Publication Date Title
TWI464640B (en) Gesture sensing apparatus and electronic system having gesture input function
TWI579734B (en) 3d visualization
EP2631739B1 (en) Contactless gesture-based control method and apparatus
TWI489317B (en) Method and system for operating electric apparatus
US9329691B2 (en) Operation input apparatus and method using distinct determination and control areas
JP5991041B2 (en) Virtual touch screen system and bidirectional mode automatic switching method
TWI471755B (en) Device for operation and control of motion modes of electrical equipment
JP6618276B2 (en) Information processing apparatus, control method therefor, program, and storage medium
TWI515605B (en) Gesture recognizing and controlling method and device thereof
KR20100138602A (en) Apparatus and method for a real-time extraction of target's multiple hands information
TWI464692B (en) Method of identifying an operating object, method of constructing depth information of an operating object, and an electronic device
TWI528271B (en) Method, apparatus and computer program product for polygon gesture detection and interaction
TW201407420A (en) Improved video tracking
JP2014029656A (en) Image processor and image processing method
CN106598422B (en) hybrid control method, control system and electronic equipment
JP5558899B2 (en) Information processing apparatus, processing method thereof, and program
TWI499937B (en) Remote control method and remote control device using gestures and fingers
TWI448918B (en) Optical panel touch system
TWI444875B (en) Multi-touch input apparatus and its interface method using data fusion of a single touch sensor pad and imaging sensor
TW201500968A (en) Three-dimensional interactive system and interactive sensing method thereof
TWI757871B (en) Gesture control method based on image and electronic apparatus using the same
TWI435280B (en) Gesture recognition interaction system
US20150323999A1 (en) Information input device and information input method
CN114327229A (en) Image-based gesture control method and electronic device using same
TWI483141B (en) System and method for gesture recognition

Legal Events

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