Object model construction method, device and electronic equipment
By continuously collecting multiple frames of images and performing filtering processing, the problem of low object model accuracy caused by blurred single-frame images is solved and a higher object model accuracy is achieved.
Patent Information
- Application Number
- CN202110136906.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-01
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-02-01
AI Technical Summary
In the existing technology, due to the influence of shooting angle, light and other factors, the content of the single-frame picture is blurred and the information is less when the human body model is reconstructed, resulting in a low accuracy of the constructed object model.
Continuously collect multiple frames of images to obtain the key point group of the target object, determine the posture information, shape information and position information, and improve the accuracy of the posture and position information through filtering processing, and finally build a more accurate object model.
Through key point group filtering of multi-frame images, the accuracy of posture and position information is improved, thereby significantly improving the accuracy of the constructed object model.
Smart Images

Figure CN112837389B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to an object model construction method, device and electronic equipment. Background Art
[0002] Object model reconstruction is a relatively complex task in computer vision, which can be applied to multiple business scenarios, such as virtual images, interactive games, etc. Among them, the above object model can be a human body model, a vehicle model, etc. The following is an example of a human body model.
[0003] In the prior art, when a human body model of a target person needs to be reconstructed, it is generally necessary to obtain a single frame of a picture containing the target person, and then construct a human body model suitable for the scene reflected by the picture based on the picture content of the picture.
[0004] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems:
[0005] Due to the influence of factors such as shooting angle and light, a single frame image may have blurred content and unclear content, and a single frame image contains less information, so the object model constructed using the above method has low accuracy. Summary of the invention
[0006] The purpose of the embodiment of the present invention is to provide a method for constructing an object model to improve the accuracy of the constructed object model. The specific technical solution is as follows:
[0007] In a first aspect, an embodiment of the present invention provides a method for constructing an object model, comprising:
[0008] Acquire a key point group of the target object contained in each frame of image continuously acquired for the target object;
[0009] Based on the acquired key point group, determining the posture information, shape information and position information of the target object in each frame of the image;
[0010] Based on the key point group of the target object in each frame image, the posture information of the target object in each frame image is filtered to obtain the filtered posture information, and based on the key point group of the target object in each frame image, the position information of the target object in each frame image is filtered to obtain the filtered position information; filtering the position information of the target object in each frame image to obtain the filtered position information;
[0011] An object model of the target object is constructed according to the shape information, filtered posture information and filtered position information of each frame image.
[0012] In a second aspect, an embodiment of the present invention provides an object model construction device, including:
[0013] A key point group acquisition module is used to acquire a key point group of the target object contained in each frame of image continuously acquired for the target object;
[0014] An information determination module is used to determine the posture information, shape information and position information of the target object in each frame of the image based on the acquired key point group. Based on the acquired key point group, the posture information, shape information and position information of the target object in each frame of the image are determined;
[0015] An information filtering module, for filtering the posture information of the target object in each frame image based on the key point group of the target object in each frame image to obtain the filtered posture information, and filtering the position information of the target object in each frame image based on the key point group of the target object in each frame image to obtain the filtered position information, filtering the posture information of the target object in each frame image based on the key point group of the target object in each frame image to obtain the filtered posture information, and filtering the position information of the target object in each frame image to obtain the filtered position information;
[0016] The model building module is used to build an object model of the target object based on the shape information, filtered posture information and filtered position information of each frame image. The object model of the target object is built based on the shape information, filtered posture information and filtered position information of each frame image.
[0017] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;
[0018] Memory, used to store computer programs;
[0019] The processor is used to implement the method steps described in the first aspect when executing the program stored in the memory.
[0020] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.
[0021] The object model construction method, device and electronic device provided by the embodiments of the present invention can obtain the key point group of the target object in multiple frame images, and determine the posture information, shape information and position information based on the obtained key point group, and filter the posture information and position information through the key point group, and further construct the object model according to the filtered posture information and the filtered position information, as well as the shape information. Since the acquired posture information and position information can be filtered based on the key point group of multiple frame images, the accuracy of the posture information and position information can be improved, and thus the object model constructed based on the posture information and position information with higher accuracy has a higher accuracy rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] 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 are briefly introduced below.
[0023] Figure 1 A flowchart of a first object model building method provided by an embodiment of the present invention.
[0024] Figure 2 A partial flow chart of a second object model building method provided by an embodiment of the present invention.
[0025] Figure 3 A partial flow chart of a third object model building method provided by an embodiment of the present invention.
[0026] Figure 4A A key point relationship diagram provided for one embodiment of the present invention.
[0027] Figure 4B An actual distribution diagram of key points provided by an embodiment of the present invention.
[0028] Figure 5 A partial flow chart of a fourth object model building method provided by an embodiment of the present invention.
[0029] Figure 6 A flowchart of a method for constructing an object model provided by another embodiment of the present invention.
[0030] Figure 7 A flowchart of a filtering method provided by an embodiment of the present invention.
[0031] Figure 8 A flowchart of a method for determining filtering parameters provided by an embodiment of the present invention.
[0032] Fig. 9 A schematic diagram of determining a numerical difference value provided by an embodiment of the present invention.
[0033] Fig.10A flowchart of a filtering method provided by another embodiment of the present invention.
[0034] Fig.11 A schematic diagram of a flow chart of a filtering method provided by an embodiment of the present invention.
[0035] Fig.12 A schematic diagram of the structure of an object model building device provided by one embodiment of the present invention.
[0036] Fig.13 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The embodiments of the present invention provide an object model construction method, device and electronic device. The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention. In addition, the embodiments of the present invention and the features in the embodiments can be combined with each other if there is no conflict.
[0038] In one embodiment of the present invention, Figure 1 As shown, a method for constructing an object model is provided, comprising:
[0039] S101: Acquire a key point group of a target object contained in each frame of an image continuously acquired for the target object.
[0040] S102: Based on the acquired key point group, determine the posture information, shape information and position information of the target object in each frame of image.
[0041] S103: Based on the key point group of the target object in each frame image, the posture information of the target object in each frame image is filtered to obtain the filtered posture information, and based on the key point group of the target object in each frame image, the position information of the target object in each frame image is filtered to obtain the filtered position information.
[0042] S104: constructing an object model of the target object according to the shape information, filtered posture information and filtered position information of each frame image.
[0043] In the embodiment of the present invention, Figure 1 In the object model construction method shown, since the object model of the target object can be constructed based on the shape information, filtered posture information and filtered position information contained in each frame image, the information used to construct the object model of the target object is more than that used in a single frame, thereby making the constructed object model more accurate.
[0044] The target object may be a human body, animal, vehicle, building, etc. contained in the image. The object model construction method provided by the embodiment of the present invention is described below using the human body as an example. The human body mentioned in the embodiment of the present invention does not limit the embodiment of the present invention.
[0045] Optionally, each frame of image continuously captured for the target object can be each frame of image in a video stream captured in real time, or each frame of image containing the target object in the video. When it is necessary to build a model of the target object contained in the video, the images in the video can be read frame by frame.
[0046] Optionally, the target object in the image is an object of a preset type among the objects contained in the image. Optionally, when the image contains multiple objects of a preset type, the target object may be the object with the largest proportion among the multiple objects, or a pre-marked object.
[0047] The key point group of the target object can be obtained through a key point recognition model. Different types of objects use different key point recognition models. For the human body, the key point recognition model for recognizing the human body can be a variety of human key point recognition algorithms, including: OpenPose, AlphaPose, CPN (Cascaded Pyramid Network) and CPM (Convolutional Pose Machines), etc.
[0048] For the human body, multiple key points can be obtained through the human body key point recognition model, and each human body key point can be represented by a two-dimensional coordinate.
[0049] Exemplarily, 24 key points can be obtained through the human body key point recognition model, and the key point group J is:
[0050] J={(x1,y1),(x2,y2),…,(x 24 ,y 24 )}
[0051] Among them, x1 to x 24 Respectively represent the horizontal coordinates of the 1st key point to the 24th key point. 24 They represent the vertical coordinates of the 1st to 24th key points respectively.
[0052] With respect to the above step S102, each frame image and the key point group of the frame are input into the human body reconstruction model, so as to obtain the posture information, shape information and position information of the target object in the frame image.
[0053] In one embodiment, in order to improve the processing efficiency of the human body reconstruction model, before the image is input into the human body reconstruction model, the image can be cropped, scaled, and other operations performed, wherein cropping is to increase the proportion of the target object in the image, and scaling is to adjust the cropped image to a preset image size.
[0054] Exemplarily, the image is cropped, the cropped image is scaled, and finally the scaled image is input into the human body reconstruction model.
[0055] In an example, the key point group is: J = {(x1,y1),(x2,y2),…,(x 24 ,y 24 )}.
[0056] First, a cropping frame needs to be determined through each key point in the key point group, and then the image is cropped based on the cropping frame.
[0057] The clipping frame can be identified by diagonal coordinates. Assume that the final clipping frame is identified by diagonal points A and B, which is {(x c1 ,y c1 ),(x c2 ,y c2 )}, where (x c1 ,y c1 ) is the two-dimensional coordinate of point A, (x c2 ,y c2 ) is the 2D coordinate of point B. Optional, when the input image size is w i ×h I When x is calculated by the following formula c1 ,y c1 、x c2 and c2 :
[0058] h c =max(y i )-min(y i )
[0059] x c1 =max((min(x i )-S x *h c ),0)
[0060] x c2 =min((max(x i )+S x *h c ),w i )
[0061] y c1 =max((min(yi )-S y *h c ),0)
[0062] y c2 =min((max(y i )+S y *h c ),h i )
[0063] Among them, x i Indicates the horizontal coordinate of the i-th key point in the key point group, y i Indicates the ordinate of the i-th key point in the key point group, h c Indicates the maximum difference between the vertical coordinates of each key point in the key point group, S x is the preset lateral extension parameter, S y It is the preset longitudinal extension parameter.
[0064] After the cropping frame is determined, the image is cropped according to the cropping frame to obtain a cropped image.
[0065] Optionally, after obtaining the cropped image, the cropped image can be further scaled. In order to facilitate the human body reconstruction model to process the image more efficiently, each human body reconstruction model needs to input an image with a fixed length and width. Suppose the size required for the human body reconstruction model is: w×h, where w is the length of the required image and h is the width of the required image. The scaling factor s required for the cropped image c =H / h c , where H is the preset scaling parameter.
[0066] The cropped image is scaled according to the scaling factor to obtain a scaled image.
[0067] Furthermore, the scaled image is input into the human body reconstruction model to obtain the posture information, shape information and position information of the target object in each frame of the scaled image.
[0068] Since scaling an image does not affect the posture information and shape information, but affects the position information, the position information needs to be restored according to the scaling factor, the cropping frame coordinates and the scaled size.
[0069] Assume that the obtained position information includes the human body X-axis displacement o x and the Y-axis displacement of the human body o y , the location information is restored according to the following formula:
[0070]
[0071]
[0072] Among them, o′ x is the X-axis displacement of the human body after restoration, o′ y is the Y-axis displacement of the human body after restoration. Thus, the position information is obtained: (o′ x ,o′ y ).
[0073] For the above step S103, in order to eliminate the noise contained in the obtained posture information and position information as much as possible, the posture information and position information can be filtered to prevent the reconstructed object model from having problems such as rotational jitter of joints and incoherent limb movements due to excessive noise in the posture information, and to prevent the reconstructed object model from having jitter in the spatial position due to excessive noise in the position information.
[0074] In one embodiment, in order to better filter the posture information and the position information, the posture information and the position information may be filtered using the filtering information carried in the key point group.
[0075] With respect to the above step S104, an object model of the target object may be constructed according to the shape information, the filtered posture information and the filtered position information of each frame image.
[0076] In a second embodiment of the present invention, Figure 2 As shown, the above step S104 includes:
[0077] S201: Generate a pre-built model of the target object according to the shape information and filtered posture information of each frame image.
[0078] In this step, the shape information and filtered posture information of each frame image can be input into the SMPL (Skinned Multi-Person Linear Model) model to obtain a human body model as a pre-built model of the target object.
[0079] S202: Adjust the pre-built model to the position area indicated by the filtered position information to obtain an object model of the target object.
[0080] In this step, after obtaining the pre-constructed model, in order to make the obtained pre-constructed image model fit with the target object in the image, the object model can be adjusted to a position that matches the scene reflected by each frame image according to the filtered position information. That is, the pre-constructed model is adjusted to the position area indicated by the filtered position information to obtain the object model of the target object. For example, when each frame image is an image obtained by continuously capturing a person in the middle of the target house, after generating the pre-constructed model based on the shape information and state information, the pre-constructed model needs to be adjusted to the area in the middle of the target house indicated by the filtered position information to achieve the fit of the model with the target object in the image.
[0081] In the embodiment of the present invention, Figure 2 In the object model construction method shown, the key point group of the target object in the multi-frame image is obtained, and the posture information, shape information and position information are determined based on the obtained key point group, and the posture information and position information are filtered through the key point group, and the object model is further constructed based on the filtered posture information and the filtered position information, as well as the shape information. Since the acquired posture information and position information can be filtered based on the key point group of the multi-frame image, the accuracy of the posture information and position information can be improved, and thus the object model constructed based on the posture information and position information with higher accuracy has a higher accuracy rate.
[0082] In a third embodiment of the present invention, Figure 3 As shown, the above step S103 includes:
[0083] S301: Based on the posture information of the target object in each frame image, a posture information sequence corresponding to each type of key point is constructed as a time sequence to be filtered, and the posture information in the posture information sequence is used as a value in the time sequence to be filtered.
[0084] In this step, for example, each frame image includes image 1, image 2 and image 3, wherein image 1 includes key point 11 and key point 12, and the corresponding posture information is information 11 and information 12; image 2 includes key point 21 and key point 22, and the corresponding posture information is information 21 and information 22; image 3 includes key point 31 and key point 32, and the corresponding position information is information 31 and information 32. Among them, key point 11, key point 21 and key point 31 are first-class key points, and key point 12, key point 22 and key point 32 are second-class key points. For the first-class key points, the constructed posture information sequence is {information 11, information 21, information 31}, and for the second-class key points, the constructed posture information sequence is {information 12, information 22, information 32}.
[0085] The above-mentioned posture information may be any information reflecting the spatial posture of the target object, such as the axis angle (Axis-Angle) of each key point in the key point group, or the global rotation information of each key point in the key point group.
[0086] In one embodiment, when the posture information is the axis angle of each key point in the key point group, the axis angle of each key point can be converted into global rotation information of each key point.
[0087] For example, the key point group contains 24 key points, and the axis angle of each key point can be represented by a 1×3-dimensional axis angle matrix. Then the posture information of the target object in each frame image is a 24×3-dimensional posture information matrix. The axis angle uses the Local representation method. The 24 key points contain a starting key point, and each of the other key points has a parent key point. The axis angle information of a key point reflects its positional relationship with the parent key point. Figure 4A The key point relationship diagram provided in the embodiment of the present invention includes 24 key points of the human body. Figure 4B An actual distribution diagram of key points provided by an embodiment of the present invention.
[0088] For example, when the global rotation matrix of the "L_Knee" key point needs to be calculated, the axis-angle matrix of the "L_Knee" key point needs to be multiplied by the axis-angle matrix of the key points between it and the "Pelvis" key point, as shown in the following formula:
[0089]
[0090] in, Represents the global rotation matrix of the key point L_Knee, Represents the axis-angle matrix of the key point L_Knee, Represents the axis-angle matrix of the key point L_Hip, Represents the axis-angle matrix of the keypoint Pelvis.
[0091] Alternatively, multiply the point's rotation matrix by its parent's global rotation matrix, as shown below:
[0092]
[0093] in, Represents the global rotation matrix of the key point L_Hip.
[0094] After determining the global rotation information of the 24 key points, that is, after determining the 24 3×3 global rotation information, for each 3×3 matrix, the 3×3 matrix of each type of key points determined by each frame image is used to construct a posture information sequence corresponding to each type of key point as the time series to be filtered.
[0095] A value matrix to be filtered may also be constructed for each of the 9 values contained in the 3×3 matrix of each type of key point.
[0096] S302: For each type of key point, select the key points of this type from the key point group of the target object in each frame image, and sort the extracted key points according to the order of acquisition of each frame image, and construct a key point sequence of this type as a related sequence of the time series to be filtered corresponding to the key points of this type, and the key points in the key point sequence are used as the values in the related sequence.
[0097] In this step, the above example is further explained. For image 1, image 2 and image 3, the acquisition order is first to acquire image 1, then to acquire image 2, and finally to acquire image 3. For the first type of key points, the key points belonging to this type are selected as key points 11, key points 21 and key points 31, respectively. Then, according to Figure 1 , Figure 2 and Figure 3 The key point 11, key point 21 and key point 31 are sorted in the order of acquisition to obtain {key point 11, key point 21, key point 31}, and the key point sequence of the first type of key points {key point 11, key point 21, key point 31} is obtained as the related sequence of the time series {information 11, information 21, information 31} to be filtered. Similarly, {key point 12, key point 22, key point 32} is constructed as the related sequence of the time series {information 12, information 22, information 32} to be filtered.
[0098] Optionally, in one implementation, since each key point is represented by an X-axis coordinate and a Y-axis coordinate, an X-axis sequence and / or a Y-axis sequence consisting of X-axis coordinates and / or Y-axis coordinates is constructed for each type of key point, which can be used as related sequences of the posture information sequence.
[0099] S303: Based on the correlation sequence, each value in the constructed time series to be filtered is filtered to obtain filtered posture information.
[0100] In this step, when the posture information sequence corresponding to each type of key point has two related sequences, the posture information sequence can be filtered according to each related sequence and the average value can be taken.
[0101] In the embodiment of the present invention, Figure 3In the object model construction method shown, since the key point group of the target object in multiple frame images is obtained, and the posture information, shape information and position information are determined based on the obtained key point group, and the posture information and position information are filtered through the key point group, and the object model is further constructed according to the filtered posture information and the filtered position information, as well as the shape information, since the acquired posture information and position information can be filtered based on the key point group of the multiple frame images, the accuracy of the posture information and position information can be improved, and then the object model constructed based on the posture information and position information with higher accuracy has a higher accuracy rate, and since the posture information of the target object in each frame image is determined based on the key point group, the posture information contains more noise than the key point, so that the filtering information carried by the key point is more accurate than the filtering information carried by the posture information, and therefore, the effect of filtering the posture information can be improved.
[0102] In a fourth embodiment of the present invention, Figure 5 As shown, the above step S103 includes:
[0103] S501: averaging the coordinates of each key point in the key point group of the target object in each image to obtain the coordinates of the center of gravity of the target object in each image.
[0104] In this step, the center of gravity of the target object in each image can be calculated. Optionally, the coordinates of the center of gravity are set to (x g ,y g ),but
[0105] S502: extracting coordinates represented by the position information of the target object in each frame image, and sorting the extracted coordinates according to the order of acquisition of each frame image to obtain a first coordinate sequence as the coordinates to be filtered.
[0106] In this step, the construction method is similar to that of S302 and will not be repeated here. Optionally, in one implementation, the position information of the target object in each frame image is (o′ x ,o′ y ), then we can respectively calculate the o′ of the target object in each frame image. x and o′ y Two time series to be filtered are constructed: the X-axis time series to be filtered and the Y-axis time series to be filtered.
[0107] S503: extracting the coordinates of the center of gravity of the target person in each captured image, and sorting the extracted coordinates according to the sequence of capturing each frame of the image to obtain a second coordinate sequence as a related sequence of coordinates to be filtered.
[0108] In this step, the construction method is similar to that of S302, and will not be repeated here. Optionally, in one implementation, the center of gravity of the target object in each frame image is (x g ,y g ), then we can calculate the x value of the target object in each frame image. g and g Two correlation sequences are constructed: the X-axis correlation sequence and the Y-axis correlation sequence.
[0109] S504: Filter each value in the constructed time series to be filtered based on the correlation sequence of the constructed time series to be filtered.
[0110] In this step, the correlation sequence of the X-axis time series to be filtered is the X-axis correlation sequence, and the correlation sequence of the Y-axis time series to be filtered is the Y-axis correlation sequence, that is, the X-axis time series to be filtered is filtered according to the X-axis correlation sequence, and the Y-axis time series to be filtered is filtered according to the Y-axis correlation sequence.
[0111] In the embodiment of the present invention, Figure 5 In the object model construction method shown, since the key point group of the target object in multiple frames of images is obtained, and the posture information, shape information and position information are determined based on the obtained key point group, and the posture information and position information are filtered through the key point group, and the object model is further constructed based on the filtered posture information and the filtered position information, as well as the shape information, since the acquired posture information and position information can be filtered based on the key point group of multiple frames of images, the accuracy of the posture information and position information can be improved, and the object model constructed based on the posture information and position information with higher accuracy has a higher accuracy rate, and since the posture information of the target object in each frame of the image is determined based on the key point group, the position information contains more noise than the center of gravity calculated by the key points, so that the filtering information carried by the center of gravity is more accurate than the filtering information carried by the position information, and therefore, the effect of filtering the position information can be improved.
[0112] In one embodiment of the present invention, Figure 6As shown, a flow chart of a method for constructing a human body model is also provided. When a human body model needs to be constructed, a plurality of frames of images containing a target human body are continuously collected, and key points of the input images are identified through a key point recognition model to obtain a key point group. The human body cropping frame is determined through the key point group, and the image is cropped to obtain a cropped image, and the cropped image is input into the human body reconstruction model, and the posture information, shape information and position information of the human body are output. At the same time, the posture information is filtered through a filtering algorithm based on the key point group to obtain filtered posture information, and the center of gravity of the human body is obtained through the key point group, and then the position information is filtered through a filtering algorithm based on the center of gravity to obtain filtered position information, and then the shape information and filtered position information are input into the SMPL model to obtain a pre-built model, and then the pre-built model is adjusted through the filtered position information to obtain a human body model.
[0113] In the embodiment of the present invention, Figure 6 In the object model construction method shown, the key point group of the target object in the multi-frame image of the human body is obtained, and the posture information, shape information and position information of the human body are determined based on the obtained key point group, and the posture information and position information are filtered through the key point group, and the object model is further constructed based on the filtered posture information and the filtered position information, as well as the shape information. Since the acquired posture information and position information can be filtered based on the key point group of the multi-frame image of the human body, the accuracy of the posture information and position information can be improved, and thus the human body model constructed based on the posture information and position information with higher accuracy has a higher accuracy rate.
[0114] In one embodiment of the present invention, Figure 7 As shown, a filtering method is provided to filter the above-mentioned time series to be filtered, comprising:
[0115] S701: For each sequence value in a related sequence, a filtering parameter of the sequence value is determined according to a sampling time difference and a value difference between other sequence values in the related sequence and the sequence value, and the filtering parameter is used as a filtering parameter of a sequence value in a time sequence to be filtered that has the same sampling time as the sequence value.
[0116] The above-mentioned time series to be filtered may be a posture information sequence corresponding to each key point type, or a first coordinate sequence of the target object, namely, the X-axis time series to be filtered and the Y-axis time series to be filtered mentioned in the above embodiment.
[0117] Optionally, in one implementation, when the filtered time series is a posture information sequence, the related sequence is a key point sequence corresponding to the posture information sequence.
[0118] Optionally, in another implementation, when the filtered time series is an X-axis time series to be filtered, its related sequence is an X-axis related sequence; when the filtered time series is a Y-axis time series to be filtered, its related sequence is a Y-axis related sequence.
[0119] For the convenience of expression, the above-mentioned posture information sequence, X-axis time sequence to be filtered and Y-axis time sequence to be filtered are expressed as time sequence to be filtered, and their implementation methods are consistent.
[0120] Optionally, the time series to be filtered can be represented by the time series X, denoted as:
[0121] X={x1,x2,x3,…,x l-1 ,x l}
[0122] In the above formula, l is the number of sequence values contained in the time series X, x1, x2, x2, x l-1 and x l They are the sequence values with sequence numbers 1, 2, 3, l-1 and l in the time series X respectively.
[0123] For the convenience of expression, in the embodiment of the present invention, the correlation sequence of the time series to be filtered is represented by time series B, which is recorded as:
[0124] B={b1,b2,b3,…,b l-1 ,b l}
[0125] In the above formula, l is the number of sequence values contained in time series B, b1, b2, b2, b l-1 and b l They are the sequence values of sequence numbers 1, 2, 3, l-1 and l in time series B respectively.
[0126] In one embodiment, the sampling times of the sequence values with the same sequence numbers in the time series X and the time series B are the same.
[0127] Optionally, before executing step S702, the related sequence may be weakly filtered, wherein the weak filtering is filtering processing with a filtering strength less than a preset strength threshold, so as to further reduce the noise contained in the related sequence, thereby further improving the effect of filtering the time series to be filtered.
[0128] S702: Filter the time series to be filtered according to the filtering parameters of each sequence value in the time series to be filtered.
[0129] The sequence values in the related sequence are b1 to b l The sequence value of the sequence number t in the relevant sequence is b t, according to b t The value b is determined by the sampling time difference and value difference with other sequence values in the related sequence t The filtering parameters are determined and the determined filtering parameters are used as the filtering time series corresponding to the value b t The value x of the same sampling time t For example, the sampling time difference and the value difference can be weighted and summed as the value b t The filtering parameters can also be sampled in other ways, which will be described in detail later and will not be repeated here. Generally speaking, the smaller the sampling time difference is, the better the sequence value b to be filtered. t The greater the impact or the greater the numerical difference, the greater the sequence value b of the filtered sequence value t The greater the impact.
[0130] Optionally, for each sequence value in the related sequence, the product of the numerical difference between each sequence value other than the sequence value and the sequence value and the inverse of the sampling time difference can be calculated as a filtering parameter of the sequence value; the difference between each sequence value and the adjacent values can also be calculated first, and when it is necessary to determine the filtering parameter of a sequence value in the related sequence, it can be determined based on the difference between other sequence values and the adjacent values, and the numerical difference between the sequence value and other values.
[0131] After determining the filtering parameters of each sequence value in the related sequence, the determined filtering parameters of the sequence values can be used as filtering parameters of sequence values in the time series to be filtered that have the same sampling time as the sequence values, and further, the time series to be filtered can be filtered according to the filtering parameters of each sequence value in the time series to be filtered.
[0132] The embodiments of the present invention provide Figure 7 The filtering method shown can filter the time series to be filtered by using the filtering parameters of a correlated sequence that is correlated with the time series to be filtered and contains less noise than the time series to be filtered. Since the correlated sequence contains less noise than the time series to be filtered, the filtering information carried by the correlated sequence is more accurate than the filtering information carried by the time series to be filtered. Therefore, the effect of filtering the time series to be filtered can be improved.
[0133] In one embodiment of the present invention, for step S702, the following steps may be performed: Figure 8 The filtering parameters of each sequence value in the correlation sequence are determined in the manner shown, such as Figure 8 As shown, a method for determining filtering parameters provided by an embodiment of the present invention includes:
[0134] S801: Select, from a related sequence, a sequence value whose absolute value of the difference between the sequence number and the sequence number of the first sequence value is less than a preset difference as a second sequence value; wherein the first sequence data is a sequence value of a filtering parameter to be determined.
[0135] In this step, the preset difference value may be determined according to actual needs and experience, such as 3. When the sequence number of the first sequence value in the related sequence is 4, the sequence values in the related sequence whose absolute value of the sequence number difference between the sequence number of the first sequence value and the sequence number of the first sequence value is less than the preset difference value may be 2, 3, 5 and 6, respectively. For another example, there are 9 sequence differences, which are 1, 2, 3, 4, 5, 6, 7, 8 and 9, and the first sequence value is 5. If the preset difference value is 3, the absolute value of the sequence difference between 1 and 5 is 4, the absolute value of the sequence difference between 2 and 5 is 3, the absolute value of the sequence difference between 3 and 5 is 2, the absolute value of the sequence difference between 4 and 5 is 1, the absolute value of the sequence difference between 6 and 5 is 1, the absolute value of the sequence difference between 7 and 5 is 2, the absolute value of the sequence difference between 8 and 5 is 3, and the absolute value of the sequence difference between 9 and 5 is 4. Among them, the absolute value of the sequence difference between 3, 4, 6 and 7 and 5 is less than 3, that is, the second sequence value is 3, 4, 6 and 7. Similarly, if the preset difference value is 4, the second sequence value is 2, 3, 4, 6, 7 and 8.
[0136] In the above embodiment, the relevant sequence is recorded as time series B:
[0137] B={b1,b2,b3,…,b l-1 , b l}
[0138] For the sequence value b in the related sequence B t , we can first determine the sequence value b from time series B t The filtering sequence B′ is recorded as:
[0139] B′={b t-m , b t-m+1 , b t-m+2 , …, b t-1 , b t , b t+1 , …, b t+m-2 , b t+m-1 , b t+m}
[0140] Among them, m is the preset difference, b t-m , b t-m+1 , b t-m+2 , b t-1 , b t , b t+1 , bt+m-2 , b t+m-1 and b t+m They respectively represent the sequence values with sequence numbers tm, t-m+1, t-m+2, t-1, t, t+1, t+m-1, t+m-1 and t+m in time series B.
[0141] In one embodiment, since there is no value with a sequence number less than or equal to 0 in the time series B, when tm≤0, b may not be obtained. t-m , or use b t+m+1 Instead of b t-m For example, tm = 0, using b t+m+1 Instead of b t-m This means that b1 is used instead of b0. For another example, when t=2, the preset difference is 3, then:
[0142] B′={b -2 , b -1 , b0, b1, b2, b3, b4, b5}
[0143] Since there is no b -2 , b -1 , b0, therefore, using b -1 Instead of b -2 , use b0 instead of b -1 , use b1 instead of b 01 , that is, b -2 =b -1 =b0=b1, that is:
[0144] B′={b1, b1, b1, b1, b2, b3, b4, b5}
[0145] Correspondingly, when t+m>l, b can be omitted. t+m , or use b t-m-1 Instead of b t+m .
[0146] In one embodiment, in order to improve the filtering effect of the sequence values at both ends of the time series to be filtered, for the sequence value b t The sequence value b with sequence number j in the filtered sequence B′ j For b j When j≤0, b j =b1, when b j When j>l, b j =b i .
[0147] S802: Determine filtering parameters of the sequence values according to the sampling time difference and the value difference between each second sequence value and the first sequence value.
[0148] Wherein, when the time series to be filtered corresponds to a sampling time interval, and the sampling time interval is the sampling time of the adjacent sequence values of the time series to be filtered, in one method, the filtering parameters of the sequence values can be determined in the following manner, including the steps of:
[0149] Step 1: Calculate the numerical difference between each second sequence value and the adjacent sequence value of the second sequence value as the adjacent numerical difference, wherein the adjacent sequence value of the second sequence value is: a sequence value whose sequence number is between the sequence number of the second sequence value and the sequence number of the first sequence value and is adjacent to the second sequence value.
[0150] In this step, the adjacent values of the second sequence value are: sequence values whose sequence numbers are between the sequence numbers of the second sequence value and the sequence number of the first sequence value and are adjacent to the second sequence value, that is, for the second sequence value whose sequence number is greater than the first sequence value, the adjacent values of the second sequence value are: values adjacent to the second sequence value and whose sequence number is less than the second sequence value; for the second sequence value whose sequence number is less than the first value, the adjacent values of the second sequence value are: values adjacent to the second sequence value and whose sequence number is greater than the second sequence value.
[0151] For example, Fig. 9 As shown in the figure, it is a schematic diagram of determining the difference value provided by an embodiment of the present invention, in which Bt is a first sequence value, Bt-2, Bt-1, Bt+1 and Bt+2 are second sequence values of the first sequence value Bt respectively. For Bt-2, the sequence number is between t-2 and t, and the value adjacent to Bt-2 is Bt-1, that is, the adjacent value of Bt-2 is Bt-1, that is, Vt-2 in the figure, and for Bt+2, the sequence number is between t+2 and t, and the value adjacent to Bt+2 is Bt+1, that is, the adjacent value of Bt+2 is Bt+2. t+1, which is Vt+2 in the figure. In the figure, Vt-2, Vt-1, Vt+1 and Vt+2 are the numerical differences between Bt-2, Bt-1, Bt+1 and Bt+2 and their adjacent values, respectively. Among them, the adjacent value of Bt-2 is Bt-1, the adjacent value of Bt-1 is Bt, the adjacent value of Bt+1 is Bt, and the adjacent value of Bt+2 is Bt+1, that is, Vt-2=Bt-1-Bt-2, Vt-1=Bt-Bt-1, Vt+1=Bt-Bt+1, Vt+1=Bt+1-Bt+2.
[0152] Step 2: Determine the serial number difference between each second serial value and the first serial value.
[0153] In this step, as known to those skilled in the art, the sampling time interval of the time series is fixed. Since the sampling time interval of the related sequence is fixed, the sequence number difference of the sequence value can reflect the difference in the sampling time of the sequence value, and therefore, the sequence number difference between each second sequence value and the first value can be calculated. That is, the sampling time is the product of the sampling time interval and the sequence number difference.
[0154] Step 3: Determine the influence parameter of the second sequence value on the first sequence value based on the difference in sequence number between each second sequence value and the first sequence value and the sampling time interval corresponding to the time series to be filtered, wherein the influence parameter of the second sequence value on the first sequence value represents the degree of influence of the second sequence value when filtering the first sequence value.
[0155] In this step, the difference between the sequence numbers of each second sequence value and the first sequence value and the sampling time interval of the time series to be filtered can be multiplied, and the product is used as the influence parameter of the second value on the first value.
[0156] In one embodiment, the influence parameter of each second sequence value may also be determined according to the following formula:
[0157]
[0158] in, Indicates the second sequence value b in the related sequence j For the first sequence value b t The influence parameter, T is the sampling time interval of the time series to be filtered, r is the preset influence factor coefficient, jt represents the second sequence value b j With the first sequence value b t The serial number difference.
[0159] In one embodiment, the sampling time interval T is the inverse of the sampling period F of the time series to be filtered.
[0160] Step 4: Determine the filtering parameters of the first sequence values according to the adjacent value differences and influence parameters corresponding to each second sequence value.
[0161] In this step, the filtering parameters of the first sequence values can be determined according to the adjacent value differences and influence parameters corresponding to each second sequence value, such as multiplying the adjacent value differences and influence parameters corresponding to each second sequence value, and using the product as the filtering parameter of the first sequence value. Other methods can also be used, which will be described in detail in the subsequent embodiments of the present invention and will not be repeated here.
[0162] The embodiments of the present invention provide Figure 2The filtering parameter determination method shown can determine the filtering parameter of the first value through the adjacent value difference and the influence parameter, and then filter the filtering time series according to the determined filtering parameter, thereby improving the filtering effect of the filtering time series.
[0163] In another embodiment of the present invention, for the above step 4, the following method can be used: Fig.10 The filtering parameter determination method shown is implemented, comprising:
[0164] S1001: Determine, based on adjacent value differences corresponding to each second sequence value, a change degree of the second sequence value relative to a second sequence value sampled at the same time as the first sequence value, wherein the change degree represents a magnitude of value change.
[0165] In this step, the difference between adjacent values may be used as the degree of change of the second sequence values relative to the second sequence values having the same sampling time as the first sequence values.
[0166] In one embodiment, the degree of change of each second sequence value relative to the second sequence value having the same sampling time as the first sequence value may also be determined according to the following formula:
[0167]
[0168] Among them, the function g(x) is:
[0169]
[0170] The value range of u is 1 to m, where m is the preset difference. and They represent the values of the sequence numbers t, tu, t-u+1, t+u and t+u-1 in the related sequence relative to the first sequence value b t The degree of change of the second series value with the same sampling time, v t-u and v t+u They represent the adjacent numerical differences corresponding to the values of sequence numbers tu and t+u in the relevant sequence, respectively, set is the preset threshold, and s is the preset change factor coefficient.
[0171] Through the function g(x) and the preset numerical difference v set It can be ensured that when an abnormal sequence value appears in the related sequence, the abnormal sequence value will not participate in the filtering of the normal sequence value, thereby improving the filtering effect. Further, through the above formula for calculating the degree of change of the second sequence value, it can be ensured that when an abnormal sequence value appears, the abnormal sequence value and subsequent values of the abnormal sequence value will not participate in the filtering of the normal sequence value, further improving the filtering effect.
[0172] S1002: Determine filtering parameters of the first values according to the degree of change and influence parameters of each second value.
[0173] In this step, the average change degree of each second sequence value and the average influence parameter of the influence parameter of each second sequence value can be determined first, and the product of the average change degree and the average influence parameter is used as the filtering parameter of the first value.
[0174] The filtering parameter of the first value can be determined according to the following formula:
[0175]
[0176] Among them, w t Indicates the first sequence value b t The filter parameters are Indicates the second sequence value b i Relative to the first sequence value b t The degree of change, Indicates the second sequence value b i For the first sequence value b t The influence parameters.
[0177] The embodiments of the present invention provide Fig.10 The filtering parameter determination method shown in the figure can determine the filtering parameters of the first sequence of values by the degree of change and the influence parameter, and then filter the filtering time series to be filtered according to the determined filtering parameters, thereby improving the filtering effect of the filtering time series to be filtered. Further, by using the function g(x) and the preset value difference v set It can be ensured that when an abnormal sequence value appears in the related sequence, the abnormal sequence value will not participate in the filtering of the normal sequence value, thereby improving the filtering effect. Further, through the above formula for calculating the degree of change of the second sequence value, it can be ensured that when an abnormal sequence value appears, the abnormal sequence value and subsequent values of the abnormal sequence value will not participate in the filtering of the normal sequence value, further improving the filtering effect.
[0178] In one embodiment, in order to filter the time series to be filtered more accurately, the first sequence values to be filtered may be adjusted based on the first sequence values. That is, after the filtering parameters of the first sequence values are determined according to the above formula, the time series to be filtered may be filtered according to the following formula:
[0179]
[0180] in, It represents the value obtained after filtering the value with sequence number t in the filtering time series, x i Represents the value of sequence number i in the time series to be filtered.
[0181] In another embodiment of the present invention, Fig.11 As shown, a flowchart schematic diagram of a filtering method is provided. When a time series to be filtered needs to be filtered, a related sequence is first determined, and the related sequence is filtered through a weak filter. For the first sequence value to be filtered in the time series to be filtered, the corresponding second sequence value is determined from the related sequence, and the influence parameter and the degree of change are calculated by sampling the method provided in the above embodiment, and then the first sequence value is adjusted to obtain the adjusted first sequence value. After each first sequence value in the time series to be filtered is adjusted, the filtering is completed to obtain the filtered sequence.
[0182] Based on the same inventive concept, according to the object model construction method provided by the embodiment of the present invention, the embodiment of the present invention also provides an object model construction device, such as Fig.12 As shown, the device comprises:
[0183] The key point group acquisition module 1201 is used to acquire the key point group of the target object contained in each frame of the image continuously collected for the target object;
[0184] An information determination module 1202 is used to determine the posture information, shape information and position information of the target object in each frame of the image based on the acquired key point group;
[0185] The information filtering module 1203 is used to filter the posture information of the target object in each frame image based on the key point group of the target object in each frame image to obtain the filtered posture information, and to filter the position information of the target object in each frame image based on the key point group of the target object in each frame image to obtain the filtered position information;
[0186] The model building module 1204 is used to build an object model of the target object according to the shape information, filtered posture information and filtered position information of each frame image.
[0187] Furthermore, the model building module is specifically used to generate a pre-built model of the target object based on the shape information and filtered posture information of each frame image; the pre-built model is adjusted to the position area indicated by the filtered position information to obtain the object model of the target object.
[0188] Furthermore, the information filtering module is specifically used to construct a posture information sequence corresponding to each type of key point based on the posture information of the target object in each frame image, as the time series to be filtered, and the posture information in the posture information sequence is used as the numerical value in the time series to be filtered; for each type of key point, the key points belonging to this type are selected from the key point group of the target object in each frame image, and the extracted key points are sorted according to the order of acquisition of each frame image, and the key point sequence of this type is constructed as the related sequence of the time series to be filtered corresponding to the key points belonging to this type, and the key points in the key point sequence are used as the numerical value in the related sequence; based on the related sequence, each numerical value in the time series to be filtered is filtered to obtain the filtered posture information.
[0189] Furthermore, the information filtering module is specifically used to average the coordinates of each key point in the key point group of the target object in each image to obtain the coordinates of the center of gravity of the target object in each image; extract the coordinates represented by the position information of the target object in each frame image, and sort the extracted coordinates according to the order of acquisition of each frame image to obtain a first coordinate sequence as the coordinates to be filtered; extract the coordinates of the center of gravity of the target person in each acquired image, and sort the extracted coordinates according to the order of acquisition of each frame image to obtain a second coordinate sequence as the related sequence of the coordinates to be filtered; based on the related sequence of the time sequence to be filtered, filter each value in the time sequence to be filtered.
[0190] Furthermore, the information filtering module is specifically used to determine, for each sequence value in the related sequence, a filtering parameter of the sequence value according to the sampling time difference and the value difference between other sequence values in the related sequence and the sequence value, as the filtering parameter of the sequence values in the time series to be filtered that have the same sampling time as the sequence value; and filter the time series to be filtered according to the filtering parameter of each sequence value in the time series to be filtered.
[0191] Furthermore, the information filtering module is specifically used to determine the filtering parameters of each sequence value in the related sequence in the following manner: select a sequence value from the related sequence whose absolute value of the difference between the sequence number and the sequence number of the first sequence value is less than a preset difference, as the second sequence value; wherein the first sequence data is a sequence value of the filtering parameters to be determined; and determine the filtering parameters of the sequence value based on the sampling time difference and the value difference between each second sequence value and the first sequence value.
[0192] Furthermore, the time series to be filtered corresponds to a sampling time interval, and the sampling time interval is the sampling time difference between adjacent sequence values of the time series to be filtered;
[0193] The information filtering module is specifically used to calculate the value difference between each second sequence value and the adjacent sequence value of the second sequence value as the adjacent value difference, wherein the adjacent sequence value of the second sequence value is: a sequence value whose sequence number is between the sequence number of the second sequence value and the sequence number of the first sequence value and is adjacent to the second sequence value; determine the sequence number difference between each second sequence value and the first sequence value; determine the influence parameter of the second sequence value on the first sequence value according to the sequence number difference between each second sequence value and the first sequence value and the sampling time interval corresponding to the time series to be filtered, wherein the influence parameter of the second sequence value on the first sequence value represents the degree of influence of the second sequence value when filtering the first sequence value; determine the filtering parameter of the first sequence value according to the adjacent value difference and the influence parameter corresponding to each second sequence value.
[0194] Furthermore, the information filtering module is specifically used to determine the influence parameter of each second sequence value according to the following formula:
[0195]
[0196] in, Indicates the second sequence value b in the related sequence j For the first sequence value b t The influence parameter, T is the sampling time interval of the time series to be filtered, r is the preset influence factor coefficient, jt represents the second sequence value b j With the first sequence value b t The serial number difference.
[0197] Furthermore, the information filtering module is specifically used to determine the degree of change of the second sequence value relative to the second sequence value with the same sampling time as the first sequence value according to the difference of adjacent values corresponding to each second sequence value, and the degree of change represents the magnitude of the value change; according to the degree of change of each second value and the influence parameter, determine the filtering parameter of the first value.
[0198] Furthermore, the information filtering module specifically determines the degree of change of each second sequence value relative to the second sequence value having the same sampling time as the first sequence value according to the following formula:
[0199]
[0200] Among them, the function g(x) is:
[0201]
[0202] The value range of u is 1 to m, where m is half of the preset number. and They represent the values of the sequence numbers t, tu, t-u+1, t+u and t+u-1 in the related sequence relative to the first sequence value b t The degree of change of the second series value with the same sampling time, v t-u and v t+u They represent the adjacent numerical differences corresponding to the values of sequence numbers tu and t+u in the relevant sequence, respectively, and v set is the preset threshold, and s is the preset change factor coefficient.
[0203] Furthermore, the information filtering module specifically filters the filtering time series according to the following formula:
[0204]
[0205] in, Indicates the first sequence value b t The filter parameters are Indicates the second sequence value b i Relative to the first sequence value b t The degree of change, Indicates the second sequence value b i For the first sequence value b t The influence parameters of It represents the value obtained after filtering the value with sequence number t in the filtering time series, x i Represents the value of sequence number i in the time series to be filtered.
[0206] The embodiments of the present invention provide Fig.12 The filtering parameter determination device shown can obtain the key point group of the target object in multiple frame images, and determine the posture information, shape information and position information based on the obtained key point group, and filter the posture information and position information through the key point group, and further construct an object model based on the filtered posture information and the filtered position information, as well as the shape information. Since the acquired posture information and position information can be filtered based on the key point group of multiple frame images, the accuracy of the posture information and position information can be improved, and the object model constructed based on the posture information and position information with higher accuracy has a higher accuracy rate.
[0207] The embodiment of the present invention further provides an electronic device, such as Fig.13 As shown, it includes a processor 1301, a communication interface 1302, a memory 1303 and a communication bus 1304, wherein the processor 1301, the communication interface 1302, and the memory 1303 communicate with each other through the communication bus 1304.
[0208] Memory 1303, used for storing computer programs;
[0209] The processor 1301 is used to implement the following steps when executing the program stored in the memory 1303:
[0210] Acquire a key point group of the target object contained in each frame of image continuously acquired for the target object;
[0211] Based on the acquired key point group, determining the posture information, shape information and position information of the target object in each frame of the image;
[0212] Based on the key point group of the target object in each frame image, the posture information of the target object in each frame image is filtered to obtain the filtered posture information, and based on the key point group of the target object in each frame image, the position information of the target object in each frame image is filtered to obtain the filtered position information;
[0213] An object model of the target object is constructed according to the shape information, filtered posture information and filtered position information of each frame image.
[0214] The embodiments of the present invention provide Fig.13 The electronic device shown can obtain the key point group of the target object in multiple frame images, and determine the posture information, shape information and position information based on the obtained key point group, and filter the posture information and position information through the key point group, and further build an object model based on the filtered posture information and the filtered position information, as well as the shape information. Since the acquired posture information and position information can be filtered based on the key point group of multiple frame images, the accuracy of the posture information and position information can be improved, and thus the object model built based on the posture information and position information with higher accuracy has a higher accuracy rate.
[0215] It should be noted that other embodiments of the object model construction method implemented by the above-mentioned electronic device are the same as the object model construction method mentioned in the aforementioned method embodiment part, and will not be repeated here.
[0216] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0217] The communication interface is used for communication between the above electronic device and other devices.
[0218] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0219] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0220] In another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the object model construction method described in any of the above embodiments is implemented.
[0221] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the object model construction method described in any one of the above embodiments.
[0222] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0223] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0224] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0225] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A method for constructing an object model, characterized in that: include: Acquire a key point group of the target object contained in each frame of image continuously acquired for the target object; Based on the acquired key point group, determining the posture information, shape information and position information of the target object in each frame of the image; Based on the key point group of the target object in each frame image, the posture information of the target object in each frame image is filtered to obtain the filtered posture information, and based on the key point group of the target object in each frame image, the position information of the target object in each frame image is filtered to obtain the filtered position information; Constructing an object model of the target object according to shape information, filtered posture information and filtered position information of each frame image; The filtering of the position information of the target object in each frame of image based on the key point group of the target object in each frame of image to obtain the filtered position information includes: The coordinates of each key point in the key point group of the target object in each image are averaged to obtain the coordinates of the center of gravity of the target object in each image; Extracting the coordinates represented by the position information of the target object in each frame of image, and sorting the extracted coordinates according to the order of acquisition of each frame of image, to obtain a first coordinate sequence as a first time sequence to be filtered; Extracting the coordinates of the center of gravity of the target person in each collected image, and sorting the extracted coordinates according to the order of collecting each frame of the image, to obtain a second coordinate sequence as a related sequence of the first time sequence to be filtered; Based on the correlation sequence of the first time series to be filtered, each value in the first time series to be filtered is filtered.
2. The method according to claim 1, characterized in that The object model of the target object is constructed according to the shape information, the filtered posture information and the filtered position information of each frame image, including: Generate a pre-built model of the target object based on the shape information and filtered posture information of each frame image; The pre-built model is adjusted to the position area indicated by the filtered position information to obtain an object model of the target object.
3. The method according to claim 1, characterized in that The filtering of the posture information of the target object in each frame of image based on the key point group of the target object in each frame of image to obtain the filtered posture information includes: Based on the posture information of the target object in each frame image, a posture information sequence corresponding to each type of key point is constructed as a second time series to be filtered, and the posture information in the posture information sequence is used as a value in the second time series to be filtered; For each type of key point, select key points belonging to this type from the key point group of the target object in each frame image, and sort the extracted key points according to the order of acquisition of each frame image, construct a key point sequence of this type as the correlation sequence of the second time series to be filtered corresponding to the key points belonging to this type, and the key points in the key point sequence are used as the values in the correlation sequence of the second time series to be filtered; Based on the correlation sequence of the second time series to be filtered, each value in the second time series to be filtered is filtered to obtain filtered posture information.
4. The method according to claim 1, characterized in that: The filtering of each value in the first time series to be filtered based on the correlation sequence of the first time series to be filtered includes: For each sequence value in the correlation sequence of the first time series to be filtered, determining a filtering parameter of the sequence value according to a sampling time difference and a value difference between the sequence value and other sequence values in the correlation sequence of the first time series to be filtered, and using the filtering parameter as a filtering parameter of a sequence value in the first time series to be filtered with the same sampling time as the sequence value; The first time series to be filtered is filtered according to the filtering parameters of each sequence value in the first time series to be filtered.
5. The method according to claim 3, characterized in that: The filtering of each value in the second time series to be filtered based on the correlation sequence of the second time series to be filtered includes: For each sequence value in the correlation sequence of the second time series to be filtered, determine a filtering parameter of the sequence value according to a sampling time difference and a value difference between other sequence values in the correlation sequence of the second time series to be filtered and the sequence value, and use the filtering parameter as a filtering parameter of a sequence value in the second time series to be filtered with the same sampling time as the sequence value; The first time series to be filtered is filtered according to the filtering parameters of each sequence value in the second time series to be filtered.
6. The method according to claim 4, characterized in that The step of determining, for each sequence value in the correlation sequence of the first time series to be filtered, filtering parameters of the sequence value according to sampling time differences and value differences between the sequence value and other sequence values in the correlation sequence of the first time series to be filtered comprises: The filtering parameter of each sequence value in the correlation sequence of the first time series to be filtered is determined in the following manner: Selecting, from the related sequence of the first time series to be filtered, a sequence value whose absolute value of the difference between the sequence number and the sequence number of the first sequence value is less than a preset difference as the second sequence value; wherein the first sequence value is the sequence value of the filtering parameter to be determined; The filtering parameters of the sequence values are determined according to the sampling time difference and the value difference between each second sequence value and the first sequence value.
7. The method according to claim 5, characterized in that The step of determining, for each sequence value in the correlation sequence of the second time series to be filtered, filtering parameters of the sequence value according to sampling time differences and value differences between the sequence value and other sequence values in the correlation sequence of the second time series to be filtered comprises: The filtering parameter of each sequence value in the correlation sequence of the second time series to be filtered is determined in the following manner: Selecting, from the relevant sequence of the second time series to be filtered, a sequence value whose absolute value of the difference between the sequence number and the sequence number of the first sequence value is less than a preset difference as the second sequence value; wherein the first sequence value is a sequence value of the filtering parameter to be determined; The filtering parameters of the sequence values are determined according to the sampling time difference and the value difference between each second sequence value and the first sequence value.
8. The method according to claim 6 or 7, characterized in that: The time series to be filtered includes a first time series to be filtered and / or a second time series to be filtered; the time series to be filtered corresponds to a sampling time interval, and the sampling time interval is the sampling time difference between adjacent sequence values of the time series to be filtered; The step of determining the filtering parameters of the sequence values according to the sampling time difference and the value difference between each second sequence value and the first sequence value comprises: Calculate the value difference between each second sequence value and the adjacent sequence value of the second sequence value as the adjacent value difference, wherein the adjacent sequence value of the second sequence value is: a sequence value having a sequence number between the sequence number of the second sequence value and the sequence number of the first sequence value and adjacent to the second sequence value; Determine the difference between each second sequence value and the first sequence value; Determine, according to the difference between the sequence numbers of each second sequence value and the first sequence value and the sampling time interval corresponding to the time series to be filtered, an influence parameter of the second sequence value on the first sequence value, wherein the influence parameter of the second sequence value on the first sequence value represents the degree of influence of the second sequence value when filtering the first sequence value; The filtering parameters of the first sequence values are determined according to the adjacent value differences and the influence parameters corresponding to each second sequence value.
9. The method according to claim 8, characterized in that The determining, according to the sequence number difference between each second sequence value and the first sequence value and the sampling time interval corresponding to the to-be-filtered time series, the influence parameter of the second sequence value on the first sequence value includes: The influence parameter of each second order value is determined according to the following formula: in, Indicates the second sequence value b in the related sequence j For the first sequence value b t The influence parameter, T is the sampling time interval of the time series to be filtered, r is the preset influence factor coefficient, jt represents the second sequence value b j With the first sequence value b t The serial number difference.
10. The method according to claim 8, characterized in that The step of determining the filtering parameters of the first sequence values according to the adjacent value difference and the influence parameter corresponding to each second sequence value includes: Determine, according to the adjacent value difference corresponding to each second sequence value, the degree of change of the second sequence value relative to the second sequence value with the same sampling time as the first sequence value, wherein the degree of change represents the magnitude of the value change; The filtering parameters of the first values are determined according to the variation degree and the influence parameter of each second value.
11. The method according to claim 9, characterized in that The step of determining the filtering parameters of the first sequence values according to the adjacent value difference and the influence parameter corresponding to each second sequence value includes: Determine, according to the adjacent value difference corresponding to each second sequence value, the degree of change of the second sequence value relative to the second sequence value with the same sampling time as the first sequence value, wherein the degree of change represents the magnitude of the value change; The filtering parameters of the first values are determined according to the variation degree and the influence parameter of each second value.
12. The method according to claim 10 or 11, characterized in that: The step of determining, based on the adjacent value difference corresponding to each second sequence value, the degree of change of the second sequence value relative to the second sequence value having the same sampling time as the first sequence value, comprises: Determine the degree of change of each second sequence value relative to the second sequence value at the same sampling time as the first sequence value according to the following formula: Among them, the function g(x) is: The value range of u is 1 to m, where m is the preset difference. and respectively represent the values of the sequence numbers t, tu, t-u+1, t+u and t+u-1 in the related sequence relative to the first sequence value b t The degree of change of the second series value with the same sampling time, v t-u and v t+u represent the adjacent numerical differences corresponding to the values of sequence numbers tu and t+u in the related sequence, respectively, set is the preset threshold, and s is the preset change factor coefficient.
13. The method according to claim 12, characterized in that Filtering the time series to be filtered according to the filtering parameters of each sequence value in the time series to be filtered includes: The time series to be filtered is filtered according to the following formula: in, Indicates the first sequence value b t The filter parameters are Indicates the second sequence value b i Relative to the first sequence value b t The degree of change, Indicates the second sequence value b i For the first sequence value b t The influence parameters of represents the value obtained after filtering the value with sequence number t in the time series to be filtered, x i Represents the value of the sequence number i in the time series to be filtered.
14. An object model building device, characterized in that: include: A key point group acquisition module, used to acquire a key point group of a target object contained in each frame of an image continuously acquired for the target object; An information determination module, used to determine the posture information, shape information and position information of the target object in each frame of the image based on the acquired key point group; An information filtering module is used to filter the posture information of the target object in each frame of the image based on the key point group of the target object in each frame of the image to obtain the filtered posture information, and to filter the position information of the target object in each frame of the image based on the key point group of the target object in each frame of the image to obtain the filtered position information; A model building module, used for building an object model of a target object according to shape information, filtered posture information and filtered position information of each frame image; The information filtering module is specifically used to average the coordinates of each key point in the key point group of the target object in each image to obtain the coordinates of the center of gravity of the target object in each image; extract the coordinates represented by the position information of the target object in each frame image, and sort the extracted coordinates according to the order of acquisition of each frame image to obtain a first coordinate sequence as a first time sequence to be filtered; extract the coordinates of the center of gravity of the target person in each collected image, and sort the extracted coordinates according to the order of acquisition of each frame image to obtain a second coordinate sequence as a related sequence of the first time sequence to be filtered; Based on the correlation sequence of the first time series to be filtered, each value in the first time series to be filtered is filtered.
15. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1-13 when executing a program stored in a memory.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 13 are implemented.
