Emotion-assisted analysis method and system based on gait recognition
By constructing a rectangular coordinate system and calculating the degree of corner point expression in gait recognition, the problem of difficulty in obtaining corner points in complex backgrounds is solved, the accuracy of gait recognition is improved, and accurate analysis of human emotional states is achieved.
Patent Information
- Application Number
- CN202410948120.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-16
AI Technical Summary
In a complex background, it is easy to be interfered when obtaining human body corner points, which affects the accuracy of gait recognition.
By obtaining the corner points and optical flow corner points in the gait image sequence of the recognition object, a rectangular coordinate system is constructed, the image sequence is divided into target sequence segments, the corner point performance degree and movement error are calculated, the response value is adjusted, and the corner point trajectory is re-detected ,Analysis of emotional states using neural networks.
It improves the accuracy of human body corner points and gait recognition, and reduces the impact of background interference.
Smart Images

Figure CN118486089B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and system for emotion-assisted analysis based on gait recognition. Background Art
[0002] The posture and pattern of a person walking can contain rich emotional information. By analyzing the individual's walking posture to infer their emotional state, it can be used in a variety of scenarios, such as enhanced security monitoring, human-computer interaction, and medical health. By collecting gait data in a non-contact manner, it provides real-time and objective evaluation of emotional state.
[0003] By studying the posture and pattern of an individual's walking, their emotional state can be identified and understood. The position of joints is crucial to understanding walking patterns. Corner detection can help determine the approximate position of joints. Therefore, corner detection is used to perform gait recognition during human walking. However, when obtaining human corner points during walking, complex backgrounds may contain interference that may be identified as human corner points, which will make it difficult to obtain human corner points, thus affecting the final gait recognition results. Summary of the invention
[0004] The present invention provides an emotion-assisted analysis method and system based on gait recognition to solve the existing problems.
[0005] The emotion-assisted analysis method and system based on gait recognition of the present invention adopts the following technical solutions:
[0006] An embodiment of the present invention provides a method for emotion-assisted analysis based on gait recognition, the method comprising the following steps:
[0007] Obtain a gait image sequence of the identified object;
[0008] In the sequence of gait images of the identified object, a number of corner points of each frame of the gait image of the identified object and the initial response value of each corner point are obtained; a rectangular coordinate system of each frame of the gait grayscale image of the identified object is constructed; the corner points of the first frame of the gait image of the identified object are recorded as initial corner points; and the optical flow corner points of each initial corner point in each frame of the gait image of the identified object are obtained;
[0009] According to the difference between the distances of each initial corner point and each optical flow corner point of all gait images of the identified object to the origin in the rectangular coordinate system, the gait image sequence of the identified object is equally divided into a number of target sequence segments;
[0010] According to the difference between the chain code value of each optical flow corner point of the gait image of the identified object and the distance to the origin in the rectangular coordinate system of each initial corner point of the same sequence value in each target sequence segment, the human body corner point expression degree of each initial corner point is obtained; according to the human body corner point expression degree of each initial corner point, several initial expression corner points are obtained;
[0011] According to the number of initial expression corner points and the length of the edge line where the optical flow corner point of each initial expression corner point in each frame of the gait image of the recognition object is located, the movement error of the gait image sequence of the recognition object is obtained;
[0012] According to the movement error of the gait image sequence of the identified object, the difference between the positions of the optical flow corner points of the gait image of the identified object with the same sequence value of the initial expression corner point in each target sequence segment, the initial response value and the degree of expression of the human body corner points, the adjusted response value of each initial expression corner point is obtained; according to the adjusted response value of the initial expression corner point, the corner point detection is re-performed to obtain several sequences of human body corner point trajectories; according to the several sequences of human body corner point trajectories, the emotional state of the human body is obtained using the trained neural network.
[0013] Furthermore, the method of dividing the gait image sequence of the identified object into a plurality of target sequence segments according to the difference between the distances of each initial corner point in all the optical flow corner points of the identified object gait images from the origin in the rectangular coordinate system comprises the following specific steps:
[0014] Preset a number of segmentation periods, and use any segmentation period to equally divide the gait grayscale image sequence of the identified object into a number of sequence segments;
[0015] According to each initial corner point corresponding to the The distance between the optical flow corner point and the origin of the rectangular coordinate system of each frame of the gait image of the recognized object in each sequence segment corresponding to the segmentation period is obtained. The period evaluation index corresponding to each segment period;
[0016] The segmented cycle with the largest cycle evaluation index is recorded as the final gait cycle;
[0017] The sequence segment corresponding to the final gait cycle is recorded as the target sequence segment.
[0018] Further, the method according to each initial corner point corresponds to the first The distance between the optical flow corner point and the origin of the rectangular coordinate system of each frame of the gait image of the recognized object in each sequence segment corresponding to the segmentation period is obtained. The specific calculation formula for the period evaluation index corresponding to each segment period is:
[0019]
[0020] in, Indicates The period evaluation index corresponding to each segment period; Indicates the number of initial corner points; Indicates The number of sequence segments corresponding to each segment period; Indicates The number of gait images of the identified object in the sequence segment corresponding to the segmentation period; Indicates The initial corner point corresponds to the The segment period corresponds to the In the sequence segment The distance between the optical flow corner point of the gait image of the frame recognition object and the origin of the rectangular coordinate system; Indicates The initial corner point corresponds to the The segment period corresponds to the In the sequence segment The distance between the optical flow corner point of the gait image of the frame recognition object and the origin of the rectangular coordinate system; Indicates absolute value; Represents an exponential function with a natural constant as its base.
[0021] Furthermore, the specific calculation formula corresponding to the human body corner point performance degree of each initial corner point is obtained based on the difference between the chain code value of each optical flow corner point of the gait image of the identified object and the distance to the origin in the rectangular coordinate system according to the same sequence value of each initial corner point in each target sequence segment:
[0022]
[0023] in, Indicates The degree of human body corner expression of the initial corner points; Indicates the number of target sequence segments; represents the number of gait images of the identified object for each target sequence segment; Indicates The initial corner point is The first target sequence segment The distance between the optical flow corner point of the gait image of the frame recognition object and the origin in the rectangular coordinate system; Indicates The initial corner point is The first target sequence segment The distance between the optical flow corner point of the gait image of the frame recognition object and the origin in the rectangular coordinate system; Indicates The initial corner point is The first target sequence segment Chain code values of optical flow corner points of gait images of frame recognition objects; Indicates The initial corner point is The first target sequence segment Chain code values of optical flow corner points of gait images of frame recognition objects; Indicates absolute value; represents an exponential function with a natural constant as base; represents the linear normalization function.
[0024] Furthermore, the step of obtaining a plurality of initial corner points according to the human body corner point expression degree of each initial corner point includes the following specific steps:
[0025] when Greater than , then the initial corner points, recorded as initial performance corner points; among them, is the preset performance threshold, For the The degree of human body corner expression of the initial corner points.
[0026] Furthermore, according to the number of initial performance corner points and the length of the edge line where the optical flow corner point of each initial performance corner point is located in each frame of the gait image of the recognized object in each target sequence segment, the specific calculation formula corresponding to the movement error of the gait image sequence of the recognized object is obtained as follows:
[0027]
[0028] in, represents the motion error of the gait image sequence of the recognized object; Indicates the number of initial performance corners; Indicates the number of target sequence segments; represents the number of gait images of the identified object for each target sequence segment; Indicates that the zth initial corner point is in The first target sequence segment The length of the edge line where the optical flow corner point of the gait image of the frame recognition object is located; Indicates that the zth initial corner point is in The first target sequence segment The length of the edge line where the optical flow corner point of the gait image of the frame recognition object is located.
[0029] Further, the method of obtaining the adjusted response value of each initial performance corner point according to the movement error of the gait image sequence of the recognition object, the difference between the positions of the optical flow corner points of the gait image of the recognition object with the same ordinal value in each target sequence segment of the initial performance corner point, the initial response value and the performance degree of the human body corner point includes the following specific steps:
[0030] According to the motion error of the gait image sequence of the identified object, The initial performance corner points and The difference between the coordinates of the optical flow corner points of the adjacent initial performance corner points on the edge line of each target sequence segment in all frames of the gait grayscale image of the object to be recognized in the rectangular coordinate system is obtained. The linkage of the initial performance corners;
[0031] According to The linkage of the initial corner points, the degree of corner point expression of the human body, and the initial response value are obtained. The adjusted response value of the initial performance corner point.
[0032] Further, the motion error of the gait image sequence of the identified object, the The initial corner points and The difference between the coordinates of the optical flow corner points of the adjacent initial performance corner points on the edge line of each target sequence segment in all frames of the gait grayscale image of the object to be recognized in the rectangular coordinate system is obtained. The specific calculation formula corresponding to the linkage of the initial performance corner points is:
[0033]
[0034] in, Indicates The linkage of the initial performance corners; Indicates The initial corner point is located on the edge line and The number of initial representation corner points adjacent to the initial representation corner points; Indicates the number of target sequence segments; Indicates The initial performance corner point is A curve formed by the coordinates of the optical flow corner points of the grayscale image of the gait of the object in all frames of the target sequence segment in the rectangular coordinate system; Indicates The first adjacent edge line where the initial corner point is located The initial performance corner point is A curve formed by the coordinates of the optical flow corner points of the grayscale image of the gait of the object in all frames of the target sequence segment in the rectangular coordinate system; represents the motion error of the gait image sequence of the recognized object; represents an exponential function with a natural constant as base; represents the linear normalization function; express and The DTW distance value of .
[0035] Furthermore, according to The linkage of the initial corner points, the degree of corner point expression of the human body, and the initial response value are obtained. The adjustment response value of the initial performance corner point includes the following specific steps:
[0036] The first The product of the linkage of the initial corner points, the degree of corner point expression of the human body, and the initial response value is recorded as The adjusted response value of the initial performance corner point.
[0037] The present invention also proposes an emotion-assisted analysis system based on gait recognition, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the aforementioned emotion-assisted analysis method based on gait recognition.
[0038] The beneficial effects of the technical solution of the present invention are:
[0039] Obtain a gait image sequence of the identified object;
[0040] In the gait image sequence of the identified object, several corner points of each frame of the gait image of the identified object and the initial response value of each corner point are obtained; the rectangular coordinate system of each frame of the gait grayscale image of the identified object is constructed; the corner points of the first frame of the gait image of the identified object are recorded as initial corner points; the optical flow corner points of each initial corner point in each frame of the gait image of the identified object are obtained; according to the difference between the distances of each optical flow corner point of all the gait images of the identified object from the rectangular coordinate system to the origin of each initial corner point, the gait image sequence of the identified object is divided into several target sequence segments, which can more accurately identify and analyze the characteristics of each gait cycle. According to the difference between the chain code value of each optical flow corner point of the gait image of the identified object with the same sequence value of each initial corner point in each target sequence segment and the distance to the origin on the rectangular coordinate system, the human body corner point expression degree of each initial corner point is obtained; according to the human body corner point expression degree of each initial corner point, several initial expression corner points are obtained; the accuracy of obtaining human body corner points is improved. According to the number of initial performance corner points and the length of the edge line where the optical flow corner point of each initial performance corner point in each frame of the gait image of the identified object is located in each target sequence segment, the movement error of the gait image sequence of the identified object is obtained, which reduces the influence of background corner points on the acquisition of human body corner points. According to the movement error of the gait image sequence of the identified object, the difference between the positions of the optical flow corner points of the gait image of the identified object with the same sequence value of the initial performance corner point in each target sequence segment, the initial response value and the degree of expression of the human body corner point, the adjusted response value of each initial performance corner point is obtained, which further improves the accuracy of obtaining the human body corner point. According to the adjusted response value of the initial performance corner point, the corner point detection is re-performed to obtain several sequences of human body corner point trajectories; according to several sequences of human body corner point trajectories, the emotional state of the human body is obtained using a trained neural network. The present invention analyzes the corner points in the gait image of the identified object in continuous frames, accurately retains the human body corner points, thereby improving the accuracy of gait recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 This is a flowchart of the steps of the emotion-assisted analysis method based on gait recognition of the present invention. DETAILED DESCRIPTION
[0043] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the emotion-assisted analysis method and system based on gait recognition proposed by the present invention, its specific implementation method, structure, characteristics and effects are described in detail as follows in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0044] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0045] The specific scheme of the emotion-assisted analysis method and system based on gait recognition provided by the present invention is described in detail below with reference to the accompanying drawings.
[0046] See also Figure 1 , which shows a flowchart of a method for emotion-assisted analysis based on gait recognition provided by an embodiment of the present invention, the method comprising the following steps:
[0047] Step S001: Acquire a gait image sequence of an identification object.
[0048] Select a place suitable for walking, fix multiple high-definition cameras at different angles for recording, pre-process the recorded video, such as denoising, cropping, contrast enhancement and grayscale processing, capture the gait image of the identified object in each frame of the recorded video, and obtain the gait image sequence of the identified object consisting of continuous frames.
[0049] Step S002: in the sequence of gait images of the identified object, obtain several corner points of each frame of the gait image of the identified object and the initial response value of each corner point; construct a rectangular coordinate system of the grayscale gait image of each frame of the identified object; record the corner points of the gait image of the first frame of the identified object as initial corner points; obtain the optical flow corner points of each initial corner point in each frame of the gait image of the identified object.
[0050] Harris corner point detection is used to operate on each frame of the gait image of the identified object to obtain a number of corner points of each frame of the gait image of the identified object and an initial response value of each corner point. Harris corner point detection is a well-known technology, and the specific method is not introduced here.
[0051] A rectangular coordinate system is constructed with the vertex at the lower left corner of the grayscale image of the gait of each frame of the object to be recognized as the origin, horizontally to the right as the positive direction of the horizontal axis, and vertically upward as the positive direction of the vertical axis, to obtain the rectangular coordinate system of the gait image of each frame of the object to be recognized.
[0052] All corner points of the gait image of the recognized object in the first frame are recorded as initial corner points.
[0053] The optical flow method is used to calculate each initial corner point in the sequence of grayscale images of the gait of the identified object in continuous frames to obtain the optical flow corner point corresponding to each initial corner point in the grayscale image of the gait of the identified object in each frame. The optical flow method is a well-known technology and the specific method is not introduced here.
[0054] Step S003: according to the difference between the distances of each initial corner point from each optical flow corner point of all gait images of the recognition object to the origin in the rectangular coordinate system, the recognition object gait image sequence is equally divided into a number of target sequence segments.
[0055] It should be noted that when walking, each segmentation cycle is repeated. Through segmentation, the characteristics of each segmentation cycle can be more accurately identified and analyzed, so as to distinguish the corner points between people and background. In each segmentation cycle, the corner points belonging to the human body have moved and finally returned to a position close to the original position, while the corner points in the background may be fixed, or may be constantly blocked or revealed. According to the positions of all corner points in different segmentation cycles during the change process, several target sequence segments are obtained.
[0056] A number of segmentation periods are preset, and taking any segmentation period as an example, the sequence of gait grayscale images of the identified object is equally divided into a number of sequence segments, and the number of gait grayscale images of the identified object in each sequence segment is set to the number of the any segmentation period.
[0057] It should be noted that: in this embodiment, several segment periods are preset, respectively , taking this as an example, is half the number of grayscale images of the gait of the identified object in the grayscale image sequence of the identified object. When the number of grayscale images of the gait of the identified object in the last sequence segment is less than any segmentation period, no subsequent operation is performed on it.
[0058] The first The specific calculation formula for the period evaluation index corresponding to each segment period is:
[0059]
[0060] in, Indicates The period evaluation index corresponding to each segment period; Indicates the number of initial corner points; Indicates The number of sequence segments corresponding to each segment period; Indicates The number of gait images of the identified object in the sequence segment corresponding to the segmentation period; Indicates The initial corner point corresponds to the The segment period corresponds to the In the sequence segment The distance between the optical flow corner point of the gait image of the frame recognition object and the origin of the rectangular coordinate system; Indicates The initial corner point corresponds to the The segment period corresponds to the In the sequence segment The distance between the optical flow corner point of the gait image of the frame recognition object and the origin of the rectangular coordinate system; Indicates absolute value; Represents an exponential function with a natural constant as its base.
[0061] What needs to be explained is: represents the first segment in the gait image segment sequence of adjacent recognition objects Frame recognition of the object in the gait image The position difference between the optical flow corner points of the initial corner points, the action of a person is repeated when walking, and the action in the same frame in each cycle is synchronized. The smaller the value of , the larger the period evaluation index of the gait image segmentation sequence of the identified object.
[0062] Through the above process, we obtain The period evaluation index corresponding to each segment period.
[0063] Each segmented period is calculated according to the above process to obtain the period evaluation index corresponding to each segmented period.
[0064] The segmented cycle with the largest cycle evaluation index is recorded as the final gait cycle.
[0065] The sequence segment corresponding to the final gait cycle is recorded as the target sequence segment.
[0066] It should be noted that when the number of gait images of the recognition object in the gait image segmentation sequence of the recognition object is less than the final gait cycle, the following operation is not performed.
[0067] Step S004: according to the difference between the chain code value of each optical flow corner point of the gait image of the identified object with the same sequence value of each initial corner point in each target sequence segment and the distance to the origin in the rectangular coordinate system, the human body corner point expression degree of each initial corner point is obtained; according to the human body corner point expression degree of each initial corner point, a number of initial expression corner points are obtained.
[0068] It should be noted that in the gait image sequence of the identified object, the human body corner points will move with the change of frame number, while the background corner points are fixed, and the movement direction of the human body corner points is consistent. By analyzing the position movement of the initial corner points in each target sequence segment and the corresponding movement directions in different target sequence segments, the human body corner point performance degree of the initial corner points can be obtained.
[0069] The chain code extraction algorithm is used to calculate each optical flow corner point of each initial corner point in each frame of the gait image of the recognized object to obtain the chain code value of each optical flow corner point of each initial corner point. The chain code extraction algorithm is a well-known technology and the specific method is not introduced here.
[0070] First As an example, the first The specific calculation formula corresponding to the human body corner point performance degree of the initial corner points is:
[0071]
[0072] in, Indicates The degree of human body corner expression of the initial corner points; Indicates the number of target sequence segments; represents the number of gait images of the identified object for each target sequence segment; Indicates The initial corner point is The first target sequence segment The distance between the optical flow corner point of the gait image of the frame recognition object and the origin in the rectangular coordinate system; Indicates The initial corner point is The first target sequence segment The distance between the optical flow corner point of the gait image of the frame recognition object and the origin in the rectangular coordinate system; Indicates The initial corner point is The first target sequence segment Chain code values of optical flow corner points of gait images of frame recognition objects; Indicates The initial corner point is The first target sequence segment Chain code values of optical flow corner points of gait images of frame recognition objects; Indicates absolute value; represents an exponential function with a natural constant as base; represents the linear normalization function.
[0073] What needs to be explained is: The larger the value, the The more likely the first initial corner point is a corner point of the human body, the The greater the degree of human body corner expression of the initial corner points; The larger the value, the The moving directions of the optical flow corner points of the gait images of the identified objects with the same sequence values of the initial corner points in the adjacent target sequence segments are highly consistent, and the moving directions of the initial corner points belonging to the human body corner points are consistent in different cycles. The higher the initial corner points, the higher the degree of human body corner expression.
[0074] Through the above process, we obtain The degree of human body corner expression of the initial corner points.
[0075] Each initial corner point is calculated according to the above process to obtain the human body corner point expression degree of each initial corner point.
[0076] when Greater than , then the Initial corner points are recorded as initial performance corner points. is a preset performance threshold. The preset performance threshold in this embodiment is The value is 0.8, and this example is used for description.
[0077] Through the above process, several initial performance corner points are obtained.
[0078] Step S005: obtaining the movement error of the gait image sequence of the recognition object according to the number of initial expression corner points and the length of the edge line where the optical flow corner point of each initial expression corner point in each frame of the recognition object gait image of each target sequence segment is located.
[0079] It should be noted that in certain emotions, such as sadness, people walk slowly and heavily, and their shoulders remain in the same position. At this time, the corner points at the shoulder joint position are similar to the background corner points, and they are both static during walking, which requires further distinction. In the gait image sequence of the identified object, people will walk in one direction. According to the principle that the closer the object is, the smaller the object is. The length of the edge line where the corner points of the human body are located will change as they walk. However, the length of the edge line where the corner points of the background are located will not change over time. Therefore, the movement error is obtained by initially showing the change in the length of the edge line where the corner points are located.
[0080] In each target sequence segment, according to the grayscale value of the pixel points in each frame of the gait image of the recognition object, the Sobel edge detection algorithm is used to perform edge detection on each frame of the gait image of the recognition object, and several edge lines of each frame of the gait image of the recognition object are obtained.
[0081] It should be noted that a corner point is a local maximum or local minimum in an image, a sharp turning point or corner in an image, and is often located on an edge line. If a streamer point is not located on an edge line, the streamer corner point is not analyzed.
[0082] The specific calculation formula corresponding to the movement error of the gait image sequence of the identified object is:
[0083]
[0084] in, represents the motion error of the gait image sequence of the recognized object; Indicates the number of initial performance corners; Indicates the number of target sequence segments; represents the number of gait images of the identified object for each target sequence segment; Indicates that the zth initial corner point is in The first target sequence segment The length of the edge line where the optical flow corner point of the gait image of the frame recognition object is located; Indicates that the zth initial corner point is in The first target sequence segment The length of the edge line where the optical flow corner point of the gait image of the frame recognition object is located.
[0085] What needs to be explained is: The larger the value of , the greater the movement error of the gait image sequence of the recognized object.
[0086] It is further explained that a corner point is a local maximum or local minimum in an image, a sharp turning point or corner in an image, and is often located on an edge line. If the initial corner point or its corresponding streamer point is not located on an edge line, the initial corner point is not analyzed.
[0087] Step S006: obtaining an adjusted response value of each initial performance corner point according to the movement error of the gait image sequence of the recognition object, the difference between the positions of the optical flow corner points of the gait image of the recognition object with the same sequence value of the initial performance corner point in each target sequence segment, the initial response value and the degree of expression of the human body corner points; re-performing corner point detection according to the adjusted response value of the initial performance corner point to obtain several sequences of human body corner point trajectories; obtaining the emotional state of the human body according to the several sequences of human body corner point trajectories using the trained neural network.
[0088] It should be noted that: if there are multiple initial expression corner points on the same edge line, it means that the initial expression corner points on the edge line are linked, and the more similar the curves formed by the coordinates of the optical flow corner points of the gait grayscale images of the object recognized in all frames of each target sequence segment in the rectangular coordinate system, the greater the possibility that the initial expression corner point is a human body corner point.
[0089] First As an example, the first initial corner point The specific calculation formula corresponding to the linkage of the initial performance corner points is:
[0090]
[0091] in, Indicates The linkage of the initial performance corners; Indicates The initial corner point is located on the edge line and The number of initial representation corner points adjacent to the initial representation corner points; Indicates the number of target sequence segments; represents the number of gait images of the identified object for each target sequence segment; Indicates The initial performance corner point is A curve formed by the coordinates of the optical flow corner points of the grayscale image of the gait of the object in all frames of the target sequence segment in the rectangular coordinate system; Indicates The first adjacent edge line where the initial corner point is located The initial performance corner point is A curve formed by the coordinates of the optical flow corner points of the grayscale image of the gait of the object in all frames of the target sequence segment in the rectangular coordinate system; represents the motion error of the gait image sequence of the recognized object; represents an exponential function with a natural constant as base; represents the linear normalization function. express and DTW distance value, wherein the DTW distance value is obtained according to the DTW algorithm, which is a well-known technology.
[0092] What needs to be explained is: It means that after each cycle, a movement error is added to eliminate the interference of the movement error on the linkage calculation; for and The DTW distance value is The smaller the value of is, the more similar the motion trajectories between the initial performance corner points are, indicating that the The greater the linkage between the initial performance corner points.
[0093] It is further necessary to explain that: When there is no adjacent initial performance corner point on the edge line where the initial performance corner point is located, no analysis is performed.
[0094] What needs to be further explained is that the important factor for distinguishing human corner points from background corner points is the linkage between corner points. According to the linkage of the initial performance corner points, the corner points belonging to the background can be removed. The specific process is that when the linkage is high, it means that the initial performance corner point is likely to be a human corner point. Therefore, the corresponding response value is adjusted to make it the maximum value of the response value in the neighborhood. In the non-maximum suppression step of Harris corner detection, only the corner point with the maximum response value is retained, thereby screening out the human corner points.
[0095] Through the above process, we obtain The linkage of the initial performance corners.
[0096] Each initial expression corner point is calculated according to the above process to obtain the linkage of each initial expression corner point.
[0097] The first The product of the linkage of the initial performance corner points, the performance degree of the human body corner points, and the initial response value is recorded as The adjusted response value of the initial performance corner point.
[0098] Through the above process, the adjusted response value of each initial performance corner point is obtained.
[0099] The first frame recognition object gait image uses the adjusted response value of the initial performance corner point to perform Harris corner point detection on the first frame recognition object gait image to obtain human body corner points.
[0100] According to the above method, the human body corner points of the gait image of each frame of the recognition object are obtained.
[0101] The optical flow method is used to obtain several human corner point trajectory sequences in the continuous frame images. Harris corner point detection and optical flow method are well-known technologies, and the specific methods are not introduced here.
[0102] According to the trajectory sequence of all human corner points during walking, the changes in human posture during walking, namely gait features, can be obtained. The corner point motion trajectory is marked in an image to obtain information such as the movement direction, movement position and body swinging law of the joint position. By studying the posture and pattern of human walking, namely gait features, its emotional state can be identified and understood. For example, under happy emotions, the gait is more brisk and the step length is longer. The performance of the human corner points is that there is a difference in the movement direction and the position movement is larger. At the same time, the walking is accompanied by more obvious arm swings, and the head and upper body posture are more upright; while under sad emotions, the gait may be heavy and slow, the arm swing is reduced, and the shoulders are drooped. Different emotions have different gaits, so a large number of walking gait data sets under different emotions are obtained. RNN recurrent neural network is used for sentiment analysis, so as to obtain the emotional state of the human body through gait recognition.
[0103] It should be noted that the input of the RNN recurrent neural network in this embodiment is the sequence of all human corner point trajectories, and the output is the emotional state of the human body, that is, happiness and sadness. The convolutional neural network model is ResNet500, which is used as an example for description. The data set is a data set composed of all human corner point trajectory sequences, and the human emotions in each human corner point trajectory sequence are used as sample labels, such as happiness is marked as 1 and sadness is marked as 2. The neural network is trained using the above-obtained data set, and the loss function used is the cross entropy loss function. The specific training process is well known and will not be described in detail in this embodiment.
[0104] So far, the present invention is completed.
[0105] In summary, in an embodiment of the present invention, a sequence of gait images of an object to be identified is obtained, and the corner points and initial response values of the gait images of the object to be identified in each frame in the sequence are obtained. The sequence of gait images of the object to be identified is divided into a plurality of target sequence segments by constructing a rectangular coordinate system and obtaining the initial corner points and the optical flow corner points. The degree of human corner point expression of each initial corner point is calculated to determine the initial expression corner point. Then, the movement error of the sequence of gait images of the object to be identified is calculated, and then the adjustment response value of the initial expression corner point is calculated. The corner point detection is performed again according to the adjustment response value of the initial expression corner point to obtain a plurality of sequences of human corner point trajectories, thereby finally obtaining the emotional state of the human body. The present invention analyzes the corner points in the gait images of the object to be identified in continuous frames, accurately retains the human corner points, and thus improves the accuracy of gait recognition.
[0106] The present invention also provides an emotion-assisted analysis system based on gait recognition, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the aforementioned emotion-assisted analysis method based on gait recognition.
[0107] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. The emotion-assisted analysis method based on gait recognition is characterized in that: The method comprises the following steps: Obtain a gait image sequence of the identified object; In the sequence of gait images of the identified object, a number of corner points of each frame of the gait image of the identified object and the initial response value of each corner point are obtained; a rectangular coordinate system of each frame of the gait grayscale image of the identified object is constructed; the corner points of the first frame of the gait image of the identified object are recorded as initial corner points; and the optical flow corner points of each initial corner point in each frame of the gait image of the identified object are obtained; According to the difference between the distances of each initial corner point and each optical flow corner point of all gait images of the identified object to the origin in the rectangular coordinate system, the gait image sequence of the identified object is equally divided into a number of target sequence segments; According to the difference between the chain code value of each optical flow corner point of the gait image of the identified object and the distance to the origin in the rectangular coordinate system of each initial corner point of the same sequence value in each target sequence segment, the human body corner point expression degree of each initial corner point is obtained; according to the human body corner point expression degree of each initial corner point, several initial expression corner points are obtained; According to the number of initial expression corner points and the length of the edge line where the optical flow corner point of each initial expression corner point in each frame of the gait image of the recognition object is located, the movement error of the gait image sequence of the recognition object is obtained; According to the movement error of the gait image sequence of the recognition object, the difference between the positions of the optical flow corner points of the gait image of the recognition object with the same sequence value of the initial performance corner point in each target sequence segment, the initial response value and the degree of human body corner point performance, the adjusted response value of each initial performance corner point is obtained; the corner point detection is re-performed according to the adjusted response value of the initial performance corner point to obtain several sequences of human body corner point trajectories; according to the several sequences of human body corner point trajectories, the emotional state of the human body is obtained using the trained neural network; The specific steps of identifying several corner points of the gait image of the object in each frame and the initial response value of each corner point are as follows: Harris corner point detection is used to operate on each frame of the gait image of the identified object, and a number of corner points of each frame of the gait image of the identified object and an initial response value of each corner point are obtained; The specific calculation formula corresponding to the human body corner point performance degree of each initial corner point is obtained based on the difference between the chain code value of each optical flow corner point of the gait image of the identified object and the distance to the origin in the rectangular coordinate system according to the same sequence value of each initial corner point in each target sequence segment: in, Indicates The degree of human body corner expression of the initial corner points; Indicates the number of target sequence segments; represents the number of gait images of the identified object for each target sequence segment; Indicates The initial corner point is The first target sequence segment The distance between the optical flow corner point of the gait image of the frame recognition object and the origin in the rectangular coordinate system; Indicates The initial corner point is The first target sequence segment The distance between the optical flow corner point of the gait image of the frame recognition object and the origin in the rectangular coordinate system; Indicates The initial corner point is The first target sequence segment Chain code values of optical flow corner points of gait images of frame recognition objects; Indicates The initial corner point is The first target sequence segment Chain code values of optical flow corner points of gait images of frame recognition objects; Indicates absolute value; represents an exponential function with a natural constant as base; represents the linear normalization function; The method of obtaining a plurality of initial corner points according to the human body corner point expression degree of each initial corner point includes the following specific steps: when Greater than , then the initial corner points, recorded as initial performance corner points; among them, is the preset performance threshold, For the The degree of human body corner expression of the initial corner points; The specific calculation formula corresponding to the movement error of the gait image sequence of the identified object is obtained according to the number of initial expression corner points and the length of the edge line where the optical flow corner point of each initial expression corner point is located in each frame of the gait image of the identified object in each target sequence segment: in, represents the motion error of the gait image sequence of the recognized object; Indicates the number of initial performance corners; Indicates the number of target sequence segments; represents the number of gait images of the identified object for each target sequence segment; Indicates that the zth initial corner point is in The first target sequence segment The length of the edge line where the optical flow corner point of the gait image of the frame recognition object is located; Indicates that the zth initial corner point is in The first target sequence segment The length of the edge line where the optical flow corner point of the gait image of the frame recognition object is located; The method of obtaining the adjusted response value of each initial performance corner point according to the movement error of the gait image sequence of the recognition object, the difference between the positions of the optical flow corner points of the gait image of the recognition object with the same sequence value of the initial performance corner point in each target sequence segment, the initial response value and the performance degree of the human body corner point comprises the following specific steps: According to the motion error of the gait image sequence of the identified object, The initial performance corner points and The difference between the coordinates of the optical flow corner points of the adjacent initial performance corner points on the edge line of each target sequence segment in all frames of the gait grayscale image of the object to be recognized in the rectangular coordinate system is obtained. The linkage of the initial performance corners; According to The linkage of the initial corner points, the degree of corner point expression of the human body, and the initial response value are obtained. The adjusted response value of the initial performance corner point; The motion error of the gait image sequence of the identified object, the The initial performance corner points and The difference between the coordinates of the optical flow corner points of the adjacent initial performance corner points on the edge line of each target sequence segment in all frames of the gait grayscale image of the object to be recognized in the rectangular coordinate system is obtained. The specific calculation formula corresponding to the linkage of the initial performance corner points is: in, Indicates The linkage of the initial performance corners; Indicates The initial corner point is located on the edge line and The number of initial representation corner points adjacent to the initial representation corner points; Indicates the number of target sequence segments; Indicates The initial performance corner point is A curve formed by the coordinates of the optical flow corner points of the grayscale image of the gait of the object in all frames of the target sequence segment in the rectangular coordinate system; Indicates The first adjacent edge line where the initial corner point is located The initial performance corner point is A curve formed by the coordinates of the optical flow corner points of the grayscale image of the gait of the object in all frames of the target sequence segment in the rectangular coordinate system; represents the motion error of the gait image sequence of the recognized object; represents an exponential function with a natural constant as base; represents the linear normalization function; express and DTW distance value; According to the The linkage of the initial corner points, the degree of corner point expression of the human body, and the initial response value are obtained. The adjustment response value of the initial performance corner point includes the following specific steps: The first The product of the linkage of the initial corner points, the degree of corner point expression of the human body, and the initial response value is recorded as The adjusted response value of the initial performance corner point.
2. The emotion-assisted analysis method based on gait recognition according to claim 1 is characterized in that: The specific steps of dividing the gait image sequence of the identified object into several target sequence segments according to the difference between the distances of each initial corner point and each optical flow corner point of all the gait images of the identified object in the rectangular coordinate system to the origin are as follows: Preset a number of segmentation periods, and use any segmentation period to equally divide the gait grayscale image sequence of the identified object into a number of sequence segments; According to each initial corner point corresponding to the The distance between the optical flow corner point and the origin of the rectangular coordinate system of each frame of the gait image of the recognized object in each sequence segment corresponding to the segmentation period is obtained. The period evaluation index corresponding to each segment period; The segmented cycle with the largest cycle evaluation index is recorded as the final gait cycle; The sequence segment corresponding to the final gait cycle is recorded as the target sequence segment.
3. The emotion-assisted analysis method based on gait recognition according to claim 2 is characterized in that: According to each initial corner point corresponding to the The distance between the optical flow corner point and the origin of the rectangular coordinate system of each frame of the gait image of the recognized object in each sequence segment corresponding to the segmentation period is obtained. The specific calculation formula for the period evaluation index corresponding to each segment period is: in, Indicates The period evaluation index corresponding to each segment period; Indicates the number of initial corner points; Indicates The number of sequence segments corresponding to each segment period; Indicates The number of gait images of the identified object in the sequence segment corresponding to the segmentation period; Indicates The initial corner point corresponds to the The segment period corresponds to the In the sequence segment The distance between the optical flow corner point of the gait image of the frame recognition object and the origin of the rectangular coordinate system; Indicates The initial corner point corresponds to the The segment period corresponds to the In the sequence segment The distance between the optical flow corner point of the gait image of the frame recognition object and the origin of the rectangular coordinate system; Indicates absolute value; Represents an exponential function with a natural constant as its base.
4. An emotion-assisted analysis system based on gait recognition, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the emotion-assisted analysis method based on gait recognition as described in any one of claims 1 to 3 are implemented.
