A method for human position estimation based on monocular vision
By detecting the outline of wearable items on the construction site and building a plane and three-dimensional geometric model, the problem of monocular visual posture estimation in the existing technology is solved, and the position estimation of low-cost and high-accuracy construction personnel is achieved, and the safety of the construction site is improved.
Patent Information
- Application Number
- CN202111451933.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2041-11-30
AI Technical Summary
The existing monocular visual pose estimation method based on deep learning is costly, has low accuracy and high computational complexity, so it is impossible to effectively estimate the location of construction personnel, resulting in insufficient safety at the construction site.
By detecting the outline of wearable items in the construction site photos, fitting the plane geometry and constructing a body geometry model, calculating the human body's position using optimization problems, and issuing alarm prompts to improve safety.
It realizes low-cost and high-accuracy human position estimation, reduces the computational complexity, and improves the safety management efficiency of the construction site.
Smart Images

Figure CN114387335B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to visual pose estimation, and in particular to a method for estimating human body position based on monocular vision. Background Art
[0002] In certain construction environments, there are dangerous objects that need to be avoided. For example, power construction sites usually have many charged objects that construction workers can easily touch, posing a high risk. It is necessary to estimate the location of construction workers in real time through on-site images and then remind them whether they are close to charged objects to improve construction site safety.
[0003] Currently, to save costs, only one camera is deployed at a construction site. Managers use images uploaded by the camera to remind construction workers to stay away from charged objects. However, manual reminders are often delayed and prone to human oversight, and a single camera cannot effectively reflect positional relationships.
[0004] Currently, there are methods based on deep learning that use monocular vision to estimate target positions. By inputting an image, the depth information of a specified target in the image can be obtained. However, monocular vision pose estimation methods based on deep learning require pre-training with a sample set. These samples are a large number of ground-truth depth values. The cost of obtaining such a large number of ground-truth depth values is very high, requiring sophisticated depth measurement equipment and a mobile platform. Moreover, the data in the sample set is difficult to cover all real-world position conditions, and data may be missing, resulting in models constructed through deep learning being unable to achieve high accuracy. At the same time, monocular vision pose estimation methods based on deep learning have scale uncertainty and cannot accurately obtain the depth of the target.
[0005] Therefore, a low-cost and high-accuracy depth estimation method based on monocular vision is needed to determine the location of construction workers in power construction sites. Summary of the Invention
[0006] The technical problem to be solved by the present invention is: In view of the above problems in the prior art, a method for estimating the position of a human body based on monocular vision is provided, which has the advantages of low cost, high accuracy and low computational complexity.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] A method for estimating human position based on monocular vision comprises the following steps:
[0009] Obtaining a construction site photo, detecting a wearable item in a target area of the construction site photo, obtaining an outline of the wearable item, fitting a plane geometric figure corresponding to the wearable item to the outline, and calculating a direction vector from an optical center to an edge of the plane geometric figure in a camera coordinate system;
[0010] A model of a three-dimensional geometric figure corresponding to the wearable item is constructed based on the direction vector and the size of the wearable item. An optimization problem is then solved for the model to obtain the optimal position of the center of the three-dimensional geometric figure in the camera coordinate system. The optimal position is used as the estimated position of the human body. If the estimated position of the human body is outside a preset safety zone, an alarm prompt is issued.
[0011] Furthermore, detecting wearable items in a target area in the construction site photo and obtaining the outline of the wearable items specifically includes: using a YOLO network to detect wearable items in the construction site photo, then using an ENet network to segment the detected wearable items from the target area in the construction site photo, and extracting contour points of the wearable items to obtain a set of contour points.
[0012] Furthermore, fitting the plane geometric figure corresponding to the wearable article to the outline specifically includes: setting plane geometric figure parameters, generating a set of plane geometric figure edge points based on the plane geometric figure parameters, constructing a first objective function based on the contour points in the contour of the wearable article and the edge points, solving an optimization problem for the first objective function to obtain optimal plane geometric figure parameters, and fitting the edge points of the plane geometric figure to the contour points of the wearable article.
[0013] Furthermore, the first objective function expression is as follows:
[0014] L2(θ)=||f(x)-g(x|θ)||2
[0015] In the above formula, f(x) is a Gaussian mixture model established based on the contour points of the wearable item, and g(x|θ) is a Gaussian mixture model established based on the edge points of the plane geometric figure;
[0016] Solving the optimization problem for the first objective function is specifically determining the optimal plane geometric figure parameters by minimizing the first objective function.
[0017] Furthermore, the plane geometric figure is an ellipse, and the ellipse parameter θ=(x0, y0, a0, b0, γ), where x0 and y0 are the coordinates of the ellipse center, a0 and b0 are the values of the two semi-axes of the ellipse, and γ is the rotation angle of the ellipse. Before constructing the first objective function based on the contour points in the contour of the wearable article and the edge points, the step of establishing a Gaussian mixture model is also included, specifically including:
[0018] A Gaussian mixture model f(x) is established based on the contour points of the wearable item and the preset Gaussian kernel function. The function expression is as follows:
[0019]
[0020] In the above formula, n is the number of contour points of the helmet, x j represents the j-th contour point of the helmet, h represents the bandwidth of the Gaussian kernel function, I represents the unit matrix, N(x; x j ,h 2 I) represents the Gaussian kernel function;
[0021] Generate a set of ellipse edge points based on the ellipse parameters. The function expression of the edge points is as follows:
[0022]
[0023] In the above formula, i∈[1,m], m is the number of edge points, τ i ∈[0,2π);
[0024] A Gaussian mixture model g(x|θ) is established based on the edge points and the preset Gaussian kernel function. The function expression is as follows:
[0025]
[0026] In the above formula, m is the number of edge points of the ellipse, N(x; μ i ,Σ i ) represents the Gaussian kernel function, ω i Represents the weight of the Gaussian kernel function, μ i represents the mean of the Gaussian kernel function, Σ i Represents the covariance matrix of the Gaussian kernel function.
[0027] Furthermore, calculating the direction vector from the optical center to the edge of the plane geometric figure in the camera coordinate system specifically includes: calculating the coordinates of the edge points of the edge of the plane geometric figure in the camera coordinate system respectively, and for each edge point, calculating its corresponding direction vector based on the coordinates of the optical center in the camera coordinate system and the coordinates of the edge point in the camera coordinate system.
[0028] Furthermore, the function expression of the coordinates of the edge points of the plane geometric figure in the camera coordinate system is:
[0029] P i =K -1 u i
[0030] In the above formula, i∈[1,m], m is the number of edge points, K is the intrinsic parameter of the camera, u i are the edge points of a plane geometric figure.
[0031] Furthermore, constructing a model of a three-dimensional geometric figure corresponding to the wearable article based on the direction vector and the size of the wearable article specifically includes: calculating a unit vector for each direction vector, calculating a tangent point between the optical center and the three-dimensional geometric figure corresponding to the wearable article in a camera coordinate system based on the unit vector, setting three-dimensional geometric figure parameters based on the center of the three-dimensional geometric figure and a rotation matrix of the three-dimensional geometric figure coordinate system relative to the camera coordinate system, and constructing a model of the three-dimensional geometric figure using the tangent point, the three-dimensional geometric figure parameters, and the size of the wearable article.
[0032] Furthermore, the three-dimensional geometric figure corresponding to the wearable article is an ellipsoid, and the function expression of the model of the ellipsoid is:
[0033]
[0034] In the above formula, i∈[1,m], t is a variable, m is the number of edge points, Q i ′ is the tangency point, p i is a unit vector, ν is the coordinate of the ellipsoid center in the camera coordinate system, R is the rotation matrix of the ellipsoid coordinate system relative to the camera coordinate system, and M is a diagonal matrix constructed based on the values of the three semi-axes of the wearable item in the ellipsoid coordinate system.
[0035] Furthermore, the specific steps of solving the optimization problem of the model include:
[0036] Construct the discriminant of variable t, the function expression is as follows:
[0037] Δ=4p i T R T MRνν T R T MRp i -4p i T R T MRp i (ν T R T MRν-1)
[0038] In the above formula, i∈[1,m], m is the number of edge points, p i is a unit vector, ν is the coordinate of the ellipsoid center in the camera coordinate system, R is the rotation matrix of the ellipsoid coordinate system relative to the camera coordinate system, and M is a diagonal matrix constructed based on the values of the three semi-axes of the wearable item in the ellipsoid coordinate system;
[0039] Establish the second objective function and the corresponding constraints, the expression is as follows:
[0040]
[0041] In the above formula, △ is the discriminant of the variable t in the ellipsoid model, ν is the coordinate of the ellipsoid center in the camera coordinate system, and R is the rotation matrix of the ellipsoid coordinate system relative to the camera coordinate system;
[0042] The optimal ellipse center and rotation matrix are determined by minimizing the second objective function.
[0043] Compared with the prior art, the present invention has the following advantages:
[0044] The present invention selects a wearable item on the human body as the calculation object to calculate the position of the wearable item. Since the wearable item is located on the human body, this position is the estimated position of the human body. When calculating the position of the wearable item, the wearable item's outline is first fitted to the corresponding plane geometric figure to calculate the direction vector from the optical center to the edge of the plane geometric figure in the camera coordinate system. Then, based on the direction vector and the size information of the wearable item, a three-dimensional geometric figure model is constructed. An optimization problem is solved on the model to adjust the position of the center of the three-dimensional geometric figure in the camera coordinate system to the optimal position in the three-dimensional geometric figure parameters, thereby determining the position of the wearable item. Since the plane geometric figure and the three-dimensional geometric figure corresponding to the wearable item are both simple shapes (for example, when the wearable item is a helmet, the corresponding plane geometric figure is an ellipse and the corresponding three-dimensional figure is an ellipsoid), the computational complexity is low and the accuracy is high. At the same time, compared with methods based on depth calculation for position estimation, the present invention saves the time and cost of using a large amount of true position information to construct a training set for training. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is a specific flow chart of an embodiment of the present invention.
[0046] Figure 2 Schematic diagram of the steps of an embodiment of the present invention.
[0047] Figure 3 FIG. 4 is a schematic diagram of extracting the contour of a wearable item in an embodiment of the present invention. FIG.
[0048] Figure 4 Schematic diagram of fitting the contour of a wearable item and the corresponding plane geometric figure in an embodiment of the present invention.
[0049] Figure 5 Schematic diagram of calculating the position in the camera coordinate system using the planar geometric figures and solid geometric figures corresponding to the wearable article in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The present invention will be further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the scope of protection of the present invention is not limited thereby.
[0051] This embodiment proposes a method for estimating human position based on monocular vision, such as Figure 1 As shown, the idea is as follows:
[0052] First, a construction site photo is obtained and the target area in the construction site photo is detected to determine whether a wearable item exists. If not, the next construction site photo is obtained and the target area is continuously monitored to determine whether a wearable item exists. If so, the outline of the wearable item is obtained, and the plane geometric figure corresponding to the wearable item is fitted to the outline. The direction vector from the optical center to the edge of the plane geometric figure in the camera coordinate system is calculated.
[0053] Then, a model of the three-dimensional geometric figure corresponding to the wearable object is constructed based on the direction vector and the size of the wearable object. Then, an optimization problem is solved for the model to obtain the optimal position of the center of the three-dimensional geometric figure in the camera coordinate system. The optimal position is used as the estimated position of the human body. If the estimated position of the human body is outside the preset safety interval, an alarm is issued. Otherwise, the next construction site photo is obtained and the steps of the aforementioned human body position estimation method based on monocular vision are executed.
[0054] In this embodiment, the research object for human position estimation is wearable items, because wearable items are on the human body. At the same time, for human position estimation in power construction, there is no need to strictly distinguish the position difference between the human body and the wearable items on the human body. Therefore, the position of the wearable item can be used as the result of human position estimation. At the same time, the wearable items are selected to have a relatively simple shape and are equipped by all personnel. For example, the safety helmet worn by power construction personnel is itself a part of an ellipsoid, and its outline is also approximately a part of an ellipse. Therefore, the wearable items are used to construct corresponding plane figures and three-dimensional figures for position calculation, so that the calculation amount is relatively small, the calculation complexity is low, and more accurate calculation results can be obtained quickly.
[0055] like Figure 2 As shown, based on the above ideas, the method proposed in this embodiment includes the following steps:
[0056] 1) Use a camera to capture a construction site image of a worker wearing a helmet. Then, based on deep learning, perform helmet detection on the target area in the construction site image to obtain the helmet's outline.
[0057] 2) performing ellipse fitting on the point set of the helmet's contour in step 1) to obtain the parameters of the ellipse corresponding to the helmet;
[0058] 3) In the camera coordinate system, calculate the direction vector from the optical center to the edge of the ellipse fitted in step 2);
[0059] 4) Calculate the tangent point between the optical center and the ellipsoid corresponding to the helmet based on the direction vector in step 3), and inversely calculate the spatial position of the ellipsoid in the camera coordinate system. Use this spatial position as the estimated result of the human body position, and determine the distance between the human body position and the pre-saved location of the dangerous object. If the distance is less than a preset threshold, issue a reminder to the people in the target area.
[0060] In this embodiment, step 1) detects the safety helmet in the target area of the construction site photo based on deep learning, and obtains the outline of the safety helmet, such as Figure 3 As shown, the YOLO network is used to detect hard hats in the construction site photo. The ENet network is then used to segment the detected hard hats from the target area in the construction site photo and extract the hard hat contour points to obtain a set of contour points. The object detection and segmentation of the YOLO network and the ENet network are common methods in image processing and will not be detailed here.
[0061] In this embodiment, a target area is set in the construction site photo. The target area is the area where dangerous objects are placed, such as the area where charged objects are present. Therefore, helmet detection and contour calculation are performed only in this area, which can effectively reduce the amount of calculation for position estimation and avoid the generation of redundant data. Because people outside the target area do not have the risk of contacting dangerous objects, there is no need to determine their location and issue reminders. Figure 3 As shown in the figure, the middle part of the image is set as the target area, so only the Figure 2 The helmet worn by the person standing in the middle position does not need to be tested Figure 3 Safety helmets worn by other staff members in the middle room.
[0062] In this embodiment, step 2) performs fitting of the plane geometric figure corresponding to the helmet on the outline of the helmet, that is, performs elliptical fitting on the outline of the helmet, and the fitting effect is as follows: Figure 4 As shown, the specific process includes:
[0063] 2.1) Based on the helmet’s contour points and the preset Gaussian kernel function, a Gaussian mixture model f(x) is established. The function expression is as follows:
[0064]
[0065] In the above formula, n is the number of contour points of the helmet, x j represents the j-th contour point of the helmet, h represents the bandwidth of the Gaussian kernel function, I represents the unit matrix, N(x; x j ,h 2 I) represents the Gaussian kernel function;
[0066] 2.2) Set the ellipse parameters θ = (x0, y0, a0, b0, γ), where x0 and y0 are the coordinates of the ellipse center in the pixel coordinate system, a0 and b0 are the values of the two semi-axes of the ellipse, and γ is the rotation angle of the ellipse. Generate a set of ellipse edge points based on the ellipse parameters θ. First, use the major and minor axes of the ellipse as the coordinate system to establish the basic ellipse. Then rotate it clockwise by γ. Finally, translate the ellipse center (x0, y0) to obtain the ellipse corresponding to the ellipse parameters θ. The function expression of the edge points is as follows:
[0067]
[0068] In the above formula, i∈[1,m], m is the number of edge points, τ i is a point on the basic ellipse, τ i ∈[0,2π);
[0069] A Gaussian mixture model g(x|θ) is established based on the edge points and the preset Gaussian kernel function. The function expression is as follows:
[0070]
[0071] In the above formula, m is the number of edge points of the ellipse, N(x; μ i ,Σ i ) represents the Gaussian kernel function, ω i Represents the weight of the Gaussian kernel function, μ i represents the mean of the Gaussian kernel function, Σ i represents the covariance matrix of the Gaussian kernel function, where:
[0072]
[0073] In the above formula, i∈[1,m], m is the number of edge points, u i represents the edge point, Q i Contains the normal vector and tangent vector of the edge point of the ellipse, Λ i is a diagonal matrix representing the variance, where:
[0074]
[0075] In the above formula, i∈[1,m], m is the number of edge points, u i represents edge points, n 1i Represents the normal vector of the edge point on the ellipse, n 2i Represents the tangent vector of the upper edge point of the ellipse, n 2i (x), n 2i (y) are used to represent the tangent vector n 2i the first and second elements of ;
[0076]
[0077] In the above formula, i∈[1,m], m is the number of edge points, u i represents the edge point, h represents the bandwidth of the Gaussian kernel function, h i Represents the distance between two points on the ellipse;
[0078] 2.3) Solve the optimization problem to obtain the optimal ellipse parameters and fit the edge points of the ellipse to the contour points of the helmet, specifically including:
[0079] The first objective function is constructed based on the contour points of the helmet and the edge points of the ellipse. The expression is as follows:
[0080] L2(θ)=||f(x)-g(x|θ)||2 (7)
[0081] In the above formula, f(x) is the Gaussian mixture model established based on the contour points of the helmet, and g(x|θ) is the Gaussian mixture model established based on the edge points of the ellipse;
[0082] The optimal ellipse parameters are determined by minimizing the first objective function, which is expressed as follows:
[0083]
[0084] In the above formula, L2(θ) is the first objective function. There are currently a large number of studies on solving optimization problems. For example, the Newton method or quasi-Newton method is used to solve differentiable objective functions, and the simulated annealing algorithm, particle swarm algorithm, genetic algorithm or ant colony algorithm is used to solve non-differentiable objective functions. The specific algorithm implementation process for solving the optimization problem of the first objective function is not the focus of this embodiment, so it will not be repeated here.
[0085] In step 3 of this embodiment, the direction vector from the optical center to the edge of the ellipse in the camera coordinate system is calculated to facilitate the construction of the ellipsoid model in subsequent steps. The specific process includes:
[0086] 3.1) Obtain the optimal ellipse parameters in step 2.3) and generate m ellipse edge points u1 to u according to formula (2) m ;
[0087] 3.2) Calculate the coordinates of each edge point in the camera coordinate system. The function expression is:
[0088] P i =K -1 u i (9)
[0089] In the above formula, i∈[1,m], m is the number of edge points, K is the intrinsic parameter of the camera, and ui is the edge point of the ellipse in step 3.1);
[0090] 3.3) For each edge point, calculate the corresponding direction vector based on the coordinates of the optical center C in the camera coordinate system and the coordinates of the edge point in the camera coordinate system. The values of these direction vectors are the coordinate values of the corresponding edge point in step 3.2) in the camera coordinate system. Therefore, these direction vectors are expressed as P i To express, such as Figure 4 shown.
[0091] In step 4 of this embodiment, a model of the ellipsoid corresponding to the helmet is constructed according to the direction vector of each edge point and the size of the helmet, and the optimization problem is solved for the model to obtain the optimal position of the center of the ellipsoid in the camera coordinate system, such as Figure 4 As shown, the specific process includes:
[0092] 4.1) Calculate the unit vector of each direction vector. The function expression of the unit vector is as follows:
[0093]
[0094] In the above formula, i∈[1,m], m is the number of edge points, P i is the direction vector;
[0095] 4.2) Calculate the tangent point between the optical center C and the ellipsoid corresponding to the helmet in the camera coordinate system based on these unit vectors. Assuming the variable t, these unit vectors are tangent to the ellipsoid. The coordinates of the tangent point are:
[0096] Q i ′=tp i (11)
[0097] In the above formula, i∈[1,m], m is the number of edge points, p i is a unit vector;
[0098] 4.3) Set the ellipsoid parameters according to the center of the ellipsoid and the rotation matrix of the ellipsoid coordinate system relative to the camera coordinate system. Use the tangent point, ellipsoid parameters and the size of the helmet in step 4.2) to construct the model of the ellipsoid. The expression is as follows:
[0099]
[0100] In the above formula, i∈[1,m], m is the number of edge points, p i is the unit vector, ν is the coordinate of the ellipsoid center in the camera coordinate system, R is the rotation matrix of the ellipsoid coordinate system relative to the camera coordinate system, and M is the diagonal matrix constructed based on the size of the helmet, which is:
[0101]
[0102] In the above formula, a, b, and c are the values of the three semi-axes of the helmet in the ellipsoid coordinates;
[0103] After obtaining the ellipsoid model, the optimization problem of the model is solved. Since t in Equation (12) is a variable, Figure 4 As shown, each direction vector and the helmet ellipsoid have only one tangent point, so we think of constructing the discriminant of variable t based on equations (12) and (13), and the discriminant has a unique solution, that is, the value of the discriminant is 0. The function expression of the discriminant is as follows:
[0104] Δ=4p i T R T MRνν T R T MRp i -4p i T R T MRp i (ν T R T MRν-1) (14)
[0105] In the above formula, i∈[1,m], m is the number of edge points, p i is the unit vector, ν is the coordinate of the ellipsoid center in the camera coordinate system, R is the rotation matrix of the ellipsoid coordinate system relative to the camera coordinate system, and M is the diagonal matrix constructed based on the size of the helmet. Where a, b, and c are the values of the three semi-axes of the helmet in the ellipsoid coordinates;
[0106] Establish the second objective function and the corresponding constraints, the expression is as follows:
[0107]
[0108] In the above formula, △ is the discriminant of the variable t in the ellipsoid model, ν is the coordinate of the ellipsoid center in the camera coordinate system, and R is the rotation matrix of the ellipsoid coordinate system relative to the camera coordinate system;
[0109] The optimal ellipse center and rotation matrix are determined by minimizing the second objective function. The expression is as follows:
[0110]
[0111] In the above formula, L(ν, R) is the second objective function. Currently, there have been a large number of studies on solving optimization problems. For example, the Newton method or quasi-Newton method is used to solve differentiable objective functions, and the simulated annealing algorithm, particle swarm algorithm, genetic algorithm or ant colony algorithm is used to solve non-differentiable objective functions. The specific algorithm implementation process for solving the optimization problem of the second objective function is not the focus of this embodiment, so it will not be repeated here.
[0112] At this point, we can find the optimal position of the helmet in the camera coordinate system The optimal position is used as the estimated result of the human body position to determine the distance between the human body position and the pre-saved location of dangerous objects. If the distance is less than the preset threshold, a reminder is issued to the personnel in the target area, thereby achieving safety management of the power construction site.
[0113] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Although the present invention has been disclosed above with reference to the preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modifications, equivalent variations, and modifications to the above embodiment that do not depart from the technical solution of the present invention and are based on the technical essence of the present invention shall fall within the scope of protection of the technical solution of the present invention.
Claims
1. A method for estimating human position based on monocular vision, characterized in that: The following steps are involved: Obtaining a construction site photo, detecting a wearable item in a target area in the construction site photo, obtaining an outline of the wearable item, fitting a plane geometric figure corresponding to the wearable item to the outline, calculating a direction vector from an optical center to an edge of the plane geometric figure in a camera coordinate system, and fitting the outline to the plane geometric figure corresponding to the wearable item. The method specifically includes: setting plane geometric figure parameters, generating a set of plane geometric figure edge points based on the plane geometric figure parameters, constructing a first objective function based on contour points in the contour of the wearable item and the edge points, solving an optimization problem for the first objective function to obtain optimal plane geometric figure parameters, and fitting the edge points of the plane geometric figure to contour points of the wearable item. A model of a three-dimensional geometric figure corresponding to the wearable item is constructed based on the direction vector and the size of the wearable item. An optimization problem is then solved for the model to obtain the optimal position of the center of the three-dimensional geometric figure in the camera coordinate system. The optimal position is used as the estimated position of the human body. If the estimated position of the human body is outside a preset safety zone, an alarm prompt is issued.
2. The method for estimating human body position based on monocular vision according to claim 1, characterized in that: Detecting a wearable item in a target area in the construction site photo and obtaining a contour of the wearable item specifically includes: using a YOLO network to perform wearable item detection on the construction site photo, then using an ENet network to segment the detected wearable item from the target area in the construction site photo, and extracting contour points of the wearable item to obtain a set of contour points.
3. The method for estimating human body position based on monocular vision according to claim 1, characterized in that: The first objective function expression is as follows: In the above formula, f(x) is a Gaussian mixture model established based on the contour points of the wearable item, and g(x|θ) is a Gaussian mixture model established based on the edge points of the plane geometric figure; Solving the optimization problem for the first objective function is specifically determining the optimal plane geometric figure parameters by minimizing the first objective function.
4. The method for estimating human body position based on monocular vision according to claim 1, wherein: The plane geometric figure is an ellipse, and the ellipse parameters ,in are the coordinates of the ellipse center, are the values of the two semi-axes of the ellipse, is the rotation angle of the ellipse. Before constructing the first objective function based on the contour points in the contour of the wearable item and the edge points, the method further includes the step of establishing a Gaussian mixture model, specifically including: A Gaussian mixture model f(x) is established based on the contour points of the wearable item and the preset Gaussian kernel function. The function expression is as follows: In the above formula, n is the number of contour points of the helmet, represents the j-th contour point of the helmet, h represents the bandwidth of the Gaussian kernel function, represents the identity matrix, represents the Gaussian kernel function; Generate a set of ellipse edge points based on the ellipse parameters. The function expression of the edge points is as follows: In the above formula, , m is the number of edge points, ; A Gaussian mixture model g(x|θ) is established based on the edge points and the preset Gaussian kernel function. The function expression is as follows: In the above formula, m is the number of edge points of the ellipse, represents the Gaussian kernel function, represents the weight of the Gaussian kernel function, represents the mean of the Gaussian kernel function, Represents the covariance matrix of the Gaussian kernel function.
5. The method for estimating human position based on monocular vision according to claim 1, wherein: Calculating the direction vector from the optical center to the edge of the plane geometric figure in the camera coordinate system specifically includes: calculating the coordinates of the edge points of the edge of the plane geometric figure in the camera coordinate system respectively, and for each edge point, calculating its corresponding direction vector based on the coordinates of the optical center in the camera coordinate system and the coordinates of the edge point in the camera coordinate system.
6. The method for estimating human body position based on monocular vision according to claim 5, characterized in that: The function expression of the coordinates of the edge points of the plane geometric figure in the camera coordinate system is: In the above formula, in the above formula, , m is the number of edge points, K is the intrinsic parameter of the camera, u i are the edge points of a plane geometric figure.
7. The method for estimating human body position based on monocular vision according to claim 1, characterized in that: Constructing a model of a three-dimensional geometric figure corresponding to the wearable item based on the direction vector and the size of the wearable item specifically includes: calculating a unit vector for each direction vector, calculating a tangent point between the optical center in a camera coordinate system and the three-dimensional geometric figure corresponding to the wearable item based on the unit vector, setting three-dimensional geometric figure parameters based on the center of the three-dimensional geometric figure and a rotation matrix of the three-dimensional geometric figure coordinate system relative to the camera coordinate system, and constructing a model of the three-dimensional geometric figure using the tangent point, the three-dimensional geometric figure parameters, and the size of the wearable item.
8. The method for estimating human body position based on monocular vision according to claim 7, characterized in that: The three-dimensional geometric figure corresponding to the wearable article is an ellipsoid, and the function expression of the model of the ellipsoid is: In the above formula, , t is a variable, m is the number of edge points, is the point of tangency, p i is a unit vector, is the coordinate of the ellipsoid center in the camera coordinate system, is the rotation matrix of the ellipsoidal coordinate system relative to the camera coordinate system, is a diagonal matrix constructed based on the values of the three semi-axes of the wearable item in ellipsoidal coordinates.
9. The method for estimating human body position based on monocular vision according to claim 8, characterized in that: The specific steps of solving the optimization problem for the model include: Construct the discriminant of variable t, the function expression is as follows: In the above formula, , m is the number of edge points, p i is a unit vector, is the coordinate of the ellipsoid center in the camera coordinate system, is the rotation matrix of the ellipsoidal coordinate system relative to the camera coordinate system, is a diagonal matrix constructed based on the values of the three semi-axes of the wearable item in ellipsoidal coordinates; Establish the second objective function and the corresponding constraints, the expression is as follows: In the above formula, △ is the discriminant of the variable t in the ellipsoid model, is the coordinate of the ellipsoid center in the camera coordinate system, is the rotation matrix of the ellipsoid coordinate system relative to the camera coordinate system; The optimal ellipse center and rotation matrix are determined by minimizing the second objective function.
Citation Information
Patent Citations
Safety warning method and device based on safety helmet, and storage medium
CN110443976A