An air handwriting recognition method for virtual reality human-computer interaction

By capturing and correcting handwriting trajectory sequences in virtual reality devices, and constructing encoder and decoder neural network models, the problem of string and text line recognition in air handwriting recognition was solved, achieving efficient and accurate air handwriting recognition and virtual reality interaction, and providing character-level error correction functionality.

CN117409423BActive Publication Date: 2026-11-27CHONGQING UNIV OF POSTS & TELECOMM
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311325667.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-13
Publication Date
2026-11-27
Estimated Expiration
2043-10-13

AI Technical Summary

Technical Problem

Existing methods for handwriting recognition in the air cannot recognize strings and lines of text, have insufficient accuracy and efficiency, and lack integration with virtual reality technology, which limits the freedom and sophistication of human-computer interaction.

Method used

By capturing handwritten trajectory sequences using virtual reality devices, and after correction and normalization, a neural network model based on encoders and decoders is constructed. Feature extraction and recognition are then performed using one-dimensional convolutional neural networks and attention mechanisms to achieve recognition of handwritten strings in the air.

Benefits of technology

It enables natural interaction by freely writing strings in virtual reality scenes, improves recognition efficiency and accuracy, can recognize and output handwritten text or strings in the air, and provides character-level error detection and correction, enhancing the user's immersive interactive experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117409423B_ABST
    Figure CN117409423B_ABST
Patent Text Reader

Abstract

The application relates to the field of human-computer interaction and computer vision, in particular to an air handwriting recognition method for virtual reality human-computer interaction, which comprises the following steps: capturing a handwriting trajectory sequence of a user in the air by using a virtual reality device to obtain the handwriting trajectory sequence; projecting the handwriting trajectory sequence to the same plane to correct the handwriting trajectory sequence; performing normalization and resampling on the corrected handwriting trajectory sequence; extracting the offset of the horizontal axis and the vertical axis of a trajectory point, the cosine and sine values of a trajectory writing direction, and the cosine and sine values of a trajectory writing curvature from the normalized handwriting trajectory sequence; constructing a neural network attention model based on an encoder and a decoder structure, inputting the extracted features into the model for recognition, and then outputting a recognition result; the application can guarantee high recognition accuracy and significantly improve the recognition speed of air handwriting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of human-computer interaction and computer vision, and in particular to an aerial handwriting recognition method for virtual reality human-computer interaction. Background Technology

[0002] In today's digital age, users need to interact with intelligent devices such as computers in an efficient and natural way. Although traditional keyboard input and touch screen operation have been widely used, traditional input methods are still limited by physical space constraints, which to some extent restricts the freedom and advancement of human-computer interaction.

[0003] In recent years, with the continuous development of sensor technology and machine learning technology, an aerial handwriting human-computer interaction method based on air gestures has been proposed. However, current aerial handwriting systems still have many shortcomings in terms of recognition performance, specifically including:

[0004] (1) Current air handwriting recognition methods can only recognize single characters (e.g., patent application with publication number CN109033954A), but cannot recognize strings and text lines, which cannot meet the needs of people in actual application scenarios;

[0005] (2) The existing air handwriting methods have both recognition accuracy and efficiency that need to be improved (for example, the patent application with publication number CN107316067B). More novel and efficient recognition models are needed to meet the application requirements of high accuracy and high efficiency.

[0006] (3) At present, there is a lack of human-computer interaction systems that fully combine air handwriting recognition and virtual reality technology, and there is a gap in its application in virtual reality.

[0007] In summary, there is an urgent need to explore a new method for aerial handwriting interaction that can overcome the above problems. This invention proposes a handwriting interaction scheme that combines aerial handwriting recognition technology with virtual reality technology to achieve a more natural human-computer interaction method. Summary of the Invention

[0008] To improve the efficiency and accuracy of air-written string recognition, this invention proposes an air-written string recognition method for virtual reality human-computer interaction, specifically including the following steps:

[0009] The handwriting trajectory sequence is obtained by capturing the trajectory sequence of a user's handwriting in the air using virtual reality equipment.

[0010] The handwritten trajectory sequence is projected onto the same plane to correct the handwritten trajectory sequence;

[0011] The corrected handwritten trajectory sequence is then normalized, including normalization and resampling.

[0012] The offsets of the horizontal and vertical axes of the trajectory points, the cosine and sine values ​​of the trajectory writing direction, and the cosine and sine values ​​of the trajectory writing curvature are extracted from the normalized handwritten trajectory sequence.

[0013] A neural network attention model based on an encoder and decoder structure is constructed. The extracted features are input into the model for recognition, and then the recognition result is output.

[0014] Furthermore, the process of correcting the handwritten trajectory sequence includes: projecting the handwritten trajectory sequence onto the correction plane Ax+Bx+Cz+D=0, and using the normal vector of the correction plane as the rotation axis to selectively rotate it to a position parallel to the z=C plane.

[0015] Furthermore, the correction plane Ax + Bx + Cz + D = 0 satisfies the condition that the perpendicular distance from each trajectory point in the handwritten trajectory sequence to the correction plane is the shortest. Therefore, the process of obtaining the parameters A, B, C, and D of the correction plane is expressed as follows:

[0016]

[0017] Among them, (x i ,y i ,z i ) represents the coordinates of the i-th trajectory point in the handwritten trajectory sequence; n represents the number of trajectory points in the handwritten trajectory sequence.

[0018] Furthermore, a rotation is performed using the normal vector of the correction plane as the axis of rotation, projecting the image to a position parallel to the z=C plane. This involves rotating the image with an angle θ around the normal vector of the correction plane. Based on the rotation angle θ and the normal vector of the correction plane (A,B,C), a rotation matrix R is constructed using Rodriguez's rotation formula. Then, the coordinates of the rotated trajectory points are calculated using the rotation matrix R. Specifically, this includes:

[0019] (x i ',y i ',z i ')=(x i ,y i ,z i )·R

[0020]

[0021]

[0022] Among them, (x i ',y i ',z i ') is (x i ,y i ,z iThe trajectory points obtained after rotation.

[0023] Furthermore, the corrected handwritten trajectory sequence undergoes normalization processing, including:

[0024] Standardize the X-axis and Y-axis coordinates of the trajectory points respectively, that is, subtract the mean of the corresponding axis data from the value of each trajectory point and then divide it by the standard deviation of the corresponding axis data.

[0025] After standardization, a resampling step size is set to resample the standardized handwritten trajectory sequence.

[0026] Furthermore, extracting the offsets of the horizontal and vertical axes of the trajectory points, the cosine and sine values ​​of the trajectory writing direction, and the cosine and sine values ​​of the trajectory writing curvature from the normalized handwritten trajectory sequence specifically includes the following steps:

[0027] The calculation of the horizontal axis offset of the trajectory point includes: Δx t =x t -x t-1 ;

[0028] The calculation of the vertical axis offset of the trajectory point includes: Δy t =y t -y t-1 ;

[0029] The calculation of the cosine of the trajectory writing direction includes:

[0030] The calculation of the sine of the trajectory writing direction includes:

[0031] The calculation of the cosine of the curvature of the trajectory writing includes:

[0032]

[0033] The calculation of the sine of the curvature of the trajectory writing includes:

[0034] Where, Δx t The x-coordinate of the t-th trajectory point in the normalized handwritten trajectory sequence is represented by the x-coordinate of the t-th trajectory point. t The offset; Δy t This represents the ordinate y of the t-th trajectory point in the normalized handwritten trajectory sequence. t The offset; α t β represents the writing direction of the t-th trajectory point in the normalized handwritten trajectory sequence; t It represents the writing curvature of the t-th trajectory point in the normalized handwritten trajectory sequence.

[0035] Furthermore, the construction of a neural network attention model based on encoder and decoder structures includes:

[0036] The encoder uses a one-dimensional convolutional neural network to encode features by inputting them into the one-dimensional convolutional neural network.

[0037] The decoder employs a recurrent unit based on an attention mechanism, using the average of the feature codes of all features as the initial input, and predicting character probabilities sequentially according to the temporal order of the input.

[0038] Furthermore, the one-dimensional convolutional neural network includes a first convolutional module, a second convolutional module, and a third convolutional module. The first convolutional module consists of three concatenated first residual blocks with 64 channels. The second convolutional module consists of one second residual block with 128 channels and two first residual blocks. The third convolutional module consists of one second residual block with 256 channels and two first residual blocks.

[0039] The first residual block includes a convolutional layer, a dropout layer, and an adder. The input data is processed sequentially through the convolutional layer, the dropout layer, and the convolutional layer, and then added to the input by the adder to become the output of the first residual block. The convolutional layer consists of a one-dimensional convolutional layer, a batch normalization layer, and an activation function layer.

[0040] The second residual layer includes a convolutional layer, a dropout layer, a one-dimensional convolutional layer, and an adder. The input data is processed sequentially through the convolutional layer, the dropout layer, and the convolutional layer, and then added to the input data processed by the one-dimensional convolutional layer by the adder to obtain the output of the second residual module.

[0041] Furthermore, the decoder predicts the probability of the target character based on the current decoder state, specifically including the following steps:

[0042] Calculate the current hidden layer state, i.e.:

[0043]

[0044] in, h represents the hidden layer state at time step l; l-1 y represents the decoder state at time step (l-1). l-1 Represents the target character at time step l-1; RNN(·) represents a recurrent neural unit;

[0045] Relevant contextual features are extracted from the encoded feature sequence output by the encoder using an attention mechanism. The current contextual features are represented as follows:

[0046]

[0047] Among them, c l This represents the contextual features at the l-th time step; z iLet N be the i-th feature in the encoded feature sequence output by the encoder, and N be the number of features in the encoded feature sequence output by the encoder; (·) T Indicates the transpose operation;

[0048] The decoder combines the current hidden state and the current context features to calculate the current decoder state, which is represented as:

[0049]

[0050] Among them, h l Represents the decoder state at the l-th time step; [,] represents concatenation operation, W c This is the first weight matrix;

[0051] Predict the current target character based on the current decoder state, including:

[0052] P(y l |x,y <l = softmax(W) s h l +b s )

[0053] Wherein, P(y l |x,y <l This indicates that the input is x and the first l characters are y. <l The output is y in the case of l The probability of W; s b is the second weight matrix. s This is the bias value.

[0054] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0055] 1) This invention provides a method for human-computer interaction in virtual reality, realizing a natural and intuitive way of human-computer interaction in virtual reality. Users can freely write strings in virtual reality scenes, providing a more immersive human-computer interaction experience. At the same time, this invention overcomes the difficulty of three-dimensional coordinate transformation in the virtual world for handwriting in the air, and can correct the user's writing direction to ensure the consistency and correctness of the user's handwriting in the air.

[0056] 2) The air handwriting recognition method for virtual reality human-computer interaction of the present invention adopts an encoding and decoding architecture, in which the encoder is mainly based on one-dimensional convolutional Res-CNN. Compared with traditional methods, it significantly improves recognition efficiency while ensuring accuracy, achieves faster user response, and meets the requirements of high efficiency and real-time performance for human-computer interaction in virtual reality scenarios.

[0057] 3) The air handwriting method proposed in this invention can recognize and output air handwritten text or strings, while most existing air handwriting systems can only recognize single characters. At the same time, the recognition method of this invention allows the system to achieve character-level error detection and correction. Furthermore, the solution of this invention combines the contextual information of the character for error correction. That is, if the user writes an incorrect character, the system can immediately provide feedback and correction suggestions, which significantly improves the accuracy of air handwriting recognition. Attached Figure Description

[0058] Figure 1 This is a schematic flowchart of the aerial handwriting recognition method for virtual reality human-computer interaction according to the present invention.

[0059] Figure 2 Figure (a) is a schematic diagram of the interface of the virtual reality-based aerial handwriting interaction system of the present invention, wherein Figure (b) is a schematic diagram of user interaction, Figure (c) is a schematic diagram of handwritten text, and Figure (d) is a schematic diagram of handwriting result.

[0060] Figure 3 A flowchart of the preprocessing of the air handwritten trajectory of the present invention;

[0061] Figure 4 This is a schematic diagram illustrating the feature extraction of handwritten trajectory points in the air according to the present invention;

[0062] Figure 5 This is a schematic diagram of the air-based handwritten text recognition based on the encoding and decoding architecture of the present invention;

[0063] Figure 6 Figure 1 shows a detailed configuration diagram of the Res-CNN-based encoding module of the present invention. Figure 2(a) is a schematic diagram of the residual block A structure, Figure 3(b) is a schematic diagram of the residual block B structure, and Figure 4(c) is a schematic diagram of the Res-CNN encoder structure. Detailed Implementation

[0064] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0065] This invention proposes an aerial handwriting recognition method for virtual reality human-computer interaction, specifically including the following steps:

[0066] The handwriting trajectory sequence is obtained by capturing the trajectory sequence of a user's handwriting in the air using virtual reality equipment.

[0067] The handwritten trajectory sequence is projected onto the same plane to correct the handwritten trajectory sequence;

[0068] The corrected handwritten trajectory sequence is then normalized, including normalization and resampling.

[0069] The offsets of the horizontal and vertical axes of the trajectory points, the cosine and sine values ​​of the trajectory writing direction, and the cosine and sine values ​​of the trajectory writing curvature are extracted from the normalized handwritten trajectory sequence.

[0070] A neural network attention model based on an encoder and decoder structure is constructed. The extracted features are input into the model for recognition, and then the recognition result is output.

[0071] This example provides an aerial handwriting recognition method for virtual reality human-computer interaction and its application in English vocabulary teaching. The aim is to leverage virtual reality technology to allow users to freely write English words in a virtual three-dimensional space for learning. For instance, this recognition method can be applied to an English vocabulary teaching system, capturing and recognizing human gestures in a virtual reality environment to achieve interaction. By writing in the air, users are freed from the constraints of writing boards, mice, and keyboards, utilizing virtual reality technology to provide an immersive experience integrating multiple senses (audio, visual, kinematic, and kinetic), offering a more novel and natural human-computer interaction learning experience. Students can use gestures or controllers as sensors to write English words and letters in the air. The virtual reality device captures and recognizes the gestures or detects the posture and position of the controllers, recording the trajectory and recognizing the handwriting results in real time, displaying them on a virtual reality head-mounted display. In this embodiment, machine learning technology is further utilized to assist handwriting recognition and provide timely teaching feedback, recording student learning data to help students overcome knowledge weaknesses, enabling targeted, efficient, and personalized English vocabulary learning, and significantly improving students' English writing skills and memory. Figure 1 The above-ground handwriting recognition method for virtual reality human-computer interaction in this embodiment mainly includes the following four steps:

[0072] Step 1: The user wears a virtual reality device (such as a VR headset) and uses a controller or hand to write text or strings in the air, while the virtual reality device tracks and records the trajectory of the handwriting in the air;

[0073] Step 2: Correct the coordinates of the collected handwritten trajectory in three-dimensional space, find the optimal projection plane based on the least squares method, and project it onto the Z=C plane based on the Rodrigues rotation formula;

[0074] Step 3: Preprocess and extract features from the projected coordinate points to obtain the feature time series sequence;

[0075] Step 4: Input the processed time sequence into the encoding and decoding recognition model consisting of a 3D convolutional network encoder and a recurrent neural network decoder, and output the handwritten text or string recognition result.

[0076] In this embodiment, professional modeling software such as Substance Painter and 3DS MAX are used to model the scene. Through these software, multiple scenes such as homes, farms, and the wild in real life can be modeled in detail.

[0077] In this embodiment, a virtual reality headset is used as a display platform. The modeled scene is displayed to the user with high-quality visual effects. The virtual reality headset, through its high-resolution display and perspective technology, allows the user to immerse themselves in a realistic virtual environment and experience a truly immersive experience.

[0078] In this embodiment, Unity virtual reality (VR) technology is used to achieve interaction with students. Specifically, the controllers corresponding to the virtual reality headset are used as sensors. The input system in Unity reads and responds to the input of the controllers or controllers, thereby detecting events such as button presses, releases, and collisions. Based on the position and posture information of the controllers, air gesture interaction is achieved.

[0079] Furthermore, Unity's physics engine can be used to add rigid body and collider components to objects in virtual reality scenes to set gravity, enabling collision detection and physical interaction between objects, allowing objects to be naturally subjected to forces and react to collisions.

[0080] Furthermore, by using Unity's UI system, user interface elements such as buttons, sliders, and text can be created in virtual reality scenes, and these elements can be rendered in a childlike manner to enable interactive operations such as clicking and swiping. In this embodiment, development tools such as Visual Studio are used to write interactive scripts to define the interaction methods and rules between the user and the virtual environment, implement complex interactive logic and behaviors, complete the entire English vocabulary teaching process, and provide a more diverse user experience.

[0081] This embodiment provides a detailed explanation of a handwriting trajectory acquisition, coordinate correction, normalization processing, feature extraction, and recognition model for an aerial handwriting recognition method for virtual reality human-computer interaction. Specifically, it includes the following steps:

[0082] (I) Handwriting Trajectory Acquisition

[0083] By using virtual reality devices to capture and recognize gestures or detect the posture and position of the controller, the position of the fingertip or the endpoint of the controller ray is recorded in each frame to obtain a handwriting trajectory sequence.

[0084] (II) Coordinate Correction

[0085] Since handwriting is done in the air, the trajectory may jitter and may not lie in the same plane. Therefore, the trajectory is first corrected to the plane Ax+Bx+Cz+D=0. For each coordinate point (x) in the handwritten trajectory sequence... i ,y i ,z i The perpendicular distance from the plane can be calculated as follows:

[0086]

[0087] Establish an objective function that minimizes the sum of squares of the vertical distances:

[0088]

[0089] The value of the objective function is minimized by using optimization algorithms such as the least squares method, and the resulting plane is the projection plane.

[0090] The correction plane is rotated to a position parallel to the z=C plane to eliminate the z-coordinate value and retain only the x and y coordinates. Specifically, this includes:

[0091] The normal vector of the correction plane is N = (A, B, C), and the normal vector of the projected plane after rotation is N' = (0, 0, 1). The angle θ required for the rotation plane can be calculated using the following formula:

[0092]

[0093] Using the normalized correction plane normal vector as the rotation axis (normalizing the plane normal vector (A,B,C) to a unit vector to ensure the rotation axis has a length of 1), and a rotation angle θ, a rotation matrix R is constructed according to Rodrigues' rotation formula, expressed as:

[0094]

[0095] The coordinates of the projected points, calculated using the rotation matrix, are represented as follows:

[0096] (x i ',y i ',z i ')=(x i ,y i ,z i )·R

[0097] Among them, (x i ',y i ',z i ') is (x i ,y i ,z i The trajectory points obtained after rotation.

[0098] (III) Standardized Processing

[0099] like Figure 3 As shown, the normalization process for handwritten trajectories includes normalization and resampling, namely:

[0100] Standardize the X-axis and Y-axis coordinates of the trajectory points respectively, that is, subtract the mean of the corresponding axis data from the value of each trajectory point and then divide it by the standard deviation of the corresponding axis data.

[0101] After standardization, a resampling step size is set to resample the standardized handwritten trajectory sequence. The purpose of this operation is to reduce the number of trajectory points, which facilitates the extraction of subsequent speech features.

[0102] (iv) Feature Extraction

[0103] Feature extraction will extract and retain six-dimensional features for each point, resulting in a feature sequence. This feature sequence includes the offsets of the horizontal and vertical axes of the trajectory points, the cosine and sine values ​​of the trajectory writing direction, and the cosine and sine values ​​of the trajectory writing curvature extracted from the normalized handwritten trajectory sequence. The specific acquisition process includes:

[0104] The calculation of the horizontal axis offset of the trajectory point includes: Δx t =x t -x t-1 ;

[0105] The calculation of the vertical axis offset of the trajectory point includes: Δy t =y t -y t-1 ;

[0106] The calculation of the cosine of the trajectory writing direction includes:

[0107] The calculation of the sine of the trajectory writing direction includes:

[0108] The calculation of the cosine of the curvature of the trajectory writing includes:

[0109]

[0110] The calculation of the sine of the curvature of the trajectory writing includes:

[0111] Where, Δx t The x-coordinate of the t-th trajectory point in the normalized handwritten trajectory sequence is represented by the x-coordinate of the t-th trajectory point. t The offset, Figure 4 Provide a schematic diagram of the horizontal coordinate offset Δx; Δy t This represents the ordinate y of the t-th trajectory point in the normalized handwritten trajectory sequence. t The offset, Figure 4Provide a schematic diagram of the vertical coordinate offset Δy; α t This represents the writing direction of the t-th trajectory point in the normalized handwritten trajectory sequence. Figure 4 Provide a schematic of the writing direction α; β t Let represent the writing curvature of the t-th trajectory point in the normalized handwritten trajectory sequence. Figure 4 A schematic diagram of the writing direction β is given.

[0112] (V) Identification Model

[0113] In this embodiment, the recognition model consists of an encoder and a decoder, such as Figure 5 The encoder is responsible for calculating the feature encoding representation of the input sequence, and the decoder outputs the conditional probability of the target sequence. The specific operations are as follows:

[0114] The encoder employs a one-dimensional convolutional neural network, Res-CNN, which can directly process sequence trajectories and exhibits extremely high recognition performance. Res-CNN encodes the features of the input sequence x:

[0115]

[0116] Where x represents the input handwritten trajectory feature, denoted as x={X1,X2,…,X…} N}, X t This represents the t-th element of the input handwritten trajectory feature, where t∈{1,2,…,N}; This refers to Res-CNN.

[0117] Meanwhile, the initial hidden state h0 of the loop decoder can be calculated as:

[0118]

[0119] Where N is the length of the input sequence, z t This represents the t-th element output by the encoder, and the output sequence is represented as Z = {z1, z2, ..., z}. N}

[0120] The decoder employs an attention-based recurrent unit that predicts the probability of the target character based on its current decoder state. Specifically, it includes the following steps:

[0121] First, calculate the hidden layer state, represented as:

[0122]

[0123] in, h represents the hidden layer state at time step l; l-1 y represents the decoder state at time step (l-1).l-1 Represents the target character at time step l-1; RNN(·) represents a recurrent neural unit.

[0124] Then, relevant contextual features are extracted from the encoded feature sequence Z using an attention mechanism to assist in the generation of the target character. The current contextual features can be calculated as follows:

[0125]

[0126] Among them, c l This represents the contextual features at the l-th time step; z i Let N be the i-th feature in the encoded feature sequence output by the encoder, and N be the number of features in the encoded feature sequence output by the encoder; (·) T This indicates the transpose operation.

[0127] Next, the decoder combines the current hidden state with the current context features to calculate the current decoder state, which is represented as:

[0128]

[0129] Among them, h l Represents the decoder state at the l-th time step; [,] represents concatenation operation, W c This is the first weight matrix.

[0130] Finally, based on the current decoder state, the current target character is predicted, including:

[0131] P(y l |x,y <l = softmax(W) s h l +b s )

[0132] Wherein, P(y l |x,y <l This indicates that the input is x and the first l characters are y. <l The output is y in the case of l The probability of W; s b is the second weight matrix. s This is the bias value.

[0133] This embodiment also provides detailed information on the structure, configuration, and training details of the encoding / decoding network, specifically including:

[0134] 1) Network structure: Res-CNN, or one-dimensional convolutional neural network, such as... Figure 6(c) The network includes a first convolutional module, a second convolutional module, and a third convolutional module. The first convolutional module consists of three concatenated first residual blocks (i.e., residual block A) with 64 channels. The second convolutional module consists of one concatenated second residual block (i.e., residual block B) with 128 channels and two concatenated first residual blocks. The third convolutional module consists of one concatenated second residual block with 256 channels and two concatenated first residual blocks.

[0135] like Figure 6 (a) The first residual block includes a convolutional layer, a dropout layer and an adder. The input data is processed by the convolutional layer, the dropout layer and the convolutional layer in sequence, and then added to the input by the adder to become the output of the first residual block. The convolutional layer is composed of a one-dimensional convolutional layer, a batch normalization layer and an activation function layer (ReLU function activation) cascaded in sequence.

[0136] like Figure 6 (b) The second residual layer includes a convolutional layer, a dropout layer, a one-dimensional convolutional layer, and an adder. The input data is processed sequentially through the convolutional layer, the dropout layer, and the convolutional layer, and then added to the input data processed by the one-dimensional convolutional layer by the adder to obtain the output of the second residual module.

[0137] 2) Network configuration: For Res-CNN, such as Figure 6 In residual block A, the one-dimensional convolution parameters are all with a kernel size of 3 and a stride of 1 (i.e., k: 3, s: 1), dropout = 0.2, and the skip connections use identity mapping; in residual block B, the first layer of one-dimensional convolution parameters are with a kernel size of 3 and a stride of 2 (i.e., k: 3, s: 2), the second layer of one-dimensional convolution parameters are with a kernel size of 3 and a stride of 1 (i.e., k: 3, s: 1), dropout = 0.2, and the skip connections use 1×1 convolution skip connections, that is, the one-dimensional convolution parameters of the skip layer are with a kernel size of 1 and a stride of 2 (i.e., k: 1, s: 2).

[0138] 3) Training details: In the Res-CNN module, the weights of each one-dimensional convolutional layer are distributed from... Initialization, where c is the input channel and k is the convolution kernel size; the decoder has 256 hidden units, distributed from... (n is the number of hidden units) Initialize the weights; U(,) represents a uniform distribution.

[0139] This embodiment also provides an aerial handwriting recognition system for virtual reality human-computer interaction, used to implement an aerial handwriting recognition method for virtual reality human-computer interaction. The system includes a data acquisition module, a data correction module, a data normalization module, a feature extraction module, and a recognition module, wherein:

[0140] The data acquisition module is used to collect the trajectory sequence of handwriting by the user in the air. In this embodiment, a virtual reality device's controller or similar device is used as the acquisition module. The user generates the handwriting trajectory sequence by interacting with the controller or other motion-sensing device. Figure 2 In one implementation case, the user writes down a word through a sensor device, and the system checks whether the handwritten result matches the target structure to determine if the writing is accurate.

[0141] The data correction module is used to project the trajectory points in the collected handwritten trajectory sequence onto the same plane;

[0142] The data normalization module is used to normalize the corrected data, including data normalization and resampling.

[0143] The feature extraction module is used to extract the offsets of the horizontal and vertical axes of the trajectory points, the cosine and sine values ​​of the trajectory writing direction, and the cosine and sine values ​​of the trajectory writing curvature from the normalized data as features of each trajectory in the writing trajectory sequence.

[0144] The recognition module is used to recognize characters based on the characteristics of trajectory points and predict the characters written by the user.

[0145] In this example, to verify the effectiveness of the proposed method, the proposed method was first evaluated against other recognition methods on the publicly available aerial handwriting dataset IAHWE-UCAS2016. This dataset contains 150,480 English word samples, covering 2280 English words, with 66 different samples for each English word. The experimental results are shown in Table 1.

[0146] Table 1

[0147] Recognition Model Accuracy (%) Directional features + MQDF 89.64 Bidirectional recurrent neural network + Softmax classification 96.34 Bidirectional Recurrent Neural Network + CTC Decoding 97.37 Bidirectional recurrent neural network + decoder 97.74 Res-CNN+ Decoder 97.88

[0148] The training process uses an optimizer with a learning rate of 0.001, a minibatch size of 240, and a sampling rate of 0.1. It reaches convergence after 8000 iterations.

[0149] In this example, to verify the computational efficiency of the proposed one-dimensional convolutional network Res-CNN, the proposed method was compared with DBLSTM. DBLSTM consists of three stacked BLSTM layers with 256 hidden units each, and the outputs of the last two layers are subsampled. Finally, the average cost was calculated and compared under different batch sizes, and the experimental results are shown in Table 2.

[0150] Table 2

[0151]

[0152] As can be seen from the table above, the average computation time for each batch size using the one-dimensional convolutional network Res-CNN to replace the RNN encoding module proposed in this invention is shorter than that of DBLSM. This shows that the Res-CNN encoding module used in this invention can work efficiently, significantly improve the recognition speed, and has good timeliness.

[0153] The model achieved a 97.88% recognition rate for handwritten English words in the air on the IAHWE-UCAS2016 dataset. Comparisons show that this accuracy meets the recognition precision requirements of an English vocabulary teaching platform. In practical application, this invention supports users writing words not from the vocabulary list. Since the purpose of this English vocabulary teaching system is to guide students in learning English words from teaching examples, the network recognition model automatically determines whether the words actually written by the student match the learned words, thereby automatically generating learning evaluation data to provide timely corrective feedback to the user.

[0154] In summary, the above experiments demonstrate the usability of the encoding and decoding architecture of the aerial handwriting recognition method in this invention. The proposed method was tested on a publicly available aerial handwritten English word dataset, and the experimental results show that the proposed method is very effective for recognizing aerial handwritten English words and can be applied to practical systems.

[0155] This invention provides a computer device including a processor and a memory, using a virtual reality headset as the implementation platform. The memory is used to store computer programs, and the processor is connected to the memory to execute the computer programs stored in the memory. Through this computer device, an air handwriting recognition method for virtual reality human-computer interaction is realized.

[0156] Specifically, memory includes various media, such as ROM, RAM, magnetic disks, USB flash drives, memory cards, or optical discs, used to store program code. Processors can be general-purpose processors, such as central processing units (CPUs) and network processors (NPs), or programmable logic devices such as digital signal processors (DSPs), application-specific integrated circuits (ASICs), and field-programmable gate arrays (FPGAs), or other hardware components.

[0157] Specifically, virtual reality headsets include various types, such as PC-connected headsets that connect to a personal computer (PC) or game console via cable, providing higher image quality and performance; stand-alone virtual reality headsets have built-in computer processors and memory and do not require connection to external devices; and mixed reality headsets combine virtual reality and augmented reality technologies, which can overlay digital content onto the real world in virtual scenes.

[0158] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for aerial handwriting recognition in virtual reality human-computer interaction, characterized in that, Specifically, the following steps are included: The handwriting trajectory sequence is obtained by capturing the trajectory sequence of a user's handwriting in the air using virtual reality equipment. The handwritten trajectory sequence is projected onto the same plane to correct the handwritten trajectory sequence; The process of correcting the handwritten trajectory sequence includes: projecting the handwritten trajectory sequence onto the correction plane Ax+Bx+Cz+D=0, and rotating it using the normal vector of the correction plane as the axis of rotation to project it to a position parallel to the z=C plane. The correction plane Ax + Bx + Cz + D = 0 satisfies the condition that the perpendicular distance from each point in the handwritten trajectory sequence to the correction plane is the shortest. Therefore, the process of obtaining the parameters A, B, C, and D of the correction plane is as follows: in, The coordinates of the i-th trajectory point in the handwritten trajectory sequence are represented by ; n represents the number of trajectory points in the handwritten trajectory sequence; The corrected plane normal vector is used as the axis of rotation to project the object onto a position parallel to the z=C plane. This means rotating the object by an angle θ. Based on the rotation angle θ and the corrected plane normal vector (A,B,C), a rotation matrix R is constructed using Rodrigues's rotation formula. Then, the coordinates of the rotated trajectory points are calculated using the rotation matrix R. Specifically, this includes: in, for The trajectory points obtained after rotation; The corrected handwritten trajectory sequence is then normalized, including normalization and resampling. The offsets of the horizontal and vertical axes of the trajectory points, the cosine and sine values ​​of the trajectory writing direction, and the cosine and sine values ​​of the trajectory writing curvature are extracted from the normalized handwritten trajectory sequence. A neural network attention model based on an encoder and decoder structure is constructed. The extracted features are input into the model for recognition, and then the recognition result is output.

2. The method for aerial handwriting recognition for virtual reality human-computer interaction according to claim 1, characterized in that, The normalization process for the corrected handwritten trajectory sequence includes: Standardize the X-axis and Y-axis coordinates of the trajectory points respectively, that is, subtract the mean of the corresponding axis data from the value of each trajectory point and then divide it by the standard deviation of the corresponding axis data. After standardization, a resampling step size is set to resample the standardized handwritten trajectory sequence.

3. The method for aerial handwriting recognition for virtual reality human-computer interaction according to claim 1, characterized in that, Extracting the offsets of the horizontal and vertical axes of the trajectory points, the cosine and sine values ​​of the trajectory writing direction, and the cosine and sine values ​​of the trajectory writing curvature from the normalized handwritten trajectory sequence specifically includes the following steps: The calculation of the horizontal axis offset of the trajectory point includes: ; The calculation of the vertical axis offset of the trajectory point includes: ; The calculation of the cosine of the trajectory writing direction includes: ; The calculation of the sine of the trajectory writing direction includes: ; The calculation of the cosine of the curvature of the trajectory writing includes: ; The calculation of the sine of the curvature of the trajectory writing includes: ; in, This represents the x-coordinate of the t-th trajectory point in the normalized handwritten trajectory sequence. The offset; This represents the ordinate of the t-th trajectory point in the normalized handwritten trajectory sequence. The offset; This indicates the writing direction of the t-th trajectory point in the normalized handwritten trajectory sequence; It represents the writing curvature of the t-th trajectory point in the normalized handwritten trajectory sequence.

4. The method for aerial handwriting recognition for virtual reality human-computer interaction according to claim 1, characterized in that, The construction of a neural network attention model based on encoder and decoder structures includes: The encoder uses a one-dimensional convolutional neural network to encode features by inputting them into the one-dimensional convolutional neural network. The decoder employs a recurrent unit based on an attention mechanism, using the average of the feature codes of all features as the initial input, and predicting character probabilities sequentially according to the temporal order of the input.

5. The method for aerial handwriting recognition for virtual reality human-computer interaction according to claim 4, characterized in that, A one-dimensional convolutional neural network includes a first convolutional module, a second convolutional module, and a third convolutional module. The first convolutional module consists of three concatenated first residual blocks with 64 channels. The second convolutional module consists of one second residual block with 128 channels and two first residual blocks. The third convolutional module consists of one second residual block with 256 channels and two first residual blocks. The first residual block includes a convolutional layer, a dropout layer, and an adder. The input data is processed sequentially through the convolutional layer, the dropout layer, and the convolutional layer, and then added to the input by the adder to become the output of the first residual block. The convolutional layer consists of a one-dimensional convolutional layer, a batch normalization layer, and an activation function layer. The second residual layer includes a convolutional layer, a dropout layer, a one-dimensional convolutional layer, and an adder. The input data is processed sequentially through the convolutional layer, the dropout layer, and the convolutional layer, and then added to the input data processed by the one-dimensional convolutional layer by the adder to obtain the output of the second residual module.

6. The method for aerial handwriting recognition for virtual reality human-computer interaction according to claim 4, characterized in that, The decoder predicts the probability of the target character based on the current decoder state, specifically including the following steps: Calculate the current hidden layer state, i.e.: ; in, This represents the hidden layer state at the l-th time step; This represents the decoder state at time step (l-1). This represents the target character at time step (l-1). Represents a circulatory neural unit; Relevant contextual features are extracted from the encoded feature sequence output by the encoder using an attention mechanism. The current contextual features are represented as follows: ; in, Represents the contextual features at the l-th time step; Let N be the i-th feature in the encoded feature sequence output by the encoder, and N be the number of features in the encoded feature sequence output by the encoder. Indicates the transpose operation; The decoder combines the current hidden state and the current context features to calculate the current decoder state, which is represented as: ; in, This represents the decoder state at the l-th time step; [,] represents concatenation operation. This is the first weight matrix; Predict the current target character based on the current decoder state, including: in, This indicates that the input is And the first l characters are In the case of output The probability of; This is the second weight matrix. This is the bias value.

Citation Information

Patent Citations

  • A method for aerial handwritten character recognition based on inertial sensors

    CN107316067B

  • An air handwriting recognition system and method based on machine vision

    CN109033954A

  • Text recognition method and device applied to air handwriting, equipment and storage medium

    CN115826762A