CN109189232A - A kind of capacitance data acquisition device and its gesture identification method for gesture identification - Google Patents

A kind of capacitance data acquisition device and its gesture identification method for gesture identification Download PDF

Info

Publication number
CN109189232A
CN109189232A CN201811345259.4A CN201811345259A CN109189232A CN 109189232 A CN109189232 A CN 109189232A CN 201811345259 A CN201811345259 A CN 201811345259A CN 109189232 A CN109189232 A CN 109189232A
Authority
CN
China
Prior art keywords
capacitor
gesture
elements
resistor
key switch
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201811345259.4A
Other languages
Chinese (zh)
Other versions
CN109189232B (en
Inventor
安康
方聪聪
方玲玲
李欣荣
叶霞
孙亚萍
王李冬
安宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Aozhong Science And Trade Co ltd
Original Assignee
Qianjiang College of Hangzhou Normal University
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 Qianjiang College of Hangzhou Normal University filed Critical Qianjiang College of Hangzhou Normal University
Priority to CN201811345259.4A priority Critical patent/CN109189232B/en
Publication of CN109189232A publication Critical patent/CN109189232A/en
Application granted granted Critical
Publication of CN109189232B publication Critical patent/CN109189232B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/017Gesture based interaction, e.g. based on a set of recognized hand gestures

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Position Input By Displaying (AREA)

Abstract

The invention discloses a kind of capacitance data acquisition devices and its gesture identification method for gesture identification.Existing gesture identifying device is generally existing expensive, and the device is complicated, to the demanding problem of light.A kind of capacitance data acquisition device for gesture identification of the present invention, including capacitance signal collector and Acquisition Circuit.Capacitance signal collector includes metal foil, substrate and isolation board.Metal foil is fixed between substrate and isolation board.Acquisition Circuit includes main control module, power module and capacitance sensing module.The power module is master control module for power supply by voltage stabilizing chip.Main control module includes single-chip microcontroller, the first key switch, the first crystal oscillator and the second crystal oscillator.Capacitance sensing module includes capacitance sensor.The present invention can be realized to stone, scissors, cloth, and the gestures such as number 1,2,3,4,5 accurately identify.

Description

一种用于手势识别的电容数据采集装置及其手势识别方法A capacitive data acquisition device for gesture recognition and a gesture recognition method thereof

技术领域technical field

本发明属于手势识别技术领域,具体涉及一种用于手势识别的电容数据采集装置及其手势识别方法。The invention belongs to the technical field of gesture recognition, and in particular relates to a capacitance data acquisition device for gesture recognition and a gesture recognition method thereof.

背景技术Background technique

随着计算机的飞速发展,人们与计算机已经密不可分。而人机交互作为其中重要的一步,已经不满足于借助普遍的鼠标、键盘等外设装置。虽然,这些方式被广泛的应用和被人们所熟知。但是,人们仍追求于更简便,舒适且适合人类习惯的人机交互方式。因此,手势识别应运而生。With the rapid development of computers, people and computers have become inseparable. And human-computer interaction, as an important step, is no longer satisfied with the use of common peripheral devices such as mouse and keyboard. Although, these methods are widely used and well known. However, people are still pursuing a simpler, more comfortable and human-computer interaction method suitable for human habits. Therefore, gesture recognition came into being.

手势作为人与人交流沟通的方式之一,具有多样化,专一性的特点,为人机交互的进一步发展提供了可能。在交通安全方面,通过手势操作汽车内部的各种功能和数据,能将驾驶者的注意力充分的集中在面前的马路现状上,减少交通事故。在物联网发展上,手势识别能充分提高人与各个事物的交互。也同时为虚拟现实技术的实现提供了可能。然而现有的手势识别装置,像是数据手套,红外线识别装置,或是摄像头识别装置,都普遍存在价格昂贵,设备复杂,对光线要求高的问题。这违背了人们最初不接触和借助机械设备自然交互的初衷。因此需要考虑建立一种设备简单,高分辨率、抗噪性能强、经济适用的非接触式手势识别交互装置系统。Gesture, as one of the ways of human-to-human communication, has the characteristics of diversity and specificity, which provides the possibility for the further development of human-computer interaction. In terms of traffic safety, operating various functions and data inside the car through gestures can fully concentrate the driver's attention on the current road situation in front of him and reduce traffic accidents. In the development of the Internet of Things, gesture recognition can fully improve the interaction between people and various things. It also provides the possibility for the realization of virtual reality technology. However, the existing gesture recognition devices, such as data gloves, infrared recognition devices, or camera recognition devices, generally have the problems of high price, complicated equipment and high requirements on light. This defeats the original purpose of people interacting naturally without contact and with the help of mechanical devices. Therefore, it is necessary to consider establishing a non-contact gesture recognition interactive device system with simple equipment, high resolution, strong anti-noise performance, and economical application.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于提供一种用于手势识别的电容数据采集装置及其手势识别方法。The purpose of the present invention is to provide a capacitance data acquisition device for gesture recognition and a gesture recognition method thereof.

本发明一种用于手势识别的电容数据采集装置,包括电容信号采集器和采集电路。所述的电容信号采集器包括金属箔、基板和隔离板。所述的金属箔固定在基板与隔离板之间。所述的采集电路包括主控模块、电源模块和电容传感模块。所述的电源模块通过稳压芯片为主控模块供电。The present invention is a capacitive data acquisition device for gesture recognition, comprising a capacitive signal acquisition device and a acquisition circuit. The capacitive signal collector includes metal foil, substrate and isolation plate. The metal foil is fixed between the base plate and the isolation plate. The acquisition circuit includes a main control module, a power supply module and a capacitive sensing module. The power supply module supplies power to the main control module through a voltage regulator chip.

所述的主控模块包括单片机、第一电容C1、第二电容C2、第三电容C3、第四电容C4、第五电容C5、第一电阻R1、第二电阻R2、第一按键开关S1、第一晶振Y1和第二晶振Y2。单片机的复位引脚接第一电容C1、第一电阻R1及第一按键开关S1的一端。第一电容C1及第一按键开关S1的另一端均接地。第一电阻R1的另一端接电源模块的供电输出端。单片机的VDD引脚接电源模块的供电输出端,VSS引脚接地。单片机的两个外部晶振引脚与第一晶振Y1的两端分别相连,并与第二电容C2、第三电容C3的一端分别相连。第二电容C2及第三电容C3的另一端均接地。单片机的两个第二外部晶振引脚与第二电阻R2的两端分别相连,与第二晶振的两端分别相连,且与第四电容C4、第五电容C5的一端分别相连。第四电容C4及第五电容C5的另一端均接地。The main control module includes a single-chip microcomputer, a first capacitor C1, a second capacitor C2, a third capacitor C3, a fourth capacitor C4, a fifth capacitor C5, a first resistor R1, a second resistor R2, a first key switch S1, The first crystal oscillator Y1 and the second crystal oscillator Y2. The reset pin of the single-chip microcomputer is connected to one end of the first capacitor C1, the first resistor R1 and the first key switch S1. The other ends of the first capacitor C1 and the first key switch S1 are both grounded. The other end of the first resistor R1 is connected to the power supply output end of the power supply module. The VDD pin of the microcontroller is connected to the power supply output end of the power supply module, and the VSS pin is grounded. The two external crystal pins of the single-chip microcomputer are respectively connected to two ends of the first crystal oscillator Y1, and are respectively connected to one end of the second capacitor C2 and the third capacitor C3. The other ends of the second capacitor C2 and the third capacitor C3 are both grounded. The two second external crystal oscillator pins of the microcontroller are respectively connected to two ends of the second resistor R2, respectively connected to both ends of the second crystal oscillator, and respectively connected to one end of the fourth capacitor C4 and the fifth capacitor C5. The other ends of the fourth capacitor C4 and the fifth capacitor C5 are both grounded.

所述的电容传感模块包括电容传感器。所述电容传感器的SCL引脚接第四电阻R4的一端,SDA引脚接第三电阻R3的一端。第三电阻R3的另一端接单片机的第一I/O口。第四电阻R4的另一端接单片机的第二I/O口。电容传感器的PAD、GND、ADDR、SD及CLKIN引脚均接地,VDD引脚接第六电容C6、第七电容C7的一端及外部输入+5V电压。第六电容C6、第七电容C7的另一端均接地。电容传感器的IN0A引脚接第一电感L1及第八电容C8的一端,IN0B引脚接第一电感L1及第八电容C8的另一端。电容传感器的IN0A引脚作为电容传感模块的信号输入端,与金属箔电连接。The capacitive sensing module includes a capacitive sensor. The SCL pin of the capacitive sensor is connected to one end of the fourth resistor R4, and the SDA pin is connected to one end of the third resistor R3. The other end of the third resistor R3 is connected to the first I/O port of the microcontroller. The other end of the fourth resistor R4 is connected to the second I/O port of the microcontroller. The PAD, GND, ADDR, SD and CLKIN pins of the capacitive sensor are all grounded, and the VDD pin is connected to one end of the sixth capacitor C6, the seventh capacitor C7 and the external input +5V voltage. The other ends of the sixth capacitor C6 and the seventh capacitor C7 are both grounded. The IN0A pin of the capacitive sensor is connected to one end of the first inductor L1 and the eighth capacitor C8, and the IN0B pin is connected to the other end of the first inductor L1 and the eighth capacitor C8. The IN0A pin of the capacitive sensor is used as the signal input end of the capacitive sensing module and is electrically connected to the metal foil.

进一步地,所述的电源模块包括稳压芯片、第九电容C9、第十电容C10、第十一电容C11和第十二电容C12。稳压芯片的型号为AMS111。稳压芯片的VCC引脚接第九电容C9的正极、第十电容C10的一端及外部输入+5V电压VCC,OUT引脚接第十一电容C11的正极及第十二电容C12的一端。稳压芯片的GND引脚、第九电容C9、第十一电容C11的负极、第十电容C10及第十二电容C12的另一端均接地。稳压芯片的OUT引脚为电源模块的供电输出端。Further, the power supply module includes a voltage regulator chip, a ninth capacitor C9, a tenth capacitor C10, an eleventh capacitor C11 and a twelfth capacitor C12. The model of the voltage regulator chip is AMS111. The VCC pin of the voltage regulator chip is connected to the anode of the ninth capacitor C9, one end of the tenth capacitor C10 and the external input +5V voltage VCC, and the OUT pin is connected to the anode of the eleventh capacitor C11 and one end of the twelfth capacitor C12. The GND pin of the voltage regulator chip, the negative electrode of the ninth capacitor C9, the negative electrode of the eleventh capacitor C11, the other ends of the tenth capacitor C10 and the twelfth capacitor C12 are all grounded. The OUT pin of the voltage regulator chip is the power supply output end of the power supply module.

进一步地,所述的采集电路还包括LCD显示屏。所述LCD显示屏的型号为LCD12864。LCD显示屏的1及20引脚均接地,2及19引脚接外部输入5V电压,4、5、6、7、8、9、10、11、12、13、14、15、17引脚与单片机的第三I/O口至第十五I/O口分别相连。Further, the acquisition circuit also includes an LCD display screen. The model of the LCD display screen is LCD12864. The 1 and 20 pins of the LCD display are grounded, the 2 and 19 pins are connected to the external input 5V voltage, and the 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, and 17 pins It is connected with the third I/O port to the fifteenth I/O port of the microcontroller.

进一步地,所述的采集电路还包括按键操作模块。所述的按键操作模块包括第二按键开关S2、第三按键开关S3、第四按键开关S4、第五按键开关S5和第六按键开关S6。第二按键开关S2的一端接第九电阻R9的一端及单片机的第十六I/O口。第三按键开关S3的一端接第八电阻R8的一端及单片机的第十七I/O口。第四按键开关S4的一端接第七电阻R7的一端及单片机的第十八I/O口。第五按键开关S5的一端接第六电阻R6的一端及单片机的第十九I/O口。第六按键开关S6的一端接第五电阻R5的一端及单片机的第二十I/O口。第二按键开关S2、第三按键开关S3、第四按键开关S4、第五按键开关S5及第六按键开关S6的另一端均接地。第五电阻R5、第六电阻R6、第七电阻R7、第八电阻R8及第九电阻R9的另一端接外部输入+5V电压。Further, the acquisition circuit further includes a key operation module. The key operation module includes a second key switch S2, a third key switch S3, a fourth key switch S4, a fifth key switch S5 and a sixth key switch S6. One end of the second key switch S2 is connected to one end of the ninth resistor R9 and the sixteenth I/O port of the microcontroller. One end of the third key switch S3 is connected to one end of the eighth resistor R8 and the seventeenth I/O port of the microcontroller. One end of the fourth key switch S4 is connected to one end of the seventh resistor R7 and the eighteenth I/O port of the microcontroller. One end of the fifth key switch S5 is connected to one end of the sixth resistor R6 and the nineteenth I/O port of the microcontroller. One end of the sixth key switch S6 is connected to one end of the fifth resistor R5 and the twentieth I/O port of the microcontroller. The other ends of the second key switch S2, the third key switch S3, the fourth key switch S4, the fifth key switch S5 and the sixth key switch S6 are all grounded. The other ends of the fifth resistor R5, the sixth resistor R6, the seventh resistor R7, the eighth resistor R8 and the ninth resistor R9 are connected to an external input voltage of +5V.

进一步地,所述电容传感器U2的型号为FDC2214。Further, the model of the capacitive sensor U2 is FDC2214.

进一步地,所述单片机的型号为STM32F1。Further, the model of the single-chip microcomputer is STM32F1.

进一步地,所述的金属箔采用铜箔。Further, the metal foil is copper foil.

该用于手势识别的电容数据采集装置的手势识别方法如下:The gesture recognition method of the capacitive data acquisition device for gesture recognition is as follows:

步骤一、建立手势识别数据库,使用者将需要被识别的各个采样手势录入到数据库中。Step 1: Establish a gesture recognition database, and the user enters each sample gesture that needs to be recognized into the database.

1.1、将1赋值给i和j。1.1. Assign 1 to i and j.

1.2、使用者用手做出第i个采样手势,并放置到隔离板上,电容传感器采集金属箔输出的m个电容数据,并将采集到的m个电容数据转换为数字信号传输主控模块。m个电容数据分别为sij1,sij2,sij3,......,sijm。进入步骤1.3。1.2. The user makes the i-th sampling gesture by hand and places it on the isolation board. The capacitive sensor collects m capacitance data output by the metal foil, and converts the collected m capacitance data into digital signal transmission main control module . The m capacitance data are respectively s ij1 , s ij2 , s ij3 ,...,s ijm . Proceed to step 1.3.

1.3、若i<l,且j<n,则将j增大1,并执行步骤1.2;若i<l,且j=n,则将i增大1,并将1赋值给j,并重复执行步骤1.2;若i=l,且j=n,则进入行步骤1.4。l为需要输入的手势个数,n为每个手势的重复放置次数1≤n≤20。1.3. If i<l and j<n, increase j by 1, and execute step 1.2; if i<l and j=n, increase i by 1, assign 1 to j, and repeat Go to step 1.2; if i=l, and j=n, go to step 1.4. l is the number of gestures to be input, and n is the number of repetitions of each gesture 1≤n≤20.

1.4、将步骤1.1至1.3得到的电容数据整合为手势样本数据集S。1.4. Integrate the capacitance data obtained in steps 1.1 to 1.3 into a gesture sample dataset S.

步骤二、对手势样本数据集S内所有的元素进行归一化处理,得到归一化手势数据集SnorStep 2: Normalize all elements in the gesture sample dataset S to obtain a normalized gesture dataset S nor .

其中,smax为手势样本数据集S内数值最大的元素;smin为手势样本数据集S内数值最小的元素。in, s max is the element with the largest value in the gesture sample data set S; s min is the element with the smallest value in the gesture sample data set S.

步骤三、对归一化手势数据集Snor内的元素进行均值化处理,得到均值化手势数据集SaveStep 3: Perform an averaging process on the elements in the normalized gesture data set S nor to obtain an averaged gesture data set Save .

Save={{save,11,save,12,save,13,......,save,1m},{save,21,save,22,save,23,......,save,2m},......,{save,l1,save,l2,save,l3,......,save,lm}}S ave = {{s ave,11 ,s ave,12 ,s ave,13 ,......,s ave,1m },{s ave,21 ,s ave,22 ,s ave,23 ,. .....,s ave,2m },...,{s ave,l1 ,s ave,l2 ,s ave,l3 ,...,s ave,lm }}

其中, in,

步骤四、将归一化手势数据集Snor内的l·m个元素按照从小到大的顺序依次排序。Step 4: Sort the l·m elements in the normalized gesture dataset Snor in order from small to large.

步骤五、取归一化手势数据集Snor的中间元素作为汇聚元素。一个含有z个元素的集合的中间元素为该集合的第个元素;为0.5×z向上取整所得值。汇聚元素将归一化手势数据集Snor分隔为两个第一中间集合。将1赋值给a。Step 5: Take the intermediate element of the normalized gesture dataset Snor as the aggregation element. The middle element of a set of z elements is the th elements; The resulting value is rounded up to 0.5×z. The pooled element separates the normalized gesture dataset Snor into two first intermediate sets. Assign 1 to a.

步骤六、将所有第a中间集合的中间元素均作为第a+1中间元素。第a+1中间元素称为对应的第a中间元素的子元素。在同一个第a中间集合内两个第a+1中间元素互为兄弟元素。Step 6: Take all the intermediate elements of the a-th intermediate set as the a+1-th intermediate elements. The a+1-th intermediate element is called a child element of the corresponding a-th intermediate element. Two a+1-th intermediate elements in the same a-th intermediate set are siblings of each other.

若一个第a中间集合内的元素个数大于或等于5,对应的第a+1中间元素将该第a中间集合分割为两个第a+1中间集合。If the number of elements in an a-th intermediate set is greater than or equal to 5, the corresponding a+1-th intermediate element divides the a-th intermediate set into two a+1-th intermediate sets.

若一个第a中间集合内的元素个数等于4,对应的第a+1中间元素将该第a中间集合分割为一个终端元素和一个第a+1中间集合。该终端元素为对应第a+1中间元素的子元素。If the number of elements in an a-th intermediate set is equal to 4, the corresponding a+1-th intermediate set divides the a-th intermediate set into a terminal element and a a+1-th intermediate set. The terminal element is a child element corresponding to the a+1-th intermediate element.

若一个第a中间集合内的元素个数等于3,对应的第a+1中间元素将该第a中间集合分割为两个终端元素。该两个终端元素均为对应第a+1中间元素的子元素。If the number of elements in an a-th intermediate set is equal to 3, the corresponding a+1-th intermediate element divides the a-th intermediate set into two terminal elements. The two terminal elements are sub-elements corresponding to the a+1-th intermediate element.

若一个第a中间集合内的元素个数等于2,该第a中间集合内除第a+1中间元素外的那个元素为终端元素。该终端元素为对应第a+1中间元素的子元素。If the number of elements in an a-th intermediate set is equal to 2, the element in the a-th intermediate set except the a+1-th intermediate element is the terminal element. The terminal element is a child element corresponding to the a+1-th intermediate element.

进入步骤七。Go to step seven.

步骤七、若第a+1中间集合存在,则将a增大1,并重复执行步骤六;否则,进入步骤八。Step 7: If the a+1th intermediate set exists, increase a by 1, and repeat step 6; otherwise, go to step 8.

步骤八、使用者将手做成一个待识别的手势,并将手贴合到放置板上。将金属箔输出的多个被识别电容数据取均值,得到被识别电容平均数据x′。Step 8: The user makes a hand gesture to be recognized, and attaches the hand to the placing board. A plurality of identified capacitance data output from the metal foil are averaged to obtain the identified capacitance average data x'.

步骤九、计算步骤四检测出的被识别手势归一化值xnorStep 9: Calculate the normalized value x nor of the recognized gesture detected in Step 4 .

步骤十、将汇聚元素作为第一目标元素g1,并加入纵向筛选集合G。将1赋值给b,并进入步骤十一。Step 10: Take the aggregated element as the first target element g 1 , and add it to the vertical screening set G. Assign 1 to b and go to step eleven.

步骤十一、对比第b目标元素gb与被识别手势归一化值xnor的大小。若xnor小于第b目标元素gb的值,则将第b目标元素gb的两个子元素中较小的那个子元素作为第b+1目标元素gb+1;否则,则将作为第b目标元素gb的两个子元素中较大的那个子元素作为第b+1目标元素gb+1Step 11: Compare the size of the b-th target element g b with the normalized value x nor of the recognized gesture. If x nor is less than the value of the b-th target element g b , the smaller of the two sub-elements of the b-th target element g b is taken as the b+1-th target element g b+1 ; otherwise, it will be taken as the b-th target element g b+1 ; The larger of the two sub-elements of the b target element g b is the b+1-th target element g b+1 .

将第b+1目标元素gb+1加入纵向筛选集合G,进入步骤十二。Add the b+1 th target element g b+1 to the vertical screening set G, and go to step 12.

步骤十二、若第b+1目标元素gb+1存在两个子元素,则将b增大1并执行步骤十一;若第b+1目标元素gb+1存在一个子元素,则第b+1目标元素gb+1的子元素作为第b+2目标元素gb+2,加入纵向筛选集合G,并进入步骤十三;若第b+1目标元素gb+1不存在子元素,则直接进入步骤十三。Step 12. If the b+1 th target element g b+1 has two sub-elements, increase b by 1 and execute step 11; if the b+1 th target element g b+1 has one sub-element, then the first The child element of the b+1 target element g b+1 is used as the b+2 target element g b+2 , and is added to the vertical screening set G, and goes to step 13; if the b+1 target element g b+1 does not have a child element, go directly to step thirteen.

步骤十三、计算纵向筛选集合G内所有元素与被识别手势归一化值xnor的欧式距离dv,v=1,2,…,c;c为纵向筛选集合G的元素个数。Step 13: Calculate the Euclidean distance d v between all elements in the vertical screening set G and the normalized value xnor of the recognized gesture, v=1,2,...,c; c is the number of elements in the vertical screening set G.

其中,gv为纵向筛选集合G内第v个元素。Among them, g v is the v-th element in the vertical screening set G.

步骤十四、取d1、d2、...、dc中的最小值d′min。d′min对应的那个纵向筛选集合G内的元素作为第一候选元素。若第一候选元素不存在兄弟元素,则使用者做成的待识别的手势与第一候选元素在均值化手势数据集Save中对应的那个采样手势相同,手势识别结束。Step 14: Take the minimum value dmin among d 1 , d 2 , . . . , dc . The element in the vertical screening set G corresponding to d' min is used as the first candidate element. If the first candidate element has no sibling elements, the gesture to be recognized made by the user is the same as the sampling gesture corresponding to the first candidate element in the averaged gesture data set Save , and the gesture recognition ends.

若第一候选元素存在兄弟元素,则将第一候选元素的兄弟元素作为第二候选元素,并计算第二候选元素与被识别手势归一化值xnor的的欧式距离d″ming′为第二候选元素;进入步骤十五。If the first candidate element has a sibling element, the sibling element of the first candidate element is used as the second candidate element, and the Euclidean distance d″ min between the second candidate element and the normalized value x nor of the recognized gesture is calculated; g' is the second candidate element; go to step fifteen.

步骤十五、对比d′min与d″min;若d′min<d″min,则使用者做成的待识别的手势与第一候选元素在均值化手势数据集Save中对应的那个采样手势相同,手势识别结束;若d′min≥d″min,则使用者做成的待识别的手势与第一候选元素在均值化手势数据集Save中对应的那个采样手势相同,手势识别结束。Step 15. Compare d′ min and d″ min ; if d′ min <d″ min , the gesture to be recognized made by the user and the sample corresponding to the first candidate element in the averaged gesture dataset Save If the gestures are the same, the gesture recognition ends; if d′ min ≥ d″ min , the gesture to be recognized made by the user is the same as the sampling gesture corresponding to the first candidate element in the averaged gesture dataset Save , and the gesture recognition ends .

本发明具有的有益效果是:The beneficial effects that the present invention has are:

1、本发明通过电容传感器与金属箔相配合的方式,将放置在金属箔上的人手动作转化为精确的电容信号,进而能够实现对手势的识别。并且相较于现有的数据手套、红外线识别装置、摄像头识别装置等手势识别设备具有成本低廉的优势。1. The present invention converts the movement of the human hand placed on the metal foil into an accurate capacitive signal through the combination of the capacitive sensor and the metal foil, thereby realizing the recognition of the gesture. And compared with the existing gesture recognition devices such as data gloves, infrared recognition devices, camera recognition devices, etc., it has the advantage of low cost.

2、本发明应用的电容传感技术很好的解决了小信号放大问题,进而提高了采集的精度。2. The capacitive sensing technology applied in the present invention solves the problem of small signal amplification very well, thereby improving the accuracy of acquisition.

3、本发明排除了环境光线对判决的影响,提高了手势识别的准确度。3. The present invention eliminates the influence of ambient light on the judgment, and improves the accuracy of gesture recognition.

4、本发明通过Mesh网络拓扑递进搜索算法被识别手势与数据库内数据的配对,使得被识别手势与数据库内所有的数据进行对比,即可找出数据库中与被识别手势最接近的数据,大大减少识别过程中的计算量。4. The present invention makes the pairing of the recognized gesture and the data in the database through the Mesh network topology progressive search algorithm, so that the recognized gesture is compared with all the data in the database, and the data that is closest to the recognized gesture in the database can be found out, The amount of computation in the recognition process is greatly reduced.

5、本发明能够实现对石头、剪刀、布,数字1、2、3、4、5等手势的精确识别。5. The present invention can realize accurate recognition of gestures such as rock, scissors, cloth, numbers 1, 2, 3, 4, and 5.

附图说明Description of drawings

图1为本发明的系统框图;1 is a system block diagram of the present invention;

图2为本发明中电源模块的电路原理图;Fig. 2 is the circuit schematic diagram of the power module in the present invention;

图3为本发明中主控模块的电路原理图;Fig. 3 is the circuit schematic diagram of the main control module in the present invention;

图4为本发明中电容传感模块的电路原理图;4 is a schematic circuit diagram of a capacitive sensing module in the present invention;

图5为本发明中LCD显示屏的接线图;Fig. 5 is the wiring diagram of LCD display screen in the present invention;

图6为本发明中按键操作模块的电路原理图。FIG. 6 is a circuit schematic diagram of a key operation module in the present invention.

具体实施方式Detailed ways

以下结合附图对本发明作进一步说明。The present invention will be further described below with reference to the accompanying drawings.

如图1所示,一种用于手势识别的电容数据采集装置,包括电容信号采集器1和采集电路。电容信号采集器1包括金属箔、基板和隔离板。金属箔固定在基板与隔离板之间。隔离板位于基板的上方。金属箔采用铜箔。采集电路包括主控模块2、电源模块3、电容传感模块4、LCD显示屏U4和按键操作模块5。电源模块3通过稳压芯片将外部输入的5V电压转换为3.3V电压为主控模块2供电。电容传感模块4通过电容传感器将电容信号采集器1的金属箔与地线之间的电容值模拟信号转化为数字信号并传输给主控模块2。当使用者的放上隔离板时,金属箔输出的电容值发生变化。LCD显示屏U4与主控模块2相连,用于显示手势识别的结果,当前的使用模式。按键操作模块5通过按键开关将模式调节指令发送给主控模块2。As shown in FIG. 1 , a capacitive data acquisition device for gesture recognition includes a capacitive signal acquisition device 1 and a acquisition circuit. The capacitive signal collector 1 includes a metal foil, a substrate and an isolation plate. The metal foil is fixed between the base plate and the spacer plate. The isolation plate is located above the base plate. The metal foil is copper foil. The acquisition circuit includes a main control module 2 , a power supply module 3 , a capacitive sensing module 4 , an LCD display screen U4 and a key operation module 5 . The power supply module 3 converts the externally input 5V voltage into a 3.3V voltage through a voltage regulator chip to supply power to the main control module 2 . The capacitance sensing module 4 converts the capacitance value analog signal between the metal foil of the capacitance signal collector 1 and the ground wire into a digital signal through the capacitance sensor and transmits it to the main control module 2 . When the user puts the isolation plate on, the capacitance value of the metal foil output changes. The LCD display screen U4 is connected to the main control module 2, and is used to display the result of gesture recognition and the current usage mode. The key operation module 5 sends the mode adjustment instruction to the main control module 2 through the key switch.

如图2所示,电源模块3包括稳压芯片U3、第九电容C9、第十电容C10、第十一电容C11和第十二电容C12。稳压芯片U3的型号为AMS111。稳压芯片U3的VCC引脚接第九电容C9的正极、第十电容C10的一端及外部输入+5V电压VCC,OUT引脚接第十一电容C11的正极及第十二电容C12的一端。稳压芯片U3的GND引脚、第九电容C9、第十一电容C11的负极、第十电容C10及第十二电容C12的另一端均接地。稳压芯片U3的OUT引脚为电源模块3的供电输出端+3.3V。As shown in FIG. 2 , the power module 3 includes a voltage regulator chip U3 , a ninth capacitor C9 , a tenth capacitor C10 , an eleventh capacitor C11 and a twelfth capacitor C12 . The model of the voltage regulator chip U3 is AMS111. The VCC pin of the voltage regulator chip U3 is connected to the positive electrode of the ninth capacitor C9, one end of the tenth capacitor C10 and the external input +5V voltage VCC, and the OUT pin is connected to the positive electrode of the eleventh capacitor C11 and one end of the twelfth capacitor C12. The GND pin of the voltage regulator chip U3, the negative pole of the ninth capacitor C9, the negative pole of the eleventh capacitor C11, and the other ends of the tenth capacitor C10 and the twelfth capacitor C12 are all grounded. The OUT pin of the voltage regulator chip U3 is the power supply output terminal +3.3V of the power supply module 3 .

如图3所示,主控模块2包括单片机U1、第一电容C1、第二电容C2、第三电容C3、第四电容C4、第五电容C5、第一电阻R1、第二电阻R2、第一按键开关S1、第一晶振Y1和第二晶振Y2。单片机U1的型号为STM32F1。单片机U1的复位引脚(25引脚)接第一电容C1、第一电阻R1及第一按键开关S1的一端。第一电容C1及第一按键开关S1的另一端均接地。第一电阻R1的另一端接电源模块3的供电输出端+3.3V。单片机U1的VDD引脚(72、108、144、39、17、52、62、84、95、121、131引脚)接电源模块3的供电输出端+3.3V,VSS引脚(71、107、143、38、16、51、61、83、94、120、130引脚)接地。单片机U1的两个外部晶振引脚(7、8引脚)与第一晶振Y1的两端分别相连,并与第二电容C2、第三电容C3的一端分别相连。第二电容C2及第三电容C3的另一端均接地。单片机U1的两个第二外部晶振引脚(23、24引脚)与第二电阻R2的两端分别相连,与第二晶振的两端分别相连,且与第四电容C4、第五电容C5的一端分别相连。第四电容C4及第五电容C5的另一端均接地。As shown in FIG. 3 , the main control module 2 includes a single-chip microcomputer U1, a first capacitor C1, a second capacitor C2, a third capacitor C3, a fourth capacitor C4, a fifth capacitor C5, a first resistor R1, a second resistor R2, a A key switch S1, a first crystal oscillator Y1 and a second crystal oscillator Y2. The model of the microcontroller U1 is STM32F1. The reset pin (pin 25) of the single-chip microcomputer U1 is connected to one end of the first capacitor C1, the first resistor R1 and the first key switch S1. The other ends of the first capacitor C1 and the first key switch S1 are both grounded. The other end of the first resistor R1 is connected to the power supply output terminal +3.3V of the power supply module 3 . The VDD pins (72, 108, 144, 39, 17, 52, 62, 84, 95, 121, 131 pins) of the microcontroller U1 are connected to the power supply output terminal +3.3V of the power supply module 3, and the VSS pins (71, 107 , 143, 38, 16, 51, 61, 83, 94, 120, 130 pins) to ground. The two external crystal oscillator pins (pins 7 and 8) of the single-chip microcomputer U1 are respectively connected to two ends of the first crystal oscillator Y1, and are respectively connected to one end of the second capacitor C2 and the third capacitor C3. The other ends of the second capacitor C2 and the third capacitor C3 are both grounded. The two second external crystal oscillator pins (pins 23 and 24) of the microcontroller U1 are respectively connected to both ends of the second resistor R2, respectively connected to both ends of the second crystal oscillator, and connected to the fourth capacitor C4 and the fifth capacitor C5. ends are connected respectively. The other ends of the fourth capacitor C4 and the fifth capacitor C5 are both grounded.

如图4所示,电容传感模块4包括电容传感器U2。电容传感器U2的型号为FDC2214。电容传感器U2的SCL引脚(1引脚)接第四电阻R4的一端,SDA引脚(2引脚)接第三电阻R3的一端。第三电阻R3的另一端接单片机U1的第一I/O口(44引脚)。第四电阻R4的另一端接单片机U1的第二I/O口(45引脚)。电容传感器U2的PAD、GND、ADDR、SD及CLKIN引脚均接地,VDD引脚接第六电容C6、第七电容C7的一端及外部输入+5V电压。第六电容C6、第七电容C7的另一端均接地。电容传感器U2的IN0A引脚接第一电感L1及第八电容C8的一端,IN0B引脚接第一电感L1及第八电容C8的另一端。电容传感器U2的IN0A引脚作为电容传感模块4的信号输入端,与金属箔电连接。电容传感器U2的其余引脚均悬空。As shown in FIG. 4 , the capacitive sensing module 4 includes a capacitive sensor U2. The model of capacitive sensor U2 is FDC2214. The SCL pin (1 pin) of the capacitive sensor U2 is connected to one end of the fourth resistor R4, and the SDA pin (2 pin) is connected to one end of the third resistor R3. The other end of the third resistor R3 is connected to the first I/O port (pin 44) of the microcontroller U1. The other end of the fourth resistor R4 is connected to the second I/O port (pin 45) of the microcontroller U1. The PAD, GND, ADDR, SD and CLKIN pins of the capacitive sensor U2 are all grounded, and the VDD pin is connected to the sixth capacitor C6, one end of the seventh capacitor C7 and the external input +5V voltage. The other ends of the sixth capacitor C6 and the seventh capacitor C7 are both grounded. The IN0A pin of the capacitive sensor U2 is connected to one end of the first inductor L1 and the eighth capacitor C8, and the IN0B pin is connected to the other end of the first inductor L1 and the eighth capacitor C8. The IN0A pin of the capacitive sensor U2 is used as the signal input end of the capacitive sensing module 4 and is electrically connected to the metal foil. The remaining pins of capacitive sensor U2 are left floating.

如图5所示,LCD显示屏U4的型号为LCD12864。LCD显示屏U4的1及20引脚均接地,2及19引脚接外部输入5V电压VCC,4、5、6、7、8、9、10、11、12、13、14、15、17引脚与单片机U1的第三I/O口至第十五I/O口(114、115、117、77、78、79、80、81、82、85、86、118、119引脚)分别相连。LCD显示屏U4的其余引脚均悬空。As shown in Figure 5, the model of LCD display U4 is LCD12864. The 1 and 20 pins of the LCD display U4 are grounded, the 2 and 19 pins are connected to the external input 5V voltage VCC, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17 The pins and the third I/O port to the fifteenth I/O port (114, 115, 117, 77, 78, 79, 80, 81, 82, 85, 86, 118, 119 pins) of the microcontroller U1 are respectively connected. The remaining pins of LCD display U4 are left floating.

如图6所示,按键操作模块5包括第二按键开关S2、第三按键开关S3、第四按键开关S4、第五按键开关S5和第六按键开关S6。第二按键开关S2的一端接第九电阻R9的一端及单片机U1的第十六I/O口K2(10引脚)。第三按键开关S3的一端接第八电阻R8的一端及单片机U1的第十七I/O口K3(11引脚)。第四按键开关S4的一端接第七电阻R7的一端及单片机U1的第十八I/O口K4(12引脚)。第五按键开关S5的一端接第六电阻R6的一端及单片机U1的第十九I/O口K5(13引脚)。第六按键开关S6的一端接第五电阻R5的一端及单片机U1的第二十I/O口K6(14引脚)。第二按键开关S2、第三按键开关S3、第四按键开关S4、第五按键开关S5及第六按键开关S6的另一端均接地。第五电阻R5、第六电阻R6、第七电阻R7、第八电阻R8及第九电阻R9的另一端接外部输入+5V电压VCC。单片机U1的其余引脚均悬空。As shown in FIG. 6 , the key operation module 5 includes a second key switch S2, a third key switch S3, a fourth key switch S4, a fifth key switch S5 and a sixth key switch S6. One end of the second key switch S2 is connected to one end of the ninth resistor R9 and the sixteenth I/O port K2 (pin 10) of the microcontroller U1. One end of the third key switch S3 is connected to one end of the eighth resistor R8 and the seventeenth I/O port K3 (pin 11) of the microcontroller U1. One end of the fourth key switch S4 is connected to one end of the seventh resistor R7 and the eighteenth I/O port K4 (12 pins) of the microcontroller U1. One end of the fifth key switch S5 is connected to one end of the sixth resistor R6 and the nineteenth I/O port K5 (pin 13) of the microcontroller U1. One end of the sixth key switch S6 is connected to one end of the fifth resistor R5 and the twentieth I/O port K6 (pin 14) of the microcontroller U1. The other ends of the second key switch S2, the third key switch S3, the fourth key switch S4, the fifth key switch S5 and the sixth key switch S6 are all grounded. The other ends of the fifth resistor R5, the sixth resistor R6, the seventh resistor R7, the eighth resistor R8 and the ninth resistor R9 are connected to the external input +5V voltage VCC. The remaining pins of the microcontroller U1 are left floating.

该用于手势识别的电容数据采集装置的手势识别方法如下:The gesture recognition method of the capacitive data acquisition device for gesture recognition is as follows:

步骤一、建立手势识别数据库,使用者将需要被识别的各个采样手势录入到数据库中,本发明能够识别的手势必须为已经录入数据库的手势。Step 1: Establishing a gesture recognition database, the user records each sample gesture to be recognized into the database, and the gestures that can be recognized by the present invention must be gestures that have been recorded in the database.

1.1、将1赋值给i和j。1.1. Assign 1 to i and j.

1.2、使用者用手做出第i个采样手势,并放置到隔离板上T时间,T=m/f,m≥10,f为电容传感器的数据采集频率。使用者的手影响金属箔输出的电容值。电容传感器将采集到的m个电容数据转换为数字信号并传输主控模块2。m个电容数据分别为sij1,sij2,sij3,...,sijm。进入步骤1.3。1.2. The user makes the i-th sampling gesture by hand and places it on the isolation board for T time, T=m/f, m≥10, and f is the data collection frequency of the capacitive sensor. The user's hand affects the capacitance value of the foil output. The capacitance sensor converts the collected m capacitance data into digital signals and transmits them to the main control module 2 . The m capacitance data are respectively s ij1 , s ij2 , s ij3 ,...,s ijm . Proceed to step 1.3.

1.3、若i<l,且j<n,则将j增大1,并执行步骤1.2;若i<l,且j=n,则将i增大1,并将1赋值给j,并重复执行步骤1.2;若i=l,且j=n,则进入行步骤1.4。l为需要输入的手势个数,n为每个手势的重复放置次数1≤n≤20。1.3. If i<l and j<n, increase j by 1, and execute step 1.2; if i<l and j=n, increase i by 1, assign 1 to j, and repeat Go to step 1.2; if i=l, and j=n, go to step 1.4. l is the number of gestures to be input, and n is the number of repetitions of each gesture 1≤n≤20.

1.4、步骤1.1至1.3中获得了手势样本数据集S。1.4. The gesture sample dataset S is obtained in steps 1.1 to 1.3.

步骤二、对手势样本数据集S内所有的元素进行归一化处理,得到归一化手势数据集SnorStep 2: Normalize all elements in the gesture sample dataset S to obtain a normalized gesture dataset S nor .

其中,smax为手势样本数据集S内数值最大的元素;smin为手势样本数据集S内数值最小的元素。in, s max is the element with the largest value in the gesture sample data set S; s min is the element with the smallest value in the gesture sample data set S.

步骤三、对归一化手势数据集Snor内的元素进行均值化处理,得到均值化手势数据集SaveStep 3: Perform an averaging process on the elements in the normalized gesture data set S nor to obtain an averaged gesture data set Save .

Save={{save,11,save,12,save,13,......,save,1m},{save,21,save,22,save,23,......,save,2m},......,{save,l1,save,l2,save,l3,......,save,lm}}S ave = {{s ave,11 ,s ave,12 ,s ave,13 ,......,s ave,1m },{s ave,21 ,s ave,22 ,s ave,23 ,. .....,s ave,2m },...,{s ave,l1 ,s ave,l2 ,s ave,l3 ,...,s ave,lm }}

其中, in,

步骤四、将归一化手势数据集Snor内的l·m个元素按照从小到大的顺序依次排序。Step 4: Sort the l·m elements in the normalized gesture dataset Snor in order from small to large.

步骤五、取归一化手势数据集Snor的中间元素作为汇聚元素。一个含有z个元素的集合的中间元素为该集合的第个元素;为0.5×z向上取整所得值。汇聚元素将归一化手势数据集Snor分隔为两个第一中间集合。一个第一中间集合内的所有元素均大于汇聚元素或均小于汇聚元素。将1赋值给a。Step 5: Take the intermediate element of the normalized gesture dataset Snor as the aggregation element. The middle element of a set of z elements is the th elements; The resulting value is rounded up to 0.5×z. The pooled element separates the normalized gesture dataset Snor into two first intermediate sets. All elements in a first intermediate set are larger than the aggregated element or are smaller than the aggregated element. Assign 1 to a.

步骤六、将所有第a中间集合的中间元素均作为第a+1中间元素。第a+1中间元素称为对应的第a中间元素的子元素。第a中间元素称为对应的第a+1中间元素的父元素。在同一个第a中间集合内两个第a+1中间元素互为兄弟元素(即具有同一父元素的两个元素互为兄弟元素)。Step 6: Take all the intermediate elements of the a-th intermediate set as the a+1-th intermediate elements. The a+1-th intermediate element is called a child element of the corresponding a-th intermediate element. The a-th intermediate element is called the parent element of the corresponding a+1-th intermediate element. In the same a-th intermediate set, two a+1-th intermediate elements are mutually sibling elements (that is, two elements with the same parent element are mutually sibling elements).

若一个第a中间集合内的元素个数大于或等于5,对应的第a+1中间元素将该第a中间集合分割为两个第a+1中间集合。一个第a+1中间集合内的元素均大于第a+1中间元素或均小于第a+1中间元素。If the number of elements in an a-th intermediate set is greater than or equal to 5, the corresponding a+1-th intermediate element divides the a-th intermediate set into two a+1-th intermediate sets. The elements in an a+1-th intermediate set are all larger than the a+1-th intermediate element or are all smaller than the a+1-th intermediate element.

若一个第a中间集合内的元素个数等于4,对应的第a+1中间元素将该第a中间集合分割为一个终端元素和一个元素个数等于2的第a+1中间集合。该终端元素为对应第a+1中间元素的子元素。If the number of elements in an intermediate set a is equal to 4, the corresponding intermediate element a+1 divides the intermediate set a into a terminal element and an intermediate set a+1 with the number of elements equal to 2. The terminal element is a child element corresponding to the a+1-th intermediate element.

若一个第a中间集合内的元素个数等于3,该第a+1中间元素将对应的第a中间集合分割为两个终端元素。该两个终端元素均为对应第a+1中间元素的子元素。If the number of elements in an a-th intermediate set is equal to 3, the a+1-th intermediate element divides the corresponding a-th intermediate set into two terminal elements. The two terminal elements are sub-elements corresponding to the a+1-th intermediate element.

若一个第a中间集合内的元素个数等于2,该第a中间集合内除第a+1中间元素外的那个元素为终端元素。该终端元素为对应第a+1中间元素的子元素。If the number of elements in an a-th intermediate set is equal to 2, the element in the a-th intermediate set except the a+1-th intermediate element is the terminal element. The terminal element is a child element corresponding to the a+1-th intermediate element.

进入步骤七。Go to step seven.

步骤七、若存在第a+1中间集合(即存在至少一个元素个数大于或等于4的第a中间集合),则将a增大1,并重复执行步骤六;否则,归一化手势数据集Snor中的所有元素均已成为汇聚元素、中间元素、终端元素的一种,进入步骤八。Step 7. If there is an a+1-th intermediate set (that is, there is at least one a-th intermediate set whose number of elements is greater than or equal to 4), increase a by 1, and repeat step 6; otherwise, normalize the gesture data All elements in the set Snor have become a kind of convergent elements, intermediate elements, and terminal elements, and go to step eight.

步骤八、使用者将手做成一个待识别的手势,并将手贴合到放置板上。使用者的手影响金属箔输出的电容值。电容传感器将采集到的多个被识别电容数据转换为数字信号并传输给主控模块2。主控模块2计算接收到的多个数字信号的平均值x′。Step 8: The user makes a hand gesture to be recognized, and attaches the hand to the placing board. The user's hand affects the capacitance value of the foil output. The capacitance sensor converts the collected multiple identified capacitance data into digital signals and transmits them to the main control module 2 . The main control module 2 calculates the average value x' of the received multiple digital signals.

步骤九、计算步骤四检测出的被识别手势归一化值xnorStep 9: Calculate the normalized value x nor of the recognized gesture detected in Step 4 .

步骤十、将汇聚元素作为第一目标元素g1,并加入初始为空集合的纵向筛选集合G。将1赋值给b,并进入步骤十一。Step 10: Take the aggregated element as the first target element g 1 , and add the vertical screening set G which is initially an empty set. Assign 1 to b and go to step eleven.

步骤十一、对比第b目标元素gb与被识别手势归一化值xnor的大小。若xnor小于第b目标元素gb的值,则将第b目标元素gb的两个子元素中较小的那个子元素作为第b+1目标元素gb+1;否则,则将作为第b目标元素gb的两个子元素中较大的那个子元素作为第b+1目标元素gb+1Step 11: Compare the size of the b-th target element g b with the normalized value x nor of the recognized gesture. If x nor is less than the value of the b-th target element g b , the smaller of the two sub-elements of the b-th target element g b is taken as the b+1-th target element g b+1 ; otherwise, it will be taken as the b-th target element g b+1 ; The larger of the two sub-elements of the b target element g b is the b+1-th target element g b+1 .

将第b+1目标元素gb+1加入纵向筛选集合G,进入步骤十二。Add the b+1 th target element g b+1 to the vertical screening set G, and go to step 12.

步骤十二、若第b+1目标元素gb+1存在两个子元素,则将b增大1并执行步骤十一;若第b+1目标元素gb+1存在一个子元素,则第b+1目标元素gb+1的子元素作为第b+2目标元素gb+2,加入纵向筛选集合G,并进入步骤十三,此时纵向筛选集合G内共有b+2个元素,将b+2赋值给c;若第b+1目标元素gb+1不存在子元素,则直接进入步骤十三,此时纵向筛选集合G内共有b+1个元素,将b+1赋值给c。Step 12. If the b+1 th target element g b+1 has two sub-elements, increase b by 1 and execute step 11; if the b+1 th target element g b+1 has one sub-element, then the first The sub-elements of the b+1 target element g b+1 are used as the b+2 target element g b+2 , and are added to the vertical screening set G, and the process goes to step 13. At this time, there are b+2 elements in the vertical screening set G. Assign b+2 to c; if the b+1th target element g b+1 has no sub-elements, go directly to step 13. At this time, there are b+1 elements in the vertical screening set G, and b+1 is assigned give c.

步骤十三、计算纵向筛选集合G内所有元素与被识别手势归一化值xnor的欧式距离dv,v=1,2,…,c;c为纵向筛选集合G的元素个数。Step 13: Calculate the Euclidean distance d v between all elements in the vertical screening set G and the normalized value xnor of the recognized gesture, v=1,2,...,c; c is the number of elements in the vertical screening set G.

其中,gv为纵向筛选集合G内第v个元素(即第v目标元素)。Among them, g v is the v-th element in the vertical screening set G (ie, the v-th target element).

步骤十四、取d1、d2、...、dc中的最小值记为d′min。d′min对应的那个纵向筛选集合G内的元素作为第一候选元素。若第一候选元素不存在兄弟元素(即均值化手势数据集Save内不存在与第一候选元素具有同一个父元素的元素),则使用者做成的待识别的手势与第一候选元素在均值化手势数据集Save中对应的那个采样手势相同,手势识别结束。Step 14. Take the minimum value among d 1 , d 2 , ..., dc and record it as d ' min . The element in the vertical screening set G corresponding to d' min is used as the first candidate element. If there is no sibling element in the first candidate element (that is, there is no element with the same parent element as the first candidate element in the averaged gesture dataset Save ), the gesture to be recognized made by the user will be the same as the first candidate element. The sampling gesture corresponding to the averaged gesture dataset Save is the same, and the gesture recognition ends.

若第一候选元素存在兄弟元素(即均值化手势数据集Save内存在与第一候选元素具有同一个父元素的元素),则将第一候选元素的兄弟元素作为第二候选元素,并计算第二候选元素与被识别手势归一化值xnor的的欧式距离d″ming′为第二候选元素的值。进入步骤十五。If the first candidate element has sibling elements (that is, there is an element with the same parent element as the first candidate element in the averaged gesture dataset Save ), the sibling element of the first candidate element is taken as the second candidate element, and the calculation Euclidean distance d″ min between the second candidate element and the normalized value x nor of the recognized gesture; g' is the value of the second candidate element. Go to step fifteen.

步骤十五、对比d′min与d″min;若d′min<d″min,则使用者做成的待识别的手势与第一候选元素在均值化手势数据集Save中对应的那个采样手势相同,手势识别结束;若d′min≥d″min,则使用者做成的待识别的手势与第一候选元素在均值化手势数据集Save中对应的那个采样手势相同,手势识别结束。Step 15. Compare d′ min and d″ min ; if d′ min <d″ min , the gesture to be recognized made by the user and the sample corresponding to the first candidate element in the averaged gesture dataset Save If the gestures are the same, the gesture recognition ends; if d′ min ≥ d″ min , the gesture to be recognized made by the user is the same as the sampling gesture corresponding to the first candidate element in the averaged gesture dataset Save , and the gesture recognition ends .

Claims (8)

1. A capacitance data acquisition device for gesture recognition comprises a capacitance signal acquisition device and an acquisition circuit; the method is characterized in that: the capacitance signal collector comprises a metal foil, a substrate and an isolation plate; the metal foil is fixed between the substrate and the isolation plate; the acquisition circuit comprises a main control module, a power supply module and a capacitance sensing module; the power supply module supplies power to the main control module through the voltage stabilizing chip;
the main control module comprises a single chip microcomputer, a first capacitor C1, a second capacitor C2, a third capacitor C3, a fourth capacitor C4, a fifth capacitor C5, a first resistor R1, a second resistor R2, a first key switch S1, a first crystal oscillator Y1 and a second crystal oscillator Y2; the reset pin of the singlechip is connected with one end of a first capacitor C1, a first resistor R1 and a first key switch S1; the other ends of the first capacitor C1 and the first key switch S1 are grounded; the other end of the first resistor R1 is connected with the power supply output end of the power supply module; a VDD pin of the singlechip is connected with a power supply output end of the power module, and a VSS pin is grounded; two external crystal oscillator pins of the singlechip are respectively connected with two ends of a first crystal oscillator Y1 and are respectively connected with one ends of a second capacitor C2 and a third capacitor C3; the other ends of the second capacitor C2 and the third capacitor C3 are grounded; two second external crystal oscillator pins of the singlechip are respectively connected with two ends of a second resistor R2, connected with two ends of a second crystal oscillator, and respectively connected with one ends of a fourth capacitor C4 and a fifth capacitor C5; the other ends of the fourth capacitor C4 and the fifth capacitor C5 are grounded;
the capacitance sensing module comprises a capacitance sensor; the SCL pin of the capacitance sensor is connected with one end of a fourth resistor R4, and the SDA pin is connected with one end of a third resistor R3; the other end of the third resistor R3 is connected with a first I/O port of the singlechip; the other end of the fourth resistor R4 is connected with a second I/O port of the singlechip; pins PAD, GND, ADDR, SD and CLKIN of the capacitance sensor are all grounded, and a pin VDD is connected with one end of a sixth capacitor C6 and one end of a seventh capacitor C7 and +5V voltage of external input; the other ends of the sixth capacitor C6 and the seventh capacitor C7 are grounded; the pin IN0A of the capacitive sensor is connected with one end of the first inductor L1 and one end of the eighth capacitor C8, and the pin IN0B is connected with the other end of the first inductor L1 and the other end of the eighth capacitor C8; the IN0A pin of the capacitive sensor serves as a signal input end of the capacitive sensing module and is electrically connected with the metal foil.
2. The capacitive data acquisition device for gesture recognition according to claim 1, wherein: the power supply module comprises a voltage stabilizing chip, a ninth capacitor C9, a tenth capacitor C10, an eleventh capacitor C11 and a twelfth capacitor C12; the model of the voltage stabilizing chip is AMS 111; a VCC pin of the voltage stabilizing chip is connected with the anode of the ninth capacitor C9, one end of a tenth capacitor C10 and an external input +5V voltage VCC, and an OUT pin is connected with the anode of the eleventh capacitor C11 and one end of a twelfth capacitor C12; the GND pin of the voltage stabilizing chip, the ninth capacitor C9, the negative electrode of the eleventh capacitor C11, the tenth capacitor C10 and the twelfth capacitor C12 are all grounded; and an OUT pin of the voltage stabilizing chip is a power supply output end of the power supply module.
3. The capacitive data acquisition device for gesture recognition according to claim 1, wherein: the acquisition circuit also comprises an LCD display screen; the model of the LCD display screen is LCD 12864; pins 1 and 20 of the LCD screen are grounded, pins 2 and 19 are connected with an external input voltage of 5V, and pins 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 and 17 are respectively connected with a third I/O port to a fifteenth I/O port of the singlechip.
4. The capacitive data acquisition device for gesture recognition according to claim 1, wherein: the acquisition circuit further comprises a key operation module; the key operation module comprises a second key switch S2, a third key switch S3, a fourth key switch S4, a fifth key switch S5 and a sixth key switch S6; one end of the second key switch S2 is connected with one end of the ninth resistor R9 and the sixteenth I/O port of the single chip microcomputer; one end of the third key switch S3 is connected with one end of the eighth resistor R8 and a seventeenth I/O port of the singlechip; one end of a fourth key switch S4 is connected with one end of a seventh resistor R7 and an eighteenth I/O port of the singlechip; one end of a fifth key switch S5 is connected with one end of a sixth resistor R6 and a nineteenth I/O port of the single chip microcomputer; one end of a sixth key switch S6 is connected with one end of a fifth resistor R5 and a twentieth I/O port of the singlechip; the other ends of the second key switch S2, the third key switch S3, the fourth key switch S4, the fifth key switch S5 and the sixth key switch S6 are all grounded; the other ends of the fifth resistor R5, the sixth resistor R6, the seventh resistor R7, the eighth resistor R8 and the ninth resistor R9 are connected with an external input +5V voltage.
5. The capacitive data acquisition device for gesture recognition according to claim 1, wherein: the capacitive sensor U2 is model FDC 2214.
6. The capacitive data acquisition device for gesture recognition according to claim 1, wherein: the model of the single chip microcomputer is STM32F 1.
7. The capacitive data acquisition device for gesture recognition according to claim 1, wherein: the metal foil is copper foil.
8. The gesture recognition method of the capacitive data acquisition device for gesture recognition according to claim 1, characterized in that: step one, establishing a gesture recognition database, and inputting each sampling gesture to be recognized into the database by a user;
1.1, assigning 1 to i and j;
1.2, a user makes an ith sampling gesture with a hand and places the sampling gesture on an isolation plate, a capacitance sensor collects m capacitance data output by a metal foil, and the collected m capacitance data are converted into a digital signal transmission main control module; m pieces of capacitance data are sij1,sij2,sij3,......,sijm(ii) a Entering step 1.3;
1.3, if i is less than l and j is less than n, increasing j by 1 and executing the step 1.2; if i is less than l and j is equal to n, increasing i by 1, assigning 1 to j, and repeatedly executing the step 1.2; if i ═ l and j ═ n, then proceed to row step 1.4; l is the number of gestures to be input, n is the repeated placement frequency of each gesture, n is more than or equal to 1 and less than or equal to 20;
1.4, integrating the capacitance data obtained in the steps 1.1 to 1.3 into a gesture sample data set S;
step two, normalizing all elements in the gesture sample data set S to obtain a normalized gesture data set Snor
Wherein,i=1,2,…,l;j=1,2,…,n;k=1,2,…,m;smaxthe element with the largest numerical value in the gesture sample data set S is selected; sminThe element with the minimum numerical value in the gesture sample data set S is selected;
step three, normalizing the gesture data set SnorThe inner elements are subjected to equalization processing to obtain an equalized gesture data set Save
Save={{save,11,save,12,save,13,......,save,1m},{save,21,save,22,save,23,......,save,2m},......,{save,l1,save,l2,save,l3,......,save,lm}}
Wherein,i=1,2,…,l;k=1,2,…,m;
step four, normalizing the gesture data set SnorThe l.m elements in the sequence are sequentially ordered from small to large;
step five, taking a normalized gesture data set SnorAs a convergence element; an intermediate element of a set of z elements being the first element of the setAn element;the value obtained by rounding up in the 0.5 xz direction; the convergent elements will normalize the gesture data set SnorPartitioning into two first middle sets; assigning 1 to a;
taking all the intermediate elements of the a-th intermediate set as a + 1-th intermediate elements; the a +1 th intermediate element is called a sub-element of the corresponding a-th intermediate element; two a +1 intermediate elements in the same a intermediate set are brother elements;
if the number of elements in an a-th intermediate set is greater than or equal to 5, the corresponding a + 1-th intermediate element divides the a-th intermediate set into two a + 1-th intermediate sets;
if the number of elements in an a-th intermediate set is equal to 4, the corresponding a + 1-th intermediate element divides the a-th intermediate set into a terminal element and an a + 1-th intermediate set; the terminal element is a sub-element corresponding to the a +1 th intermediate element;
if the number of elements in an a-th intermediate set is equal to 3, the corresponding a + 1-th intermediate element divides the a-th intermediate set into two terminal elements; the two terminal elements are both sub-elements corresponding to the a +1 th intermediate element;
if the number of the elements in the a-th intermediate set is equal to 2, the element in the a-th intermediate set except the a + 1-th intermediate element is a terminal element; the terminal element is a sub-element corresponding to the a +1 th intermediate element;
entering a seventh step;
step seven, if the a +1 th intermediate set exists, increasing a by 1, and repeatedly executing the step six; otherwise, entering step eight;
step eight, making a hand into a gesture to be recognized by a user, and attaching the hand to the placing plate; averaging a plurality of identified capacitance data output by the metal foil to obtain identified capacitance average data x';
step nine, calculating the normalization value x of the recognized gesture detected in the step fournor
Step ten, using the convergent element as a first target element g1Adding a longitudinal screening set G; assigning 1 to b and entering step eleven;
step eleven, comparing the target element g of the bbNormalized to recognized gestureChange value xnorThe size of (d); if xnorLess than the b-th target element gbIs then the b-th target element gbThe smaller of the two sub-elements of (a) is taken as the (b + 1) th target element gb+1(ii) a Otherwise, it will be the b-th target element gbThe larger of the two sub-elements of (a) as the (b + 1) th target element gb+1
B +1 th target element gb+1Adding a longitudinal screening set G, and entering the step twelve;
step twelve, if the b +1 th target element gb+1If there are two sub-elements, then b is incremented by 1 and step eleven is performed; if the b +1 th target element gb+1If there is a sub-element, the b +1 th target element gb+1As the b +2 th target element gb+2Adding a longitudinal screening set G and entering a step thirteen; if the b +1 th target element gb+1If no sub-element exists, directly entering step thirteen;
thirteen, calculating all elements in the longitudinal screening set G and the normalization value x of the recognized gesturenorOf Euclidean distance dvV ═ 1,2, …, c; c is the number of elements in the longitudinal screening set G;
wherein, gvScreening the v element in the set G longitudinally;
step fourteen, get d1、d2、...、dcOf d'min;d′minThe corresponding element in the longitudinal screening set G is used as a first candidate element; if the first candidate element does not have a brother element, the gesture to be recognized made by the user and the first candidate element are in the equalized gesture data set SaveThe corresponding sampling gestures are the same, and the gesture recognition is finished;
if the first candidate element has the brother element, taking the brother element of the first candidate element as a second candidate element, and calculating the normalization value x of the second candidate element and the recognized gesturenorOfEuropean distance d'ming' is a second candidate element; entering a step fifteen;
fifteen step, d 'comparison'minAnd d ″)min(ii) a If d'min<d″minThe user' S gesture to be recognized and the first candidate element are averaged in a gesture data set SaveThe corresponding sampling gestures are the same, and the gesture recognition is finished; if d'min≥d″minThe user' S gesture to be recognized and the first candidate element are averaged in a gesture data set SaveThe corresponding sampling gesture is the same, and the gesture recognition is finished.
CN201811345259.4A 2018-11-13 2018-11-13 Capacitive data acquisition device for gesture recognition and gesture recognition method thereof Active CN109189232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811345259.4A CN109189232B (en) 2018-11-13 2018-11-13 Capacitive data acquisition device for gesture recognition and gesture recognition method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811345259.4A CN109189232B (en) 2018-11-13 2018-11-13 Capacitive data acquisition device for gesture recognition and gesture recognition method thereof

Publications (2)

Publication Number Publication Date
CN109189232A true CN109189232A (en) 2019-01-11
CN109189232B CN109189232B (en) 2023-11-14

Family

ID=64939441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811345259.4A Active CN109189232B (en) 2018-11-13 2018-11-13 Capacitive data acquisition device for gesture recognition and gesture recognition method thereof

Country Status (1)

Country Link
CN (1) CN109189232B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083255A (en) * 2019-04-02 2019-08-02 华东师范大学 A kind of contactless input keyboard
CN110957997A (en) * 2019-12-06 2020-04-03 江苏黑马高科股份有限公司 Processing method and circuit for eliminating key jitter
CN110956719A (en) * 2019-08-30 2020-04-03 南宁学院 An emergency escape system based on capacitance detection
CN112486079A (en) * 2020-12-22 2021-03-12 江苏科技大学 Unmanned surface of water ship control circuit

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205117188U (en) * 2015-11-19 2016-03-30 西安科技大学 Gesture remote control (window) curtain system
CN105467890A (en) * 2015-11-19 2016-04-06 西安科技大学 Gesture-remote-control type curtain system having fuzzy light supplement function and method
CN105759998A (en) * 2016-02-16 2016-07-13 上海斐讯数据通信技术有限公司 Touch computer keyboard system and key judgment method
CN107426037A (en) * 2017-08-23 2017-12-01 南京邮电大学 A kind of flexible internal home network architecture design and resource allocation method
CN206773646U (en) * 2017-04-01 2017-12-19 大连民族大学 Gesture recognition system based on light-seeking

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205117188U (en) * 2015-11-19 2016-03-30 西安科技大学 Gesture remote control (window) curtain system
CN105467890A (en) * 2015-11-19 2016-04-06 西安科技大学 Gesture-remote-control type curtain system having fuzzy light supplement function and method
CN105759998A (en) * 2016-02-16 2016-07-13 上海斐讯数据通信技术有限公司 Touch computer keyboard system and key judgment method
CN206773646U (en) * 2017-04-01 2017-12-19 大连民族大学 Gesture recognition system based on light-seeking
CN107426037A (en) * 2017-08-23 2017-12-01 南京邮电大学 A kind of flexible internal home network architecture design and resource allocation method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083255A (en) * 2019-04-02 2019-08-02 华东师范大学 A kind of contactless input keyboard
CN110956719A (en) * 2019-08-30 2020-04-03 南宁学院 An emergency escape system based on capacitance detection
CN110957997A (en) * 2019-12-06 2020-04-03 江苏黑马高科股份有限公司 Processing method and circuit for eliminating key jitter
CN112486079A (en) * 2020-12-22 2021-03-12 江苏科技大学 Unmanned surface of water ship control circuit

Also Published As

Publication number Publication date
CN109189232B (en) 2023-11-14

Similar Documents

Publication Publication Date Title
CN109189232A (en) A kind of capacitance data acquisition device and its gesture identification method for gesture identification
Yun et al. Self-powered transparent and flexible touchpad based on triboelectricity towards artificial intelligence
US10402031B2 (en) Method and system for thermal drift correction
CN112148128B (en) A real-time gesture recognition method, device and human-computer interaction system
CN105809107B (en) Single sample face recognition method and system based on facial feature points
CN105579808A (en) Hard press rejection
CN107368820B (en) Refined gesture recognition method, device and equipment
CN104020845B (en) Acceleration transducer placement-unrelated movement recognition method based on shapelet characteristic
WO2017005207A1 (en) Input method, input device, server and input system
US10719159B2 (en) Method and system for force sensitive components in a display device
CN107909042B (en) A Continuous Gesture Segmentation Recognition Method
CN104268511A (en) Tennis pattern recognition system and method based on three-axis acceleration sensor
CN111708433A (en) Hand gesture data collection gloves and sign language gesture recognition method based on hand gesture data collection gloves
Sun et al. Effective human action recognition using global and local offsets of skeleton joints
US20160266682A1 (en) Force sensor
CN107368717A (en) The method and terminal of a kind of identification
CN117742502B (en) Dual-mode gesture recognition system and method based on capacitance and distance sensor
CN205788094U (en) The operating system substituting computer mouse is operated by gesture gesture recognition
CN117389454B (en) Finger joint operation identification method and electronic equipment
CN111814812B (en) Modeling method, modeling device, storage medium, electronic equipment and scene recognition method
CN109298792B (en) Four-channel capacitance signal acquisition device for gesture recognition and recognition method thereof
CN105912160A (en) False touch recognition device and method
US10088954B2 (en) Object filter
CN111275683A (en) Image quality grading processing method, system, device and medium
US20190087030A1 (en) Method and system for scanning matrix electrode sub-regions

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240805

Address after: 510000, No. 585 Airport Road, Tangjing Street, Baiyun District, Guangzhou City, Guangdong Province, China, 807-808

Patentee after: Guangzhou Xucheng Information Technology Co.,Ltd.

Country or region after: China

Address before: Hangzhou City, Zhejiang province 310036 Xiasha Higher Education Park forest Street No. 16

Patentee before: HANGZHOU NORMAL UNIVERSITY QIANJIANG College

Country or region before: China

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20250107

Address after: Room 179, 1st Floor, Building 7, Courtyard 15, Jiajia Garden, Fengtai District, Beijing, 100000

Patentee after: Beijing Aozhong Science and Trade Co.,Ltd.

Country or region after: China

Address before: 510000, No. 585 Airport Road, Tangjing Street, Baiyun District, Guangzhou City, Guangdong Province, China, 807-808

Patentee before: Guangzhou Xucheng Information Technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right