CN114612524B - Motion recognition method based on RGB-D camera - Google Patents
Motion recognition method based on RGB-D camera Download PDFInfo
- Publication number
- CN114612524B CN114612524B CN202210506139.8A CN202210506139A CN114612524B CN 114612524 B CN114612524 B CN 114612524B CN 202210506139 A CN202210506139 A CN 202210506139A CN 114612524 B CN114612524 B CN 114612524B
- Authority
- CN
- China
- Prior art keywords
- point cloud
- point
- rgb
- nearest neighbor
- motion
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 238000012545 processing Methods 0.000 claims abstract description 16
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 11
- 238000007781 pre-processing Methods 0.000 claims abstract description 5
- 239000011159 matrix material Substances 0.000 claims description 28
- 239000013598 vector Substances 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims description 9
- 230000000295 complement effect Effects 0.000 claims description 6
- 230000014759 maintenance of location Effects 0.000 claims description 6
- 238000012216 screening Methods 0.000 claims description 6
- 230000011218 segmentation Effects 0.000 claims description 5
- 230000008602 contraction Effects 0.000 claims description 4
- 238000005070 sampling Methods 0.000 claims description 2
- 238000000605 extraction Methods 0.000 abstract 1
- 210000003414 extremity Anatomy 0.000 description 12
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 6
- 210000003127 knee Anatomy 0.000 description 6
- 238000004590 computer program Methods 0.000 description 5
- 230000007547 defect Effects 0.000 description 3
- 210000002478 hand joint Anatomy 0.000 description 3
- RZVAJINKPMORJF-UHFFFAOYSA-N Acetaminophen Chemical compound CC(=O)NC1=CC=C(O)C=C1 RZVAJINKPMORJF-UHFFFAOYSA-N 0.000 description 1
- 238000012935 Averaging Methods 0.000 description 1
- 230000032683 aging Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 210000002310 elbow joint Anatomy 0.000 description 1
- 238000000265 homogenisation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000000474 nursing effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/254—Analysis of motion involving subtraction of images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/246—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
- G06T7/251—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments involving models
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
- G06T9/40—Tree coding, e.g. quadtree, octree
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10028—Range image; Depth image; 3D point clouds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20224—Image subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a motion recognition method based on an RGB-D camera, which comprises the steps of collecting an RGB-D image by using the RGB-D camera, and preprocessing the RGB-D image to obtain a preprocessed point cloud; obtaining a motion difference point cloud according to the preprocessed point cloud, and optimizing the motion difference point cloud set to obtain an optimized motion difference point cloud set; obtaining a motion linear point cloud model according to the optimized motion difference point cloud set by using a point cloud shrinkage algorithm based on a Laplacian operator, and constructing a human body joint point identification template according to the motion linear point cloud model so as to finish human body motion identification; according to the invention, the depth image is subjected to subsequent processing, and no visible camera exists in an actual application scene, so that the privacy of a user can be well protected; and the K neighborhood denoising method is utilized to remove discrete noise points and simplify point cloud, thereby greatly reducing data processing amount, accelerating algorithm processing speed and providing a method for fast extraction and accurate identification.
Description
Technical Field
The invention relates to the technical field of point cloud identification, in particular to a motion identification method based on an RGB-D camera.
Background
With the economic development, the aging problem of the population is continuously aggravated, and the indoor personnel posture detection device based on the unmanned equipment plays a great role in the fields of home furnishing and nursing; two human point cloud sensors commonly used at present are a millimeter wave radar and an RGB-D depth camera; the millimeter wave radar has the defects of high cost, long scanning time, poor penetrability and the like, and cannot meet the requirements of most scenes; on the other hand, the current indoor personnel action virtual reconstruction method based on the RGB-D depth camera has the defects of low reconstruction precision, high computational power requirement and the like.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides a motion recognition method based on an RGB-D camera, and provides a method for quickly extracting and accurately recognizing.
In order to achieve the purpose of the invention, the invention adopts the technical scheme that:
in one aspect, a motion recognition method based on an RGB-D camera includes the following steps:
s1, collecting an RGB-D image by using an RGB-D camera, and preprocessing the RGB-D image to obtain a preprocessed point cloud;
s2, obtaining motion difference point cloud according to the preprocessed point cloud;
s3, optimizing the motion difference point cloud set to obtain an optimized motion difference point cloud set;
s4, obtaining a motion linear point cloud model according to the optimized motion difference point cloud set by using a point cloud shrinkage algorithm based on a Laplacian operator;
s5, constructing a human body joint point identification template according to the motion linear point cloud model;
and S6, recognizing the human motion by using the human joint point recognition template.
The invention has the following beneficial effects:
collecting an RGB-D image by using an RGB-D camera, and preprocessing the RGB-D image to obtain a preprocessed point cloud; obtaining a motion difference point cloud according to the preprocessed point cloud, and optimizing the motion difference point cloud set to obtain an optimized motion difference point cloud set; obtaining a motion linear point cloud model according to the optimized motion difference point cloud set by using a point cloud shrinkage algorithm based on a Laplacian operator, and constructing a human body joint point identification template according to the motion linear point cloud model so as to finish human body motion identification; the method and the device collect RGB-D images based on the depth camera, only carry out subsequent processing on the depth images, have no visible camera in the actual application scene, can better protect the privacy of users, and have the advantages of low equipment cost and short scanning period; and the point cloud is simplified while discrete noise points are removed by utilizing a judgment threshold value of a K neighborhood denoising method, so that the simplified accurate indoor moving person point cloud is obtained, the data processing amount is greatly reduced, the algorithm processing speed is accelerated, and the method for quickly extracting and accurately identifying is provided.
Drawings
FIG. 1 is a flowchart illustrating steps of a RGB-D camera-based motion recognition method according to the present invention;
FIG. 2 is a schematic diagram of the left arm joint angle according to the embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate the understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and it will be apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention as defined and defined in the appended claims, and all matters produced by the invention using the inventive concept are protected.
As shown in fig. 1, a motion recognition method based on RGB-D camera includes the following sub-steps:
s1, collecting an RGB-D image by using an RGB-D camera, and preprocessing the RGB-D image to obtain a preprocessed point cloud;
preferably, step S1 is specifically:
the method comprises the steps of collecting two groups of RGB-D images at a preset time interval by using an RGB-D camera, converting the RGB-D images into at least one-dimensional point cloud, and obtaining the preprocessed point cloud.
In the embodiment of the invention, an RGB-D camera is used for collecting two groups of RGB-D images respectively at an interval of 50ms, and the two groups of RGB-D images are converted into six-dimensional point cloud to obtain preprocessed point cloud; the method specifically comprises the following steps: firstly, obtaining a group of indoor personnel images of an RGB-D camera A at a time t1, and constructing a scene six-dimensional point cloud PA1 at the time t1 by the group of images; then another group of indoor personnel images of the RGB-D camera A is obtained at t1+50ms, namely at t2, and a scene six-dimensional point cloud PA2 at t2 is constructed by the group of images;
wherein the RGB-D camera a is suspended in a ceiling corner of an indoor room; each group of images comprises an RGB image acquired by a color camera and a depth image acquired by a depth camera; all pixels of the RGB image have color values corresponding to the pixels and are divided into R, G, B channels; the value of each pixel in the depth image corresponds to the depth value of the point, i.e., the distance of the point from the camera focal point.
Mapping two-dimensional coordinates of depth image pixels into point cloud data, and calculating the coordinates of each pixel point in a three-dimensional space; the three-dimensional space coordinate value (x, y, z) corresponding to a depth image pixel point (u, v, d) and some camera parameters is converted, and can be calculated by the following formula:
wherein (u, v, d) is the corresponding pixel coordinate of the pixel point in the depth image,the focal lengths of the cameras in the x, y axes,is the coordinate of the center of the aperture of the camera, s is the zoom factor of the depth image,are all inside the cameraA parameter;
after the space coordinate of each pixel point is obtained, (x, y, z) corresponding to each pixel point and three channel values (r, g, b) of the color image of the pixel point are spliced to obtain point cloudAnd calculating pixel by pixel to obtain scene six-dimensional point cloud data set。
S2, obtaining motion difference point cloud according to the preprocessed point cloud;
preferably, step S2 specifically includes the following sub-steps:
s21, performing intersection processing on the preprocessed point clouds;
preferably, step S21 is specifically:
a1, extracting point cloud data with the same serial number in the preprocessed point clouds, judging whether the coordinates of the point cloud data with the same serial number are consistent, if so, recording the point cloud data with the same coordinates as sub-data of an intersection point cloud, and entering the step A2; otherwise go to step A3;
a2, traversing the preprocessed point clouds, and constructing a point cloud intersection according to the subdata of the intersection point cloud;
and A3, adding 1 to the serial number of the preprocessed point cloud data, returning to the step A1, re-extracting the point cloud data with the same serial number in the preprocessed point cloud until a preset iteration condition is met, and ending the iteration loop.
In the embodiment of the invention, the method specifically comprises the following steps:
1) extracting points with subscript i (i is the serial number of single point data in the point cloud sets of PA1 and PA2, and the initial value is 0) in PA1 and PA2, comparing whether the coordinates (x, y, z) of the points are consistent or not, and recording if the coordinates are consistent(j is a point data serial number to be stored in the PA3 point cloud set, and the initial value is 0); otherwise, entering step 2);
2) checking whether all points are compared completely, if all points are compared completely, solving the intersection and obtaining an intersection PA3, and exiting the loop; otherwise, go to step 3)
3) And adding 1 to the count values i and j, and returning to the step 1.
S22, homogenizing the point cloud after intersection processing to obtain an average point cloud data set;
in the embodiment of the invention, the homogenization treatment specifically comprises the following steps:
averaging (x, y, z) of each point of PA1 and PA2 in a one-to-one correspondence manner to obtain an average point cloud data setThe formula is as follows:
wherein, i is the serial number of single point data in the PA1 and PA2 point cloud sets, j is the serial number of point data to be stored in the PA3 point cloud sets, and the initial value is 0.
And S23, performing complementary collection processing on the homogenized point cloud data under the preset Euclidean distance threshold value to obtain motion difference point cloud.
Preferably, step S23 is specifically:
extracting point cloud data with the same serial number in the average point cloud data set, judging whether the Euclidean distance of the extracted point cloud data meets a preset Euclidean distance threshold value, if so, rejecting the point cloud data, and otherwise, retaining the point cloud data;
traversing the homogenized point cloud data to obtain a complementary set point cloud, and constructing a motion difference point cloud set according to the complementary set point cloud.
In the embodiment of the invention, the method specifically comprises the following steps:
the predetermined euclidean distance threshold is determined according to the point cloud obtaining effect, and is usually 0.05 m.
S3, optimizing the motion difference point cloud set to obtain an optimized motion difference point cloud set;
preferably, step S3 specifically includes the following sub-steps:
b1, segmenting each point cloud in the motion difference point cloud set by using a threshold segmentation method to obtain a segmented point cloud data set;
preferably, step B1 is specifically:
establishing a preset segmentation condition according to a threshold segmentation method, judging whether each point cloud in a motion difference point cloud set meets the first preset condition, if so, rejecting the point cloud, and otherwise, keeping the point cloud; traversing the motion difference point cloud set to obtain a segmented point cloud data set, wherein the first preset condition is represented as:
wherein (A), (B), (C), (D), (C), (B), (C)x,y,z) The coordinates of each point cloud in the motion difference point cloud set,is a distance threshold.
In the embodiment of the invention, the segmented point cloud data set is a point cloud data set with a background removed.
B2, screening the segmented point cloud data set by using a random sampling consistency algorithm to obtain an inner point set;
preferably, step B2 is specifically:
calculating the standard deviation of each point cloud in the segmented point cloud data set, judging whether the standard deviation of each point cloud meets a second preset condition, and if so, retaining the point cloud; otherwise, rejecting the point cloud; traversing the segmented point cloud data set, and constructing a screened point cloud set as an inner point set according to the screened point cloud, wherein the second preset condition is represented as:
wherein,is as followsiThe euclidean distance of the point cloud to plane z,is as followsiAnd coordinates of each point cloud, wherein a plane z is a plane constructed by each point cloud in the point cloud data set after segmentation, and the following conditions are met: z =ax + by + c; a. b and c are coefficients of the plane z, respectively.
In the embodiment of the invention, the method specifically comprises the following steps:
1) randomly selecting xyz data of three points from the point cloud PA 6;
2) and calculating a plane equation z = ax + by + c by the following formula:
3) calculating Euclidean space distance from residual point cloud data in the point cloud PA6 to the plane z = ax + by + c(i is the serial number of a single point data in the PA6 point cloud set, the initial value is 0, and each calculationAdding 1) at the time;
4) according to the Euclidean distance from each point cloud obtained in the step 3) to the planeCalculating to obtain the standard deviationIs of the formulaWherein;
5) And repeating the steps, judging that the points meeting the conditions are inner points and the points not meeting the conditions are outer points according to the condition2, and finally obtaining an inner point set PA7 with the ground point cloud data removed.
B3, denoising the inner point set by using a K neighborhood denoising method to obtain the optimized motion difference point cloud.
Preferably, step B3 is specifically:
c1, carrying out proximity search on each point cloud in the internal point set to obtain at least one nearest neighbor point of each point cloud;
c2, calculating the average distance from each point cloud to the nearest neighbor point, wherein the calculation formula is as follows:
wherein,is as followsiThe average distance from the point cloud to the nearest neighbor point, k is theiThe number of nearest neighbor and near points of each point cloud,is as followsiThe spatial coordinates of the individual point clouds,is as followsiFirst of point cloudsjThe spatial coordinates of the nearest neighboring points,an Euclidean space distance calculation formula of the three-dimensional data;
c3, traversing the inner point set, and calculating the average distance and the mean square error of each point cloud in the inner point set according to the average distance from each point cloud to the nearest neighbor point;
in the embodiment of the present invention, the calculation formulas of the average distance and the mean square error are respectively expressed as:
wherein N is the total number of the point clouds in the interior point set and the mean square errorCan be calculated by variance.
C4, establishing a third preset condition according to the average distance and the mean square error of each point cloud in the inner point set, judging whether each point cloud in the inner point set meets the third preset condition, if so, removing the point cloud, otherwise, retaining the point cloud, and obtaining an optimized motion difference point cloud set, wherein the third preset condition is represented as:
wherein U is the average distance of each point cloud in the inner point set,in order to be able to adjust the parameters,is the mean square error of each point cloud in the interior point set,u i is as followsiAverage distance of each point cloud to nearest neighbor.
In the embodiment of the present invention, the preset condition may be further expressed as:whereinis also an adjustable parameter.
S4, obtaining a motion linear point cloud model according to the optimized motion difference point cloud set by using a point cloud shrinkage algorithm based on a Laplacian operator;
preferably, step S4 is specifically:
d1, performing proximity search on the optimized motion difference point cloud set by using a spatial binary tree method to obtain at least one nearest neighbor point and obtain a nearest neighbor point set;
d2, calculating to obtain an initial motion linear point cloud model according to the nearest neighbor point set by using a point cloud shrinkage algorithm based on a Laplacian operator; wherein, the calculation formula is expressed as:
wherein PA8 is the point cloud before contraction, PA8 ’ Is the point cloud after the contraction,W L for the diagonal matrix to control the degree of shrinkage,W H to control the diagonal matrix of the degree of point cloud retention,Lfor adopting the Laplace matrix of cosine tangent, satisfy:
wherein,is a function of the cosine cut function,is the first of the Laplace matrixiGo to the firstjThe value of the column element is set,is the first of the Laplace matrixiGo to the firstjThe residual weight value corresponding to the column element value,andis the first of the Laplace matrixiGo to the firstjThe column elements construct the outer angle values with their left and right elements, their sum is 180 degrees,is the first of the Laplace matrixiGo to the firstiColumn, the set of field elements for the right diagonal elements;
d3, iteratively updating a diagonal matrix used for controlling the shrinkage degree and a diagonal matrix used for controlling the point cloud retention degree, judging whether a fourth preset condition is met, if so, ending the iterative updating, and obtaining a motion linear point cloud model according to the current iterative result; otherwise, the iterative updating is continued.
Preferably, the updating formulas of the diagonal matrix for controlling the degree of shrinkage and the diagonal matrix for controlling the degree of point cloud retention in step D3 are respectively expressed as:
wherein,as a number of iterationst+1 diagonal matrix to control the degree of shrinkage;is the current number of iterationstA diagonal matrix for controlling the degree of shrinkage;is the first in the initial motion linear point cloud modeliPoints of contractionThe current neighborhood of (c);linear point cloud model for initial motionTo middleiPoints of contractionThe original domain of (1);as a number of iterationst+1 under the firstiPoints of contractionA corresponding diagonal matrix for controlling the degree of point cloud retention,is the first in the initial iterationiPoints of contractionThe corresponding diagonal matrix is used for controlling the point cloud maintaining degree.
Preferably, the fourth preset condition in step D3 is represented as:
wherein,tin order to be the threshold value of the number of iterations,is the first in the initial motion linear point cloud modeliPoints of contractionThe latest field of the art.
In the embodiment of the present invention, the iterative update specifically includes:
1) calculating the latest searching point cloud according to the current iteration times; the calculation formula is as follows:
wherein,is the current number of iterationstA diagonal matrix for controlling the degree of shrinkage;is the current number of iterationstA diagonal matrix for controlling the point cloud holding degree is arranged below;is the current number of iterationstA pull-down placian matrix;is the current number of iterationstLower shrinkage point cloud;is the latest iteration numbert+Searching point clouds under 1, namely: searching the point cloud latest;trepresenting the depth value of the binary traversal of the point cloud for the iteration times;
2) according to the update formula:
are updated respectivelyAnda value of (1), whereinAndare respectively asOriginal neighborhood sum of pointsA latest neighborhood;
3) judging according to the condition4, if yes, stopping iteration, otherwise, continuing iteration, and recalculating new contracted point cloudCalculating a new Laplace matrix。
And S5, constructing a human body joint point identification template according to the motion linear point cloud model.
Preferably, step S5 specifically includes the following sub-steps:
s51, constructing a human limb endpoint set according to the motion linear point cloud model;
preferably, step S51 specifically includes the following sub-steps:
s511, initializing cloud serial numbers of all points and human body joint point serial numbers in the motion linear point cloud model, respectively screening the point clouds in the motion linear point cloud model to obtain a first nearest neighbor point and a second nearest neighbor point related to the point clouds, and constructing a nearest neighbor point set related to the point clouds according to the first nearest neighbor point and the second nearest neighbor point related to the point clouds;
preferably, step S511 specifically includes:
initializing the serial number of each point cloud and the serial number of human body joint points in the motion linear point cloud model, respectively screening the closest adjacent points of the point clouds in the motion linear point cloud model, selecting one point cloud, obtaining a first closest adjacent point of the point cloud, and screening the closest adjacent points of the first closest adjacent point to obtain the first closest adjacent point of the closest adjacent point, namely the first closest adjacent point of the closest adjacent point is used as a second closest adjacent point of the arbitrary point cloud; the first nearest neighbor point and the second nearest neighbor point of the arbitrary point cloud together form a nearest neighbor point related to the arbitrary point cloud.
S512, calculating the Euclidean space vector included angle of each nearest neighbor point set according to the nearest neighbor point set related to each point cloud, judging whether the Euclidean space vector included angle meets a fifth preset condition, if so, entering the step S513, otherwise, constructing the nearest neighbor point set related to each point cloud by using the nearest neighbor point of the next level, and returning to the step S511;
in the embodiment of the present invention, the first and second substrates,
The euclidean space vector angle of the three points is expressed as:(ii) a The method comprises the following steps:is an included angle of two vectors; and judging whether the included angle of the Euclidean space vectors of the three points is less than 90 degrees, if so, entering the step S513, otherwise, constructing a nearest neighbor point set related to each point cloud by using the nearest neighbor point of the next level, specifically: recording or else reselecting pointAs the next nearest neighborReturning to step S511;
s513, performing nearest neighbor point search on the second nearest neighbor point of each point cloud to obtain a third nearest neighbor point of each point cloud, judging whether the third nearest neighbor point of each point cloud meets a sixth preset condition, if so, updating the sequence number in the point cloud in the motion linear point cloud model, and returning to the step S511; otherwise, go to step S514;
in the embodiment of the inventionLinear point cloud model in motionIn the method, neighbor search is carried out to obtain pointsNearest neighbors ofDetermine nearest neighborWhether or not to satisfy the nearest neighborIs 0, i.e.:if the motion linear point cloud model meets the requirement, updating the point cloud serial number in the motion linear point cloud model, namely: and adding 1 to the point cloud serial number and returning to the step S511.
S514, recording the third nearest neighbor point of the point cloud as a subset of the human body limb endpoint set, and adding 2 to the serial number of the point cloud to serve as an auxiliary value of the subset; judging whether the serial number of the current human body joint point meets a seventh preset condition or not; if so, ending the iteration to obtain a human body limb end point set; otherwise, adding 1 to the serial number of the current human body joint point, and returning to the step S511.
In the embodiment of the invention, the method specifically comprises the following steps: recording dotIs an element of the human limb end point set P5 that:i.e. bySimultaneously recording the depth plus 2 and making the depth beAnd judging whether the serial number of the current human body joint point is 5, namely: the number of subsets in the human body limb endpoint set is met, and if the number of subsets in the human body limb endpoint set is met, the iteration is ended to obtain a human body limb endpoint set; otherwise, updating the serial number of the current human body joint point, namely: adding 1 to the serial number of the current human body joint point; and returns to step S511.
And S52, constructing a human body joint point identification template according to the human body limb endpoint set.
Step S52 specifically includes:
traversing the human body limb endpoint set, and taking the subset corresponding to the minimum space Z-axis coordinate value as the joint point of the foot; taking the subset corresponding to the minimum depth value as the head joint point; taking the screened residual subset as hand joint point data, and constructing eighth preset conditions to distinguish the hand joint point data; obtaining a human body joint point identification template; wherein the eighth preset condition is identified as:
Condition 8:
wherein,in the human body extremity endpoint setThe spatial coordinates of the optical system (c),in the human body extremity endpoint setThe spatial coordinates of (a);
if the eighth preset condition is met, the human body limb endpoint setFor the data of the left-hand joint point,right hand joint point data; otherwiseFor the right-hand joint point data,left-handed joint data.
In the embodiment of the invention, the distribution rule of the data of 15 joint points of the human body can be summarized by inquiring the relevant anatomical data, namely the head, the neck, the right shoulder, the left shoulder, the right elbow, the left elbow, the right hand, the left hand, the trunk, the right hip, the left hip, the right knee, the left knee, the right foot and the left foot, and assuming that the length from the head to the neck is 1.5a, the rule of Euclidean space distances of the other joint points is as follows:
1) the distance from the left foot to the left knee is 2a, and the distance from the right foot to the right knee is 2 a;
2) the distance from the left knee to the left hip is 2.3a, and the distance from the right knee to the right hip is 2.3 a;
3) the distance from the left hand to the left elbow is 2.1a, and the distance from the right hand to the right elbow is 2.1 a;
4) the distance from the left shoulder to the neck is a, and the distance from the right shoulder to the neck is a;
5) the distance from the left shoulder to the left elbow is 1.5a, and the distance from the right shoulder to the right elbow is 1.5a
6) The distance from the trunk to the left hip is 1.2a, and the distance from the trunk to the right hip is 1.2 a;
7) the distance from the trunk to the neck is 2.2 a;
traversing the linear point cloud model of the human body according to the data rule of the human body joint points and the known five-limb point cloud data of the head, the left hand, the right hand, the left foot and the right footSelecting the human body joint points meeting the rule conditions as available data to obtain 15 human bodiesJoint point cloud data set P15。
And S6, recognizing the human motion by using the human joint point recognition template.
In the embodiment of the invention, 4 upper body angle characteristics and 4 lower body angle characteristics are required to be selected for human motion recognition, and the angle size of the upper body angle characteristics and the angle size of the lower body angle characteristics are taken as characteristic data of 6 standard actions, so that rapid action recognition can be carried out; the selection of 8 angular features is shown in Table 1-1:
TABLE 1-1 table for selecting angle characteristics between various joint points
Taking fig. 2 as a schematic diagram of the joint angle of the left arm, taking the joint angle of the left arm, i.e. the feature a2 as an example, let the joint point of the left shoulder be a and the spatial coordinate beThe left elbow joint point is B, and the space coordinate thereof isThe left-hand joint point is C, and the space coordinate thereof isThen vector ofSum vectorAngle of (2)The solving formula of (2) is as follows:
and determining the motion characteristics of the human body motion so as to perform rapid template matching motion recognition. The characteristic table of the corresponding angle of 6 reference actions is shown in the table 1-2:
table 1-2 six kinds of reference action corresponding angle characteristic table
First, define the feature angle set under the first action asAnd the input real-time motion feature angle setTwo data sets are subjected to difference obtaining;
2) Calculating the normalized angle of C(Is a weight of the characteristic angle, satisfiesSince the angle data are not greatly different in size, the angle data are taken here) Record ofData;
3) replacing the A with a reference characteristic angle set of the next action, repeating the steps, and executing 6 times in total;
4) counting the above 6Data are put into the array D, and the minimum value is taken outThe corresponding reference motion is regarded as the motion recognition result.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
It will be appreciated by those of ordinary skill in the art that the embodiments described herein are intended to assist the reader in understanding the principles of the invention and are to be construed as being without limitation to such specifically recited embodiments and examples. Those skilled in the art can make various other specific changes and combinations based on the teachings of the present invention without departing from the spirit of the invention, and these changes and combinations are within the scope of the invention.
Claims (9)
1. A motion recognition method based on an RGB-D camera is characterized by comprising the following steps:
s1, collecting an RGB-D image by using an RGB-D camera, and preprocessing the RGB-D image to obtain a preprocessed point cloud;
s2, obtaining motion difference point cloud according to the preprocessed point cloud;
s3, optimizing the motion difference point cloud set to obtain an optimized motion difference point cloud set;
s4, obtaining a motion linear point cloud model according to the optimized motion difference point cloud set by using a point cloud shrinkage algorithm based on a Laplacian operator;
s5, constructing a human body joint point identification template according to the motion linear point cloud model;
s6, recognizing human motion by using a human joint point recognition template;
step S3 specifically includes the following sub-steps:
b1, segmenting each point cloud in the motion difference point cloud set by using a threshold segmentation method to obtain a segmented point cloud data set;
b2, screening the segmented point cloud data set by using a random sampling consistency algorithm to obtain an inner point set;
b3, denoising the inner point set by using a K neighborhood denoising method to obtain the optimized motion difference point cloud.
2. The RGB-D camera-based motion recognition method according to claim 1, wherein the step S1 specifically includes:
the method comprises the steps of collecting two groups of RGB-D images at a preset time interval by using an RGB-D camera, converting the RGB-D images into at least one-dimensional point cloud, and obtaining the preprocessed point cloud.
3. The RGB-D camera-based motion recognition method of claim 1, wherein the step S2 includes the following sub-steps:
s21, performing intersection processing on the preprocessed point clouds;
s22, homogenizing the point cloud after intersection processing to obtain an average point cloud data set;
and S23, performing complementary collection processing on the homogenized point cloud data by using a preset Euclidean distance threshold value to obtain motion difference point cloud.
4. The RGB-D camera-based motion recognition method according to claim 3, wherein the step S21 specifically includes:
a1, extracting point cloud data with the same serial number in the preprocessed point clouds, judging whether the coordinates of the point cloud data with the same serial number are consistent, if so, recording the point cloud data with the same coordinates as subdata of an intersection point cloud, and entering the step A2; otherwise go to step A3;
a2, traversing the preprocessed point clouds, and constructing a point cloud intersection according to the subdata of the intersection point cloud;
and A3, adding 1 to the serial number of the preprocessed point cloud data, returning to the step A1, re-extracting the point cloud data with the same serial number in the preprocessed point cloud until a preset iteration condition is met, and ending the iteration loop.
5. The RGB-D camera-based motion recognition method according to claim 3, wherein the step S23 specifically includes:
extracting point cloud data with the same serial number in the average point cloud data set, judging whether the Euclidean distance of the extracted point cloud data meets a preset Euclidean distance threshold value, if so, rejecting the point cloud data, and otherwise, retaining the point cloud data;
traversing the homogenized point cloud data to obtain a complementary set point cloud, and constructing a motion difference point cloud set according to the complementary set point cloud.
6. The RGB-D camera-based motion recognition method according to claim 3, wherein the step B3 includes the following sub-steps:
c1, carrying out proximity search on each point cloud in the internal point set to obtain at least one nearest neighbor point of each point cloud;
c2, calculating the average distance from each point cloud to the nearest neighbor point, wherein the calculation formula is as follows:
wherein,is as followsiThe average distance from the point cloud to the nearest neighbor point, k is theiThe number of nearest neighbor near points of each point cloud,is as followsiThe spatial coordinates of the individual point clouds,is as followsiFirst of point cloudsjThe spatial coordinates of the nearest neighboring points,an Euclidean space distance calculation formula of the three-dimensional data;
c3, traversing the inner point set, and calculating the average distance and the mean square error of each point cloud in the inner point set according to the average distance from each point cloud to the nearest neighbor point;
c4, establishing a third preset condition according to the average distance and the mean square error of each point cloud in the inner point set, judging whether each point cloud in the inner point set meets the third preset condition, if so, removing the point cloud, otherwise, retaining the point cloud, and obtaining an optimized motion difference point cloud set, wherein the third preset condition is represented as:
7. The RGB-D camera-based motion recognition method according to claim 1, wherein the step S4 specifically includes:
d1, performing proximity search on the optimized motion difference point cloud set by using a spatial binary tree method to obtain at least one nearest neighbor point and obtain a nearest neighbor point set;
d2, calculating to obtain an initial motion linear point cloud model according to the nearest neighbor point set by using a point cloud shrinkage algorithm based on a Laplacian operator; wherein, the calculation formula is expressed as:
wherein PA8 is the point cloud before contraction, PA8 ’ Is the point cloud after the contraction,W L for the diagonal matrix to control the degree of shrinkage,W H to control the diagonal matrix of the degree of point cloud retention,Lfor adopting the Laplace matrix of cosine tangent, satisfy:
wherein,is a function of the cosine cut function,is the first of the Laplace matrixiGo to the firstjThe value of the column element is set,is the first of the Laplace matrixiGo to the firstjThe residual weight value corresponding to the column element value,andis the first of the Laplace matrixiGo to the firstjThe outer angle value constructed by the column element and the left and right elements thereof,is the first of the Laplace matrixiGo to the firstiColumn, the set of field elements for the right diagonal elements;
d3, iteratively updating a diagonal matrix used for controlling the shrinkage degree and a diagonal matrix used for controlling the point cloud retention degree, judging whether a fourth preset condition is met, if so, ending the iterative updating, and obtaining a motion linear point cloud model according to the current iterative result; otherwise, the iterative updating is continued.
8. The RGB-D camera-based motion recognition method according to claim 1, wherein the step S5 specifically includes the following sub-steps:
s51, constructing a human limb endpoint set according to the motion linear point cloud model;
and S52, constructing a human body joint point identification template according to the human body limb endpoint set.
9. The RGB-D camera-based motion recognition method of claim 8, wherein the step S51 includes the following sub-steps:
s511, initializing cloud serial numbers of all points and human body joint point serial numbers in the motion linear point cloud model, respectively screening the point clouds in the motion linear point cloud model to obtain a first nearest neighbor point and a second nearest neighbor point related to the point clouds, and constructing a nearest neighbor point set related to the point clouds according to the first nearest neighbor point and the second nearest neighbor point related to the point clouds;
s512, calculating the Euclidean space vector included angle of each nearest neighbor point set according to the nearest neighbor point set related to each point cloud, judging whether the Euclidean space vector included angle meets a fifth preset condition, if so, entering the step S513, otherwise, constructing the nearest neighbor point set related to each point cloud by using the nearest neighbor point of the next level, and returning to the step S511;
s513, performing nearest neighbor point search on the second nearest neighbor point of each point cloud to obtain a third nearest neighbor point of each point cloud, judging whether the third nearest neighbor point of each point cloud meets a sixth preset condition, if so, updating the sequence number in the point cloud in the motion linear point cloud model, and returning to the step S511; otherwise, go to step S514;
s514, recording the third nearest neighbor point of the point cloud as a subset of the human body limb endpoint set, and adding 2 to the serial number of the point cloud to serve as an auxiliary value of the subset; judging whether the serial number of the current human body joint point meets a seventh preset condition or not; if so, ending the iteration to obtain a human body limb end point set; otherwise, adding 1 to the serial number of the current human body joint point, and returning to the step S511.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210506139.8A CN114612524B (en) | 2022-05-11 | 2022-05-11 | Motion recognition method based on RGB-D camera |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210506139.8A CN114612524B (en) | 2022-05-11 | 2022-05-11 | Motion recognition method based on RGB-D camera |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114612524A CN114612524A (en) | 2022-06-10 |
CN114612524B true CN114612524B (en) | 2022-07-29 |
Family
ID=81869634
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210506139.8A Active CN114612524B (en) | 2022-05-11 | 2022-05-11 | Motion recognition method based on RGB-D camera |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114612524B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111597974A (en) * | 2020-05-14 | 2020-08-28 | 哈工大机器人(合肥)国际创新研究院 | Monitoring method and system based on TOF camera for personnel activities in carriage |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9898856B2 (en) * | 2013-09-27 | 2018-02-20 | Fotonation Cayman Limited | Systems and methods for depth-assisted perspective distortion correction |
US20170273665A1 (en) * | 2016-03-28 | 2017-09-28 | Siemens Medical Solutions Usa, Inc. | Pose Recovery of an Ultrasound Transducer |
JP2018119833A (en) * | 2017-01-24 | 2018-08-02 | キヤノン株式会社 | Information processing device, system, estimation method, computer program, and storage medium |
WO2019006760A1 (en) * | 2017-07-07 | 2019-01-10 | 深圳市大疆创新科技有限公司 | Gesture recognition method and device, and movable platform |
CN108573231B (en) * | 2018-04-17 | 2021-08-31 | 中国民航大学 | Human body behavior identification method of depth motion map generated based on motion history point cloud |
WO2019217903A1 (en) * | 2018-05-11 | 2019-11-14 | Visionairy Health, Inc. | Automated screening of medical data |
CN110910426A (en) * | 2019-11-26 | 2020-03-24 | 爱菲力斯(深圳)科技有限公司 | Action process and action trend identification method, storage medium and electronic device |
CN113011381B (en) * | 2021-04-09 | 2022-09-02 | 中国科学技术大学 | Double-person motion recognition method based on skeleton joint data |
CN114038011A (en) * | 2021-11-08 | 2022-02-11 | 沈阳理工大学 | Method for detecting abnormal behaviors of human body in indoor scene |
-
2022
- 2022-05-11 CN CN202210506139.8A patent/CN114612524B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111597974A (en) * | 2020-05-14 | 2020-08-28 | 哈工大机器人(合肥)国际创新研究院 | Monitoring method and system based on TOF camera for personnel activities in carriage |
Also Published As
Publication number | Publication date |
---|---|
CN114612524A (en) | 2022-06-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Melekhov et al. | Dgc-net: Dense geometric correspondence network | |
CN110378997B (en) | ORB-SLAM 2-based dynamic scene mapping and positioning method | |
CN110084243B (en) | File identification and positioning method based on two-dimensional code and monocular camera | |
CN109544677A (en) | Indoor scene main structure method for reconstructing and system based on depth image key frame | |
WO2015017941A1 (en) | Systems and methods for generating data indicative of a three-dimensional representation of a scene | |
Li et al. | Fast visual odometry using intensity-assisted iterative closest point | |
CN111998862B (en) | BNN-based dense binocular SLAM method | |
CN112734652B (en) | Near-infrared blood vessel image projection correction method based on binocular vision | |
CN111679661A (en) | Semantic map construction method based on depth camera and sweeping robot | |
Ozbay et al. | A hybrid method for skeleton extraction on Kinect sensor data: Combination of L1-Median and Laplacian shrinking algorithms | |
CN111192194A (en) | Panoramic image splicing method for curtain wall building vertical face | |
CN113936210A (en) | Anti-collision method for tower crane | |
CN117078982B (en) | Deep learning-based large-dip-angle stereoscopic image alignment dense feature matching method | |
CN108597589B (en) | Model generation method, target detection method and medical imaging system | |
Zhou | Application and Analysis of Computer Vision Algorithms in Graphics and Image Processing | |
CN114612524B (en) | Motion recognition method based on RGB-D camera | |
CN116563104A (en) | Image registration method and image stitching method based on particle swarm optimization | |
CN115564915A (en) | Map construction method and device for environment digital area of transformer substation | |
Zhang et al. | Stereo matching cost computation based on nonsubsampled contourlet transform | |
Du et al. | A high-precision vision-based mobile robot slope detection method in unknown environment | |
Liu et al. | Deep learning of volumetric representation for 3D object recognition | |
Li et al. | A real-time pineapple matching system based on speeded-up robust features | |
CN113379663B (en) | Space positioning method and device | |
Hu et al. | Research and implementation of 3D reconstruction algorithm for multi-angle monocular garment image | |
Persad et al. | Automatic co-registration of pan-tilt-zoom (PTZ) video images with 3D wireframe models |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20231013 Address after: 610000 Chengdu, Sichuan Province, China (Sichuan) Free Trade Pilot Zone Patentee after: Sichuan Bawei Jiuzhang Technology Co.,Ltd. Address before: 610031 section 1, 2nd Ring Road North, Jinniu District, Chengdu City, Sichuan Province Patentee before: SOUTHWEST JIAOTONG University Patentee before: Sichuan Bawei Jiuzhang Technology Co.,Ltd. |