CN113505748A - Method, device, equipment and medium for capturing wonderful images of infants - Google Patents

Method, device, equipment and medium for capturing wonderful images of infants Download PDF

Info

Publication number
CN113505748A
CN113505748A CN202110853521.1A CN202110853521A CN113505748A CN 113505748 A CN113505748 A CN 113505748A CN 202110853521 A CN202110853521 A CN 202110853521A CN 113505748 A CN113505748 A CN 113505748A
Authority
CN
China
Prior art keywords
image
infant
snapshot
scene
images
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110853521.1A
Other languages
Chinese (zh)
Inventor
陈辉
张青军
张智
熊章
雷奇文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Xingxun Intelligent Technology Co ltd
Original Assignee
Ningbo Xingxun Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ningbo Xingxun Intelligent Technology Co ltd filed Critical Ningbo Xingxun Intelligent Technology Co ltd
Priority to CN202110853521.1A priority Critical patent/CN113505748A/en
Publication of CN113505748A publication Critical patent/CN113505748A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Abstract

The invention belongs to the technical field of video data processing, solves the technical problems of poor user experience effect caused by large data volume and high repeatability of a snap-shot image in the prior art, and provides a snap-shot method, a snap-shot device, snap-shot equipment and a snap-shot medium for a wonderful image of an infant. Acquiring a plurality of continuous snap-shot multi-frame scene images in a snap-shot event of an infant image; calculating the resolution of the infant image in each scene image and the contact ratio of the infant image between each adjacent scene images, and judging each resolution and each contact ratio; if the resolution and the contact ratio meet the requirements, the target image of the snapshot event is output, the problems of poor definition of the infant image, deformation of the infant image and the like in the snapshot image can be solved, and the snapshot quality is improved.

Description

Method, device, equipment and medium for capturing wonderful images of infants
Technical Field
The invention relates to the technical field of video data processing, in particular to a method, a device, equipment and a medium for capturing infant wonderful images.
Background
With the development of video technology, a mobile terminal is used in the market to check real-time pictures acquired by a camera terminal in real time, so that the activity condition of a target object in an area monitored by the camera is mastered; the technology has very important significance in nursing old people and infants, and can improve the nursing efficiency of nursing infants and old people.
Utilize the intelligent camera to nurse the in-process of infant, adopt the camera to take a candid photograph infant's splendid attire in the twinkling of an eye, can provide abundanter service content for the user, simultaneously, be favorable to taking notes infant's growth, form beautiful recall and take notes the record. However, in the prior art, a video recording method is often adopted for recording the growth of the infant through the camera, a section of meaningful video is recorded, and then an interested image is captured and stored manually, the image obtained by adopting the method is often tedious to operate and large in data volume, poor user experience is brought to a user, meanwhile, as the infant has a lot of wonderful shots in the growth process, and in daily life, in practical situations, the same infant has small differences in activities every day, if only some images conforming to the actions are captured or captured, the problems of large number of pictures and excessive number of repeated images are caused, and therefore more memory of the intelligent camera is occupied.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a medium for capturing a highlight image of an infant, so as to solve the technical problems of a large amount of image data, high repetition degree, and poor user experience effect caused by complicated operations when capturing an image of a scene where the infant is located in the prior art.
The technical scheme adopted by the invention is as follows:
the invention provides a method for snapshotting a wonderful image of an infant, which comprises the following steps:
s10: acquiring multi-frame scene images of scenes where infants are continuously captured in one infant image capturing event;
s11: calculating the resolution of the infant image in each frame of scene image and the coincidence degree of the infant image between every two adjacent frame of scene images, and judging the resolution and the coincidence degree;
s12: and if the resolution and the contact ratio meet the requirements, outputting a target scene image of the baby image snapshot event.
Preferably, the S1 includes:
s101: before a baby image snapshot event, carrying out primary pre-shooting on a scene where a baby is located to obtain a pre-shot scene image;
s102: calculating the area proportion occupied by the infant image in the pre-shot scene image, and judging whether the area proportion occupied by the infant image meets the snapshot requirement or not;
s103: and if the scene meets the requirements, continuously capturing the scene where the infant is positioned to obtain continuous multiframe scene images.
Preferably, the S11 includes:
s111: acquiring coordinate information of a detection frame for calibrating the face position of the infant in each scene image, and a preset size and a preset resolution of a shot scene image;
s112: determining the contact ratio of each adjacent scene image according to the coordinate information of each detection frame;
s113: determining the corresponding image proportion of the face of the infant in each scene image according to the preset size of the scene image and the coordinate information of each detection frame;
s114: and obtaining each resolution of the facial images of the infants according to the preset resolution and each image proportion.
Preferably, the S12 includes:
s121: carrying out one-time snapshot on a scene area where a monitored infant is located to obtain a first snapshot image;
s122: acquiring the file size of the first snapshot image and infant facial information, and respectively judging whether the infant facial information and the file size of the first snapshot image meet requirements or not;
s123: if the file size of the first snapshot image and/or the facial information of the infant do not meet the requirements, the infant is rephotographed;
s124: repeating S121 to S123 until the file size of the first snapshot image and the infant face information meet requirements, and outputting the first snapshot image as the target image.
Preferably, the S123 includes:
s1231: acquiring a file size threshold of a preset snapshot image;
s1232: comparing the file size of the first snapshot image with a file size threshold of the preset snapshot image;
s1233: if the file size of the first snapshot image is larger than or equal to the file size threshold of the preset snapshot image, detecting the facial information of the infant in the first snapshot image, and if not, carrying out snapshot again;
s1234: and if the facial information of the infant in the first snapshot image does not meet the requirement, the infant is snapshot again.
Preferably, before the S10, the method further includes:
s010: acquiring the activity state of the infant;
s011: determining the snapshot interval time according to the activity state of the infant;
s012: controlling a camera to perform automatic snapshot according to the snapshot interval time;
wherein the infant activity states include a sleeping state and a non-sleeping state.
Preferably, after the S12, the method further includes:
s13: acquiring the number of images of the current target image and a preset image number threshold;
s14: comparing the number of images with the preset image number threshold, and if the number of images is smaller than the preset image number threshold, determining the time of the next infant image capturing event at first interval time;
s15: comparing the number of images with the preset image number threshold, and if the number of images is larger than or equal to the preset image number threshold, determining the time of the next infant image capturing event at a second interval;
wherein the first interval time is less than the second interval time.
The invention also provides a device for capturing the wonderful image of the infant, which comprises:
an image capturing module: the multi-frame scene image capturing system is used for acquiring multi-frame scene images of scenes where infants are continuously captured in one infant image capturing event;
an image processing module: the image processing device is used for calculating the resolution of the infant image in each frame of scene image and the coincidence degree of the infant image between the adjacent frame of scene images, and judging each resolution and each coincidence degree;
the image capturing module: and outputting the target scene image of the baby image snapshot event if the resolution and the contact ratio meet the requirements.
The present invention also provides an electronic device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of any of the above.
The invention also provides a medium having stored thereon computer program instructions which, when executed by a processor, implement the method of any of the above.
In conclusion, the beneficial effects of the invention are as follows:
according to the method, the device, the equipment and the medium for capturing the infant wonderful images, provided by the invention, during each capturing, a plurality of scene images are continuously captured, and the resolution of the infant images in the scene images and the contact ratio of the adjacent scene images are calculated; outputting the target image captured at the time as a highlight image on the premise of meeting the preset resolution and coincidence; the problems of infant image definition, infant image deformation and the like of the snapshot image can be prevented, and the snapshot quality is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, without any creative effort, other drawings may be obtained according to the drawings, and these drawings are all within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of a method for capturing a highlight image of an infant in embodiment 1 of the present invention;
FIG. 2 is a schematic flow chart of acquiring an instantaneous image according to embodiment 1 of the present invention;
fig. 3 is a schematic flow chart illustrating the process of obtaining the resolution of the infant face in embodiment 1 of the present invention;
fig. 4 is a schematic flow chart of capturing an infant in embodiment 1 of the present invention;
fig. 5 is a schematic flow chart illustrating monitoring of sleep states of infants in embodiment 2 of the present invention;
fig. 6 is a schematic flow chart illustrating a process of acquiring a sleep state of an infant in embodiment 2 of the present invention;
FIG. 7 is a schematic view of the procedure for infant scaring in example 2 of the present invention;
fig. 8 is a schematic flow chart of real-time monitoring of infant sleep in embodiment 3 of the present invention;
fig. 9 is a schematic flowchart of acquiring location information of a first detection frame in embodiment 3 of the present invention;
fig. 10 is a schematic flow chart illustrating sleep determination of an infant in embodiment 3 of the present invention;
fig. 11 is a schematic flowchart of acquiring a second detection frame in embodiment 3 of the present invention;
fig. 12 is a schematic flowchart of detecting a sleep condition of an infant in embodiment 3 of the present invention;
fig. 13 is a schematic structural view of an infant highlight image capturing device according to embodiment 4 of the present invention;
fig. 14 is a block diagram of an infant sleep monitoring device according to embodiment 5 of the present invention;
fig. 15 is a schematic structural view of an infant activity monitoring device according to embodiment 6 of the present invention;
fig. 16 is a schematic structural diagram of an electronic device in embodiment 7 of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. In the description of the present invention, it is to be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience of description and simplicity of description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, are not to be construed as limiting the present invention. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. In case of conflict, the various features of the present invention and embodiments may be combined with each other and are within the scope of the present invention.
Implementation mode one
Example 1
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for capturing a wonderful infant image according to embodiment 1 of the present invention; the method comprises the following steps:
s10: acquiring multi-frame scene images of a scene in which an infant is continuously snapshotted in a primary infant image snapshotting event;
specifically, an infant is nursed in real time by using an infant nursing machine, an infant activity area is set as a nursing scene of the infant nursing machine, in the nursing process, the wonderful actions of the infant are snapshotted according to preset snapshotting rules, a plurality of continuous scene images are snapshotted at each time, wherein the preset snapshotting rules include but are not limited to preset interval time, infant activity frequency and the like.
In one embodiment, referring to fig. 2, the S1 includes:
s101: before a baby image snapshot event, carrying out primary pre-shooting on a scene where a baby is located to obtain a pre-shot scene image;
specifically, according to an automatic snapshot mechanism, when a snapshot is prepared, a scene where an infant is located is pre-snapshot firstly, a pre-shot scene image is obtained, unnecessary data processing caused by snapshot when the snapshot requirement is not met can be avoided, and meanwhile the quality of a snapshot wonderful image can be guaranteed.
It should be noted that: the scene of the infant is as follows: the method comprises the following steps that a scene which is initially set when an infant is nursed by an infant nursing machine, namely before nursing is started, an area where the infant is located is set as a nursing scene of the infant nursing machine, the scene can be adjusted along with tracking along with the movement of the infant and can also be unchanged, and when the nursing scene is unchanged, the infant may exist or does not exist in a snapshot image in one snapshot event; meanwhile, with the movement of the infant, the imaging position of the infant in the pre-shot scene image may be different, that is, may not be centered.
S102: calculating the area proportion occupied by the infant image in the pre-shot scene image, and judging whether the area proportion occupied by the infant image meets the snapshot requirement or not;
specifically, the distance perspective of the infant from the nursing machine directly influences the area of the infant in the pre-shot scene image; if the area proportion of the infant image in the pre-shot scene image in the whole image meets the requirement, performing snapshot; meanwhile, when the infant is far away from the lens, the image of the infant is not clear due to the fact that the area occupied by the image of the infant is too small, when the infant is close to the lens, the image of the infant is poor in watching effect due to the fact that the area occupied by the image of the infant is too large, false images of the infant disappearing from the image can appear, the captured images are useless data, and data processing capacity of equipment is increased.
S103: and if the scene meets the requirements, continuously capturing the scene where the infant is positioned to obtain continuous multiframe scene images.
Specifically, if the area of the infant image in the pre-shot scene image meets the requirement, the nursing machine is controlled to continuously snapshot the scene of the infant to obtain continuous multi-frame scene images, the continuous multi-frame scene images are further analyzed, the stability of a snapshot environment is guaranteed, and the success rate of the target image of the snapshot event is improved.
S11: calculating the resolution of the infant image in each frame of scene image and the coincidence degree of the infant image between every two adjacent scene images, and judging the resolution and the coincidence degree;
specifically, the resolution of the infant imaging in each frame of scene image is calculated respectively, and it can be understood that the pixel points included in each scene image are determined, and the total number of the pixel points of each scene image is the same, and the pixel points belonging to the infant image in each scene image are counted respectively to obtain the proportion of the pixel points of the infant in each scene image to the total pixel points of each scene image; such as: the scene image comprises 1000 pixel points, the pixel points occupied by the infant image are 500, and if the resolution of the scene image is 360dpi, the resolution of the infant image is 180 dpi; meanwhile, the coincidence degree of any two adjacent scene images is calculated, and the coincidence degree calculation includes the position of the image of the scene, the position of each pixel point of the image of the infant, or the position of each part detection frame, which is not limited to the position of the image of the scene using the outline of the infant in the image of the infant.
It should be noted that: the resolution and the degree of coincidence of the infant image include: the infant overall image and the infant local image, the infant local image includes: face, limbs, head, etc.
In an embodiment, the resolution of the image of the infant is the resolution of the image of the face of the infant, referring to fig. 3, the S11 includes:
s111: acquiring coordinate information of a detection frame for calibrating the face position of the infant in each scene image, and a preset size and a preset resolution of a shot scene image;
specifically, under the condition that the shooting angle of the camera is determined, the size and the resolution of each preset scene image are the same; the target in the shot image is detected by determining a detection frame corresponding to the target object, namely, the position of the face of the infant is indicated by the position of the face detection frame of the infant in the scene picture.
S112: determining the contact ratio of each adjacent scene image according to the coordinate information of each detection frame;
specifically, the position of the infant face in the scene image can be quickly determined through the coordinate information of the detection frame, and the position of the infant face in the scene image includes but is not limited to centering, left-right offset, up-down offset and the like; meanwhile, the area proportion of the face of the infant in the scene image can be determined, so that the contact ratio between two adjacent images can be determined quickly.
S113: determining the corresponding image proportion of the face of the infant in each scene image according to the preset size of the scene image and the coordinate information of each detection frame;
specifically, according to coordinate information of a detection frame corresponding to the infant face, the area size of the infant face in the scene image can be determined, and then according to the preset size of the scene image, the image proportion of the infant face image in the scene image can be obtained, so that the resolution of the infant face image in each scene image is determined.
S114: and obtaining each resolution of the facial image of the infant according to the preset resolution and each image proportion.
Specifically, when the nursing machine starts nursing in the scene of the infant, the size and the resolution of any frame of image shot by the nursing machine in the scene of the infant are the same, the image proportion of the image of the infant in each frame of image is calculated, and the resolution of the image of the infant in each frame of image is determined by combining the resolution of each frame of image. Such as: the image resolution of the scene where the infant is located shot by the nursing machine is 360dpi, and if the infant image accounts for 30%, the resolution of the infant image is 108 dpi.
S12: and if the resolution and the contact ratio meet the requirements, outputting a target scene image of the baby image snapshot event.
Specifically, a resolution threshold value that an infant image in each scene image meets requirements and a coincidence degree threshold value of the infant image in an adjacent scene image are set, the resolution of the infant image in each scene image is compared with the resolution threshold value, the coincidence degree of the infant image in the adjacent scene image is compared with the coincidence degree threshold value, if the resolution of the infant image in each scene image meets the requirements, a target scene image of the snapshot is output, and the target scene image is a wonderful image of the snapshot; the target scene image comprises the last scene image in a plurality of scene images, further processing of the scene images or a re-captured image, wherein the further processing of the scene images comprises the steps of not limiting to the calculation of the centering degree and the detection of special actions; the special actions include, but are not limited to, covering the face, adjusting the skin, etc.
In an embodiment, after each of the resolutions and the coincidence degrees meet the requirement, referring to fig. 4, the S12 includes:
s121: carrying out one-time snapshot on a scene area where a monitored infant is located to obtain a first snapshot image;
specifically, the overlap ratio of the scene images is determined to ensure stable movement of the infants, prevent the deformation of the images of the infants in the snap shot images, ensure the clarity of the snap shot images after the resolution of the images of the infants meets the requirements, and improve the quality of the snap shot images.
S122: acquiring the file size of the first snapshot image and infant facial information, and respectively judging whether the infant facial information and the file size of the first snapshot image meet requirements or not;
s123: if the file size and/or the infant facial information do not meet the requirements, re-snapping;
specifically, under the condition that the scene where the infant corresponding to the nursing machine is located is determined, parameters such as color, brightness, exposure, saturation and the like in the scene influence the size of a snap-shot image file, for example, a color image file is larger than a black-and-white file under the same condition, although a camera can be adjusted in a self-adaptive mode during shooting to prevent abnormal snap-shot images, the abnormal images cannot be avoided, and whether the snap-shot images are abnormal or not is quickly determined by analyzing the size of the first snap-shot image file, so that whether the snap-shot images need to be taken again or not is determined; and identifying the image information of the snapshot image, judging the size and the front proportion of the face information of the infant, if no face information exists or the face information exists but the front proportion does not meet the requirements, carrying out snapshot again, and improving the snapshot efficiency and quality.
In one embodiment, the S123 includes:
s1231: acquiring a file size threshold of a preset snapshot image;
specifically, the image size of the snapshot image is preset, the size of the image file is affected by the factors such as the scene color, the brightness, the protection degree and the like, and in the same state, the file of the color image is larger than the file of the black-and-white image, meanwhile, the snapshot abnormality exists, the file of the image is very small, the image picture is not clear due to the fact that the file is too small, and the image quality is affected.
S1232: comparing the file size of the first snapshot image with the file size threshold of a preset snapshot image;
specifically, a first snapshot image of a scene where a snapshot infant is located is obtained, the file size of the first snapshot image is calculated, the file size of the first snapshot image is compared with a preset file size threshold of the snapshot image, an inappropriate image is quickly screened, and data processing amount is reduced.
S1233: if the file size of the first snapshot image is larger than or equal to the file size threshold of a preset snapshot image, performing infant facial information detection on the infant in the first snapshot image, and otherwise, performing snapshot again;
specifically, if the file size of the first snapshot image meets the requirement, performing infant face recognition on the first snapshot image; otherwise, the infant face recognition is not carried out, and the infant face is directly and again snapped.
S1234: and if the facial information of the infant in the first snapshot image does not meet the requirement, the infant is snapshot again.
Specifically, infant face recognition is carried out on a first snapshot image, if the fact that the infant face information meets the requirements is detected, the first snapshot image is output as a target image, if the fact that the infant face information does not meet the requirements is detected, the first snapshot image is taken again, if the fact that the infant face information does not meet the requirements is detected for multiple times, the snapshot event is abandoned, the target image is not output, specifically, the face information detection comprises the steps of judging whether the infant face is a front face, if the infant face is the front face, judging whether the ratio of the area of the front face to the area of a non-front face (side face) is larger than a threshold value, if the ratio is larger than the threshold value, the infant face recognition is judged to be in accordance with the snapshot condition, and if not, the infant face recognition is not in accordance with the snapshot condition; if the face is not the front face, the face is not judged to be in accordance with the snapshot condition.
S124: repeating S121 to S123 until the file size of the first snapshot image and the face information of the infant meet requirements, and outputting the first snapshot image as the target image.
In an embodiment, before the S10, the method further includes:
s010: acquiring the activity state of the infant;
specifically, the activity intensity difference between the sleeping state and the non-sleeping state of the infant is large, the activity intensity of the sleeping state is small, and the activity intensity of the non-sleeping state is large.
S011: determining the snapshot interval time according to the activity state of the infant;
specifically, the difference of the snapshot images obtained at different snapshot times in the sleep state is small, the difference of the snapshot images obtained at different snapshot times in the non-sleep state is large, and the snapshot interval time corresponding to the activity state is set, so that the quality of the snapshot images can be improved.
S012: controlling a camera to perform automatic snapshot according to the snapshot interval time;
wherein the infant activity states include a sleeping state and a non-sleeping state.
In an embodiment, after the S12, the method further includes:
s13: acquiring the number of images of the current target image and a preset image number threshold;
specifically, images captured each time can not be used as target images, the captured images do not meet the requirements of the highlight images, and similarly, when the captured images meet the requirements of the highlight images but are captured too densely and in too many numbers, the highlight images displayed to the user are too many, so that the aesthetic fatigue of the user is caused; therefore, the image number threshold of the target image is set to adjust the interval time of the snap-shot images.
S14: comparing the number of images with the preset image number threshold, and if the number of images is less than or equal to the preset image number threshold, determining the time of the next infant image capturing event at first interval time;
s15: comparing the number of images with the preset image number threshold, and if the number of images is larger than or equal to the preset image number threshold, determining the time of the next infant image capturing event at a second interval;
wherein the first interval time is less than the second interval time.
Specifically, the first interval time includes an interval time of a sleep state and an interval time of a non-sleep state; setting an image quantity threshold value as N, wherein the first capturing time T is k T1, k is less than or equal to N, k and N are positive integers, T1 is unit interval time, the second interval time Q is N T1+ T2, and T2 is fixed interval time; for example, when N is 5, T1 is 10min, T2 is 30min, T is k 10, k e [1,5], k is a positive integer, and when k is greater than 5, Q is 5 10+30 is 80min, that is, when the number of existing highlights is less than 5, the next capture time interval is increased by 10 minutes for each additional highlight, and when the number of existing highlights exceeds 5, the capture is performed every 1 hour and 20 minutes.
In one application embodiment, the method for capturing the wonderful image of the infant comprises the following steps:
according to a preset snapshot mechanism, in a snapshot event, a scene where an infant is located is pre-shot for one time to obtain a pre-shot scene image, the size and the centering degree of the infant image in the pre-shot scene image are judged, if the pixel of the pre-shot image is 360dpi, the resolution of the infant image in the pre-shot image cannot be lower than 45dpi, and meanwhile, a face frame of the infant should fall into a specified range in the pre-shot scene image, wherein the area includes an area which is not limited to one half, three quarters, three fifths and the like of the center of the image of the pre-shot image. If the requirements are met, determining the capturing opportunity of the capturing event, acquiring continuous multi-frame scene images of the scene where the infant is located, calculating the contact ratio of a virtual detection frame used for identifying the head of the infant in the two adjacent frame scene images on the position, if the contact ratios of the two adjacent frame scene images for multiple times meet the requirements, outputting the image of the capturing event, wherein the image can be an image processed by the existing multi-frame scene image or a re-captured one-frame scene image, after the image of the capturing event is obtained, performing file size detection on the image, if the image is smaller than 30kb, re-capturing, if the file size meets the requirements, judging the composition of the image of the head area of the infant in the image, specifically, determining whether the area of a face in the image of the head area of the infant meets the requirements, if the area of the face reaches fifty percent or more, if the requirements are not met, the snapshot is taken again, or the snapshot event is invalidated. And counting the current target images meeting the requirements again, and determining the time of the next snapshot time according to the number of the existing target images. Such as: the first interval time comprises an interval time of a sleep state and an interval time of a non-sleep state; setting an image quantity threshold value as N, wherein the first capturing time T is k T1, k is less than or equal to N, k and N are positive integers, T1 is unit interval time, the second interval time Q is N T1+ T2, and T2 is fixed interval time; for example, when N is 5, T1 is 10min, T2 is 30min, T is k 10, k e [1,5], k is a positive integer, and when k is greater than 5, Q is 5 10+30 is 80min, that is, when the number of existing highlights is less than 5, the next capture time interval is increased by 10 minutes for each additional highlight, and when the number of existing highlights exceeds 5, the capture is performed every 1 hour and 20 minutes.
By adopting the method for capturing the wonderful infant images, a plurality of scene images are captured continuously during each capturing, and the resolution of the infant images in the scene images and the contact ratio of the adjacent scene images are calculated; outputting the target image captured at the time as a highlight image on the premise of meeting the preset resolution and coincidence; the problems of infant image definition, infant image deformation and the like of the snapshot image can be prevented, and the snapshot quality is improved.
Example 2
Referring to fig. 5, fig. 5 is a schematic flow chart of a method for detecting a sleep state of an infant in embodiment 2 of the present invention, and embodiment 2 is based on specific applications of detection of the sleep state and a non-sleep state of the infant in a method for capturing a highlight image of the infant in embodiment 1, and the method includes:
s20: acquiring a plurality of continuously shot first scene images including scenes where target infants are located;
specifically, a nursing camera is arranged in the activity range of the infant, the activity condition of the infant is monitored in real time, a plurality of continuous images of the camera in the video in the monitoring area are obtained, whether the infant sleeps or not and whether facial shielding exists or not during sleeping or not are determined by analyzing the images, meanwhile, whether the infant acts for snapshot or not can be determined according to the analysis result of the images, a wonderful image is obtained, and the growth memory of the infant is generated.
S21: detecting infant head information of a target infant in each first scene image, and determining first position information of a first detection frame for calibrating an infant head area;
specifically, the detection of the target infant by the camera is determined by the position of the corresponding detection frame appearing in the image, and the position of the detection frame is the position of the target infant; the detection frame includes not only the first detection frame corresponding to the head region of the infant, but also the detection frame corresponding to regions such as limbs and the trunk.
S22: determining the sleeping condition of the target infant at the moment according to the relative position relation of the first position information of the first detection frame in each adjacent first scene image;
specifically, the relative position of the heads of the infants in the two adjacent first images is determined according to the first position information of each first image, so that the activity range of the infants is determined, if the change of the area corresponding to the heads of the infants in the two adjacent images is large, the infants have large activity, if the positions of the heads of the infants in the multiple continuous images are different greatly, the infants are in a non-sleep state at the moment, and otherwise, the infants are in a sleep state.
In one embodiment, referring to fig. 6, the S22 includes:
s221: acquiring a preset first coincidence degree threshold value between every two adjacent first scene images;
specifically, the camera acquires a video frame of a monitoring area where a target infant is located according to a preset frame rate, for example, the frame rate is 20 frames/second, which means that the camera shoots 20 frames of images per second, the coincidence degree between adjacent first images is determined according to the position of the target infant in each first image, and if the coincidence degree exceeds a coincidence degree threshold value, the state of the infant changes, and the state changes of the infant include but are not limited to sleeping, waking up, facial occlusion, and the like.
S222: obtaining the coincidence degree between adjacent first scene images according to the first position information;
specifically, the images of the target infants in the first images are respectively counted, specifically, the position information of the detection frame for detecting the head of the target infant is calculated, and the contact ratio between the adjacent images and the contact ratio of the target infants are determined according to the position information of the detection frame corresponding to the adjacent images; the detection frame for detecting the head of the target infant is marked as a first detection frame.
S223: comparing each contact ratio with the first contact ratio threshold value, and determining the sleep state of the infant at the moment according to the comparison result;
wherein the sleep condition includes a sleep state and a non-sleep state.
Specifically, the determination method of the comparison result includes, but is not limited to, determining the sleeping state of the infant according to the statistical result after the overall comparison, such as: the first overlap ratio threshold value is that the overlap ratio of the head regions of the infant in two adjacent first scene images is 80%, 11 first scene images are collected in total and divided into 10 groups of 1 st and 2 nd, 2 nd and 3 rd, 3 rd and 4 th, 4 th and 5 th, 5 th and 6 th, 6 th and 7 th, 7 th and 8 th, 8 th and 9 th, 9 th and 10 th, and 10 th and 11 th adjacent first scene images, wherein the overlap ratio of the two adjacent first scene images is more than or equal to 8 groups of 80, the overlap ratio of the two adjacent first scene images is less than 2 groups of 80, the overlap ratio meets the requirement of 80%, if the overlap ratio is more than 60%, the infant is considered to fall asleep, and otherwise, the infant is considered to be in an unhampered state.
In one embodiment, the method further comprises: a first detection sensitivity to detect in a sleep state and a second detection sensitivity to detect in a non-sleep state, wherein the first sensitivity is less than the second sensitivity.
Specifically, the detection sensitivity is the number of times that the infant is detected to be in an abnormal condition and an abnormal condition corresponding to the prompt message needs to be sent within a certain time, such as: when the first detection sensitivity is used, the prompting information is sent when the number of times that the moving amplitude of the baby exceeds the preset value reaches 10 times within 1 minute, and when the second detection sensitivity is used, the prompting information is sent when the number of times that the moving amplitude of the baby exceeds the preset value reaches 3 times within 1 minute.
In one embodiment, the S223 includes:
s2231: recording a comparison result of the coincidence degree of the adjacent first scene images which is greater than or equal to the first coincidence degree threshold as first data;
s2232: recording a comparison result of the coincidence degree of the adjacent first images smaller than the first coincidence degree threshold as second data;
s2233: and comparing the ratio of the first data to the second data with a preset ratio, and determining the sleep condition of the infant at the moment according to the comparison result.
Specifically, the frequency that the contact ratio is greater than the contact ratio threshold value is recorded as A, the frequency that the contact ratio is less than the contact ratio threshold value is recorded as B, and whether the target infant is awake or not is determined according to the ratio of A to B; if 10 frames of first images are collected, the times that the contact ratio of two adjacent images is greater than the contact ratio threshold value are 6 times, the times that the contact ratio is less than the contact ratio threshold value are 4 times, and the ratio of A to B is 1.5; if the preset ratio is 1, the infant is in a non-sleep state at the moment.
It should be noted that: or the infant can be directly determined to be awake after the accumulated count reaches a certain value by accumulating the times of exceeding the contact ratio threshold value.
S23: if the infant is in a sleeping state, the first detection frame and a second detection frame used for calibrating a human-shaped area including the head of the infant are adopted to simultaneously detect the sleeping condition of the target infant in real time;
specifically, if the infant is in a sleeping state, the activity intensity and the activity frequency of the body of the infant are reduced, the head and a large range of the infant are detected by adopting the first detection frame and the second detection frame at the same time, and the data processing amount can be reduced and the detection accuracy can be improved by setting the judgment priority; the influence on user experience caused by frequently sending prompt information to a caregiver is avoided; such as: when the second detection frame detects that the movement range of the infant exceeds the preset range, the image corresponding to the first detection frame is analyzed to determine whether the infant is awake or not, and false detection of the infant caused by actions such as normal turning over is avoided.
The infant in the sleep state is detected by arranging the first detection frame and the second detection frame, the detection data of the first detection frame are processed only when the second detection frame detects abnormal conditions, otherwise, the data detected by the second detection frame are processed only, and the detection precision of the second detection frame is smaller than that of the first detection frame, so that the detection effect can be guaranteed, and unnecessary data processing can be reduced.
In one embodiment, when the infant is in the sleep state, the S23 includes:
s231: acquiring a geometric center of the first detection frame;
s232: expanding the second detection frame including the first detection frame by taking the geometric center of the first detection frame as a base point;
s233: and detecting the sleep condition of the infant in real time according to the first detection frame and the second detection frame.
Specifically, when the target infant is in a sleeping state, the geometric center of a first detection frame for detecting the head area of the infant is acquired at the moment, then the first detection frame is expanded outwards by the geometric center to obtain a second detection frame, the detection area of the second detection frame is larger than that of the first detection frame, the first detection frame is completely positioned in the second detection frame, and the target infant in the monitoring area is monitored by the first detection frame and the second detection frame at the same time.
It should be noted that: the detection sensitivity of the first detection frame area is higher than that of the second detection frame area, but only when the second detection frame detects that the infant moves, the image data of the first detection frame detection area is processed, so that the detection precision can be ensured, and meanwhile, the effective data processing amount is improved.
In one embodiment, the S233 includes:
s2331: acquiring a displacement threshold value of the second detection frame in movement and second position information of the second detection frame in a plurality of second scene images continuously shot by a target infant in a sleeping state; s2332: determining displacement distance between every two adjacent second scene images according to every second position information;
specifically, when the infant is in a sleep state, the sleep detection is started, that is, the second position information of the second detection frame in each second scene image is acquired, and the displacement distance between the second detection frames in two adjacent second scene images is determined.
S2333: comparing each displacement distance with the displacement threshold respectively, and if the displacement distance is less than or equal to the displacement threshold, performing facial occlusion detection on an image area corresponding to the first detection frame; and if the displacement distance is greater than the displacement threshold, performing overlap ratio detection on adjacent images in image areas corresponding to the first detection frames in the second scene images.
Specifically, if the fact that the displacement distance of a second detection frame in two adjacent frames of second scene images is greater than a displacement threshold value is detected, coincidence degree detection is carried out on the infant head image corresponding to the first detection frame, and if the coincidence degree detection result meets the infant sleep-wake state detection requirement, sleep detection is quitted; if the displacement distance of the second detection frame in the two adjacent frames of second scene images is detected to be smaller than or equal to the displacement threshold, facial shielding detection is carried out on the image area corresponding to the first detection frame, and the dangerous situations that the infant is suffocated in a sleeping state and the like are avoided.
S24: if the infant is in a non-sleep state, the first detection frame is adopted to detect the infant in real time;
wherein the detection sensitivity of the first detection frame is greater than the detection sensitivity of the second detection frame.
Specifically, when the infant is in the non-sleep state, the image of the head area of the infant, which is calibrated by the first detection frame, is analyzed, and whether the infant can be snapshoted, whether the infant can go into sleep or not is determined according to the analysis result.
It should be noted that: the detection areas of the first detection frame and the second detection frame are smaller than the area represented by a scene image of a scene where the infant is shot by the nursing machine, meanwhile, the actual detection areas of the first detection frame and the second detection frame are corresponding to the real-time state of the infant, such as the face detection of the infant, and when the infant faces the nursing machine with the front face, the area of the detection frame is larger than that when the infant faces the nursing machine with the side face.
In an embodiment, please refer to fig. 7, after the S24, the method further includes:
s25: acquiring a second coincidence threshold value used for triggering snapshot between every two adjacent first scene images;
s26: and comparing each contact ratio with the second contact ratio threshold value, and if the contact ratio is greater than or equal to the contact ratio threshold value, capturing the infant to generate a wonderful image.
In one embodiment, when the degree of coincidence is greater than or equal to the second degree of coincidence threshold, the S26 includes:
s261: acquiring snapshot time information and current time information of the infant image snapshot event;
specifically, the snapshot time information of the snapshot is a time period, the camera automatically snapshots the monitoring area according to the snapshot rule, and after one snapshot is completed, the next snapshot time is set according to the sleep condition of the infant, if the interval time of the snapshot in the sleep state of the infant is 30 minutes and the interval time of the snapshot in the wake-up state of the infant is 10 minutes and the interval time of the snapshot in the sleep state of the infant is 10 minutes and the interval time of the snapshot in the wake-up state of the infant is 10% and the interval time of the snapshot in the sleep state of the infant is 10% and the interval time of the snapshot in the wake-up state of the infant is 10% and the snapshot in the up-down state; and the previous snapshot time is 12:00, if the contact ratio detected in 12:11 is smaller than the second contact ratio threshold value, if the infant is in a sleeping state at the moment, the snapshot is not carried out, and if the infant is in a waking state at the moment, the snapshot is carried out.
It should be noted that: the time interval of each snapshot is not limited to a fixed time, and may be the time interval manner described in embodiment 1, which is not described herein again.
S262: and comparing the snapshot time information with the current time information, and if the current time information meets the requirements of the snapshot time information, performing snapshot on the infant.
It should be noted that the specific snapshot manner is referred to as embodiment 1, and is not described herein again.
By adopting the infant sleep detection method of the embodiment, whether an infant is in a sleep state is determined according to the first position information of the target infant in each frame of image, if the infant is in the sleep state, a sleep detection mode is started, the first detection frame and the second detection frame are adopted for real-time detection, if the infant is in a wake-up state, the first detection frame is adopted for detection, different detection modes are adopted for different activity states, the data processing amount of similar pictures can be effectively reduced, excessive repeated images are prevented from being generated, and the experience effect of a user is improved.
Example 3
Referring to fig. 8, fig. 8 is a schematic flow chart of a method for detecting a sleep activity state of an infant in embodiment 3 of the present invention, and embodiment 3 is based on still another specific application of detection of a sleep state and a non-sleep state of an infant in methods for capturing wonderful images of infants in embodiments 1 and 2, where the method includes:
s30: acquiring first position information of a first detection frame corresponding to a head area for detecting an infant in a first scene image of a scene in which the infant is located;
specifically, the detection of the target infant by the camera (including the infant care machine with the camera) is determined by the position of the corresponding detection frame appearing in the image, and the position of the detection frame represents the position of the target infant; the detection frame includes a first detection frame corresponding to not only the head region of the infant, but also the limbs, the trunk, and the like.
In one embodiment, referring to fig. 9, the S30 includes:
s301: acquiring a plurality of continuously shot first scene images including scenes where target infants are located;
specifically, the camera acquires a video frame of a scene area where the target infant is located according to a preset frame rate, wherein the frame rate is 20 frames/second, which means that the camera captures 20 frames of images per second.
S302: and detecting the head area of the infant for each first scene image to obtain first position information of the first detection frame for detecting the head area of the infant in each first image.
Specifically, a processor arranged in the camera detects the head region of the target infant for each first image, and when the head region of the target infant is detected, the position information of a first detection frame corresponding to the head region is acquired and recorded as first sub-information; the first position information is generally four coordinate points corresponding to rectangular coordinates established with the edges or center of the image.
S31: determining whether the infant is in a sleeping state or not according to the change condition of the first position information;
specifically, the relative position of the heads of the infants in the two adjacent first images is determined according to the first position information of each first image, so that the activity range of the infants is determined, and if the change of the area corresponding to the heads of the infants in the two adjacent images is large, the infants have a large activity, and the infants are in a non-sleep state.
In an embodiment, referring to fig. 10, the S31 includes:
s311: acquiring a preset first coincidence degree threshold value between every two adjacent first scene images;
specifically, the camera acquires a video frame of a monitoring area where a target infant is located according to a preset frame rate, for example, the frame rate is 20 frames/second, which means that the camera shoots 20 frames of images per second, the coincidence degree between adjacent first images is determined according to the position of the target infant in each first image, and if the coincidence degree exceeds a coincidence degree threshold value, the state of the infant changes, and the state changes of the infant include but are not limited to sleeping, waking up, facial occlusion, and the like.
S312: obtaining the coincidence degree between adjacent first scene images according to the first position information;
specifically, the position information of the detection frame for detecting the head of the target infant in each first image is respectively counted, and the contact ratio of the target infant between the adjacent images is determined according to the position information corresponding to the adjacent images.
S313: comparing each contact ratio with the first contact ratio threshold, and if the contact ratio is greater than or equal to the first contact ratio threshold, representing that the infant is in a sleeping state; and if the contact ratio is less than or equal to the first contact ratio threshold value, the infant is in a non-sleep state.
S32: if the infant is in a sleeping state, the first detection frame is amplified to obtain a second detection frame used for identifying the human shape of the infant, wherein the human shape of the infant at least comprises the head of the infant;
specifically, when the infant is in a sleep state, the detection area of the target infant is enlarged, the detection area is directly and uniformly expanded outwards on the basis of the first detection frame in the pre-sleep state, the main detection object in the detection area can be detected as the target infant, redundancy is eliminated, and detection accuracy is improved.
In one embodiment, referring to fig. 11, the S32 includes:
s321: acquiring the expansion ratio of the detection range of the infant in the non-sleep state compared with the detection range of the infant in the sleep state;
specifically, the method mainly comprises the steps that the face of an infant is detected in a non-sleeping state of the infant, and the sleeping state of the infant is determined; the human shape detection method mainly aims at detecting the human shape of an infant in a sleeping state, and at the moment, the detection sensitivity is low, but the human shape detection area is obtained by expanding a human face detection area.
S322: amplifying the first detection frame according to the expansion ratio to generate a transition detection frame;
specifically, when the infant is determined to be in a sleep state according to the face detection, a sleep detection mode is started at the moment, and the detection frame corresponding to the face detection area is expanded in proportion to obtain an original human-shaped detection frame which is marked as a transition detection frame; the detection area of the transition detection frame and the detection area of the actual human-shaped detection frame can be equal or unequal.
S323: and adjusting the position information of the transition detection frame according to the size of the transition detection frame and the outline position of the infant in the first scene image to obtain the second detection frame.
Specifically, after the transition detection frame is obtained, the transition detection frame is moved according to the outline position of the infant in the first scene image, so that the human area in the transition detection frame is large enough, and the moved transition detection frame is marked as a second detection frame; by the method, effective data in the second detection frame can be increased, so that the data utilization rate is improved.
S33: determining the sleep state of the infant according to second position information of the second detection frame in a first scene graph of a scene where the infant is located in the sleep state of the infant;
wherein the detection sensitivity of the second detection frame is less than the detection sensitivity of the first detection frame.
Specifically, after the first detection frame is expanded according to the expansion ratio, a transition detection frame which is equal to the detection area of the second detection frame is obtained, then the contour of the target infant in the transition detection frame is detected, if the contour of a partial region is incomplete and the partial region has no contour, the position of the transition detection frame is moved to obtain the second detection frame, and the data abnormality of the expanded second detection frame part detection caused by the abnormal conditions such as the inclination of the sleeping posture of the infant can be avoided, if the part has no infant image, and the part has no infant image is incomplete.
It should be noted that: the detection areas of the first detection frame and the second detection frame are smaller than the area represented by a scene image of a scene where the infant is shot by the nursing machine, meanwhile, the actual detection areas of the first detection frame and the second detection frame are corresponding to the real-time state of the infant, such as the face detection of the infant, and when the infant faces the nursing machine with the front face, the area of the detection frame is larger than that when the infant faces the nursing machine with the side face.
In one embodiment, referring to fig. 12, the S33 includes:
s331: acquiring initial position information and real-time position information of a second detection frame in the first scene image;
specifically, the detection frames detect specific features, and if the positions of the features change, the positions of the detection frames also change.
S332: obtaining the offset distance of the real-time position of the second detection frame compared with the initial position according to the real-time position information and the initial position information;
s332: comparing the offset distance with a preset displacement threshold value in which the second detection frame is movable, and if the displacement distance is smaller than or equal to the displacement threshold value, performing facial shielding detection on an image area corresponding to the first detection frame; and if the displacement distance is greater than the displacement threshold value, detecting the coincidence degree of adjacent images in the head image area of the infant corresponding to the first detection frame in each first scene image.
Specifically, if the fact that the displacement distance of a second detection frame in two adjacent frames of second scene images is greater than a displacement threshold value is detected, coincidence degree detection is carried out on the infant head image corresponding to the first detection frame, and if the coincidence degree detection result meets the infant sleep-wake state detection requirement, sleep detection is quitted; if the displacement distance of the second detection frame in the two adjacent frames of second scene images is detected to be smaller than or equal to the displacement threshold, facial shielding detection is carried out on the image area corresponding to the first detection frame, and the dangerous situations that the infant is suffocated in a sleeping state and the like are avoided.
The facial occlusion detection includes, but is not limited to, the detection of mouth and nose by using facial key points.
In one embodiment, the S331 includes:
s3311: acquiring a second transition detection frame corresponding to the current position information of the head area of the infant in a scene image detection area of a scene where the infant is located and historical position information of the head area of a target infant in the second detection frame at the previous moment;
s3312: determining whether the head area in the current detection area is the head area of the target infant or not according to the image area corresponding to the current position information and the image area corresponding to the historical position information;
in one embodiment, the S3312 comprises:
s33121: acquiring an area change threshold corresponding to the change of a target infant head region in a scene image of a scene where the infant is located;
specifically, in the detection of the scene where the infant is located, other targets often appear in the detection area suddenly, and whether the target is the infant or not is determined according to the proportion of the target in the scene image by using the principle of the near distance and the far distance.
S33122: determining the area difference between the current infant head area and the target infant head area at the previous moment according to the image area corresponding to the current position information and the image area corresponding to the corresponding historical position information;
s33123: and if the area difference is smaller than or equal to the area change threshold, the head area in the current detection area is the head area of the target infant.
Specifically, the area of the head image of the infant in each frame of scene image occupying the scene image is obtained, the area difference of the head images of the infant in two adjacent frames of images is calculated, and if the area difference is extremely large, other targets are considered to enter the detection area. Specifically, no matter the first detection frame or the second detection frame is generally a rectangular frame, an image of a scene where an infant is located, which is shot by a camera, has a boundary, and the abnormality detection method includes, but is not limited to: if 4 vertexes of the first detection frame or the second detection frame in the shot scene image of the infant are all at the edge of the scene image, or 3 vertexes are at the edge of the scene image and the area of the vertexes exceeds one third of the area of the scene image, or 2 vertexes are at the edge of the scene image and the area of the vertexes exceeds one half of the area of the scene image, or no vertex is at the edge of the scene image and the area of the vertexes exceeds two thirds of the area of the scene image, the character image in the scene image is not considered to be the infant image.
And S3313, if the head area is the head area of the target infant, expanding the current position information according to the expansion ratio to generate the current real-time position information of the second detection frame.
Specifically, in a sleeping state of the infant, the head region of the infant changes in the region where the detection picture of the camera is located along with actions such as turning over of the infant, or when other people appear between the camera and the infant, the position of the head region detected by the camera in the image changes, so that the head region in each frame of picture is analyzed, when the area change of the head region in two adjacent frames of images is within an area change threshold value, the head region is considered to be the activity of the target infant, and then the first detection frame is expanded to obtain a second detection frame; otherwise, the head portrait is judged to enter the monitoring area, alarming or further detection is carried out, and if the target infant is detected, alarming is carried out.
In an embodiment, the target infant is snapshotted in the snapshotting mode of embodiment 1 according to different activity states of the target infant to obtain a highlight image, and the specific snapshotting mode refers to embodiment 1 and is not described herein again.
By adopting the method for detecting the sleep activity state of the infant, whether the infant is in the sleep state or not is determined according to the first position information of the target infant in each frame of image, if the infant is in the sleep state, the sleep detection mode is started, the second detection frame obtained by expanding the first detection frame is utilized for real-time detection, if the infant is detected to be awake, the sleep monitoring mode is exited, the first detection frame is adopted for detection, different detection modes are adopted for different activity states, the data processing amount of similar pictures can be effectively reduced, excessive repeated images are avoided being generated, and the experience effect of a user is improved.
Example 4
Embodiment 4 of the present invention further provides an infant highlight image capturing device based on the methods of embodiments 1 to 3, and please refer to fig. 13, including:
an image capturing module: the multi-frame scene image capturing system is used for acquiring multi-frame scene images of scenes where infants are continuously captured in one infant image capturing event;
an image processing module: the image processing device is used for calculating the resolution of the infant image in each frame of scene image and the coincidence degree of the infant image between the adjacent frame of scene images, and judging each resolution and each coincidence degree;
the image capturing module: and outputting the target scene image of the baby image snapshot event if the resolution and the contact ratio meet the requirements.
By adopting the infant wonderful image snapshot device, during each snapshot, a plurality of scene images are continuously snapshot, and the resolution of the infant images in the scene images and the coincidence degree of the adjacent scene images are calculated; outputting the target image captured at the time as a highlight image on the premise of meeting the preset resolution and coincidence; the problems of infant image definition, infant image deformation and the like of the snapshot image can be prevented, and the snapshot quality is improved.
It should be noted that the apparatus further includes the remaining technical solutions described in embodiments 1 to 3, which are not described herein again.
Example 5
For a specific application of the sleep state detection based on embodiment 4, please refer to fig. 14, fig. 14 is a device for monitoring infant sleep, the device includes:
an image capturing module: the method comprises the steps of obtaining a plurality of continuously shot first scene images including scenes where target infants are located;
a position detection module: the first scene images are used for detecting infant head information of a target infant in each first scene image and determining first position information of a first detection frame for calibrating an infant head area;
an image processing module: the first detection frame is used for detecting the first scene image of the target infant, and the first scene image is used for detecting the first position information of the first detection frame;
a sleep monitoring module: the first detection frame and the second detection frame are used for calibrating a human-shaped area including the head of the infant to simultaneously detect the sleeping condition of the target infant in real time if the infant is in a sleeping state;
a non-sleep monitoring module: the first detection frame is used for detecting the infants in real time if the infants are in a non-sleep state;
wherein the detection sensitivity of the first detection frame is greater than the detection sensitivity of the second detection frame.
By adopting the infant sleep detection device of the embodiment, whether an infant is in a sleep state is determined according to the first position information of a target infant in each frame of image, if the infant is in the sleep state, a sleep detection mode is started, the first detection frame and the second detection frame are adopted for real-time detection, if the infant is in a wake-up state, the first detection frame is adopted for detection, different detection modes are adopted for different activity states, the data processing amount of similar pictures can be effectively reduced, excessive repeated images are avoided being generated, and the experience effect of a user is improved.
It should be noted that the apparatus further includes the remaining technical solutions described in embodiment 4, and details are not described herein.
Example 6
The specific application of the sleep state detection of the infant based on the embodiment 4 is shown in fig. 15, and fig. 15 is a device for monitoring the activity state of the infant, the device comprising:
a position parameter acquisition module: the method comprises the steps of acquiring first position information of a first detection frame corresponding to a head area for detecting an infant in a first scene image of a scene where the infant is located;
a data analysis module: the infant sleep control system is used for determining whether the infant is in a sleep state or not according to the change condition of the first position information;
a data processing module: the first detection frame is magnified if the infant is in a sleeping state, so that a second detection frame for marking the human shape of the infant is obtained, wherein the human shape of the infant at least comprises the head of the infant;
a sleep monitoring module: the second detection frame is used for determining the sleeping state of the infant according to second position information of the second detection frame in a first scene graph of a scene where the infant is located in the sleeping state of the infant;
wherein the detection sensitivity of the second detection frame is less than the detection sensitivity of the first detection frame.
By adopting the device for detecting the sleep activity state of the infant, whether the infant is in the sleep state or not is determined according to the first position information of the target infant in each frame of image, if the infant is in the sleep state, the sleep detection mode is started, the second detection frame obtained by expanding the first detection frame is utilized for real-time detection, if the infant is detected to be awake, the infant quits the sleep monitoring mode, the first detection frame is adopted for detection, different detection modes are adopted for different activity states, the data processing amount of similar pictures can be effectively reduced, excessive repeated images are avoided being generated, and the experience effect of a user is improved.
It should be noted that the apparatus further includes the remaining technical solutions described in embodiment 4 and/or embodiment 5, and details are not described herein.
Example 7
The present invention provides an electronic device and storage medium, as shown in FIG. 14, comprising at least one processor, at least one memory, and computer program instructions stored in the memory.
Specifically, the processor may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present invention, and the electronic device includes at least one of the following: the wearing equipment that camera, mobile device that has the camera, have the camera.
The memory may include mass storage for data or instructions. By way of example, and not limitation, memory may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. The memory may include removable or non-removable (or fixed) media, where appropriate. The memory may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory is non-volatile solid-state memory. In a particular embodiment, the memory includes Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory or a combination of two or more of these.
The processor reads and executes the computer program instructions stored in the memory to realize any one of the infant sleep monitoring method, the infant sleep activity state detection method and the infant highlight image capture method in the first embodiment.
In one example, the electronic device may also include a communication interface and a bus. The processor, the memory and the communication interface are connected through a bus and complete mutual communication.
The communication interface is mainly used for realizing communication among modules, devices, units and/or equipment in the embodiment of the invention.
A bus comprises hardware, software, or both that couple components of an electronic device to one another. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. A bus may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
In summary, embodiments of the present invention provide an infant sleep monitoring method, an infant sleep activity state detection method, an infant highlight image capturing method, an infant sleep activity state detection device, an infant highlight image capturing device, and a storage medium.
It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for capturing a highlight image of an infant, the method comprising:
s10: acquiring multi-frame scene images of scenes where infants are continuously captured in one infant image capturing event;
s11: calculating the resolution of the infant image in each frame of scene image and the coincidence degree of the infant image between every two adjacent frame of scene images, and judging the resolution and the coincidence degree;
s12: and if the resolution and the contact ratio meet the requirements, outputting a target scene image of the baby image snapshot event.
2. The method for capturing a highlight image of an infant according to claim 1, wherein said S1 comprises:
s101: before a baby image snapshot event, carrying out primary pre-shooting on a scene where a baby is located to obtain a pre-shot scene image;
s102: calculating the area proportion occupied by the infant image in the pre-shot scene image, and judging whether the area proportion occupied by the infant image meets the snapshot requirement or not;
s103: and if the scene meets the requirements, continuously capturing the scene where the infant is positioned to obtain continuous multiframe scene images.
3. The method for capturing a highlight image of an infant as claimed in claim 2, wherein said S11 comprises:
s111: acquiring coordinate information of a detection frame for calibrating the face position of the infant in each scene image, and a preset size and a preset resolution of a shot scene image;
s112: determining the contact ratio of each adjacent scene image according to the coordinate information of each detection frame;
s113: determining the corresponding image proportion of the face of the infant in each scene image according to the preset size of the scene image and the coordinate information of each detection frame;
s114: and obtaining each resolution of the facial images of the infants according to the preset resolution and each image proportion.
4. The method for capturing a highlight image of an infant according to claim 3, wherein said S12 comprises:
s121: carrying out one-time snapshot on a scene area where a monitored infant is located to obtain a first snapshot image;
s122: acquiring the file size of the first snapshot image and infant facial information, and respectively judging whether the infant facial information and the file size of the first snapshot image meet requirements or not;
s123: if the file size of the first snapshot image and/or the facial information of the infant do not meet the requirements, the infant is rephotographed;
s124: repeating S121 to S123 until the file size of the first snapshot image and the infant face information meet requirements, and outputting the first snapshot image as the target image.
5. The method for capturing a highlight image of an infant as claimed in claim 4, wherein said S123 comprises:
s1231: acquiring a file size threshold of a preset snapshot image;
s1232: comparing the file size of the first snapshot image with a file size threshold of the preset snapshot image;
s1233: if the file size of the first snapshot image is larger than or equal to the file size threshold of the preset snapshot image, detecting the facial information of the infant in the first snapshot image, and if not, carrying out snapshot again;
s1234: and if the facial information of the infant in the first snapshot image does not meet the requirement, the infant is snapshot again.
6. The method for capturing an infant highlight according to any one of claims 1-5, characterized by further comprising, before said S10:
s010: acquiring the activity state of the infant;
s011: determining the snapshot interval time according to the activity state of the infant;
s012: controlling a camera to perform automatic snapshot according to the snapshot interval time;
wherein the infant activity states include a sleeping state and a non-sleeping state.
7. The method for capturing an infant highlight according to claim 6, characterized by further comprising, after said S12:
s13: acquiring the number of images of the current target image and a preset image number threshold;
s14: comparing the number of images with the preset image number threshold, and if the number of images is smaller than the preset image number threshold, determining the time of the next infant image capturing event at first interval time;
s15: comparing the number of images with the preset image number threshold, and if the number of images is larger than or equal to the preset image number threshold, determining the time of the next infant image capturing event at a second interval;
wherein the first interval time is less than the second interval time.
8. An infant highlight image capture device, comprising:
an image capturing module: the multi-frame scene image capturing system is used for acquiring multi-frame scene images of scenes where infants are continuously captured in one infant image capturing event;
an image processing module: the image processing device is used for calculating the resolution of the infant image in each frame of scene image and the coincidence degree of the infant image between the adjacent frame of scene images, and judging each resolution and each coincidence degree;
the image capturing module: and outputting the target scene image of the baby image snapshot event if the resolution and the contact ratio meet the requirements.
9. An electronic device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of any of claims 1-7.
10. A medium having stored thereon computer program instructions, which, when executed by a processor, implement the method of any one of claims 1-7.
CN202110853521.1A 2021-07-28 2021-07-28 Method, device, equipment and medium for capturing wonderful images of infants Pending CN113505748A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110853521.1A CN113505748A (en) 2021-07-28 2021-07-28 Method, device, equipment and medium for capturing wonderful images of infants

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110853521.1A CN113505748A (en) 2021-07-28 2021-07-28 Method, device, equipment and medium for capturing wonderful images of infants

Publications (1)

Publication Number Publication Date
CN113505748A true CN113505748A (en) 2021-10-15

Family

ID=78014784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110853521.1A Pending CN113505748A (en) 2021-07-28 2021-07-28 Method, device, equipment and medium for capturing wonderful images of infants

Country Status (1)

Country Link
CN (1) CN113505748A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130107073A1 (en) * 2011-05-02 2013-05-02 Nokia Corporation Methods and apparatuses for capturing an image
CN108718386A (en) * 2018-08-06 2018-10-30 光锐恒宇(北京)科技有限公司 The implementation method and device of automatic shooting
CN108737729A (en) * 2018-05-04 2018-11-02 Oppo广东移动通信有限公司 Automatic photographing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130107073A1 (en) * 2011-05-02 2013-05-02 Nokia Corporation Methods and apparatuses for capturing an image
CN108737729A (en) * 2018-05-04 2018-11-02 Oppo广东移动通信有限公司 Automatic photographing method and device
CN108718386A (en) * 2018-08-06 2018-10-30 光锐恒宇(北京)科技有限公司 The implementation method and device of automatic shooting

Similar Documents

Publication Publication Date Title
CN113298062B (en) Infant sleep activity state detection method, device, equipment and medium
CN113516095A (en) Infant sleep monitoring method, device, equipment and medium
CN109299703B (en) Method and device for carrying out statistics on mouse conditions and image acquisition equipment
US8059870B2 (en) Time-of-flight sensor-assisted iris capture system and method
JP4482037B2 (en) Digital imaging exposure
JP2010009134A (en) Image processing system, image processing method, and program
US11594060B2 (en) Animal information management system and animal information management method
JP3063504B2 (en) Image data feature detection device
CN102006485B (en) Image processing apparatus and image processing method
CN108093170B (en) User photographing method, device and equipment
CN115953719A (en) Multi-target recognition computer image processing system
CN113992886B (en) Motion detection method for motion sensor
JP2009123081A (en) Face detection method and photographing apparatus
CN117241134B (en) Shooting mode switching method for camera
US20120314044A1 (en) Imaging device
CN113505748A (en) Method, device, equipment and medium for capturing wonderful images of infants
TWM560035U (en) Image tracking device
CN108737733B (en) Information prompting method and device, electronic equipment and computer readable storage medium
JP2007251532A (en) Imaging device and face area extraction method
CN114494321A (en) Infant sleep breath real-time monitoring method, device, equipment and storage medium
CN110930340B (en) Image processing method and device
JP2006074498A (en) Image processor and imaging apparatus
CN108335278B (en) Image processing method and device, storage medium and electronic equipment
JP2008160280A (en) Imaging apparatus and automatic imaging method
CN113822927A (en) Face detection method, device, medium and equipment suitable for weak-quality images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination