Background
Sleep has a significant impact on human health. The sleep quality is good, the people can feel energetic when getting up in the morning, the efficiency of doing things is very high, and otherwise, the people can be in a poor mental state on the next day, and the work is influenced. The quality of sleep is directly related to the sleeping posture.
Supine, in life, the proportion of people who choose supine sleeping position is larger, and the posture is also a posture which is frequently recommended; the sleeping posture does not press organs such as internal organs and the like in the body, and the spine part can form a line, so that the symptoms of aching pain of the neck and the back can be effectively relieved; however, the sleeping posture is easy to cause the tongue root to drop and block the breath, and is not suitable for people who often snore or have respiratory diseases. The left side lies on the left side, which is comfortable to look, is beneficial to relaxing the body and eliminating fatigue, but because the heart is positioned in the left chest, the sleeping position easily compresses the heart, and the burden of the heart is increased if the blood circulation of the whole body is ensured; therefore, people with heart disease or the elderly are not advised to adopt this sleeping position. The sleeping posture of the right side lying is a healthy posture which is accepted by most people, so that the sleeping of people is stable, the normal running of gastrointestinal tracts is facilitated, the digestion is promoted, and the heart is not pressed; however, this sleeping position has the disadvantage of affecting the right lung movement, and if there is emphysema or the lungs are not good enough, it is better not to lie on the right side. The prone position is obviously an unhealthy sleeping position, and the chest of a person is pressed when the person lies prone, so that the conditions of heart discomfort and dyspnea occur; moreover, the sleeping posture hardly keeps the central position of the spine, can bring pressure to joints and muscles, stimulate nerves, and can cause pain and numbness on the waist and the back after a long time; furthermore, when lying on the stomach, the neck is twisted sideways, and the head is tilted sideways, which is likely to cause damage to the neck muscles, so that it is not generally recommended to adopt such a sleeping posture. For a healthy person, the person does not need to be completely restrained in a certain sleeping posture, because the person cannot keep a sleeping posture all the time in the whole night, but can change the sleeping posture continuously according to the self condition.
For people with uncomfortable or sub-healthy state, the sleeping posture may affect the physical and mental state of the people to a great extent, so that actively knowing and adjusting the sleeping posture has important significance on the physical and mental health of the people. Among the existing sleeping posture detection methods, for example, a method, an apparatus and a device for detecting sleeping posture disclosed in chinese patent publication No. CN110472481A, includes: acquiring target image information of a user to be identified; acquiring skeleton key point information of the user to be identified based on the target image information; recognizing the sleeping posture characteristic information of the user to be recognized based on the skeleton key point information; determining the sleeping posture type of the user to be identified based on the corresponding relation among the sleeping posture characteristic information, the preset sleeping posture characteristic information and the preset sleeping posture type; according to the scheme, the correlation between the key point information of the human skeleton and the sleeping posture is established, so that the accuracy of the sleeping posture detection is guaranteed, but the target image needs to be acquired firstly, and the quilt is in the dark and is covered by the quilt in the common sleeping process, so that the difficulty in acquiring the target image is increased, and the accuracy of the sleeping posture detection is reduced.
Therefore, the invention provides the method for detecting the sleeping posture of the human body, which is simple, convenient and fast to use and high in detection accuracy.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method for detecting the sleeping posture of a human body.
The purpose of the invention is realized by the following technical scheme:
a method for detecting sleeping postures of a human body comprises the steps of detecting pressure data of the human body during sleeping based on a pressure sensor on the surface of a bed body, extracting data with a pressure value larger than 20g to obtain a pressure image, wherein the pressure image comprises a plurality of pressure areas, selecting the pressure area with the largest area, and extracting the following characteristic values from the pressure area according to the detected pressure data:
the pressure value is greater than the area Sw of 20g,
a pressure value greater than 20g, a maximum curvature Cmax of the pressure region;
sw is less than or equal to 0.32m in the extracted characteristic values2When Cmax > 824.02m-1Then, the human body is judged to be in the sitting state.
Further, in-process inspectionMeasured that Sw is more than or equal to 0.823m2And then, the human body is judged to be in a lying state.
Further, the maximum distance Lx in the transverse direction of the pressure value larger than 20g, the maximum distance Ly in the longitudinal direction of the pressure value larger than 20g, and the data change rate Dmax near the maximum value of the pressure value are extracted, and the value is 0.614m in the extracted characteristic values2<Sw<0.823m2When the temperature of the water is higher than the set temperature,
if Lx is more than or equal to 0.32m and Cmax is less than 3.42m-1Judging that the human body is in a lying state;
if Lx is more than 0.20m and less than 0.32m and Dmax is more than 466.67Pa/m, the human body is judged to be in the lateral lying state;
if Lx is less than or equal to 0.20m and Ly is more than or equal to 0.62m, judging that the human body is in a side lying state;
if Lx is less than or equal to 0.20m and Ly is less than 0.62m, the human body is judged to be in the sitting state.
Further, the maximum distance Lx in the transverse direction of the pressure value larger than 20g, the maximum distance Ly in the longitudinal direction of the pressure value larger than 20g, and the data change rate Dmax near the maximum value of the pressure value are extracted, and the value is 0.32m in the extracted characteristic values2<Sw≤0.614m2When the temperature of the water is higher than the set temperature,
if Dmax is more than or equal to 703.45Pa/m and Ly is less than or equal to 0.42m at the same time, the human body is judged to be in a sitting state;
if Dmax is less than 703.45Pa/m and Lx is more than or equal to 0.28m, the human body is judged to be in a lying state;
if Dmax is less than 703.45Pa/m and Lx is less than or equal to 0.12m, the human body is judged to be in the side lying state.
Further, the detection method is used for judging the sleeping posture of the adult.
Further, according to the judgment result of the posture, combining the pressure image and the human body standard sleeping posture pressure map, carrying out image binarization and template matching, and judging the positions of all parts of the human body.
Further, the specific process of image binarization and template matching is that firstly, a human body standard sleeping posture pressure map is utilized to construct an image pyramid, then the image pyramid and the pressure image are filtered, denoised and binarized, then the image pyramid and the pressure image are matched in a rotating mode, and then the position of each part of the human body is judged.
Further, a time point corresponds to a pressure image. In the actual detection process, a pressure sensor on the surface of the bed body continuously detects the pressure applied to the bed body along with time, and in a time point, data with the pressure value larger than 20g is extracted from the pressure data detected at the time point to obtain a pressure image corresponding to the time point, the pressure image comprises a plurality of pressure areas, the pressure area with the largest area is selected, a characteristic value is extracted from the pressure area according to the measured pressure data, and then the sleeping posture of a human body is judged according to the extracted characteristic value and a judging flow to obtain a sleeping posture judging result; and the pressure data detected at the next time point is subjected to data extraction, characteristic value extraction and sleeping posture judgment again, namely a pressure image is obtained at one time point, and then the characteristic value is extracted according to the pressure image, and then the sleeping posture at the time point is judged.
Further, sleep posture detection and judgment are performed once at one time point. The sleeping posture detection and judgment is carried out once at one time point, meanwhile, the detection and judgment process and the result at the previous time point do not influence the detection and judgment at the next time point, and even if the judgment result is not obtained at the previous time point, the detection and judgment at the next time point are still carried out normally.
The invention has the beneficial effects that: the detection method for the sleeping posture of the human body detects the pressure data of the human body during sleeping based on the pressure sensor on the surface of the bed body to obtain the pressure image, extracts the following characteristic values according to the detected pressure data, can accurately detect the states of the human body such as the position, the flat sleep, the side sleep, the sitting and the like, effectively helps a target to know and adjust the personal sleeping posture, and has important significance for promoting the physical and psychological health of the human body.
Detailed Description
The technical solutions of the present invention are further described in detail below with reference to the accompanying drawings, but the scope of the present invention is not limited to the following.
As shown in fig. 1, a method for detecting a sleeping posture of a human body is used for determining a sleeping posture of an adult, detecting pressure data of the human body during sleeping based on a pressure sensor on a bed surface, extracting data with a pressure value larger than 20g, and obtaining a pressure image, as shown in fig. 3, the pressure image includes a plurality of pressure regions, the pressure region with the largest area is selected, and the following characteristic values are extracted from the pressure region according to the measured pressure data:
the pressure value is greater than the area Sw of 20g,
a pressure value greater than 20g, a maximum curvature Cmax of the pressure region,
extracting the transverse direction farthest distance Lx with the pressure value larger than 20g,
the pressure value is greater than the longitudinal furthest distance Ly of 20g,
the rate of change Dmax of the data around the maximum value of the pressure value,
sw is less than or equal to 0.32m in the extracted characteristic values2When Cmax > 824.02m-1Then, the human body is judged to be in the sitting state.
Sw is more than or equal to 0.823m in extracted characteristic value2And then, the human body is judged to be in a lying state.
0.614m in extracted feature value2<Sw<0.823m2When the temperature of the water is higher than the set temperature,
if Lx is more than or equal to 0.32m and Cmax is less than 3.42m-1Judging that the human body is in a lying state;
if Lx is more than 0.20m and less than 0.32m and Dmax is more than 466.67Pa/m, the human body is judged to be in the lateral lying state;
if Lx is less than or equal to 0.20m and Ly is more than or equal to 0.62m, judging that the human body is in a side lying state;
if Lx is less than or equal to 0.20m and Ly is less than 0.62m, the human body is judged to be in the sitting state.
In the extracted feature0.32m of the eigenvalue2<Sw≤0.614m2When the temperature of the water is higher than the set temperature,
if Dmax is more than or equal to 703.45Pa/m and Ly is less than or equal to 0.42m at the same time, the human body is judged to be in a sitting state;
if Dmax is less than 703.45Pa/m and Lx is more than or equal to 0.28m, the human body is judged to be in a lying state;
if Dmax is less than 703.45Pa/m and Lx is less than or equal to 0.12m, the human body is judged to be in the side lying state.
Specifically, based on the determination result of the posture, image binarization and template matching are performed in combination with the pressure image (as shown in fig. 3) and the standard sleeping posture pressure map (as shown in fig. 2), so as to determine the positions of the respective parts of the human body.
Specifically, the specific process of image binarization and template matching is to firstly construct an image pyramid by using a human body standard sleeping posture compressed image, then perform filtering, denoising and binarization on the image pyramid and a pressure image, perform rotation matching on the image pyramid and the pressure image, and then judge the positions of all parts of a human body, as shown in fig. 4.
Specifically, one time point corresponds to one pressure image. In the actual detection process, a pressure sensor on the surface of the bed body continuously detects the pressure applied to the bed body along with time, and in a time point, data with the pressure value larger than 20g is extracted from the pressure data detected at the time point to obtain a pressure image corresponding to the time point, the pressure image comprises a plurality of pressure areas, the pressure area with the largest area is selected, a characteristic value is extracted from the pressure area according to the measured pressure data, and then the sleeping posture of a human body is judged according to the extracted characteristic value and a judging flow to obtain a sleeping posture judging result; and the pressure data detected at the next time point is subjected to data extraction, characteristic value extraction and sleeping posture judgment again, namely a pressure image is obtained at one time point, and then the characteristic value is extracted according to the pressure image, and then the sleeping posture at the time point is judged.
Specifically, the sleep posture detection determination is performed once at one time point. The sleeping posture detection and judgment is carried out once at one time point, meanwhile, the detection and judgment process and the result at the previous time point do not influence the detection and judgment at the next time point, and even if the judgment result is not obtained at the previous time point, the detection and judgment at the next time point are still carried out normally.
The foregoing is illustrative of the preferred embodiments of this invention, and it is to be understood that the invention is not limited to the precise form disclosed herein and that various other combinations, modifications, and environments may be resorted to, falling within the scope of the concept as disclosed herein, either as described above or as apparent to those skilled in the relevant art. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.