CN114253611A - Control method and control system - Google Patents

Control method and control system Download PDF

Info

Publication number
CN114253611A
CN114253611A CN202111410582.7A CN202111410582A CN114253611A CN 114253611 A CN114253611 A CN 114253611A CN 202111410582 A CN202111410582 A CN 202111410582A CN 114253611 A CN114253611 A CN 114253611A
Authority
CN
China
Prior art keywords
frame
value
human
face
new
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
CN202111410582.7A
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.)
Shanghai Qigan Electronic Information Technology Co ltd
Original Assignee
Shanghai Qigan Electronic Information 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 Shanghai Qigan Electronic Information Technology Co ltd filed Critical Shanghai Qigan Electronic Information Technology Co ltd
Priority to CN202111410582.7A priority Critical patent/CN114253611A/en
Publication of CN114253611A publication Critical patent/CN114253611A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/32User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a control method for realizing awakening and sleeping of electronic equipment, which comprises the steps of acquiring video stream data, carrying out target detection through the video stream data to obtain a target motion trend, wherein the target detection comprises at least one of face detection and human shape detection, controlling the electronic equipment to be awakened or dormant according to the target motion trend, judging whether a target is close to the electronic equipment or far away from the electronic equipment in time through the video stream data, further controlling the electronic equipment to be awakened or dormant in time, improving the starting speed of the electronic equipment, controlling the electronic equipment to be dormant in time and reducing the power consumption of the electronic equipment. The invention also provides a control system for implementing the control method.

Description

Control method and control system
Technical Field
The present invention relates to the field of control systems, and in particular, to a control method and a control system.
Background
The conventional electronic equipment needs to be manually awakened before and after an operator arrives, so that the operator cannot use the electronic equipment immediately before the operator arrives, the electronic equipment is inconvenient to use by the operator, and the electronic equipment can enter a dormant state only after manual control or a long time when the operator leaves, so that the power consumption of the electronic equipment is increased.
Therefore, there is a need to provide a novel control method and control system to solve the above problems in the prior art.
Disclosure of Invention
The invention aims to provide a control method and a control system, which are convenient for automatically controlling the awakening or sleeping of electronic equipment, improving the starting speed of the electronic equipment and reducing the power consumption of the electronic equipment.
In order to achieve the above object, the control method of the present invention is used for implementing wake-up and sleep of an electronic device, and includes:
acquiring video stream data, and then carrying out target detection through the video stream data to obtain a target motion trend, wherein the target detection comprises at least one of face detection and human shape detection;
and controlling the electronic equipment to wake up or sleep according to the target motion trend.
The control method has the beneficial effects that: the method comprises the steps of obtaining video stream data, then carrying out target detection through the video stream data to obtain a target motion trend, wherein the target detection comprises at least one of face detection and human shape detection, controlling the electronic equipment to wake up or sleep according to the target motion trend, judging whether a target is close to the electronic equipment or is far away from the electronic equipment in time through the video stream data, further controlling the electronic equipment to wake up or sleep in time, improving the starting speed of the electronic equipment, controlling the electronic equipment to sleep in time, and reducing the power consumption of the electronic equipment.
Optionally, the obtaining video stream data and then performing target detection on the video stream data to obtain a target motion trend includes:
acquiring each frame of image in the video stream data, and then sequentially carrying out face detection on each frame of image according to the sequence of the image in the video stream data to acquire a face frame;
and obtaining a target motion trend according to the change trend of the face frame. The beneficial effects are that: and each frame of image is subjected to face detection, so that the detection accuracy is improved.
Optionally, the acquiring an image of each frame in the video stream data, and then sequentially performing face detection on the image of each frame according to a sorting order of the image in the video stream data to acquire a face frame includes:
sequentially acquiring each frame of image in the video stream data, sequentially carrying out face detection on each frame of image to determine whether a face exists in each frame of image, acquiring a face frame from the image when the face exists in the image, adding 1 to the frame count to obtain a new frame count, and replacing the frame count with the new frame count to obtain at least one face frame.
Optionally, the obtaining a target motion trend according to the change trend of the face frame includes:
sequentially comparing the sizes of the adjacent face frames according to the acquisition sequence of the face frames;
multiplying a first calculation value by a first amplification threshold value or a first reduction threshold value according to a comparison result of the sizes of the adjacent face frames to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value;
and comparing the new first calculated value with a first judgment threshold value to obtain the variation trend of the face frame, and further obtain the target motion trend. The beneficial effects are that: the accuracy of detection is improved, and final result errors caused by detection errors of individual face frames are avoided.
Optionally, the comparing the new first calculation value with a first judgment threshold to obtain a variation trend of the face frame, and further obtain a target motion trend, includes:
comparing the new first calculated value with a first judgment threshold value to obtain the variation trend of the face frame;
if the new first calculated value is larger than the first judgment threshold value, judging that the change trend of the face frame is larger and larger, and further obtaining that the target motion trend is close to the electronic equipment;
and if the new first calculation value is smaller than the first judgment threshold value, judging that the change trend of the face frame is smaller and smaller, and further obtaining that the target motion trend is far away from the electronic equipment.
Optionally, the obtaining a target motion trend according to the change trend of the face frame includes:
judging whether the new frame count is smaller than a frame count threshold value;
if the new frame count is smaller than the frame count threshold value, sequentially comparing the sizes of the adjacent face frames according to the acquisition sequence of the face frames;
and multiplying the first calculation value by a first amplification threshold value or a first reduction threshold value according to the comparison result of the sizes of the face frames in the adjacent images to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value.
Optionally, the obtaining a target motion trend according to the change trend of the face frame further includes:
if the new frame count is judged to be greater than or equal to the frame count threshold, calculating the average value frames of all the face frames acquired before the new frame count is equal to the frame count threshold;
comparing the size of the average value frame with the size of the newly obtained face frame, multiplying a second calculation value by a second amplification threshold value or a second reduction threshold value according to the comparison result of the size of the average value frame with the size of the newly obtained face frame to obtain a new second calculation value, and replacing the second calculation value by the new second calculation value;
carrying out weighted average calculation on the new first calculation value and the new second calculation value to obtain a comparison result value;
and comparing the comparison result value with a second judgment threshold value to obtain the variation trend of the face frame, and further obtain the target motion trend. The beneficial effects are that: the accuracy of detection is convenient to improve.
Optionally, the comparing the comparison result value with a second judgment threshold to obtain a variation trend of the face frame, so as to obtain a target motion trend, includes:
comparing the comparison result value with a second judgment threshold value to obtain the variation trend of the face frame;
if the comparison result value is larger than the second judgment threshold value, judging that the variation trend of the face frame is larger and larger, and further obtaining that the target motion trend is close to the electronic equipment;
and if the comparison result value is smaller than the second judgment threshold value, judging that the variation trend of the face frame is smaller and smaller, and further obtaining that the target motion trend is far away from the electronic equipment.
Optionally, the obtaining video stream data and then performing target detection on the video stream data to obtain a target motion trend includes:
acquiring each frame of image in the video stream data, and then sequentially carrying out human shape detection on each frame of image according to the sequence of the image in the video stream data to acquire a human shape frame;
and obtaining the target motion trend according to the change trend of the human-shaped frame. The beneficial effects are that: human-shaped detection is carried out on each frame of image, and the detection accuracy is improved.
Optionally, the acquiring an image of each frame in the video stream data, and then sequentially performing human shape detection on the image of each frame according to a sorting order of the image in the video stream data to acquire a human shape frame includes:
sequentially acquiring each frame of image in the video stream data, sequentially carrying out human shape detection on each frame of image to determine whether human shape exists in each frame of image, when human shape exists in the image, acquiring a human shape frame from the image, adding 1 to a frame count to obtain a new frame count, and replacing the frame count with the new frame count to obtain at least one human shape frame.
Optionally, the obtaining a target movement trend according to the variation trend of the human-shaped frame includes:
sequentially comparing the sizes of the adjacent human-shaped frames according to the acquisition sequence of the human-shaped frames;
multiplying a first calculation value by a first amplification threshold value or a first reduction threshold value according to a comparison result of the sizes of the adjacent human-shaped frames to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value;
and comparing the new first calculated value with a first judgment threshold value to obtain the variation trend of the human-shaped frame, and further obtaining the target motion trend. The beneficial effects are that: the accuracy of detection is improved, and the final detection result error caused by the detection error of individual human-shaped frames is avoided.
Optionally, the comparing the new first calculation value with a first judgment threshold to obtain a variation trend of the human-shaped frame, and further obtain a target movement trend, includes:
comparing the new first calculated value with a first judgment threshold value to obtain the variation trend of the human-shaped frame;
if the new first calculation value is larger than the first judgment threshold value, judging that the change trend of the human-shaped frame is larger and larger, and further obtaining that the target motion trend is close to the electronic equipment;
and if the new first calculation value is smaller than the first judgment threshold value, judging that the change trend of the human-shaped frame is smaller and smaller, and further obtaining that the target motion trend is far away from the electronic equipment.
Optionally, the obtaining a target movement trend according to the variation trend of the human-shaped frame includes:
judging whether the new frame count is smaller than a frame count threshold value;
if the new frame count is smaller than the frame count threshold value, sequentially comparing the sizes of the adjacent human-shaped frames according to the acquisition sequence of the human-shaped frames;
and multiplying the first calculation value by a first magnification threshold value or a first reduction threshold value according to the comparison result of the sizes of the human-shaped frames in the adjacent images to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value.
Optionally, the obtaining a target movement trend according to the variation trend of the human-shaped frame further includes:
if the new frame count is judged to be greater than or equal to the frame count threshold, solving the average value frame of all the human-shaped frames acquired before the new frame count is equal to the frame count threshold;
comparing the average value frame with the size of the human-shaped frame obtained latest, multiplying a second calculation value by a second amplification threshold value or a second reduction threshold value according to the comparison result of the average value frame with the size of the human-shaped frame obtained latest to obtain a new second calculation value, and replacing the second calculation value by the new second calculation value;
carrying out weighted average calculation on the new first calculation value and the new second calculation value to obtain a comparison result value;
and comparing the comparison result value with a second judgment threshold value to obtain the variation trend of the human-shaped frame, and further obtain the target motion trend. The beneficial effects are that: the accuracy of detection is convenient to improve.
Optionally, the comparing the comparison result value with a second judgment threshold to obtain a variation trend of the human-shaped frame, so as to obtain a target movement trend, includes:
comparing the comparison result value with a second judgment threshold value to obtain the variation trend of the human-shaped frame;
if the comparison result value is larger than the second judgment threshold value, judging that the change trend of the human-shaped frame is larger and larger, and further obtaining that the target motion trend is close to the electronic equipment;
and if the comparison result value is smaller than the second judgment threshold value, judging that the change trend of the human-shaped frame is smaller and smaller, and further obtaining that the target motion trend is far away from the electronic equipment.
Optionally, the obtaining video stream data and then performing target detection on the video stream data to obtain a target motion trend includes:
acquiring each frame of image in the video stream data, and then sequentially carrying out face detection and human shape detection on each frame of image according to the sequence of the image in the video stream data so as to acquire a face frame and a human shape frame;
and obtaining a target motion trend according to the change trend of the face frame and the change trend of the human-shaped frame.
Optionally, the acquiring an image of each frame in the video stream data, and then sequentially performing face detection and human shape detection on the image of each frame according to a sequence of the image in the video stream data to acquire a face frame and a human shape frame includes:
sequentially acquiring each frame of image in the video stream data, sequentially detecting people in each frame of image to determine whether a face and a human figure exist in each frame of image at the same time, when the face and the human figure exist in the image at the same time, acquiring a face frame and a human figure frame from the image, adding 1 to a frame count to obtain a new frame count, and replacing the frame count with the new frame count to obtain at least one face frame and at least one human figure frame.
Optionally, the obtaining a target motion trend according to the change trend of the face frame and the change trend of the human-shaped frame includes:
sequentially comparing the sizes of the adjacent human face frames according to the acquisition sequence of the human face frames, and sequentially comparing the sizes of the adjacent human face frames according to the acquisition sequence of the human face frames;
multiplying a first calculation value by a first amplification threshold value or a first reduction threshold value according to a comparison result of the sizes of the adjacent face frames to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value;
multiplying a second calculation value by a second amplification threshold value or a second reduction threshold value according to a comparison result of the sizes of the adjacent human-shaped frames to obtain a new second calculation value, and then replacing the second calculation value with the new second calculation value;
carrying out weighted average calculation on the new first calculation value and the new second calculation value to obtain a first comparison result value;
and comparing the first comparison result value with a first judgment threshold value to obtain the variation trend of the human face frame and the variation trend of the human figure frame so as to obtain the target motion trend. The beneficial effects are that: the human face frame and the human shape frame are combined, so that the detection accuracy is improved, and the final detection result error caused by the human face frame or human shape detection error is avoided.
Optionally, the comparing the first comparison result value with a first judgment threshold to obtain a variation trend of the face frame and a variation trend of the human-shaped frame, so as to obtain a target motion trend, includes:
comparing the first comparison result value with a first judgment threshold value to obtain the variation trend of the face frame;
if the first comparison result value is larger than the first judgment threshold value, judging that the variation trend of the face frame is larger and larger, and the variation trend of the human-shaped frame is larger and larger, so that the target motion trend can be obtained to be close to the electronic equipment;
if the first comparison result value is smaller than the first judgment threshold value, the change trend of the face frame is judged to be smaller and smaller, the change trend of the human-shaped frame is judged to be smaller and smaller, and then the target motion trend can be obtained to be far away from the electronic equipment.
Optionally, the obtaining a target motion trend according to the change trend of the face frame and the change trend of the human-shaped frame includes:
judging whether the new frame count is smaller than a frame count threshold value;
if the new frame count is smaller than the frame count threshold value, sequentially comparing the sizes of the adjacent human face frames according to the acquisition sequence of the human face frames, and sequentially comparing the sizes of the adjacent human face frames according to the acquisition sequence of the human face frames;
multiplying a first calculation value by a first amplification threshold value or a first reduction threshold value according to a comparison result of the sizes of the adjacent face frames to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value;
multiplying a second calculation value by a second amplification threshold value or a second reduction threshold value according to a comparison result of the sizes of the adjacent human-shaped frames to obtain a new second calculation value, and then replacing the second calculation value with the new second calculation value;
and carrying out weighted average calculation on the new first calculation value and the new second calculation value to obtain a first comparison result value.
Optionally, the obtaining a target movement trend according to the variation trend of the face frame and the variation trend of the human-shaped frame further includes:
if the new frame count is judged to be greater than or equal to the frame count threshold, solving the average value frames of all the face frames and the average value frames of all the human-shaped frames which are obtained before the new frame count is equal to the frame count threshold;
comparing the sizes of the average value frames of all the face frames with the size of the newly obtained face frame, multiplying a third calculated value by a third amplification threshold or a third reduction threshold according to the comparison result of the sizes of the average value frames of all the face frames and the newly obtained face frame to obtain a new third calculated value, and then replacing the third calculated value by the new third calculated value;
comparing the sizes of the average value frames of all the human-shaped frames with the newly obtained human-shaped frame, multiplying a fourth calculation value by a fourth amplification threshold value or a fourth reduction threshold value according to the comparison result of the sizes of the average value frames of all the human-shaped frames and the newly obtained human-shaped frame to obtain a new fourth calculation value, and then replacing the fourth calculation value by the new fourth calculation value;
performing weighted average calculation on the new third calculated value and the new fourth calculated value to obtain a second comparison result value;
carrying out weighted average on the first comparison result and the second comparison result value to obtain a third comparison result value;
and comparing the third comparison result value with a second judgment threshold value to obtain the variation trend of the human face frame and the variation trend of the human figure frame so as to obtain the target motion trend. The beneficial effects are that: the accuracy of detection is further improved, and final detection result errors caused by individual face frames or human figure detection errors are avoided.
Optionally, the comparing the third comparison result value with a second judgment threshold to obtain a variation trend of the face frame and a variation trend of the human-shaped frame, so as to obtain a target motion trend, includes:
comparing the third comparison result value with a second judgment threshold value to obtain the variation trend of the face frame;
if the third comparison result value is greater than the second judgment threshold value, judging that the variation trend of the face frame is larger and larger, and the variation trend of the human-shaped frame is larger and larger, so that the target motion trend can be obtained to be close to the electronic equipment;
if the third comparison result value is smaller than the second judgment threshold value, the change trend of the face frame is judged to be smaller and smaller, and the change trend of the human-shaped frame is judged to be smaller and smaller, so that the target motion trend is far away from the electronic equipment.
The invention also provides a control system, which comprises a video stream data acquisition unit, a motion trend calculation unit and a wake-up and sleep control unit, wherein the video stream data acquisition unit is used for acquiring video stream data, the motion trend calculation unit is used for carrying out target detection through the video stream data to obtain a target motion trend, the target detection comprises at least one of face detection and human shape detection, and the wake-up and sleep control unit is used for controlling the electronic equipment to wake up or sleep according to the target motion trend.
The control system has the advantages that: the video stream data acquisition unit is used for acquiring video stream data, the motion trend calculation unit is used for carrying out target detection through the video stream data to obtain a target motion trend, the target detection comprises at least one of face detection and human shape detection, the awakening and dormancy control unit is used for controlling the electronic equipment to be awakened or dormant according to the target motion trend, the fact that a target is close to the electronic equipment or far away from the electronic equipment can be judged in time through the video stream data, the electronic equipment is further controlled to be awakened or dormant, the starting speed of the electronic equipment is increased, the electronic equipment is controlled to be dormant in time, and the power consumption of the electronic equipment is reduced.
Drawings
FIG. 1 is a block diagram of a control system according to the present invention;
FIG. 2 is a flow chart of a control method of the present invention;
FIG. 3 is a diagram illustrating a first frame of an image according to some embodiments of the invention;
FIG. 4 is a diagram of a second frame of image in some embodiments of the invention;
FIG. 5 is a diagram of a third frame of image in some embodiments of the invention;
FIG. 6 is a diagram of a fourth frame of image in some embodiments of the invention;
FIG. 7 is a diagram of a fifth frame of image in some embodiments of the invention;
FIG. 8 is a diagram of a sixth frame of image in accordance with some embodiments of the invention;
FIG. 9 is a diagram of a seventh frame of image in some embodiments of the invention;
fig. 10 is a schematic diagram of two face frames appearing in one frame image according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages 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 accompanying drawings of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. As used herein, the word "comprising" and similar words are intended to mean that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items.
In view of the problems in the prior art, an embodiment of the present invention provides a control system, and referring to fig. 1, the control system 100 includes a video stream data obtaining unit 101, a motion trend calculating unit 102, and a wake-up and sleep control unit 103, where the video stream data obtaining unit 101 is configured to obtain video stream data, the motion trend calculating unit 102 is configured to perform target detection on the video stream data to obtain a target motion trend, where the target detection includes at least one of face detection and human shape detection, and the wake-up and sleep control unit 103 is configured to control the electronic device to wake up or sleep according to the target motion trend.
FIG. 2 is a flow chart of the control method of the present invention. Referring to fig. 2, the control method is used for realizing the awakening and sleeping of the electronic device and the control method is realized by the control system, and the control method comprises the following steps:
s1: acquiring video stream data, and then carrying out target detection through the video stream data to obtain a target motion trend, wherein the target detection comprises at least one of face detection and human shape detection;
s2: controlling the electronic equipment to wake up or sleep according to the target motion trend
In some embodiments, the face detection is performed by using a trained neural network model, and the training method of the neural network model includes: collecting a custom data set, wherein the custom data set comprises a face picture; carrying out normalization preprocessing on the face picture in the RGB format; obtaining a custom training network model, wherein the custom training network model is compressed based on YOLOV 4; inputting the human face picture subjected to normalization preprocessing into the custom training network model for training; calculating the training loss of the face image through a loss function, carrying out back propagation on the training loss to update a training network model, and finishing training when the performance of the training network model on a verification set meets a preset threshold value; and performing network pruning on the trained network model, and training all data in the pruned network model at least ten times to obtain the trained neural network model for face detection. The training method of the neural network model for human face detection is the same as the training method of the neural network model for human face detection, and human face detection and human shape detection can be performed in other modes, and the modes of human face detection and human shape detection are not particularly limited herein.
In some embodiments, the obtaining video stream data and then performing target detection on the video stream data to obtain a target motion trend includes:
acquiring each frame of image in the video stream data, and then sequentially carrying out face detection on each frame of image according to the sequence of the image in the video stream data to acquire a face frame;
and obtaining a target motion trend according to the change trend of the face frame.
In some embodiments, the acquiring an image of each frame in the video stream data, and then sequentially performing face detection on the image of each frame according to the sequence of the image in the video stream data to acquire a face frame includes:
sequentially acquiring each frame of image in the video stream data, sequentially carrying out face detection on each frame of image to determine whether a face exists in each frame of image, acquiring a face frame from the image when the face exists in the image, adding 1 to the frame count to obtain a new frame count, and replacing the frame count with the new frame count to obtain at least one face frame.
FIG. 3 is a diagram illustrating a first frame of an image according to some embodiments of the invention. Referring to fig. 3, when the frame count is 0, the face detection is performed on the first frame image 300, and it is determined that no face exists in the first frame image 300, a face frame cannot be acquired from the first frame image 300, and the frame count is unchanged and is maintained at 0.
FIG. 4 is a diagram of a second frame of image in some embodiments of the invention. Referring to fig. 4, when the frame count is 0, the face detection is performed on the second frame image 400, and it is determined that no face exists in the second frame image 400, a face frame cannot be acquired from the second frame image 400, and the frame count is unchanged and is maintained at 0.
FIG. 5 is a diagram of a third frame of image in some embodiments of the invention. Referring to fig. 5, when the frame count is 0, the face detection is performed on the third frame image 500, and it is determined that no face exists in the third frame image 500, a face frame cannot be acquired from the third frame image 500, and the frame count is unchanged and is maintained at 0.
FIG. 6 is a diagram of a fourth frame of image in some embodiments of the invention. Referring to fig. 6, when the frame count is 0, the face detection is performed on the fourth frame image 600, and it is determined that no face exists in the fourth frame image 600, a face frame cannot be acquired from the fourth frame image 600, and the frame count is unchanged and is maintained at 0.
FIG. 7 is a diagram of a fifth frame of image in some embodiments of the inventions. Referring to fig. 7, if the frame count is 0, performing face detection on a fifth frame image 700, determining that a face exists in the fifth frame image 700, and acquiring a first face box 701 in the fifth frame image 700, adding 1 to the frame count, that is, adding 1 to 0 is equal to 1, where the new frame count is 1, and replacing the frame count with the new frame count, where the frame count is 1.
FIG. 8 is a diagram of a sixth frame of image in some embodiments of the invention. Referring to fig. 8, if the frame count is 1, performing face detection on a sixth frame image 800, determining that a face exists in the sixth frame image 800, and acquiring a second face frame 801 in the sixth frame image 800, adding 1 to the frame count, that is, adding 1 to 2, where the new frame count is 2, and replacing the frame count with the new frame count, where the frame count is 2.
FIG. 9 is a diagram of a seventh frame of image in some embodiments of the invention. Referring to fig. 9, if the frame count is 2, performing face detection on a seventh frame image 902, determining that a face exists in the seventh frame image 900, and acquiring a third face frame 901 in the seventh frame image 900, adding 1 to the frame count, that is, adding 1 to 2 is equal to 3, where the new frame count is 3, and replacing the frame count with the new frame count, where the frame count is 3.
In some embodiments, the obtaining a target motion trend according to the variation trend of the face frame includes: sequentially comparing the sizes of the adjacent face frames according to the acquisition sequence of the face frames; multiplying a first calculation value by a first amplification threshold value or a first reduction threshold value according to a comparison result of the sizes of the adjacent face frames to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value; and comparing the new first calculated value with a first judgment threshold value to obtain the variation trend of the face frame, and further obtain the target motion trend.
In some embodiments, the first zoom-in threshold is greater than 1 and less than 2, the first zoom-out threshold is less than 1 and greater than 0, and the sum of the first zoom-in threshold and the first zoom-out threshold is 2. For example, the first zoom-in threshold is 1.2, and the first zoom-out threshold is 0.8. Specifically, in the adjacent face frames, when the size of the face frame sorted later is larger than that of the face frame sorted earlier, the first calculation value is multiplied by the first amplification threshold; and when the size of the face frame in the image sorted at the back is smaller than that of the face frame in the image sorted at the front, multiplying the first calculation value by the first reduction threshold.
In some embodiments, the comparing the new first calculation value with a first judgment threshold to obtain a variation trend of a face frame, so as to obtain a target motion trend, includes: comparing the new first calculated value with a first judgment threshold value to obtain the variation trend of the face frame; if the new first calculated value is larger than the first judgment threshold value, judging that the change trend of the face frame is larger and larger, and further obtaining that the target motion trend is close to the electronic equipment; and if the new first calculation value is smaller than the first judgment threshold value, judging that the change trend of the face frame is smaller and smaller, and further obtaining that the target motion trend is far away from the electronic equipment.
In some embodiments, the first determination threshold is equal to the first calculated value.
Referring to fig. 7 to 9, a first calculated value is preset to be 20, the first determination threshold is 20, the first enlargement threshold is 1.1, the first reduction threshold is 0.9, the four vertex coordinates of the first face frame 702 are (10, 11), (15, 11), (10, 6) and (15, 6), the four vertex coordinates of the second face frame 801 are (9.75, 11.25), (15.25, 11.25), (9.75, 5.75) and (15.25, 5.75), the four vertex coordinates of the third face frame 901 are (9.5, 11.5), (15.5, 11.5), (9.5, 5.5) and (15.5, 5.5), that is, the length of the first face frame 702 is 5, the height of the first face frame 702 is 5, the length of the second face frame 801 is 5.5, the height of the second face frame 801 is 5.5, the length of the third face frame 6 is 5.5, the height of the third face frame 901. If the size of the second face frame 801 is determined to be larger than that of the first face frame 702, the first calculated value is multiplied by the first zoom-in threshold, that is, 20 × 1.1 is 22, the new first calculated value is 22, and the first calculated value becomes 22; if the size of the third face frame 901 is determined to be larger than the size of the second face frame 801, the first calculation value is multiplied by the first zoom threshold, that is, 22 × 1.1 is equal to 24.2, the new first calculation value is 24.2, the first calculation value becomes 24.2, and if the first calculation value is determined to be larger than the first determination threshold, the trend of the change of the face frame is determined to be larger and larger, so that the target motion trend can be obtained to be close to the electronic device, and then the electronic device is controlled to wake up.
In some embodiments, the control method further comprises: when the change trend of the face frame is judged to be larger and larger, comparing the new first calculated value with a wake-up threshold, and if the new first calculated value is larger than the wake-up threshold, controlling the electronic equipment to wake up; and when the change trend of the face frame is judged to be smaller and smaller, comparing the new first calculated value with a dormancy threshold value, and if the new first calculated value is smaller than the awakening threshold value, controlling the electronic equipment to sleep.
In some embodiments, the obtaining a target motion trend according to the variation trend of the face frame includes: judging whether the new frame count is smaller than a frame count threshold value; if the new frame count is smaller than the frame count threshold value, sequentially comparing the sizes of the adjacent face frames according to the acquisition sequence of the face frames; and multiplying the first calculation value by a first amplification threshold value or a first reduction threshold value according to the comparison result of the sizes of the face frames in the adjacent images to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value.
In some embodiments, the obtaining a target movement trend according to the variation trend of the face frame further includes: if the new frame count is judged to be greater than or equal to the frame count threshold, calculating the average value frames of all the face frames acquired before the new frame count is equal to the frame count threshold; comparing the size of the average value frame with the size of the newly obtained face frame, multiplying a second calculation value by a second amplification threshold value or a second reduction threshold value according to the comparison result of the size of the average value frame with the size of the newly obtained face frame to obtain a new second calculation value, and replacing the second calculation value by the new second calculation value; carrying out weighted average calculation on the new first calculation value and the new second calculation value to obtain a comparison result value; and comparing the comparison result value with a second judgment threshold value to obtain the variation trend of the face frame, and further obtain the target motion trend.
In some embodiments, the comparing the comparison result value with a second judgment threshold to obtain a variation trend of the face frame, so as to obtain a target motion trend, includes: comparing the comparison result value with a second judgment threshold value to obtain the variation trend of the face frame; if the comparison result value is larger than the second judgment threshold value, judging that the variation trend of the face frame is larger and larger, and further obtaining that the target motion trend is close to the electronic equipment; and if the comparison result value is smaller than the second judgment threshold value, judging that the variation trend of the face frame is smaller and smaller, and further obtaining that the target motion trend is far away from the electronic equipment.
In some embodiments, the first zoom-in threshold and the second zoom-out threshold are both greater than 1 and less than 2, the first zoom-out threshold and the second zoom-out threshold are both less than 1 and greater than 0, and the sum of the first zoom-in threshold and the first zoom-out threshold is 2 and the sum of the second zoom-in threshold and the second zoom-out threshold is 2. For example, the first zoom-in threshold is 1.1, and the first zoom-out threshold is 0.9; for example, the second zoom-in threshold is 1.3, and the second zoom-out threshold is 0.7.
In some embodiments, the control method further comprises: when the change trend of the face frame is judged to be larger and larger, comparing the comparison result value with an awakening threshold value, and if the comparison result value is larger than the awakening threshold value, controlling the electronic equipment to be awakened; and when the change trend of the face frame is judged to be smaller and smaller, comparing the comparison result value with a dormancy threshold value, and if the comparison result value is smaller than the awakening threshold value, controlling the electronic equipment to sleep.
In some embodiments, the obtaining video stream data and then performing target detection on the video stream data to obtain a target motion trend includes: acquiring each frame of image in the video stream data, and then sequentially carrying out human shape detection on each frame of image according to the sequence of the image in the video stream data to acquire a human shape frame; and obtaining the target motion trend according to the change trend of the human-shaped frame.
In some embodiments, the obtaining an image of each frame in the video stream data, and then performing human shape detection on each frame of the image in sequence according to the sequence of the image in the video stream data to obtain a human shape frame includes: sequentially acquiring each frame of image in the video stream data, sequentially carrying out human shape detection on each frame of image to determine whether human shape exists in each frame of image, when human shape exists in the image, acquiring a human shape frame from the image, adding 1 to a frame count to obtain a new frame count, and replacing the frame count with the new frame count to obtain at least one human shape frame.
In some embodiments, the obtaining a target movement trend according to the variation trend of the human-shaped frame includes: sequentially comparing the sizes of the adjacent human-shaped frames according to the acquisition sequence of the human-shaped frames; multiplying a first calculation value by a first amplification threshold value or a first reduction threshold value according to a comparison result of the sizes of the adjacent human-shaped frames to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value; and comparing the new first calculated value with a first judgment threshold value to obtain the variation trend of the human-shaped frame, and further obtaining the target motion trend.
In some embodiments, the comparing the new first calculation value with a first judgment threshold to obtain a variation trend of a human-shaped frame, so as to obtain a target movement trend, includes: comparing the new first calculated value with a first judgment threshold value to obtain the variation trend of the human-shaped frame; if the new first calculation value is larger than the first judgment threshold value, judging that the change trend of the human-shaped frame is larger and larger, and further obtaining that the target motion trend is close to the electronic equipment; and if the new first calculation value is smaller than the first judgment threshold value, judging that the change trend of the human-shaped frame is smaller and smaller, and further obtaining that the target motion trend is far away from the electronic equipment.
In some embodiments, the obtaining a target movement trend according to the variation trend of the human-shaped frame includes: judging whether the new frame count is smaller than a frame count threshold value; if the new frame count is smaller than the frame count threshold value, sequentially comparing the sizes of the adjacent human-shaped frames according to the acquisition sequence of the human-shaped frames; and multiplying the first calculation value by a first magnification threshold value or a first reduction threshold value according to the comparison result of the sizes of the human-shaped frames in the adjacent images to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value.
In some embodiments, the obtaining a target movement trend according to the variation trend of the human-shaped frame further includes: if the new frame count is judged to be greater than or equal to the frame count threshold, solving the average value frame of all the human-shaped frames acquired before the new frame count is equal to the frame count threshold; comparing the average value frame with the size of the human-shaped frame obtained latest, multiplying a second calculation value by a second amplification threshold value or a second reduction threshold value according to the comparison result of the average value frame with the size of the human-shaped frame obtained latest to obtain a new second calculation value, and replacing the second calculation value by the new second calculation value; carrying out weighted average calculation on the new first calculation value and the new second calculation value to obtain a comparison result value; and comparing the comparison result value with a second judgment threshold value to obtain the variation trend of the human-shaped frame, and further obtain the target motion trend.
In some embodiments, the comparing the comparison result value with a second judgment threshold to obtain a variation trend of the human-shaped frame, so as to obtain a target motion trend, includes: comparing the comparison result value with a second judgment threshold value to obtain the variation trend of the human-shaped frame; if the comparison result value is larger than the second judgment threshold value, judging that the change trend of the human-shaped frame is larger and larger, and further obtaining that the target motion trend is close to the electronic equipment; and if the comparison result value is smaller than the second judgment threshold value, judging that the change trend of the human-shaped frame is smaller and smaller, and further obtaining that the target motion trend is far away from the electronic equipment.
In some embodiments, the obtaining video stream data and then performing target detection on the video stream data to obtain a target motion trend includes: acquiring each frame of image in the video stream data, and then sequentially carrying out face detection and human shape detection on each frame of image according to the sequence of the image in the video stream data so as to acquire a face frame and a human shape frame; and obtaining a target motion trend according to the change trend of the face frame and the change trend of the human-shaped frame.
In some embodiments, the acquiring an image of each frame in the video stream data, and then sequentially performing face detection and human shape detection on the image of each frame according to a sorting order of the image in the video stream data to acquire a face frame and a human shape frame includes: sequentially acquiring each frame of image in the video stream data, sequentially detecting people in each frame of image to determine whether a face and a human figure exist in each frame of image at the same time, when the face and the human figure exist in the image at the same time, acquiring a face frame and a human figure frame from the image, adding 1 to a frame count to obtain a new frame count, and replacing the frame count with the new frame count to obtain at least one face frame and at least one human figure frame.
In some embodiments, the obtaining a target movement trend according to the variation trend of the face frame and the variation trend of the human-shaped frame includes: sequentially comparing the sizes of the adjacent human face frames according to the acquisition sequence of the human face frames, and sequentially comparing the sizes of the adjacent human face frames according to the acquisition sequence of the human face frames; multiplying a first calculation value by a first amplification threshold value or a first reduction threshold value according to a comparison result of the sizes of the adjacent face frames to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value; multiplying a second calculation value by a second amplification threshold value or a second reduction threshold value according to a comparison result of the sizes of the adjacent human-shaped frames to obtain a new second calculation value, and then replacing the second calculation value with the new second calculation value; carrying out weighted average calculation on the new first calculation value and the new second calculation value to obtain a first comparison result value; and comparing the first comparison result value with a first judgment threshold value to obtain the variation trend of the human face frame and the variation trend of the human figure frame so as to obtain the target motion trend.
In some embodiments, the comparing the first comparison result value with a first judgment threshold to obtain a variation trend of the face frame and a variation trend of the human-shaped frame, so as to obtain a target motion trend includes: comparing the first comparison result value with a first judgment threshold value to obtain the variation trend of the face frame; if the first comparison result value is larger than the first judgment threshold value, judging that the variation trend of the face frame is larger and larger, and the variation trend of the human-shaped frame is larger and larger, so that the target motion trend can be obtained to be close to the electronic equipment; if the first comparison result value is smaller than the first judgment threshold value, the change trend of the face frame is judged to be smaller and smaller, the change trend of the human-shaped frame is judged to be smaller and smaller, and then the target motion trend can be obtained to be far away from the electronic equipment.
In some embodiments, the obtaining a target movement trend according to the variation trend of the face frame and the variation trend of the human-shaped frame includes: judging whether the new frame count is smaller than a frame count threshold value; if the new frame count is smaller than the frame count threshold value, sequentially comparing the sizes of the adjacent human face frames according to the acquisition sequence of the human face frames, and sequentially comparing the sizes of the adjacent human face frames according to the acquisition sequence of the human face frames; multiplying a first calculation value by a first amplification threshold value or a first reduction threshold value according to a comparison result of the sizes of the adjacent face frames to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value; multiplying a second calculation value by a second amplification threshold value or a second reduction threshold value according to a comparison result of the sizes of the adjacent human-shaped frames to obtain a new second calculation value, and then replacing the second calculation value with the new second calculation value; and carrying out weighted average calculation on the new first calculation value and the new second calculation value to obtain a first comparison result value.
In some embodiments, the obtaining a target movement trend according to the variation trend of the face frame and the variation trend of the human-shaped frame further includes: if the new frame count is judged to be greater than or equal to the frame count threshold, solving the average value frames of all the face frames and the average value frames of all the human-shaped frames which are obtained before the new frame count is equal to the frame count threshold; comparing the sizes of the average value frames of all the face frames with the size of the newly obtained face frame, multiplying a third calculated value by a third amplification threshold or a third reduction threshold according to the comparison result of the sizes of the average value frames of all the face frames and the newly obtained face frame to obtain a new third calculated value, and then replacing the third calculated value by the new third calculated value; comparing the sizes of the average value frames of all the human-shaped frames with the newly obtained human-shaped frame, multiplying a fourth calculation value by a fourth amplification threshold value or a fourth reduction threshold value according to the comparison result of the sizes of the average value frames of all the human-shaped frames and the newly obtained human-shaped frame to obtain a new fourth calculation value, and then replacing the fourth calculation value by the new fourth calculation value; performing weighted average calculation on the new third calculated value and the new fourth calculated value to obtain a second comparison result value; carrying out weighted average on the first comparison result and the second comparison result value to obtain a third comparison result value; and comparing the third comparison result value with a second judgment threshold value to obtain the variation trend of the human face frame and the variation trend of the human figure frame so as to obtain the target motion trend.
In some embodiments, the comparing the third comparison result value with a second judgment threshold to obtain a variation trend of the face frame and a variation trend of the human-shaped frame, so as to obtain a target motion trend includes: comparing the third comparison result value with a second judgment threshold value to obtain the variation trend of the face frame; if the third comparison result value is greater than the second judgment threshold value, judging that the variation trend of the face frame is larger and larger, and the variation trend of the human-shaped frame is larger and larger, so that the target motion trend can be obtained to be close to the electronic equipment; if the third comparison result value is smaller than the second judgment threshold value, the change trend of the face frame is judged to be smaller and smaller, and the change trend of the human-shaped frame is judged to be smaller and smaller, so that the target motion trend is far away from the electronic equipment.
In some embodiments, the first zoom-in threshold, the second zoom-in threshold, the third zoom-in threshold, and the fourth zoom-in threshold are all greater than 1 and less than 2, the first zoom-out threshold, the second zoom-out threshold, the third zoom-out threshold, and the fourth zoom-out threshold are all less than 1 and greater than 0, and a sum of the first zoom-in threshold and the first zoom-out threshold is 2, a sum of the second zoom-in threshold and the second zoom-out threshold is 2, a sum of the third zoom-in threshold and the third zoom-out threshold is 2, and a sum of the fourth zoom-in threshold and the fourth zoom-out threshold is 2. For example, the first zoom-in threshold is 1.1, and the first zoom-out threshold is 0.9; for example, the second zoom-in threshold is 1.3, and the second zoom-out threshold is 0.7; for example, the third zoom-in threshold is 1.1, and the third zoom-out threshold is 0.9; for example, the fourth zoom-in threshold is 1.2, and the fourth zoom-out threshold is 0.8.
In some embodiments, the control method further comprises: when the change trend of the face frame is judged to be larger and larger, comparing the third comparison result value with an awakening threshold value, and if the third comparison result value is larger than the awakening threshold value, controlling the electronic equipment to be awakened; and when the change trend of the face frame is judged to be smaller and smaller, comparing the third comparison result value with a dormancy threshold value, and if the third comparison result value is smaller than the awakening threshold value, controlling the electronic equipment to sleep.
In some embodiments, the acquiring an image of each frame in the video stream data, and then sequentially performing face detection on the image of each frame according to the sequence of the image in the video stream data to acquire a face frame includes: and if the number of the face frames in the same image is more than 1, only the face frame closest to the central point of the image is obtained. And a proper face frame is selected, so that mutual interference among a plurality of face frames is avoided, and the control complexity can be reduced.
Fig. 10 is a schematic diagram of two face frames appearing in one frame image according to the present invention. Referring to fig. 10, the image includes a center point 201, a left face frame 202, and a right face frame 203 of the image, where the center point 201 is an intersection of diagonal lines of the image, a distance from the left face frame 202 to the center point 201 is smaller than a distance from the right face frame 203 to the center point 201, and when the face frame in the image is obtained, only the left face frame 202 is obtained.
In some embodiments, the obtaining an image of each frame in the video stream data, and then performing human shape detection on each frame of the image in sequence according to the sequence of the image in the video stream data to obtain a human shape frame includes: and if the number of the human-shaped frames in the same image is more than 1, only the human-shaped frame closest to the central point of the image is obtained. And a proper human-shaped frame is selected, so that mutual interference among a plurality of human-shaped frames is avoided, and the control complexity can be reduced.
Although the embodiments of the present invention have been described in detail hereinabove, it is apparent to those skilled in the art that various modifications and variations can be made to these embodiments. However, it is to be understood that such modifications and variations are within the scope and spirit of the present invention as set forth in the following claims. Moreover, the invention as described herein is capable of other embodiments and of being practiced or of being carried out in various ways.

Claims (23)

1. A control method for enabling wake-up and hibernation of an electronic device, comprising:
acquiring video stream data, and then carrying out target detection through the video stream data to obtain a target motion trend, wherein the target detection comprises at least one of face detection and human shape detection;
and controlling the electronic equipment to wake up or sleep according to the target motion trend.
2. The control method according to claim 1, wherein the obtaining video stream data and then performing target detection through the video stream data to obtain a target motion trend comprises:
acquiring each frame of image in the video stream data, and then sequentially carrying out face detection on each frame of image according to the sequence of the image in the video stream data to acquire a face frame;
and obtaining a target motion trend according to the change trend of the face frame.
3. The control method according to claim 2, wherein the obtaining of each frame of image in the video stream data, and then performing face detection on each frame of image in sequence according to the sequence of the image in the video stream data to obtain the face frame comprises:
sequentially acquiring each frame of image in the video stream data, sequentially carrying out face detection on each frame of image to determine whether a face exists in each frame of image, acquiring a face frame from the image when the face exists in the image, adding 1 to the frame count to obtain a new frame count, and replacing the frame count with the new frame count to obtain at least one face frame.
4. The control method according to claim 2 or 3, wherein the obtaining of the target motion trend according to the change trend of the face frame comprises:
sequentially comparing the sizes of the adjacent face frames according to the acquisition sequence of the face frames;
multiplying a first calculation value by a first amplification threshold value or a first reduction threshold value according to a comparison result of the sizes of the adjacent face frames to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value;
and comparing the new first calculated value with a first judgment threshold value to obtain the variation trend of the face frame, and further obtain the target motion trend.
5. The control method according to claim 4, wherein the comparing the new first calculated value with a first judgment threshold value to obtain a variation trend of a face frame and further obtain a target motion trend comprises:
comparing the new first calculated value with a first judgment threshold value to obtain the variation trend of the face frame;
if the new first calculated value is larger than the first judgment threshold value, judging that the change trend of the face frame is larger and larger, and further obtaining that the target motion trend is close to the electronic equipment;
and if the new first calculation value is smaller than the first judgment threshold value, judging that the change trend of the face frame is smaller and smaller, and further obtaining that the target motion trend is far away from the electronic equipment.
6. The control method according to claim 3, wherein the obtaining a target motion trend according to the variation trend of the face frame comprises:
judging whether the new frame count is smaller than a frame count threshold value;
if the new frame count is smaller than the frame count threshold value, sequentially comparing the sizes of the adjacent face frames according to the acquisition sequence of the face frames;
and multiplying the first calculation value by a first amplification threshold value or a first reduction threshold value according to the comparison result of the sizes of the face frames in the adjacent images to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value.
7. The control method according to claim 6, wherein the obtaining of the target motion trend according to the variation trend of the face frame further comprises:
if the new frame count is judged to be greater than or equal to the frame count threshold, calculating the average value frames of all the face frames acquired before the new frame count is equal to the frame count threshold;
comparing the size of the average value frame with the size of the newly obtained face frame, multiplying a second calculation value by a second amplification threshold value or a second reduction threshold value according to the comparison result of the size of the average value frame with the size of the newly obtained face frame to obtain a new second calculation value, and replacing the second calculation value by the new second calculation value;
carrying out weighted average calculation on the new first calculation value and the new second calculation value to obtain a comparison result value;
and comparing the comparison result value with a second judgment threshold value to obtain the variation trend of the face frame, and further obtain the target motion trend.
8. The control method according to claim 7, wherein the comparing the comparison result value with a second determination threshold to obtain a variation trend of the face frame and further obtain a target motion trend comprises:
comparing the comparison result value with a second judgment threshold value to obtain the variation trend of the face frame;
if the comparison result value is larger than the second judgment threshold value, judging that the variation trend of the face frame is larger and larger, and further obtaining that the target motion trend is close to the electronic equipment;
and if the comparison result value is smaller than the second judgment threshold value, judging that the variation trend of the face frame is smaller and smaller, and further obtaining that the target motion trend is far away from the electronic equipment.
9. The control method according to claim 1, wherein the obtaining video stream data and then performing target detection through the video stream data to obtain a target motion trend comprises:
acquiring each frame of image in the video stream data, and then sequentially carrying out human shape detection on each frame of image according to the sequence of the image in the video stream data to acquire a human shape frame;
and obtaining the target motion trend according to the change trend of the human-shaped frame.
10. The control method according to claim 9, wherein the obtaining of each frame of image in the video stream data, and then performing human shape detection on each frame of image in sequence according to the sequence of the image in the video stream data to obtain a human shape frame comprises:
sequentially acquiring each frame of image in the video stream data, sequentially carrying out human shape detection on each frame of image to determine whether human shape exists in each frame of image, when human shape exists in the image, acquiring a human shape frame from the image, adding 1 to a frame count to obtain a new frame count, and replacing the frame count with the new frame count to obtain at least one human shape frame.
11. The control method according to claim 9 or 10, wherein the obtaining of the target movement trend according to the change trend of the human-shaped frame comprises:
sequentially comparing the sizes of the adjacent human-shaped frames according to the acquisition sequence of the human-shaped frames;
multiplying a first calculation value by a first amplification threshold value or a first reduction threshold value according to a comparison result of the sizes of the adjacent human-shaped frames to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value;
and comparing the new first calculated value with a first judgment threshold value to obtain the variation trend of the human-shaped frame, and further obtaining the target motion trend.
12. The control method according to claim 11, wherein the comparing the new first calculated value with a first judgment threshold value to obtain a variation trend of a human-shaped frame and further obtain a target movement trend comprises:
comparing the new first calculated value with a first judgment threshold value to obtain the variation trend of the human-shaped frame;
if the new first calculation value is larger than the first judgment threshold value, judging that the change trend of the human-shaped frame is larger and larger, and further obtaining that the target motion trend is close to the electronic equipment;
and if the new first calculation value is smaller than the first judgment threshold value, judging that the change trend of the human-shaped frame is smaller and smaller, and further obtaining that the target motion trend is far away from the electronic equipment.
13. The control method according to claim 12, wherein the obtaining of the target movement trend according to the variation trend of the human-shaped frame comprises:
judging whether the new frame count is smaller than a frame count threshold value;
if the new frame count is smaller than the frame count threshold value, sequentially comparing the sizes of the adjacent human-shaped frames according to the acquisition sequence of the human-shaped frames;
and multiplying the first calculation value by a first magnification threshold value or a first reduction threshold value according to the comparison result of the sizes of the human-shaped frames in the adjacent images to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value.
14. The control method according to claim 13, wherein the obtaining of the target movement tendency according to the variation tendency of the human-shaped frame further comprises:
if the new frame count is judged to be greater than or equal to the frame count threshold, solving the average value frame of all the human-shaped frames acquired before the new frame count is equal to the frame count threshold;
comparing the average value frame with the size of the human-shaped frame obtained latest, multiplying a second calculation value by a second amplification threshold value or a second reduction threshold value according to the comparison result of the average value frame with the size of the human-shaped frame obtained latest to obtain a new second calculation value, and replacing the second calculation value by the new second calculation value;
carrying out weighted average calculation on the new first calculation value and the new second calculation value to obtain a comparison result value;
and comparing the comparison result value with a second judgment threshold value to obtain the variation trend of the human-shaped frame, and further obtain the target motion trend.
15. The control method according to claim 14, wherein the comparing the comparison result value with a second judgment threshold value to obtain a variation trend of a human-shaped frame, and further obtain a target movement trend, comprises:
comparing the new comparison result value with a second judgment threshold value to obtain the variation trend of the human-shaped frame;
if the comparison result value is larger than the second judgment threshold value, judging that the change trend of the human-shaped frame is larger and larger, and further obtaining that the target motion trend is close to the electronic equipment;
and if the comparison result value is smaller than the second judgment threshold value, judging that the change trend of the human-shaped frame is smaller and smaller, and further obtaining that the target motion trend is far away from the electronic equipment.
16. The control method according to claim 1, wherein the obtaining video stream data and then performing target detection through the video stream data to obtain a target motion trend comprises:
acquiring each frame of image in the video stream data, and then sequentially carrying out face detection and human shape detection on each frame of image according to the sequence of the image in the video stream data so as to acquire a face frame and a human shape frame;
and obtaining a target motion trend according to the change trend of the face frame and the change trend of the human-shaped frame.
17. The control method according to claim 16, wherein the obtaining of the image of each frame in the video stream data, and then performing face detection and human shape detection on each frame of the image in sequence according to the sequence of the image in the video stream data to obtain the face frame and the human shape frame comprises:
sequentially acquiring each frame of image in the video stream data, sequentially detecting people in each frame of image to determine whether a face and a human figure exist in each frame of image at the same time, when the face and the human figure exist in the image at the same time, acquiring a face frame and a human figure frame from the image, adding 1 to a frame count to obtain a new frame count, and replacing the frame count with the new frame count to obtain at least one face frame and at least one human figure frame.
18. The control method according to claim 16 or 17, wherein the obtaining of the target motion trend according to the change trend of the face frame and the change trend of the human-shaped frame comprises:
sequentially comparing the sizes of the adjacent human face frames according to the acquisition sequence of the human face frames, and sequentially comparing the sizes of the adjacent human face frames according to the acquisition sequence of the human face frames;
multiplying a first calculation value by a first amplification threshold value or a first reduction threshold value according to a comparison result of the sizes of the adjacent face frames to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value;
multiplying a second calculation value by a second amplification threshold value or a second reduction threshold value according to a comparison result of the sizes of the adjacent human-shaped frames to obtain a new second calculation value, and then replacing the second calculation value with the new second calculation value;
carrying out weighted average calculation on the new first calculation value and the new second calculation value to obtain a first comparison result value;
and comparing the first comparison result value with a first judgment threshold value to obtain the variation trend of the human face frame and the variation trend of the human figure frame so as to obtain the target motion trend.
19. The control method according to claim 18, wherein the comparing the first comparison result value with a first judgment threshold value to obtain a variation trend of the face frame and a variation trend of the human-shaped frame, and further obtain a target motion trend comprises:
comparing the first comparison result value with a first judgment threshold value to obtain the variation trend of the face frame;
if the first comparison result value is larger than the first judgment threshold value, judging that the variation trend of the face frame is larger and larger, and the variation trend of the human-shaped frame is larger and larger, so that the target motion trend can be obtained to be close to the electronic equipment;
if the first comparison result value is smaller than the first judgment threshold value, the change trend of the face frame is judged to be smaller and smaller, the change trend of the human-shaped frame is judged to be smaller and smaller, and then the target motion trend can be obtained to be far away from the electronic equipment.
20. The control method according to claim 17, wherein the obtaining a target movement trend according to the variation trend of the face frame and the variation trend of the human-shaped frame comprises:
judging whether the new frame count is smaller than a frame count threshold value;
if the new frame count is smaller than the frame count threshold value, sequentially comparing the sizes of the adjacent human face frames according to the acquisition sequence of the human face frames, and sequentially comparing the sizes of the adjacent human face frames according to the acquisition sequence of the human face frames;
multiplying a first calculation value by a first amplification threshold value or a first reduction threshold value according to a comparison result of the sizes of the adjacent face frames to obtain a new first calculation value, and then replacing the first calculation value by the new first calculation value;
multiplying a second calculation value by a second amplification threshold value or a second reduction threshold value according to a comparison result of the sizes of the adjacent human-shaped frames to obtain a new second calculation value, and then replacing the second calculation value with the new second calculation value;
and carrying out weighted average calculation on the new first calculation value and the new second calculation value to obtain a first comparison result value.
21. The control method according to claim 20, wherein the obtaining of the target movement trend according to the variation trend of the face frame and the variation trend of the human-shaped frame further comprises:
if the new frame count is judged to be greater than or equal to the frame count threshold, solving the average value frames of all the face frames and the average value frames of all the human-shaped frames which are obtained before the new frame count is equal to the frame count threshold;
comparing the sizes of the average value frames of all the face frames with the size of the newly obtained face frame, multiplying a third calculated value by a third amplification threshold or a third reduction threshold according to the comparison result of the sizes of the average value frames of all the face frames and the newly obtained face frame to obtain a new third calculated value, and then replacing the third calculated value by the new third calculated value;
comparing the sizes of the average value frames of all the human-shaped frames with the newly obtained human-shaped frame, multiplying a fourth calculation value by a fourth amplification threshold value or a fourth reduction threshold value according to the comparison result of the sizes of the average value frames of all the human-shaped frames and the newly obtained human-shaped frame to obtain a new fourth calculation value, and then replacing the fourth calculation value by the new fourth calculation value;
performing weighted average calculation on the new third calculated value and the new fourth calculated value to obtain a second comparison result value;
carrying out weighted average on the first comparison result and the second comparison result value to obtain a third comparison result value;
and comparing the third comparison result value with a second judgment threshold value to obtain the variation trend of the human face frame and the variation trend of the human figure frame so as to obtain the target motion trend.
22. The control method according to claim 21, wherein the comparing the third comparison result value with a second determination threshold to obtain a variation trend of the face frame and a variation trend of the human-shaped frame, and further obtain a target motion trend comprises:
comparing the third comparison result value with a second judgment threshold value to obtain the variation trend of the face frame;
if the third comparison result value is greater than the second judgment threshold value, judging that the variation trend of the face frame is larger and larger, and the variation trend of the human-shaped frame is larger and larger, so that the target motion trend can be obtained to be close to the electronic equipment;
if the third comparison result value is smaller than the second judgment threshold value, the change trend of the face frame is judged to be smaller and smaller, and the change trend of the human-shaped frame is judged to be smaller and smaller, so that the target motion trend is far away from the electronic equipment.
23. A control system for implementing the control method according to any one of claims 1 to 22, wherein the control system comprises a video stream data acquisition unit, a motion trend calculation unit, and a wake-up and sleep control unit, wherein the video stream data acquisition unit is configured to acquire video stream data, the motion trend calculation unit is configured to perform target detection on the video stream data to obtain a target motion trend, the target detection includes at least one of face detection and human shape detection, and the wake-up and sleep control unit is configured to control the electronic device to wake up or sleep according to the target motion trend.
CN202111410582.7A 2021-11-25 2021-11-25 Control method and control system Pending CN114253611A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111410582.7A CN114253611A (en) 2021-11-25 2021-11-25 Control method and control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111410582.7A CN114253611A (en) 2021-11-25 2021-11-25 Control method and control system

Publications (1)

Publication Number Publication Date
CN114253611A true CN114253611A (en) 2022-03-29

Family

ID=80791197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111410582.7A Pending CN114253611A (en) 2021-11-25 2021-11-25 Control method and control system

Country Status (1)

Country Link
CN (1) CN114253611A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116386195A (en) * 2023-05-29 2023-07-04 南京致能电力科技有限公司 Face access control system based on image processing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107809675A (en) * 2017-10-26 2018-03-16 深圳佳力拓科技有限公司 A kind of method and system by identifying humanoid action intelligence closing set top box
CN108733420A (en) * 2018-03-21 2018-11-02 北京猎户星空科技有限公司 Awakening method, device, smart machine and the storage medium of smart machine
CN109976506A (en) * 2017-12-28 2019-07-05 深圳市优必选科技有限公司 Awakening method, storage medium and the robot of a kind of electronic equipment
CN110253595A (en) * 2019-06-21 2019-09-20 北京猎户星空科技有限公司 A kind of smart machine control method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107809675A (en) * 2017-10-26 2018-03-16 深圳佳力拓科技有限公司 A kind of method and system by identifying humanoid action intelligence closing set top box
CN109976506A (en) * 2017-12-28 2019-07-05 深圳市优必选科技有限公司 Awakening method, storage medium and the robot of a kind of electronic equipment
CN108733420A (en) * 2018-03-21 2018-11-02 北京猎户星空科技有限公司 Awakening method, device, smart machine and the storage medium of smart machine
CN110253595A (en) * 2019-06-21 2019-09-20 北京猎户星空科技有限公司 A kind of smart machine control method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116386195A (en) * 2023-05-29 2023-07-04 南京致能电力科技有限公司 Face access control system based on image processing

Similar Documents

Publication Publication Date Title
CN108830145B (en) People counting method based on deep neural network and storage medium
EP2706507B1 (en) Method and apparatus for generating morphing animation
CN102693426B (en) Method for detecting image salient regions
CN111091109B (en) Method, system and equipment for predicting age and gender based on face image
CN111191576A (en) Personnel behavior target detection model construction method, intelligent analysis method and system
CN104700405B (en) A kind of foreground detection method and system
CN104616002A (en) Facial recognition equipment used for judging age groups
CN112926541A (en) Sleeping post detection method and device and related equipment
CN114253611A (en) Control method and control system
CN111178261A (en) Face detection acceleration method based on video coding technology
CN111256315A (en) Neural network-based air conditioner control model creation method, control method and air conditioner
CN110910308A (en) Image processing method, apparatus, device and medium
CN101330606B (en) Built-in intelligent monitoring system based method for automatically detecting movement goal
CN113821109B (en) Control method and control system
CN112700568B (en) Identity authentication method, equipment and computer readable storage medium
CN105741277A (en) ViBe (Visual Background Extractor) algorithm and SLIC (Simple Linear Iterative Cluster) superpixel based background difference method
CN114253613A (en) Control method and control system
WO2006131866A3 (en) Method and system for image processing
CN114265626A (en) Control method and control system
CN110445966B (en) Panoramic camera video shooting method and device, electronic equipment and storage medium
JP2009294887A (en) Construction facility control system and program
CN114140828B (en) Real-time lightweight 2D human body posture estimation method
CN110288621A (en) Lip line complementing method, device, electronic equipment and storage medium based on B-spline
CN114253612A (en) Control method and control system
CN114283462B (en) Mask wearing detection method and system

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