[embodiment]
Detailed description of the present invention is mainly come the running of direct or indirect simulation technical solution of the present invention by program, step, logical block, process or other symbolistic descriptions.Be the thorough the present invention that understands, in ensuing description, stated a lot of specific detail.And when not having these specific detail, the present invention then may still can realize.Affiliated those of skill in the art use these descriptions herein and state that the others skilled in the art in affiliated field effectively introduce their work essence.In other words, be the purpose of the present invention of avoiding confusion, because the understanding easily of method of knowing and program, so they are not described in detail.
Alleged herein " embodiment " or " embodiment " are meant special characteristic, structure or the characteristic that can be contained at least one implementation of the present invention.Different in this manual local " in one embodiment " that occur not are all to refer to same embodiment, neither be independent or optionally mutually exclusive with other embodiment embodiment.In addition, represent the sequence of unit in method, process flow diagram or the functional block diagram of one or more embodiment and revocablely refer to any particular order, also be not construed as limiting the invention.
See also shown in Figure 1ly, it shows the structured flowchart ofsleep monitoring system 100 in one embodiment of the invention.As shown in Figure 1,sleep monitoring system 100 comprises image acquisition units 1, image analyzing unit 2 and warning message output unit 3.To introduce the structure of each unit respectively below.
Described image acquisition units 1 comprises guarded region setup unit 11 and monitoringcamera 12.
Guarded region setup unit 11 is used to set monitoring range.In order to guarantee to monitor the scope that needs, usually camera all is installed in higher position, some does not need to monitor in the zone of camera shooting this moment, in order to reduce the operand that successive image is analyzed, can only bed and near zone thereof be set at guarded region.Because bed is generally rectangle, therefore can be by the zone in guarded region setup unit 11 frame that four end to end line segments are definite as guarded region.
Monitoring camera 12 is used to gather video image.Application for the sleep quality monitoring, the existence of visible light may reduce monitored person's sleep quality, if, as seen light intensity is low excessively, can reduce the monitoring effect of supervisory system, therefore in one embodiment of the present of invention, what described monitoringcamera 12 adopted is to fix infrared/near infrared camera, and obtains image from camera.Infrared/near infrared camera is meant the camera that is operated in infrared/near-infrared band, requires the camera lens of camera can pass through visible light, and sensor can respond the light of corresponding wave band, and carries out imaging.Infrared light is meant the light of wavelength greater than 700nm, human eye to the light of this wavelength be induction less than, therefore the light source that utilizes this wavelength can not cause people's discomfort as the active light source.Commonly used is that wavelength is near-infrared light source and the corresponding camera about 850nm.Just utilize a camera in one embodiment of the invention, also can adopt two or more cameras to monitor in other embodiments from a plurality of angles.
Please continue to consult shown in Figure 1, aforementioned in one embodiment image analyzing unit 2 comprises monitoring function selectedcell 21 and people'sface detection module 22,human detection module 23, bedposition analysis module 24,quilt detection module 25 andcomparison module 26.
Monitoring function selectedcell 21 is used for the monitoring function that selected needs are carried out.Described monitoring function can comprise multiple monitoring function, comprises playing detected, sleep position probing, fall down that bed detects, nightmare detects, wakeing up and detect etc., describes in detail in the image analysis process part that the realization of every kind of function will be concrete in the back.At different ages, different sleep environments, the monitoring function that needs may be different.Such as, child use be around have the basket cot of fence, just can there be the danger of falling down bed in child, the position probing of therefore sleeping and to fall down that bed detects be exactly unwanted; If what child used is sleeping bag, just can there be the possibility of kicking quilt off, also detected with regard to not needing to play.Select few monitoring function as required, can reduce the operand of system, reduce requirement equipment.Therefore, before monitoring, can select the monitoring function that need carry out by monitoring function selectedcell 21.
People'sface detection module 22 detects the state of people's face, and it further comprisesexpression analysis module 221,eye detection module 222 and sobbing detection module 223.The expression situation ofexpression analysis module 221 analyst's faces, the normally sleep expression that it image training that comprises that a plurality of normal sleeps expressions of process input and improper sleep are expressed one's feelings obtains and the sorter (not shown) of improper sleep expression, input picture can determine that through this sorter the normal expression of sleeping still is that improper sleep is expressed one's feelings when expressing one's feelings analysis.Whethereye detection module 222 detects sleeper's eyes and opens.Whether whethersobbing detection module 223 is analyzed human bodies and is being cryyed, for example open by the face that detects people's face, and whether the face of human body has mode such as tears to judge whether human body is cryying.The testing result of people'sface detection module 22 can judge whether separately to send alerting signal, if for example the expression of people's face is improper sleep expression, if perhapseye detection module 222 detects sleeper's eyes and opens, can directly judge and to send alerting signal.
The particular location and the state ofhuman detection module 23 human body, wherein the human body state comprisesposture analysis module 231 and skin analysis module 232.Whereinposture analysis module 231 analyzes whether human body is the sleeping posture of lying down, if human body is non-sleeping postures such as sitting up or stand or squat down, thenhuman detection module 23 judgements need be sent the warning message of wakeing up.Whereinskin analysis module 232 is used to analyze the skin that human body exposes and whether surpasses predetermined value, if the skin that human body is exposed surpasses predetermined value, then represent human body play by, need send and play by warning message.The testing result ofhuman detection module 23 can judge whether separately to send alerting signal, if for example human body sits up, perhaps the skin that exposes of human body surpasses predetermined value, can directly judge and need send alerting signal.The back will illustrate that the testing result of aforementionedhuman detection module 23 also can mutually combine with the testing result of other modules, and whether common conduct needs to send the criterion of alerting signal.
The position of bedposition analysis module 24 identification bed bodies.25 positions of detecting quilt of quilt detection module.
Comparison module 26 can compare the position of human body ofhuman detection module 23 acquisitions and the bed body position of bedposition analysis module 24 acquisitions concerns to determine the position between human body and the bed body, also can compare the position of human body ofhuman detection module 23 acquisitions and the quilt position ofquilt detection module 25 acquisitions and whether kick open quilt, perhaps determine by the relation that compares between bed body position and the quilt position whether human body is played by situation with definite human body.If the difference of the center of the center of human body and bed body is greater than predetermined value, then represent the edge of human body, then need to send and to fall down a warning message, if in bed body scope, do not detect human body at bed, then represent the people outside bed, then need to send the sleeper and fall down a warning message.If the distance of the quilt center that human body center thathuman detection module 23 detects andquilt detection module 25 detect, illustrates human body greater than predetermined value and does not build quilt, then needs to send human body and play by alerting signal.If the quilt center represents then that greater than predetermined value quilt is positioned at outside the bed with the difference of bed body center, then need to send human body and play by alerting signal.
Described image analyzing unit 2 can further include one and adopts a large amount of lid quilts and play by subimage and train playing of obtaining to be classifieddevice 27, input picture through this play beclassified device 27 can draw whether play by analysis result.If play and be classified the device analysis through this, human body exist play by situation, then need to send to play by alerting signal.
Please continue to consult shown in Figure 1, aforementioned warning message output unit 3 can be according to the different warning message of various analysis results output of aforementioned image analyzing unit 2.The output of described warning message can be adopted writing on sound, the image method such as to flash to carry out in one embodiment, can set different alarm sound or change in pattern to different monitoring functions, the monitor staff just can know it is which kind of alarm condition according to the difference of alarm sound or image change like this, thereby solves apace.Also can all adopt identical warning message.
Be appreciated that ground, whensleep monitoring system 100 carried out human detection, people'sface detection module 22, bedposition analysis module 24,quilt detection module 25 and thecomparison module 26 ofsleep monitoring system 100 were omissible.If correspondingly only need carry out human detection, so, just do not need the switching between multi-functional, therefore, monitoring function selectedcell 21 also is omissible.
Below in conjunction with specific embodiment whole system operation flow process of the present invention and method are elaborated.
See also shown in Figure 2ly, it shows the workflow diagram of whole sleep monitoring system in one embodiment of the invention, and as shown in the figure, the workflow of sleep monitoring system of the present invention comprises the steps:
Step 21: the setting guarded region, because bed is generally rectangle, therefore can be by the zone in the guarded region setup unit frame that four end to end line segments are definite as guarded region;
Step 22: function that need to select monitoring;
Step 23: start camera and monitor, the video image in the acquisition monitoring zone, and vedio data is transferred to image analyzing unit;
Step 24: image analyzing unit is analyzed vedio data and analysis result is transferred to the warning message output unit, and wherein the concrete steps of graphical analysis will describe in detail in the back one by one;
Step 25: the alerting signal prompting supervisor that the output of warning message output unit is different.
Wherein aforementionedimage analysis step 24 is according to the monitoring image of input and selected monitoring function image to be analyzed, need to determine whether to report to the police, it further comprises various monitoring function analysis, respectively the analytic process of several different monitoring functions is described below.
At first will elaborate to playing monitored function.
See also shown in Fig. 3 A, the process flow diagram of a detected embodiment is played in its demonstration, and it comprises the steps:
Step 301: the quilt in the input picture is detected;
Step 302: the position to the bed in the input picture is detected;
Step 303: the position to quilt in the input picture and bed compares, if the difference of quilt and the position of bed surpasses predetermined value, thinks that then quilt has fallen down bed, represents that then human body do not build quilt, and then the warning message output unit sends alerting signal; If less than predetermined value, returning, the difference of the position of quilt and bed continues to detect.
See also shown in Fig. 3 B, the process flow diagram of another detected embodiment is played in its demonstration, and it comprises the steps:
Step 311: input picture is carried out human detection, extract area of skin color by the skin analysis module;
Step 312: calculate human body and expose the ratio in the zone of skin;
Step 313: judge whether the ratio that human body exposes the zone of skin reaches predetermined value, surpass predetermined value and think that then quilt is kicked off that then the warning message output unit sends alerting signal if human body exposes the zone of skin; If the zone that human body exposes skin surpasses predetermined value and then returns and proceed human detection.
See also shown in Fig. 3 C, the detected process flow diagram of an embodiment is again played in its demonstration, and it comprises the steps:
Step 321: input picture is carried out quilt detect;
Step 322: input picture is carried out human detection;
Step 323: quilt in the input picture and human body are compared, if the human body center with by the position difference of subcenter less than predetermined value, judge that then human body is to be covered with quilt, return and proceed to detect; If human body and quilt position difference surpass predetermined value, represent that then the sleeper has kicked quilt off, then the warning message output unit sends alerting signal.
See also shown in Fig. 3 D, the process flow diagram of detected another embodiment is played in its demonstration, and it comprises the steps:
Step 331: the image of gathering a large amount of lid quilts and playing quilt is trained, obtain a lid by with play by sorter;
Step 332: input picture is analyzed through sorter;
Step 333: sorter judge human body whether play by, if human body exists and to play by behavior, then send alerting signal through the warning message output unit, if human body does not exist and plays by behavior, then return and proceed to analyze.
To elaborate to falling down a monitoring function below.
See also shown in Figure 4ly, it shows that human body falls down the process flow diagram of an embodiment of bed monitoring, and it comprises the steps:
Step 401: input picture is carried out human detection, determine the position of human body;
Step 402: if do not detect human body in input picture, represent that then human body has exceeded the scope of a body, may fall down bed, this moment, the warning message output unit sent alerting signal.
To elaborate to the human body monitoring position function of sleeping below.
See also shown in Figure 5ly, it shows that human body is positioned at the process flow diagram that the bedside edge may fall down an embodiment of bed monitoring, and it comprises the steps:
Step 501: input picture is carried out human detection, determine the position of human body;
Step 502: input picture is carried out a health check-up survey, determine the position of bed body:
Step 503: position of human body and bed body position are compared, if the human body center surpasses predetermined value with the difference of bed body center, the sleep position of then representing human body is the edge at bed, then thinks to have the danger of falling down bed, and then the warning message output unit sends alerting signal.
To elaborate to the monitoring function of wakeing up below.
See also shown in Figure 6, the wake up process flow diagram of an embodiment of monitoring function of its demonstration, it comprises the steps:
Step 601: input picture;
Step 602: input picture is carried out the eye detection that people's face detects, and the judgement eyes are being opened or are being closed, if eyes are to open, then think to wake up, and send alerting signal; If eyes are to close, then return and continue to detect;
Step 612: the human posture who input picture is carried out the human body behavior detects; And judge whether the human posture sits up, and if sit up, represent that then the sleeper wake up, then send alerting signal;
Step 622: the sobbing behavior of input picture being carried out the human body behavior detects, and judges whether human body exists dehisce sobbing or human body face that sobbing behaviors such as tears are arranged.If human body is to cry, representing that then the sleeper wake up, then sending alerting signal.
To elaborate to the nightmare monitoring function below.
See also shown in Figure 7ly, it shows the process flow diagram of an embodiment of nightmare monitoring function, and it comprises the steps:
Step 701: the image of gathering a large amount of normal sleep expressions and improper sleep expression is trained the expression classification device of normally being slept;
Step 702: image is imported the expression classification device analyze;
Step 703: through the analysis of expression classification device, if expression is not normal sleep expression, but relatively more nervous strange expression, then expressing possibility has been nightmare, carries out the warning of nightmare this moment.
The present invention proposes a kind of sleep monitoring system based on infrared/near infrared camera, take the image of sleep quality by infrared/near infrared camera, then the part in the guarded region in the image is analyzed, determine the sleeper whether play quilt, whether near the edge of bed, whether fall down bed, whether nightmare, whether wake up etc., report to the police according to the result who analyzes then.Infrared/near-infrared light source can not exert an influence to the people, therefore can not produce user's sleep and disturb.
Above-mentioned explanation has fully disclosed the specific embodiment of the present invention.It is pointed out that and be familiar with the scope that any change that the person skilled in art does the specific embodiment of the present invention does not all break away from claims of the present invention.Correspondingly, the scope of claim of the present invention also is not limited only to previous embodiment.