[go: up one dir, main page]

CN107704788B - A Calligraphy Copying Method Based on RF Technology - Google Patents

A Calligraphy Copying Method Based on RF Technology Download PDF

Info

Publication number
CN107704788B
CN107704788B CN201710868373.4A CN201710868373A CN107704788B CN 107704788 B CN107704788 B CN 107704788B CN 201710868373 A CN201710868373 A CN 201710868373A CN 107704788 B CN107704788 B CN 107704788B
Authority
CN
China
Prior art keywords
distance
antenna
tag
phase
value
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.)
Expired - Fee Related
Application number
CN201710868373.4A
Other languages
Chinese (zh)
Other versions
CN107704788A (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.)
Northwestern University
Original Assignee
Northwestern 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 Northwestern University filed Critical Northwestern University
Priority to CN201710868373.4A priority Critical patent/CN107704788B/en
Publication of CN107704788A publication Critical patent/CN107704788A/en
Application granted granted Critical
Publication of CN107704788B publication Critical patent/CN107704788B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/20Instruments for performing navigational calculations
    • G01C21/206Instruments for performing navigational calculations specially adapted for indoor navigation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisions for transferring data to distant stations, e.g. from a sensing device
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B11/00Teaching hand-writing, shorthand, drawing, or painting

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Theoretical Computer Science (AREA)
  • Toxicology (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • Artificial Intelligence (AREA)
  • Electromagnetism (AREA)
  • Automation & Control Theory (AREA)
  • Radar Systems Or Details Thereof (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a calligraphy copying method based on an RF technology, which comprises the steps of setting an RFID tag on a writing brush, deploying antennas on three dimensions to receive RSS and phase information of a pen moving process, dividing the writing process according to strokes, extracting key characteristics influencing calligraphy, and calculating a calligraphy copy of each stroke; the difference between the learner and the calligrapher is found by utilizing the calligraphy copy, so that the learner is guided to improve.

Description

一种基于RF技术的书法临摹方法A Calligraphy Copying Method Based on RF Technology

技术领域technical field

本发明涉及室内定位技术领域,特别涉及一种基于RF技术的书法临摹方法。The invention relates to the technical field of indoor positioning, in particular to a calligraphy copying method based on RF technology.

背景技术Background technique

毛笔字书法是一门汉字书写方法和视觉艺术,是中国传统文化的精髓。近些年以来,随着人们对中国传统文化的关注,书法艺术,作为一门最好的学习欣赏中国文化的方法也受到学习者的广泛追随。书法技艺的掌握,不可或缺的是对书法大家作品的临摹对比,常年的练习积累以及正确的要领指导。现有的一些方法是基于像素点去跟踪学习者和书法家作品之间的差异,但在毛笔字书法中,其必备的三个基本要素即用笔方式、间架结构和笔画特点。如何改进才能减小差异,这仍然需要学习者花费大量的时间和精力反复实践揣摩,才能得以提升。Brush calligraphy is a method of writing Chinese characters and a visual art, which is the essence of traditional Chinese culture. In recent years, with people's attention to Chinese traditional culture, the art of calligraphy, as the best way to learn to appreciate Chinese culture, has also been widely followed by learners. The mastery of calligraphy skills is indispensable to copying and comparing the works of calligraphy masters, accumulating years of practice, and guiding the correct essentials. Some existing methods are based on pixel points to track the differences between the works of learners and calligraphers, but in brush calligraphy, the three essential elements are the way of the brush, the structure of the frame and the characteristics of the strokes. How to improve to reduce the difference, it still requires learners to spend a lot of time and energy to practice and figure out, in order to improve.

发明内容SUMMARY OF THE INVENTION

为了解决上述现有技术存在的问题,本发明的目的在于,提供一种基于RF技术的书法临摹方法,能以毫米级精度重绘出书法的书写过程,为书法学习者的临摹练习提供传统方法所不能达到的精确定位的指导。In order to solve the problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a method for copying calligraphy based on RF technology, which can redraw the writing process of calligraphy with millimeter-level precision, and provides a traditional method for the copying practice of calligraphy learners Guidance for precise positioning that cannot be achieved.

为实现上述任务,本发明采取如下的技术解决方案:For realizing above-mentioned task, the present invention adopts following technical solution:

一种基于RF技术的书法临摹方法,包括以下步骤:A calligraphy copying method based on RF technology, comprising the following steps:

步骤一,用笔撰写书法,利用天线获取笔移动过程中设置在笔的笔杆上的标签的RSS值Sa,j,i(t)和相位信息

Figure GDA0002507437900000021
其中,a表示天线的标号,a=1,2,3,j表示RFID标签的标号,j=1,2,i表示信道的标号,i=1,2,...,N,N表示信道的个数,t表示笔移动过程中的时刻;Step 1, write calligraphy with a pen, and use the antenna to obtain the RSS value S a, j, i (t) and phase information of the tag set on the pen holder of the pen during the movement of the pen.
Figure GDA0002507437900000021
Among them, a represents the label of the antenna, a=1, 2, 3, j represents the label of the RFID tag, j=1, 2, i represents the label of the channel, i=1, 2,..., N, N represents the channel The number of , t represents the moment during the movement of the pen;

步骤二,对相位信息

Figure GDA0002507437900000022
进行预处理得到预处理后的相位信息
Figure GDA0002507437900000023
预处理包括相移校准、噪声抑制和多径处理,预处理后的相位信息
Figure GDA0002507437900000024
对应的RSS值为Sa,j,m(t),其中,m表示干净信道的标号, m=1,2,...,M,M表示干净信道的个数;Step 2, for phase information
Figure GDA0002507437900000022
Perform preprocessing to obtain the preprocessed phase information
Figure GDA0002507437900000023
Preprocessing includes phase shift calibration, noise suppression and multipath processing, and the preprocessed phase information
Figure GDA0002507437900000024
The corresponding RSS value is Sa ,j,m (t), where m represents the label of the clean channel, m=1,2,...,M,M represents the number of clean channels;

其中,相移校准采用的方法具体如下:在与撰写书法相同的环境中,测得标签和天线之间的真实距离;根据标签和天线之间的真实距离,利用距离与相位关系式,求得标签的真实的相位值;获取标签的测量相位值;求标签的真实的相位值与标签的测量相位值的差值,即为需要去除的相移

Figure GDA0002507437900000025
对RFID标签的相位信息
Figure GDA0002507437900000026
进行相移校准的过程,就是在相位信息
Figure GDA0002507437900000027
中去除相移
Figure GDA0002507437900000028
Among them, the method used for phase shift calibration is as follows: in the same environment as writing calligraphy, the real distance between the tag and the antenna is measured; according to the real distance between the tag and the antenna, the relationship between distance and phase is used to obtain The real phase value of the tag; obtain the measured phase value of the tag; find the difference between the real phase value of the tag and the measured phase value of the tag, which is the phase shift that needs to be removed
Figure GDA0002507437900000025
Phase information for RFID tags
Figure GDA0002507437900000026
The process of performing phase shift calibration is to
Figure GDA0002507437900000027
remove phase shift
Figure GDA0002507437900000028

其中,多径处理采用的方法具体如下:在相位信息

Figure GDA0002507437900000029
中选出属于干净信道对应的相位信息,即为经过多径处理后的相位信息
Figure GDA00025074379000000210
干净信道的确定方法为在撰写书法的环境中,RFID阅读器跳过不同频率的信道接收数据,在每个信道获取标签的相位信息序列,求每个信道中所有相位信息的平均值,即相位均值;以信道标号为横坐标,以相位均值为纵坐标,所有相位均值连接形成曲线,通过观察曲线的走向,保留呈线性关系的相位均值,这些相位均值对应的信道即为干净信道;Among them, the method used in multipath processing is as follows:
Figure GDA0002507437900000029
Select the phase information corresponding to the clean channel, that is, the phase information after multipath processing
Figure GDA00025074379000000210
The method for determining the clean channel is that in the writing environment, the RFID reader skips the channels of different frequencies to receive data, obtains the phase information sequence of the tag in each channel, and obtains the average value of all phase information in each channel, that is, the phase. Mean value; take the channel label as the abscissa and the phase mean as the ordinate, all the phase mean values are connected to form a curve, and by observing the trend of the curve, the phase mean values in a linear relationship are retained, and the channels corresponding to these phase mean values are clean channels;

步骤三,根据相位信息

Figure GDA0002507437900000031
和RSS值Sa,j,m(t),求任一时刻t, 信道m对应的天线a与标签j的距离da,j,m(t);采用的公式如下:Step 3, according to the phase information
Figure GDA0002507437900000031
and the RSS value S a,j,m (t), find the distance d a,j,m (t) between the antenna a and the tag j corresponding to the channel m at any time t; the formula used is as follows:

Figure GDA0002507437900000032
Figure GDA0002507437900000032

其中,fm表示的是第m个干净信道的频率,c表示光速;Among them, f m represents the frequency of the mth clean channel, and c represents the speed of light;

其中,k为整数,在撰写书法的环境下,设置一个标签和一个天线,改变标签与天线之间的距离,利用RFID阅读器获取标签的相位信息和RSS信息;获取RSS值随标签与天线之间的距离改变的曲线图;当标签与天线之间的距离范围为(0,λ/2)时,k=1,当标签与天线之间的距离增加λ/2时,k的值增加1,根据标签与天线之间的每个距离范围区间,可以确定RSS信息的范围区间;根据RSS值,确定其所属范围区间,即可确定k的取值;其中,λ表示波长;Among them, k is an integer. In the environment of writing calligraphy, set up a tag and an antenna, change the distance between the tag and the antenna, and use the RFID reader to obtain the phase information and RSS information of the tag; the RSS value is obtained with the difference between the tag and the antenna. The graph of the change of the distance between the tags; when the distance between the tag and the antenna is in the range of (0, λ/2), k=1, when the distance between the tag and the antenna increases λ/2, the value of k increases by 1 , according to each distance range between the tag and the antenna, the range of the RSS information can be determined; according to the RSS value, the range to which it belongs can be determined, and the value of k can be determined; where λ represents the wavelength;

步骤四,根据相邻频率信道接收到的相位信息存在的线性关系特性,以及三角形的边长关系式对步骤三得到的所有的距离值进行筛选;针对筛选后的距离值,计算任一时刻t下,所有信道对应的第a个天线与第j个标签的距离的均值,将求得的平均值作为该时刻第a个天线与第j个标签之间的距离值da,j(t);Step 4: Screen all the distance values obtained in Step 3 according to the linear relationship characteristics of the phase information received by the adjacent frequency channels and the relationship of the side length of the triangle; for the screened distance values, calculate any time t Next, the average value of the distance between the a-th antenna and the j-th tag corresponding to all channels, and the average value obtained is taken as the distance value between the a-th antenna and the j-th tag at this moment da ,j (t) ;

步骤五,利用距离值da,j(t)采用三角函数法计算笔移动过程中,任一时刻t下,笔杆中点位置的垂直高度h(t);根据笔杆中点位置的垂直高度h(t)在笔画之间的变化规律,对书写过程中的时刻进行分段,每一段对应一个笔画;Step 5, utilizes the distance value d a, j (t) adopts the trigonometric function method to calculate in the pen movement process, under any moment t, the vertical height h (t) of the pen holder midpoint position; According to the vertical height h of the pen holder midpoint position (t) variation law between strokes, the moments in the writing process are segmented, and each segment corresponds to a stroke;

其中利用距离值da,j(t)采用三角函数法计算笔移动过程中,任一时刻t 下,笔杆中点位置的垂直高度h(t),采用的公式如下:The distance value d a,j (t) is used to calculate the vertical height h(t) of the midpoint of the pen at any time t during the movement of the pen by using the trigonometric method. The formula used is as follows:

Figure GDA0002507437900000041
Figure GDA0002507437900000041

Figure GDA0002507437900000042
其中,α1表示天线A1与标签1的连线与垂直方向的夹角;α2表示天线A1与标签2 的连线与垂直方向的夹角;
Figure GDA0002507437900000042
Among them, α1 represents the angle between the connection line between the antenna A1 and the tag 1 and the vertical direction; α2 represents the angle between the connection line between the antenna A1 and the tag 2 and the vertical direction;

其中,h1(t)表示标签1的垂直高度;h2(t)表示标签2的垂直高度; d11表示天线A1与标签1之间的距离;d21表示天线A2与标签1之间的距离;d12表示天线A1与标签2之间的距离;d22表示天线A2与标签2之间的距离;a表示天线A1与天线A2之间的距离;Wherein, h 1 (t) represents the vertical height of the tag 1; h 2 (t) represents the vertical height of the tag 2; d 11 represents the distance between the antenna A1 and the tag 1; d 21 represents the distance between the antenna A2 and the tag 1 distance; d 12 represents the distance between the antenna A1 and the tag 2; d 22 represents the distance between the antenna A2 and the tag 2; a represents the distance between the antenna A1 and the antenna A2;

其中,根据笔杆中点位置的垂直高度h(t)变化对书写过程中的笔画进行分割;采用的方法如下:设置阈值hp+η作为笔画结束的标志,若h(te)大于该阈值,表明笔被提起离开书写平面,一个笔画完成,时刻te即为一个笔画结束的时刻;设置阈值hp-η作为笔画开始的标志,若h(ts)小于该阈值,表明笔处于书写平面,信道笔画开始形成,时刻te即为一个笔画结束的时刻;hp为笔杆中点到笔尖距离;η为常数;根据时刻te和时刻ts,对书写过程中的时刻进行分段,每一段对应一个笔画;Wherein, the strokes in the writing process are segmented according to the change of the vertical height h(t) of the midpoint position of the pen; the adopted method is as follows: set the threshold h p + η as the sign of the end of the stroke, if h(t e ) is greater than the threshold , indicating that the pen is lifted off the writing plane, a stroke is completed, and the moment t e is the moment when a stroke ends; a threshold h p -n is set as the sign of the beginning of a stroke, if h(t s ) is less than the threshold, it indicates that the pen is in writing Plane, channel strokes begin to form, time t e is the moment when a stroke ends; h p is the distance from the midpoint of the pen to the tip of the pen; η is a constant; according to time te and time t s , the time in the writing process is segmented , each paragraph corresponds to a stroke;

步骤六,针对每个笔画中的每个时刻,求其对应的多个关键特征量,多个关键特征量形成该笔画对应的模板特征矩阵;关键特征量包括仰角、笔尖长度变化、笔尖移动速度和笔尖位置;Step 6, for each moment in each stroke, seek its corresponding multiple key characteristic quantities, and multiple key characteristic quantities form the template feature matrix corresponding to this stroke; key characteristic quantities include elevation angle, pen tip length variation, pen tip movement speed and nib position;

其中,计算仰角采用的公式如下:

Figure GDA0002507437900000051
b表示标签1与标签2之间的距离;Among them, the formula used to calculate the elevation angle is as follows:
Figure GDA0002507437900000051
b represents the distance between label 1 and label 2;

其中,计算笔尖长度变化,采用的公式如下:

Figure GDA0002507437900000052
L是笔杆上标签1到笔尖的距离;Among them, the formula used to calculate the change in the length of the pen tip is as follows:
Figure GDA0002507437900000052
L is the distance from label 1 on the barrel to the tip of the pen;

其中,计算笔尖移动速度,采用的公式如下:天线A1到笔尖T0 的距离:Among them, the formula used to calculate the moving speed of the pen tip is as follows: the distance from the antenna A1 to the pen tip T0:

Figure GDA0002507437900000053
Figure GDA0002507437900000053

T1'和T2'分别是笔的笔杆上标签T1和T2的投影;d11'是天线A1 到T1'的距离;d12'是天线A1到T2'的距离;笔尖移动速度:

Figure GDA0002507437900000054
Δt表示t+1时刻到t时刻的时间间隔;T1' and T2' are the projections of the labels T1 and T2 on the barrel of the pen, respectively; d 11' is the distance from the antenna A1 to T1'; d 12' is the distance from the antenna A1 to T2'; the pen tip moving speed:
Figure GDA0002507437900000054
Δt represents the time interval from time t+1 to time t;

其中,计算笔尖位置T0(x(t),y(t)),采用的公式如下:Among them, to calculate the pen tip position T0(x(t), y(t)), the formula used is as follows:

x(t)=d11'(t)sinβ1+Lcosθ(t)sin(β21);x(t)=d 11' (t) sinβ 1 +Lcosθ(t)sin(β 21 );

y(t)=d11'(t)cosβ1+Lcosθ(t)cos(β21);β1表示A1A3与A1T1'之间的夹角,β2表示A1T1'与T1'T2'之间的夹角;y(t)=d 11' (t)cosβ 1 +Lcosθ(t)cos(β 21 ); β 1 represents the angle between A1A3 and A1T1', β 2 represents A1T1' and T1'T2' the angle between

上述所有时刻(t,...t+t'...t+s)的四个关键特征量构成该笔画的特征矩阵,即:The four key feature quantities at all the above moments (t,...t+t'...t+s) constitute the feature matrix of the stroke, namely:

Figure GDA0002507437900000061
Figure GDA0002507437900000061
;

步骤七,重复步骤一至步骤六的方法,得到每个笔画对应的临摹特征矩阵,将其与模板特征矩阵进行对比,得到的差值结果用来指导书法学习者与书法家的差距。Step 7: Repeat steps 1 to 6 to obtain the copying feature matrix corresponding to each stroke, compare it with the template feature matrix, and use the difference result to guide the gap between calligraphy learners and calligraphers.

具体的,步骤二中的噪声抑制,采用的方法如下:Specifically, the noise suppression in step 2 adopts the following method:

给定阈值,若相位信息中两个连续时刻的相位值之间的相位偏差超过设定阈值,则调整后一相位值与前一相位值相等;再采用卡尔曼滤波方法对相位信息进行平滑。Given a threshold, if the phase deviation between the phase values of two consecutive moments in the phase information exceeds the set threshold, the adjusted phase value is equal to the previous phase value; then the Kalman filter method is used to smooth the phase information.

与现有技术相比,本发明具有以下技术效果:Compared with the prior art, the present invention has the following technical effects:

通过在笔上设置RFID标签,在三个维度上部署天线接收笔移动过程的RSS和相位信息,按笔画分割书写过程,提取影响书法的关键特征,算出每一笔画的书法副本;利用书法副本找到学习者与书法家的差异,从而指导学习者提高改进,本发明可以在毫米级估算标签- 天线距离,从而实现对书法的书写过程的重绘。By setting RFID tags on the pen, deploying antennas in three dimensions to receive the RSS and phase information of the pen movement process, dividing the writing process by strokes, extracting the key features that affect calligraphy, and calculating the calligraphy copy of each stroke; use the calligraphy copy to find The difference between the learner and the calligrapher can guide the learner to improve and improve. The invention can estimate the tag-antenna distance at the millimeter level, so as to realize the redrawing of the writing process of calligraphy.

附图说明Description of drawings

图1是三个不同实验环境位置图;Figure 1 is the location map of three different experimental environments;

图2是系统在办公室环境中的详细部署图;Figure 2 is a detailed deployment diagram of the system in an office environment;

图3是相位信息经过相移校准和噪声抑制的结果图;其中,(a) 表示相移校准后的结果图,(b)表示噪声抑制的结果图;Fig. 3 is the result graph of the phase information after phase shift calibration and noise suppression; wherein, (a) represents the result graph after phase shift calibration, and (b) represents the result graph of noise suppression;

图4是16个不同频率信道在大厅环境中接收的相位数据图;Figure 4 is a graph of phase data received in a hall environment for 16 different frequency channels;

图5是16个不同频率信道在图书馆环境中接收的相位数据图;Figure 5 is a graph of phase data received by 16 different frequency channels in a library environment;

图6是RSS值与天线-标签距离的关系。Figure 6 shows the relationship between the RSS value and the antenna-tag distance.

图7是书写过程中毛笔高度改变及笔画分割示意图。FIG. 7 is a schematic diagram of the height change of the brush and the division of the strokes during the writing process.

图8是获取毛笔仰角的几何关系图;Fig. 8 is the geometrical relation diagram that obtains the brush elevation angle;

图9是毛笔笔尖长度改变示意图;Fig. 9 is a schematic diagram of changing the length of the brush tip;

图10是估算笔尖位置时的几何关系图;Fig. 10 is a geometrical relationship diagram when estimating the position of the pen tip;

图11是笔尖位置的坐标图;Figure 11 is a coordinate diagram of the position of the pen tip;

图12是用三角形的边长关系对天线A1、A2与标签1、2的距离进行筛选的示意图;12 is a schematic diagram of screening the distances between antennas A1 and A2 and tags 1 and 2 by using the relationship of the side lengths of the triangles;

图13是对不同书法水平的跟踪效果图;Figure 13 is a tracking effect diagram for different calligraphy levels;

图14是用三角形的边长关系对天线A3与标签1、2的距离进行筛选的示意图;FIG. 14 is a schematic diagram of screening the distance between the antenna A3 and the tags 1 and 2 with the side length relationship of the triangle;

图15是天线A1到T1′的距离、天线A1到T2′的距离、天线A2 到T1′的距离的计算示意图;Fig. 15 is a schematic diagram of calculation of the distance from antenna A1 to T1', the distance from antenna A1 to T2', and the distance from antenna A2 to T1';

下面将结合附图和实施例对本发明作进一步地详细描述。The present invention will be described in further detail below with reference to the accompanying drawings and embodiments.

具体实施方式Detailed ways

参见图1,本发明的基于RF技术的书法临摹方法,所采用的系统包括RFID阅读器、两个Alien标签和三个5dBi增益的定向天线,其中两个Alien标签粘在笔的笔杆上下两端,距离b=16cm,三个定向天线均与阅读器连接,天线1位于坐标原点,天线2位于Z轴上,天线3位于Y轴上,天线1到天线2的距离等于天线1到天线3的距离a,a=40cm。在桌上部署系统,形成一个尺寸为50cm×50cm的监控区域,书法的书写区域是40cm×40cm的宣纸,采用的笔可以为普通毛笔或者具有软性笔头的笔,本实施例中,采样毛笔,总长度为 29.8cm,笔头部分长5.5cm,当笔进入监控区域刚刚垂直接触到纸面时,笔杆中点位置距离纸面的高度h=16cm;书写过程中,笔尖长度的最大改变值约为4cm。以1—2cm/s的速度移动笔。Referring to Fig. 1, the method for copying calligraphy based on RF technology of the present invention, the adopted system includes an RFID reader, two Alien tags and three directional antennas with a gain of 5dBi, wherein the two Alien tags are stuck on the upper and lower ends of the pen barrel , the distance b=16cm, the three directional antennas are connected to the reader, the antenna 1 is located at the origin of the coordinates, the antenna 2 is located on the Z axis, the antenna 3 is located on the Y axis, and the distance from antenna 1 to antenna 2 is equal to the distance from antenna 1 to antenna 3 Distance a, a=40cm. Deploy the system on the table to form a monitoring area with a size of 50cm×50cm. The writing area of calligraphy is 40cm×40cm of rice paper. The pen used can be an ordinary brush or a pen with a soft tip. In this embodiment, the sampling brush , the total length is 29.8cm, and the length of the pen head is 5.5cm. When the pen enters the monitoring area and just vertically touches the paper surface, the height of the midpoint of the pen holder from the paper surface is h=16cm; during the writing process, the maximum change in the length of the pen tip is about is 4cm. Move the pen at a speed of 1-2cm/s.

其中,所述的RFID阅读器兼容EPC Gen2标准,工作在中国合法 UHF频段,即920.625MHz至924.375MHz范围;在数据收集过程中,阅读器跳跃16个不同频率信道,相邻的信道间频率间隔500KHz。Among them, the RFID reader is compatible with the EPC Gen2 standard and works in China's legal UHF frequency band, that is, the range of 920.625MHz to 924.375MHz; in the process of data collection, the reader jumps 16 different frequency channels, and the frequency interval between adjacent channels is 500KHz.

本发明的基于RF技术的书法临摹方法,包括以下步骤:The calligraphy copying method based on RF technology of the present invention comprises the following steps:

步骤一,书法家用毛笔撰写书法,毛笔移动过程中,RFID阅读器的多个信道通过3个天线(A1,A2和A3)获得毛笔移动过程中每一时刻下RFID标签的RSS值Sa,j,i(t)和相位信息

Figure GDA0002507437900000081
其中,a表示天线的标号,a=1,2,3,j表示RFID标签的标号,j=1,2,i表示信道的标号,i=1,2,...,N,N表示信道的个数,此实施例中,N=16,t表示毛笔移动过程中的时刻。Step 1, calligraphy uses a brush to write calligraphy. During the movement of the brush, multiple channels of the RFID reader obtain the RSS value S a,j of the RFID tag at each moment during the movement of the brush through three antennas (A1, A2 and A3). , i (t) and phase information
Figure GDA0002507437900000081
Among them, a represents the label of the antenna, a=1, 2, 3, j represents the label of the RFID tag, j=1, 2, i represents the label of the channel, i=1, 2,..., N, N represents the channel The number of , in this embodiment, N=16, t represents the moment during the movement of the brush.

步骤二,对步骤一得到的RFID标签的相位信息

Figure GDA0002507437900000082
进行预处理,得到预处理后的相位信息
Figure GDA0002507437900000083
其中,m表示干净信道的标号, m=1,2,...,M,M表示干净信道的个数;预处理包括相移校准、噪声抑制和多径处理。Step 2, the phase information of the RFID tag obtained in step 1
Figure GDA0002507437900000082
Perform preprocessing to obtain the preprocessed phase information
Figure GDA0002507437900000083
Among them, m represents the label of the clean channel, m=1,2,...,M,M represents the number of clean channels; the preprocessing includes phase shift calibration, noise suppression and multipath processing.

其中,相移校准采用的方法为:Among them, the method used for phase shift calibration is:

将一个标签和一个天线放置在书法家撰写书法的环境中,将标签放置时在靠近天线的位置,以减少多路径的数量;用激光计测量标签和天线之间的真实距离;通过测量的标签和天线之间的真实距离,根据真实距离与真实相位之间的关系式,如公式(1)所示,可以计算得到标签的真实的相位值。RFID阅读器能够通过天线获取标签的测量相位值。求真实的相位值与RFID阅读器获取的标签的相位值的差值,即为需要去除的相移

Figure GDA0002507437900000091
Place a tag and an antenna in the environment where the calligrapher writes the calligraphy, place the tag close to the antenna to reduce the number of multipaths; measure the true distance between the tag and the antenna with a laser meter; measure the tag by The real distance between the antenna and the antenna, according to the relationship between the real distance and the real phase, as shown in formula (1), the real phase value of the tag can be calculated. The RFID reader can obtain the measured phase value of the tag through the antenna. Find the difference between the real phase value and the phase value of the tag obtained by the RFID reader, which is the phase shift that needs to be removed
Figure GDA0002507437900000091

对RFID标签的相位信息

Figure GDA0002507437900000092
进行相移校准的过程,就是在相位信息
Figure GDA0002507437900000093
中去除相移
Figure GDA0002507437900000094
Phase information for RFID tags
Figure GDA0002507437900000092
The process of performing phase shift calibration is to
Figure GDA0002507437900000093
remove phase shift
Figure GDA0002507437900000094

噪声抑制采用的方法为:The methods used for noise suppression are:

在去除恒定相移之后,由于随机相位噪声,仍然观察到相位信息中存在大峰值

Figure GDA0002507437900000095
针对同一信道,同一天线、同一标签下的相位信息,给定阈值=2,如果相位信息中两个连续时刻的相位值之间的相位偏差超过设定阈值,则调整后一相位值与前一相位值相等;再采用卡尔曼滤波方法对相位信息进行平滑。After removing the constant phase shift, a large peak in the phase information is still observed due to random phase noise
Figure GDA0002507437900000095
For the phase information of the same channel, the same antenna, and the same label, the given threshold=2, if the phase deviation between the phase values of two consecutive moments in the phase information exceeds the set threshold, the latter phase value is adjusted to the previous one. The phase values are equal; then the Kalman filter method is used to smooth the phase information.

多径处理过程基于多信道的方法来实现,原因如下:(1)虽然商用RFID读取器采用定向天线进行传输,但与Wi-Fi相比,其多径的数量少得多;(2)由于书写的跟踪区域较小,标签-天线距离也较小。因此直接路径信号很强占支配地位,降低了多径的效果;(3)商用RFID读取器可以在正常操作期间跳过不同频率的信道,通过使用相当多的可用信道(16个),就一定能识别出个别几乎不受多径干扰的信道(由直接路径信号主导)。如果不受多径干扰,给定一个标签位置,已知两个信道的中心频率差为Δf,他们的相位差Δφ可以表示为:The multipath process is implemented based on a multi-channel approach for the following reasons: (1) Although commercial RFID readers use directional antennas for transmission, the number of multipaths is much smaller compared to Wi-Fi; (2) Since the written tracking area is smaller, the tag-antenna distance is also smaller. Therefore the direct path signal is strongly dominant, reducing the effect of multipath; (3) commercial RFID readers can skip channels of different frequencies during normal operation, by using a considerable number of available channels (16), certain Individual channels (dominated by direct path signals) with little interference from multipath can be identified. If there is no multipath interference, given a tag location, the center frequency difference between the two channels is known to be Δf, and their phase difference Δφ can be expressed as:

Figure GDA0002507437900000101
Figure GDA0002507437900000101

其中,c是光速,Δδ是相位噪声,mod是求模函数,不同信道的相位值呈线性关系。一旦哪个信道由多径信号主导,与其他信道的线性关系被打破。但由于定向天线的使用以及系统部署的范围较小,所以大部分信道仍存在这种线性关系,我们把这种信道称为“干净信道”。也就是说,这些干净信道中传播的只有直接路径信号,相应的相位读数就可以用于距离估算。Among them, c is the speed of light, Δδ is the phase noise, mod is the modulo function, and the phase values of different channels are linearly related. Once which channel is dominated by multipath signals, the linear relationship with other channels is broken. However, due to the use of directional antennas and the small scope of system deployment, this linear relationship still exists for most of the channels, which we refer to as "clean channels". That is, only the direct path signal propagates in these clean channels, and the corresponding phase readings can be used for distance estimation.

所述干净信道的确定方法为,在与本实施例相同的环境中,设置 1个天线和1个RFID标签,RFID阅读器跳过16个不同频率的信道接收数据,在每个信道获取标签的相位信息序列,求每个信道中所有相位信息的平均值,即相位均值;以信道标号为横坐标,以相位均值为纵坐标,所有相位均值连接形成曲线,通过观察曲线的走向,保留呈线性关系的相位均值,这些相位均值对应的信道即为干净信道。The method for determining the clean channel is that, in the same environment as this embodiment, one antenna and one RFID tag are set up, and the RFID reader skips 16 channels of different frequencies to receive data, and obtains the data of the tag in each channel. Phase information sequence, find the average value of all phase information in each channel, that is, the phase mean value; take the channel label as the abscissa and the phase mean as the ordinate, all phase mean values are connected to form a curve, and by observing the trend of the curve, the retention is linear. The phase averages of the relationship, the channels corresponding to these phase averages are clean channels.

多径处理的实现方法为:在相位信息

Figure GDA0002507437900000102
中选出属于干净信道对应的相位信息,即为经过多径处理后的相位信息
Figure GDA0002507437900000103
多径处理后的相位信息
Figure GDA0002507437900000104
对应的RSS值为Sa,j,m(t);The realization method of multipath processing is: in the phase information
Figure GDA0002507437900000102
Select the phase information corresponding to the clean channel, that is, the phase information after multipath processing
Figure GDA0002507437900000103
Phase information after multipath processing
Figure GDA0002507437900000104
The corresponding RSS value is Sa ,j,m (t);

步骤三,根据预处理后的相位信息

Figure GDA0002507437900000105
以及与相位信息
Figure GDA0002507437900000106
对应的RSS值Sa,j,m(t),求在时刻t,信道m对应的天线a与标签 j的距离da,j,m(t);采用的公式如下:Step 3, according to the preprocessed phase information
Figure GDA0002507437900000105
and with phase information
Figure GDA0002507437900000106
The corresponding RSS value S a,j,m (t), find the distance d a,j,m (t) between the antenna a and the tag j corresponding to the channel m at time t; the formula used is as follows:

Figure GDA0002507437900000111
Figure GDA0002507437900000111

其中,fm表示的是第m个干净信道的频率,c表示光速;k为整数;Among them, f m represents the frequency of the mth clean channel, c represents the speed of light; k is an integer;

k的确定方法如下:The method of determining k is as follows:

在本实施例的环境下,设置一个标签和一个天线,改变标签与天线之间的距离,利用RFID阅读器获取标签的相位信息和RSS信息;获取RSS值随标签与天线之间的距离改变的曲线图;实验表明,信号强度值会随着天线-标签距离的增加而减小。当距离改变λ/2,λ表示波长,相应的相位旋转一个2π周期但读数不变,但RSS值改变将很容易被检测到。我们为所有可能的相位旋转数k设置相应的RSS值变化范围,如图6所示,RSS值与距离的对应关系;当标签与天线之间的距离范围为(0,λ/2)时,k=1;当标签与天线之间的距离范围为 (λ/2,λ)时,k=2;通过上述关系,能够得到当RSS值处于某一范围时,k的取值。在本实施例中,k的值可能是1或2。In the environment of this embodiment, a tag and an antenna are set, the distance between the tag and the antenna is changed, and the RFID reader is used to obtain the phase information and RSS information of the tag; the RSS value obtained varies with the distance between the tag and the antenna. Graph; experiments show that the signal strength value decreases with increasing antenna-to-tag distance. When the distance changes by λ/2, where λ represents the wavelength, the corresponding phase is rotated by one 2π period but the reading does not change, but the RSS value change will be easily detected. We set the corresponding RSS value variation range for all possible phase rotation numbers k, as shown in Figure 6, the corresponding relationship between RSS value and distance; when the distance range between the tag and the antenna is (0, λ/2), k=1; when the distance range between the tag and the antenna is (λ/2, λ), k=2; through the above relationship, the value of k can be obtained when the RSS value is in a certain range. In this embodiment, the value of k may be 1 or 2.

步骤四,通过不同的频率通道,获得了距离的多个估算值,这些估算值理论上彼此相似,因此我们排除不符合相似关系的值。然后根据天线、标签的位置之间存在的几何关系限制,利用三角形的边长关系式对步骤三得到的所有的天线与标签的距离da,j,m(t)进行筛选,得到筛选后的天线与标签的距离;针对筛选后的天线与标签的距离,计算某一时刻t下,所有信道对应的第a个天线与第j个标签的距离的均值,将求得的平均值作为该时刻第a个天线与第j个标签之间的距离值da,j(t)。In step four, through different frequency channels, multiple estimates of distance are obtained, these estimates are theoretically similar to each other, so we exclude the values that do not meet the similarity relationship. Then, according to the geometrical relationship restriction between the positions of the antenna and the tag, the distance d a, j, m (t) between all the antennas and tags obtained in step 3 is screened by using the relationship of the side length of the triangle, and the filtered The distance between the antenna and the tag; for the distance between the filtered antenna and the tag, calculate the average value of the distance between the a-th antenna and the j-th tag corresponding to all channels at a certain time t, and take the average value obtained as the time. The distance value da ,j (t) between the a-th antenna and the j-th label.

具体筛选方法如下:The specific filtering methods are as follows:

参见图12,利用三角形的边长关系,针对t1时刻,信道i对应的天线A2与标签T1之间的距离d2,1,i(t1),根据三角形A2、T1和T2,得到1组关系式:Referring to Figure 12, using the side length relationship of the triangle, at time t1, the distance d 2,1,i (t1) between the antenna A2 corresponding to the channel i and the tag T1, according to the triangles A2, T1 and T2, a set of relationships is obtained Mode:

Figure GDA0002507437900000121
Figure GDA0002507437900000121

固定d2,1,i(t1),d2,2,m(t1)表示在所有信道对应的天线A2与标签T2 之间的距离值中的任意一个,逐个选取d2,2,m(t1)代入上式进行计算,若超过一半的d2,2,m(t1)的计算结果满足上述式子,则保留该d2,1,i(t1);否则,去除d2,1,i(t1),即该值为错误值;Fixed d 2,1,i (t1), d 2,2,m (t1) represents any one of the distance values between the antenna A2 and the label T2 corresponding to all channels, select d 2,2,m ( t1) Substitute into the above formula for calculation, if more than half of the calculation results of d 2,2,m (t1) satisfy the above formula, keep the d 2,1,i (t1); otherwise, remove d 2,1, i (t1), that is, the value is an error value;

针对t1时刻,信道i对应的天线A2与标签T2之间的距离d2,2,i(t1),根据三角形A2、T2和T2,得到1组关系式:For the time t1, the distance d 2,2,i (t1) between the antenna A2 corresponding to the channel i and the label T2, according to the triangles A2, T2 and T2, a set of relational expressions are obtained:

Figure GDA0002507437900000122
Figure GDA0002507437900000122

固定d2,2,i(t1),d1,2,m(t1)表示在所有信道对应的天线A1与标签T2 之间的距离值中的任意一个,逐个选取d1,2,m(t1)代入上式进行计算,若超过一半的d1,2,m(t1)的计算结果满足上述式子,则保留该d2,2,i(t1);否则,去除d2,2,i(t1),即该值为错误值;Fixed d 2,2,i (t1), d 1,2,m (t1) represents any one of the distance values between the antenna A1 and the label T2 corresponding to all channels, select d 1,2,m ( t1) Substitute into the above formula for calculation, if more than half of the calculation results of d 1,2,m (t1) satisfy the above formula, keep the d 2,2,i (t1); otherwise, remove d 2,2, i (t1), that is, the value is an error value;

针对t1时刻,信道i对应的天线A1与标签T2之间的距离d1,2,i(t1),根据三角形A1、T1和T2,得到1组关系式:For the time t1, the distance d 1,2,i (t1) between the antenna A1 corresponding to the channel i and the label T2, according to the triangles A1, T1 and T2, a set of relational expressions are obtained:

Figure GDA0002507437900000123
Figure GDA0002507437900000123

固定d1,2,i(t1),d1,1,m(t1)表示在所有信道对应的天线A1与标签T1之间的距离值中的任意一个,逐个选取d1,1,m(t1)代入上式进行计算,若超过一半的d1,1,m(t1)的计算结果满足上述式子,则保留该d1,2,i(t1);否则,去除d1,2,i(t1),即该值为错误值;Fixed d 1,2,i (t1), d 1,1,m (t1) represents any one of the distance values between the antenna A1 and the label T1 corresponding to all channels, select d 1,1,m ( t1) Substitute into the above formula for calculation, if more than half of the calculation results of d 1,1,m (t1) satisfy the above formula, keep the d 1,2,i (t1); otherwise, remove d 1,2, i (t1), that is, the value is an error value;

针对t1时刻,信道i对应的天线A1与标签T1之间的距离d1,1,i(t1),根据三角形A1、A2和T1,得到1组关系式:For the time t1, the distance d 1,1,i (t1) between the antenna A1 corresponding to the channel i and the label T1, according to the triangles A1, A2 and T1, a set of relational expressions are obtained:

Figure GDA0002507437900000131
Figure GDA0002507437900000131

固定d1,1,i(t1),d2,1,m(t1)表示在所有信道对应的天线A2与标签T1之间的距离值中的任意一个,逐个选取d2,1,m(t1)代入上式进行计算,若超过一半的d2,1,m(t1)的计算结果满足上述式子,则保留该d1,1,i(t1);否则,去除d1,1,i(t1),即该值为错误值;Fixed d 1,1,i (t1), d 2,1,m (t1) represents any one of the distance values between the antenna A2 and the tag T1 corresponding to all channels, select d 2,1,m ( t1) Substitute into the above formula for calculation, if more than half of the calculation results of d 2,1,m (t1) satisfy the above formula, keep the d 1,1,i (t1); otherwise, remove d 1,1, i (t1), that is, the value is an error value;

参见图14,针对t1时刻,信道i对应的天线A3与标签T1之间的距离d3,1,i(t1),根据三角形A1、A3和T1,得到1组关系式:Referring to Fig. 14, for the time t1, the distance d 3,1,i (t1) between the antenna A3 corresponding to the channel i and the tag T1, according to the triangles A1, A3 and T1, a set of relational expressions are obtained:

Figure GDA0002507437900000132
Figure GDA0002507437900000132

固定d3,1,i(t1),d1,1,m(t1)表示在所有信道对应的天线A2与标签T1之间的距离值中的任意一个,逐个选取d1,1,m(t1)代入上式进行计算,若超过一半的d1,1,m(t1)的计算结果满足上述式子,则保留该d3,1,i(t1);否则,去除d3,1,i(t1),即该值为错误值;Fixed d 3,1,i (t1), d 1,1,m (t1) represents any one of the distance values between the antenna A2 and the label T1 corresponding to all channels, select d 1,1,m ( t1) Substitute into the above formula for calculation, if more than half of the calculation results of d 1,1,m (t1) satisfy the above formula, keep the d 3,1,i (t1); otherwise, remove d 3,1, i (t1), that is, the value is an error value;

针对某一时刻所有的某一天线和某一标签之间的距离值求平均,将求得的平均值作为该时刻该天线与该标签之间的距离值da,j(t)。Average the distances between all antennas and a tag at a certain moment, and use the average value as the distance value da ,j (t) between the antenna and the tag at that moment.

步骤五,计算毛笔移动过程中每个时刻笔杆中点位置的垂直高度 h(t);根据垂直高度h(t)在笔画之间的变化规律,对书写过程中的时刻进行分段,每一段对应一个笔画;Step 5: Calculate the vertical height h(t) of the midpoint position of the pen at each moment during the movement of the brush; corresponds to a stroke;

毛笔移动过程中每个时刻笔杆上的标签1的垂直高度为h1(t),毛笔移动过程中每个时刻笔杆上的标签2的垂直高度为h2(t);The vertical height of the label 1 on the pen holder at each moment during the movement of the writing brush is h 1 (t), and the vertical height of the label 2 on the pen holder at each moment during the movement of the writing brush is h 2 (t);

Figure GDA0002507437900000141
Figure GDA0002507437900000141

其中,α1表示天线A1与标签1的连线与垂直方向的夹角;α2 表示天线A1与标签2的连线与垂直方向的夹角;d11表示天线A1与标签1之间的距离;d21表示天线A2与标签1之间的距离;d12表示天线A1与标签2之间的距离;d22表示天线A2与标签2之间的距离;a 表示天线A1与天线A2之间的距离。Among them, α1 represents the angle between the connection line between the antenna A1 and the tag 1 and the vertical direction; α2 represents the angle between the connection line between the antenna A1 and the tag 2 and the vertical direction; d 11 represents the distance between the antenna A1 and the tag 1; d 21 represents the distance between the antenna A2 and the tag 1; d 12 represents the distance between the antenna A1 and the tag 2; d 22 represents the distance between the antenna A2 and the tag 2; a represents the distance between the antenna A1 and the antenna A2.

根据毛笔垂直高度h的变化对书写过程进行笔画分割。理论上,书写过程中每次笔画之间的毛笔移动都与高度h相关:提笔时h变大,移动时h基本保持不变,落笔时h减小。因为当用毛笔书写时由于笔尖的柔软特性导致提笔落笔的幅度都较大,笔尖的长度可能改变2-3cm,因此h的变化幅度明显,可以检测用来分割笔画According to the change of the vertical height h of the brush, the writing process is divided into strokes. Theoretically, the movement of the brush between each stroke in the writing process is related to the height h: h increases when the pen is lifted, remains basically unchanged when the pen is moved, and decreases when the pen is down. Because when writing with a brush, due to the softness of the nib, the range of raising and dropping the pen is relatively large, and the length of the nib may change by 2-3cm, so the change range of h is obvious, which can be detected and used to segment strokes.

参见图7,书写过程中每次笔画之间的毛笔移动都与高度h相关:提笔时h变大,移动时h基本保持不变,落笔时h减小。如图7所示,找出每个笔画结束的时间戳te和笔画开始的时间戳ts,相位序列在这些位置分割成小段。Referring to Figure 7, the movement of the brush between each stroke in the writing process is related to the height h: h increases when the pen is lifted, remains basically unchanged when the pen is moved, and decreases when the pen is down. As shown in Figure 7, the timestamp te of the end of each stroke and the timestamp t s of the beginning of the stroke are found, and the phase sequence is divided into small segments at these positions.

设置阈值hp+η作为笔画结束的标志,若h(te)大于该阈值,表明毛笔被提起离开书写平面,一个笔画完成,时刻te即为一个笔画结束的时刻;设置阈值hp-η作为笔画开始的标志,若h(ts)小于该阈值,表明毛笔处于书写平面,信道笔画开始形成,时刻te即为一个笔画结束的时刻;hp为笔杆中点到笔尖距离;η为常数;本实施例中设参数η=5mm;由此找到每个笔画结束和开始的时间戳,对带有时间戳的相位序列分段,分割以后得到的每一段是单独一个笔画的书写过程。Set the threshold h p +η as the sign of the end of the stroke, if h(t e ) is greater than the threshold, it indicates that the writing brush is lifted off the writing plane, a stroke is completed, and the moment t e is the moment when a stroke ends; set the threshold h p − η is the sign of the beginning of the stroke, if h(t s ) is less than the threshold, it indicates that the writing brush is on the writing plane, the channel stroke begins to form, and the moment t e is the moment when a stroke ends; h p is the distance from the midpoint of the pen barrel to the tip of the pen; η is a constant; set parameter n=5mm in the present embodiment; thus find the time stamp of the end and the beginning of each stroke, segment the phase sequence with the time stamp, and each segment obtained after the division is the writing process of a single stroke .

步骤六,针对每个笔画中的每个时刻,求其对应的多个关键特征量,多个关键特征量形成该笔画对应的模板特征矩阵。Step 6: For each moment in each stroke, obtain a plurality of corresponding key feature quantities, and the plurality of key feature quantities form a template feature matrix corresponding to the stroke.

毛笔的笔尖不同于一般的笔,其质地柔软,靠笔尖蘸墨书写,因此书写效果会受到运笔力度和速度的重大影响,例如:(1)毛笔的不同倾斜角度和笔尖的下压程度引起笔迹宽度的改变;(2)笔尖用不同速度写下的笔迹外观差异很大;(3)笔尖的落笔位置和移动方向决定了一个字中每一笔的空间布局。如果每一笔画的相对位置不恰当,那么即使每一笔都写的很漂亮,整个字看起来也并不美观。因此,量化了这些特征量。The nib of the brush is different from ordinary pens, its texture is soft, and the nib is dipped in ink for writing, so the writing effect will be greatly affected by the strength and speed of the brush stroke, for example: (1) The different inclination angles of the brush and the degree of depression of the nib cause handwriting Changes in width; (2) The appearance of handwriting written at different speeds by the nib varies greatly; (3) The position and movement direction of the nib determine the spatial layout of each stroke in a word. If the relative position of each stroke is inappropriate, then even if each stroke is beautifully written, the whole character will not look beautiful. Therefore, these feature quantities are quantized.

(1)仰角(1) Elevation angle

仰角是毛笔和书写平面的夹角,代表了书写过程中毛笔的倾斜程度。我们把仰角表示为θ,θ∈(0,90°),当θ=90°时,毛笔垂直于书写平面。仰角越大,墨迹的宽度越小。笔画中的每个时刻的仰角θ(t)计算公式如下:The elevation angle is the angle between the brush and the writing plane, which represents the inclination of the brush during writing. We denote the elevation angle as θ, θ∈(0,90°), when θ=90°, the brush is perpendicular to the writing plane. The higher the elevation angle, the smaller the width of the ink blot. The calculation formula of the elevation angle θ(t) at each moment in the stroke is as follows:

Figure GDA0002507437900000161
Figure GDA0002507437900000161

(2)笔尖长度变化Δh(2) Change in pen tip length Δh

笔尖长度变化表示了书写时笔尖的下压程度,是笔迹宽度的另一个重要指标。笔尖长度变化值越大,说明毛笔尖接触到书写区域的面积越大,也就说明笔迹越宽;当毛笔以仰角θ轻轻接触到书写区域, L是笔杆上标签1到笔尖T0的距离,那么笔尖没有下压的情况下,毛笔中点位置距离纸面的垂直距离是

Figure GDA0002507437900000162
因此,只要算出毛笔的垂直高度h,就能算出笔尖长度变化量Δh;The change in the length of the nib indicates the degree of depression of the nib when writing, and is another important indicator of the width of the handwriting. The greater the change in the length of the pen tip, the larger the area where the brush tip touches the writing area, which means the wider the handwriting; when the brush touches the writing area lightly at an elevation angle θ, L is the distance from the label 1 on the pen holder to the pen tip T0, Then, when the pen tip is not pressed down, the vertical distance between the midpoint of the brush and the paper surface is
Figure GDA0002507437900000162
Therefore, as long as the vertical height h of the brush is calculated, the length change Δh of the pen tip can be calculated;

笔画中的每个时刻的Δh(t)的计算公式如下:The formula for calculating Δh(t) at each moment in the stroke is as follows:

Figure GDA0002507437900000163
Figure GDA0002507437900000163

其中,L是笔杆上标签1到笔尖T0的距离;Among them, L is the distance from the label 1 on the pen holder to the tip T0;

(3)笔尖移动速度v(3) Pen tip moving speed v

图10中所示,T1'和T2'分别是毛笔笔杆上标签T1和T2的投影。当毛笔以仰角θ轻轻接触到书写区域,L是笔杆上标签1到笔尖T0的距离,天线A1到笔尖T0的距离d10(t),计算公式如下:As shown in Figure 10, T1' and T2' are the projections of the labels T1 and T2 on the brush barrel, respectively. When the brush touches the writing area lightly at an elevation angle θ, L is the distance from the label 1 on the pen holder to the pen tip T0, and the distance d 10 (t) from the antenna A1 to the pen tip T0, the calculation formula is as follows:

Figure GDA0002507437900000164
Figure GDA0002507437900000164

d11'就是天线A1到T1'的距离。在三角形A1T1'T2'中,d 11' is the distance from the antenna A1 to T1'. In triangle A1T1'T2',

Figure GDA0002507437900000165
Figure GDA0002507437900000165

所以,t时刻下的笔尖T0到天线1的距离表示为:Therefore, the distance from the tip T0 to the antenna 1 at time t is expressed as:

Figure GDA0002507437900000171
Figure GDA0002507437900000171

其中,d11'求取方法为:参见图15,在三角形A1A2T1中,三边的长度都已知,可以用反函数算出α1的大小,然后算出d11',在三角形A2A1T2中,三边的长度都已知,可以用反函数算出α2的大小,即可算出d12'Among them, the calculation method of d 11' is as follows: refer to Figure 15, in the triangle A1A2T1, the lengths of the three sides are known, the inverse function can be used to calculate the size of α 1 , and then d 11' is calculated. In the triangle A2A1T2, the three sides The length of is known, and the inverse function can be used to calculate the size of α 2 , and then d 12' can be calculated.

那么,笔尖的移动速度计算为:Then, the movement speed of the pen tip is calculated as:

Figure GDA0002507437900000172
Figure GDA0002507437900000172

其中,Δt表示t+1时刻到t时刻的时间间隔。Among them, Δt represents the time interval from time t+1 to time t.

(4)笔尖位置T0(4) Pen tip position T0

参见图11,笔画中的每个时刻的笔尖位置T0(x(t),y(t))的计算公式如下:Referring to Figure 11, the calculation formula of the pen tip position T0 (x(t), y(t)) at each moment in the stroke is as follows:

x(t)=d11'(t)sinβ1+Lcosθ(t)sin(β21)x(t)=d 11' (t)sinβ 1 +Lcosθ(t)sin(β 21 )

y(t)=d11'(t)cosβ1+Lcosθ(t)cos(β21) (15)y(t)=d 11' (t)cosβ 1 +Lcosθ(t)cos(β 21 ) (15)

其中,β1表示A1A3与A1T1'之间的夹角,β2表示A1T1'与T1'T2'之间的夹角;Among them, β 1 represents the angle between A1A3 and A1T1', and β 2 represents the angle between A1T1' and T1'T2';

β1的求取方法如下:在三角形A1A3T1'中,A1A3、A1T1'已知,A3T1' 的求解方法为:将图15中的A1用A3替换,在三角形A3A2T1中,三边的长度都已知,可以用反函数算出A2A3与A3T1之间的夹角α3的大小,d31'=d31·sinα3;用反函数即可计算角度β1The calculation method of β 1 is as follows: in the triangle A1A3T1', A1A3, A1T1' are known, the solution method of A3T1' is: replace A1 in Figure 15 with A3, in the triangle A3A2T1, the lengths of the three sides are known , the size of the included angle α 3 between A2A3 and A3T1 can be calculated by the inverse function, d 31 ′ =d 31 ·sinα 3 ; the angle β 1 can be calculated by the inverse function.

β2的求取方法如下:在三角形A1T1'T2'中,A1T1'、A1T2'已知,T1' T2'之间的距离可求得,为bcosθ;用反函数即可计算角度β2The calculation method of β 2 is as follows: in the triangle A1T1'T2', A1T1', A1T2' are known, the distance between T1' and T2' can be obtained as bcosθ; the angle β 2 can be calculated by the inverse function.

上述所有时刻的四个关键特征量构成该笔画的特征矩阵,即:The four key feature quantities at all the above moments constitute the feature matrix of the stroke, namely:

Figure GDA0002507437900000181
Figure GDA0002507437900000181

其中,该笔画中的时刻为t,...t+t'...t+s。Wherein, the moment in the stroke is t,...t+t'...t+s.

步骤七,书法学习者书写书法,按照上述步骤一至步骤六的方法,得到书法学习者的每个笔画的临摹特征矩阵,将其与书法专家的特征矩阵进行对比,得到的差值结果用来指导学习者找到与书法家的差距,改进临摹,提高书法水平。Step 7, the calligraphy learner writes calligraphy, according to the method of the above-mentioned steps 1 to 6, obtains the copying feature matrix of each stroke of the calligraphy learner, compares it with the feature matrix of the calligraphy expert, and the difference result obtained is used to guide. The learner finds the gap with the calligrapher, improves the copying, and improves the level of calligraphy.

要求专家和学习者写一个相同的汉字“大”。然后应用系统来监视写入过程并提取特征矩阵。通过比较专家和学习者的特征矩阵,可以获得学习者表现不佳的地方。写入的轨迹如图13所示。与专家的轨迹相比,学习者的轨迹是粗糙且不正确的。首先,学习者书法字中的不同笔画之间的相对位置不正确,我们可以通过根据学习者和专家之间的差异来校正每个笔画的笔尖位置T0(x,y)而得到改善。其次,由于非平滑的写入速度,笔画是不均匀的。学习者可以模仿专家的移动速度v来改进。最后,笔画宽度是不同的,我们以水平笔画“横”为例。对于由专家书写的笔画,宽度适中,沿着笔画从左到右变宽,但是学习者写的笔画宽度是随机变化。因此,我们可以比较两个作品之间的仰角θ和笔尖的长度变化Δh。这些差异会指导学习者减小毛笔的倾斜度,和减轻施加在书写表面上的压力,从而改进笔画宽度的问题。Ask experts and learners to write the same Chinese character "大". The system is then applied to monitor the writing process and extract the feature matrix. By comparing the feature matrices of experts and learners, it is possible to obtain where learners are underperforming. The written track is shown in Figure 13. The learner's trajectory is coarse and incorrect compared to the expert's trajectory. First, the relative positions between different strokes in the learner's calligraphy characters are not correct, which we can improve by correcting the pen tip position T0(x,y) of each stroke according to the difference between the learner and the expert. Second, the strokes are uneven due to the non-smooth writing speed. The learner can imitate the expert's movement speed v to improve. Finally, the stroke width is different, let's take the horizontal stroke "horizontal" as an example. For strokes written by experts, the width is moderate and widens from left to right along the stroke, but the width of the strokes written by the learner is random. Therefore, we can compare the elevation angle θ and the length change Δh of the pen tip between the two works. These differences instruct the learner to reduce the inclination of the brush and reduce the pressure exerted on the writing surface, thereby improving the problem of stroke width.

Claims (2)

1. A calligraphy copying method based on RF technology is characterized by comprising the following steps:
writing calligraphy with a pen, and obtaining calligraphy with an antennaRSS value S of label arranged on pen holder of pen in pen taking moving processa,j,i(t) and phase information
Figure FDA0002507437890000011
Wherein, a represents the label of the antenna, a is 1,2,3, j represents the label of the RFID tag, j is 1,2, i represents the label of the channel, i is 1,2, N represents the number of the channels, and t represents the time in the moving process of the pen;
step two, phase information is corrected
Figure FDA0002507437890000012
Preprocessing the phase information to obtain preprocessed phase information
Figure FDA0002507437890000013
The preprocessing includes phase shift calibration, noise suppression and multipath processing, and the preprocessed phase information
Figure FDA0002507437890000014
Corresponding RSS value is Sa,j,m(t), wherein M denotes the number of clean channels, and M is 1, 2.., M denotes the number of clean channels;
the method for phase shift calibration specifically comprises the following steps: measuring the real distance between the tag and the antenna in the same environment as writing calligraphy; according to the real distance between the tag and the antenna, the real phase value of the tag is obtained by using a distance and phase relation; acquiring a measurement phase value of the tag; calculating the difference value between the real phase value of the tag and the measured phase value of the tag, namely the phase shift to be removed
Figure FDA0002507437890000015
Phase information for RFID tags
Figure FDA0002507437890000016
The phase shift calibration is performed on the phase information
Figure FDA0002507437890000017
Removing phase shift
Figure FDA0002507437890000018
The multipath processing method specifically comprises the following steps: in phase information
Figure FDA0002507437890000019
Selecting the phase information corresponding to the clean channel, namely the phase information after multipath processing
Figure FDA00025074378900000110
The method for determining the clean channel comprises the steps that in a calligraphy writing environment, an RFID reader skips channels with different frequencies to receive data, phase information sequences of labels are obtained in each channel, and the average value of all phase information in each channel, namely the phase average value, is solved; taking the channel label as an abscissa and the phase mean value as an ordinate, connecting all the phase mean values to form a curve, and keeping the phase mean values in a linear relation by observing the trend of the curve, wherein the channels corresponding to the phase mean values are clean channels;
step three, according to the phase information
Figure FDA0002507437890000021
And RSS value Sa,j,m(t) determining the distance d between the tag j and the antenna a corresponding to the channel m at any time ta,j,m(t); the formula used is as follows:
Figure FDA0002507437890000022
wherein f ismThe frequency of the mth clean channel is indicated, c represents the speed of light;
setting a tag and an antenna under the calligraphy writing environment, changing the distance between the tag and the antenna, and acquiring phase information and RSS information of the tag by using an RFID reader; obtaining a curve graph of RSS values changing along with the distance between the tag and the antenna; when the distance between the tag and the antenna is in the range of (0, λ/2), k is 1, when the distance between the tag and the antenna is increased by λ/2, the value of k is increased by 1, and the range section of the RSS information can be determined according to each distance range section between the tag and the antenna; determining the range interval to which the RSS value belongs according to the RSS value, namely determining the value of k; wherein λ represents a wavelength;
step four, screening all the distance values obtained in the step three according to the linear relation characteristics of the phase information received by the adjacent frequency channels and the side length relation of the triangle; calculating the average value of the distances between the a-th antenna and the j-th label corresponding to all channels at any time t according to the screened distance values, and taking the obtained average value as the distance value d between the a-th antenna and the j-th label at the timea,j(t);
Step five, utilizing the distance value da,j(t) calculating the vertical height h (t) of the midpoint position of the penholder at any time t in the moving process of the pen by adopting a trigonometric function method; segmenting the moment in the writing process according to the change rule of the vertical height h (t) of the midpoint position of the penholder among strokes, wherein each segment corresponds to one stroke;
wherein the distance value d is useda,j(t) calculating the vertical height h (t) of the midpoint position of the penholder at any time t in the moving process of the pen by adopting a trigonometric function method, wherein the formula is as follows:
Figure FDA0002507437890000031
Figure FDA0002507437890000032
α 1 shows the angle between the line connecting antenna A1 and tag 1 and the vertical direction, α 2 shows the angle between the line connecting antenna A1 and tag 2 and the vertical direction;
wherein h is1(t) represents the vertical height of the label 1; h is2(t) represents the vertical height of the label 2; d11Represents the distance between antenna a1 and tag 1; d21Shows antennas A2 andthe distance between the tags 1; d12Represents the distance between antenna a1 and tag 2; d22Represents the distance between antenna a2 and tag 2; a represents the distance between antenna a1 and antenna a 2;
wherein, the strokes in the writing process are divided according to the change of the vertical height h (t) of the midpoint position of the penholder; the method adopted is as follows: setting a threshold hp+ η as the end of stroke marker if h (t)e) Above the threshold, it indicates that the pen is lifted off the writing surface and a stroke is complete, at time teNamely the time when one stroke ends; setting a threshold hp- η as a marker for the start of a stroke if h (t)s) Less than the threshold, indicating that the pen is in the writing plane, channel strokes begin to form, at time teNamely the time when one stroke ends; h ispDistance from the middle point of the pen holder to the pen point, η is constant, according to the time teAnd time tsSegmenting the time in the writing process, wherein each segment corresponds to one stroke;
step six, aiming at each moment in each stroke, solving a plurality of corresponding key characteristic quantities, and forming a template characteristic matrix corresponding to the stroke by the plurality of key characteristic quantities; the key characteristic quantity comprises an elevation angle, pen point length change, pen point moving speed and pen point position;
the formula for calculating the elevation angle is as follows:
Figure FDA0002507437890000041
b represents the distance between tag 1 and tag 2;
wherein, the length change of the pen point is calculated by the following formula:
Figure FDA0002507437890000042
l is the distance from the label 1 on the penholder to the pen point;
wherein, calculate nib moving speed, the formula of adoption is as follows: distance from antenna a1 to pen tip T0:
Figure FDA0002507437890000043
t1 'and T2' are projections of labels T1 and T2 on the shaft of the pen, respectively; d11'Is the distance of antenna a1 to T1'; d12'Is the distance of antenna a1 to T2'; moving speed of the pen point:
Figure FDA0002507437890000044
Δ t represents the time interval from time t +1 to time t;
the pen tip positions T0(x (T), y (T)) are calculated by the following formula:
x(t)=d11'(t)sinβ1+Lcosθ(t)sin(β21);
y(t)=d11'(t)cosβ1+Lcosθ(t)cos(β21);β1represents the angle between A1A3 and A1T1', β2Represents the included angle between A1T1' and T1' T2 ';
the four key feature quantities at all the above time instants (t,. t + t.. t + s) form a feature matrix of the stroke, that is:
Figure FDA0002507437890000051
and step seven, repeating the method from the step one to the step six to obtain a copy feature matrix corresponding to each stroke, comparing the copy feature matrix with the template feature matrix, and using the obtained difference result to guide the difference between the calligraphy learner and the calligraphy writer.
2. The method for calligraphy copying based on RF technology as claimed in claim 1, wherein the noise suppression in step two is performed by:
a threshold value is given, and if the phase deviation between the phase values of two continuous moments in the phase information exceeds the set threshold value, the subsequent phase value is adjusted to be equal to the previous phase value; and smoothing the phase information by adopting a Kalman filtering method.
CN201710868373.4A 2017-09-22 2017-09-22 A Calligraphy Copying Method Based on RF Technology Expired - Fee Related CN107704788B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710868373.4A CN107704788B (en) 2017-09-22 2017-09-22 A Calligraphy Copying Method Based on RF Technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710868373.4A CN107704788B (en) 2017-09-22 2017-09-22 A Calligraphy Copying Method Based on RF Technology

Publications (2)

Publication Number Publication Date
CN107704788A CN107704788A (en) 2018-02-16
CN107704788B true CN107704788B (en) 2020-09-22

Family

ID=61175343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710868373.4A Expired - Fee Related CN107704788B (en) 2017-09-22 2017-09-22 A Calligraphy Copying Method Based on RF Technology

Country Status (1)

Country Link
CN (1) CN107704788B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108564148A (en) * 2018-03-30 2018-09-21 孙博 Track recognizing method, system, computer equipment and the storage medium of interactive label
CN108597006B (en) * 2018-04-28 2019-04-05 掌阅科技股份有限公司 The method for drafting of handwriting calculates equipment and computer storage medium
CN108764070B (en) * 2018-05-11 2021-12-31 西北大学 Stroke segmentation method based on writing video and calligraphy copying guidance method
CN111078095A (en) * 2018-10-18 2020-04-28 深圳市鹰硕技术有限公司 Intelligent writing device and method based on RFID technology
WO2022097093A1 (en) * 2020-11-06 2022-05-12 National Research Council Of Canada Method and apparatus for finger input sensing
CN112232462B (en) * 2020-11-11 2022-08-30 山西警察学院 Choice question answering desk system based on RFID
CN113945889A (en) * 2021-10-15 2022-01-18 北京信息科技大学 RFID tag ranging method based on multi-antenna PDOA
CN114296565B (en) * 2021-11-17 2024-05-14 湖北工业大学 Method for correcting position information of synchronous pen point of paper screen
CN114742193B (en) * 2022-04-20 2025-05-16 南京邮电大学 A handwriting trajectory tracking method based on RFID

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101089654A (en) * 2007-07-17 2007-12-19 天津大学 RFID wireless positioning method based on phase difference ranging
KR20080072146A (en) * 2007-02-01 2008-08-06 충남대학교산학협력단 Square loop antenna with meander structure for RDF tag
CN103823628A (en) * 2013-12-15 2014-05-28 北京工业大学 Calligraphy stoke simulating method combined with pen pressure
US9690961B2 (en) * 2008-06-05 2017-06-27 Micron Technology, Inc. Systems and methods to determine kinematical parameters using RFID tags
CN107067031A (en) * 2017-03-29 2017-08-18 西北大学 A kind of calligraphy posture automatic identifying method based on Wi Fi signals

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080072146A (en) * 2007-02-01 2008-08-06 충남대학교산학협력단 Square loop antenna with meander structure for RDF tag
CN101089654A (en) * 2007-07-17 2007-12-19 天津大学 RFID wireless positioning method based on phase difference ranging
US9690961B2 (en) * 2008-06-05 2017-06-27 Micron Technology, Inc. Systems and methods to determine kinematical parameters using RFID tags
CN103823628A (en) * 2013-12-15 2014-05-28 北京工业大学 Calligraphy stoke simulating method combined with pen pressure
CN107067031A (en) * 2017-03-29 2017-08-18 西北大学 A kind of calligraphy posture automatic identifying method based on Wi Fi signals

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种有效消除环境噪声的被动式目标定位方法;常俪琼;《计算机学报》;20160616;第39卷(第5期);全文 *

Also Published As

Publication number Publication date
CN107704788A (en) 2018-02-16

Similar Documents

Publication Publication Date Title
CN107704788B (en) A Calligraphy Copying Method Based on RF Technology
JP2641388B2 (en) Adjustment method of line space and baseline in handwritten character recognition system
Garz et al. Layout analysis for historical manuscripts using sift features
CN102073870A (en) Method for recognizing Chinese character handwriting on touch screen
CN102521560A (en) Instrument pointer image identification method of high-robustness rod
RU2007149055A (en) DEFORMING MANUFACTURED FRAGMENTS FOR NORMALIZATION AND IMPROVEMENT / IMPROVEMENT OF MANUFACTURED FRAGMENTS
CN101976437A (en) High-resolution remote sensing image variation detection method based on self-adaptive threshold division
CN111178106B (en) A method for judging the direction of tag displacement based on UHF RFID phase and SVM
CN107168526B (en) Non-contact virtual screen operation identification method based on passive RFID (radio frequency identification) tag
CN103530590A (en) DPM (direct part mark) two-dimensional code recognition system
Chang et al. RF-copybook: A millimeter level calligraphy copybook based on commodity RFID
CN104392459A (en) Infrared image segmentation method based on improved FCM (fuzzy C-means) and mean drift
CN113723221A (en) Indoor behavior real-time identification method and system based on WiFi channel state information
CN107560618B (en) Robot indoor orientation method based on RFID
CN103839274A (en) Extended target tracking method based on geometric proportion relation
CN104517287A (en) Image matching method and device
CN104156722A (en) Airport target detection method based on high-resolution remote sensing image
CN106250818A (en) A kind of total order keeps the face age estimation method of projection
EP1993077A3 (en) Method and apparatus for magnetic character recognition
CN102831418A (en) Handwritten Chinese character tilting correction method and device
CN101388112A (en) Method and system for changing font style
CN110377640A (en) One kind is based on deep learning ballot statistical method
CN102324048B (en) Pen mark feature computer quantification and comparison assisted analysis system
CN101178629A (en) Character cutting method
CN1128074A (en) Method of stroke segmentation for handwritten input

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200922