CN112943661A - Fan adjusting method based on face recognition, fan and storage medium - Google Patents

Fan adjusting method based on face recognition, fan and storage medium Download PDF

Info

Publication number
CN112943661A
CN112943661A CN201911176267.5A CN201911176267A CN112943661A CN 112943661 A CN112943661 A CN 112943661A CN 201911176267 A CN201911176267 A CN 201911176267A CN 112943661 A CN112943661 A CN 112943661A
Authority
CN
China
Prior art keywords
user
fan
air supply
blowing
face recognition
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
CN201911176267.5A
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.)
Foshan Viomi Electrical Technology Co Ltd
Original Assignee
Foshan Viomi Electrical 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 Foshan Viomi Electrical Technology Co Ltd filed Critical Foshan Viomi Electrical Technology Co Ltd
Priority to CN201911176267.5A priority Critical patent/CN112943661A/en
Publication of CN112943661A publication Critical patent/CN112943661A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F04POSITIVE - DISPLACEMENT MACHINES FOR LIQUIDS; PUMPS FOR LIQUIDS OR ELASTIC FLUIDS
    • F04DNON-POSITIVE-DISPLACEMENT PUMPS
    • F04D27/00Control, e.g. regulation, of pumps, pumping installations or pumping systems specially adapted for elastic fluids
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F05INDEXING SCHEMES RELATING TO ENGINES OR PUMPS IN VARIOUS SUBCLASSES OF CLASSES F01-F04
    • F05DINDEXING SCHEME FOR ASPECTS RELATING TO NON-POSITIVE-DISPLACEMENT MACHINES OR ENGINES, GAS-TURBINES OR JET-PROPULSION PLANTS
    • F05D2270/00Control
    • F05D2270/70Type of control algorithm
    • F05D2270/709Type of control algorithm with neural networks
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F05INDEXING SCHEMES RELATING TO ENGINES OR PUMPS IN VARIOUS SUBCLASSES OF CLASSES F01-F04
    • F05DINDEXING SCHEME FOR ASPECTS RELATING TO NON-POSITIVE-DISPLACEMENT MACHINES OR ENGINES, GAS-TURBINES OR JET-PROPULSION PLANTS
    • F05D2270/00Control
    • F05D2270/80Devices generating input signals, e.g. transducers, sensors, cameras or strain gauges
    • F05D2270/804Optical devices

Abstract

The application provides a fan adjusting method, a fan and a storage medium based on face recognition, wherein the method comprises the following steps: acquiring an image shot by a camera carried by a fan as a target image; determining identity information and position coordinates of a user in a target image based on a face recognition model; acquiring historical blowing data of a user according to identity information of the user; determining an air supply mode corresponding to a user according to historical air supply data; and determining the air supply range corresponding to the fan according to the position coordinates, and adjusting the rotation angle of the fan to supply air according to the air supply range and in an air supply mode. The comfort and the experience degree of the user when blowing can be improved.

Description

Fan adjusting method based on face recognition, fan and storage medium
Technical Field
The application relates to the field of smart home, in particular to a fan adjusting method based on face recognition, a fan and a storage medium.
Background
The fan is a household appliance which can accelerate the circulation of air, and is mainly used for cooling and relieving summer heat and circulating air. Most of the existing fans are in fixed-range air supply modes and only have the function of shaking the head left and right automatically. The fans cannot determine the air supply range according to the actual positions of different users, cannot determine the air supply mode according to the blowing habits of the users, can only adjust the air supply range of the fans manually, are not intelligent enough, are poor in comfort, and reduce the experience of the users.
Disclosure of Invention
The fan adjusting method, the fan and the storage medium based on the face recognition can automatically adjust the air supply range of the fan according to the actual position of a user and supply air according to the air supply mode of the user, and the user experience is improved.
In a first aspect, the present application provides a fan adjustment method based on face recognition, where the method includes:
acquiring an image shot by a camera carried by the fan as a target image, wherein the target image comprises at least one user;
determining identity information and position coordinates of a user in the target image based on a face recognition model;
acquiring historical blowing data of the user according to the identity information of the user;
determining an air supply mode corresponding to the user according to the historical air supply data;
and determining an air supply range corresponding to the fan according to the position coordinates, adjusting the rotation angle of the fan according to the air supply range, and supplying air by adopting the air supply mode.
In a second aspect, the present application further provides a fan comprising a camera, a memory, and a processor;
the camera is used for collecting images;
the memory for storing a computer program;
the processor is used for executing the computer program and realizing the fan adjusting method based on the face recognition when the computer program is executed.
In a third aspect, the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program causes the processor to implement the fan adjustment method based on face recognition as described above.
The application discloses a fan adjusting method based on face recognition, a fan and a storage medium, wherein an image shot by a camera carried by the fan is obtained and used as a target image, and then the identity information and the position coordinates of a user in the target image are determined based on a face recognition model, so that the accuracy of a prediction result can be improved; according to the identity information of the user, historical blowing data of the user is obtained, and an air supply mode corresponding to the user can be determined according to the historical blowing data, so that the personalized requirements of the user are met; the air supply range corresponding to the fan is determined according to the position coordinates, the effect that the air supply range is automatically adjusted according to the actual position of the user and air is supplied by adopting the air supply mode corresponding to the user can be achieved, and the comfort and the experience degree of the user during air blowing are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic block diagram of a fan according to an embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating steps of a fan adjustment method provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a target image provided by an embodiment of the present application;
FIG. 4 is a diagram illustrating a prediction result of a target image according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram for determining a deviation angle of a user according to an embodiment of the present application;
FIG. 6 is a schematic diagram of determining a deviation angle of a user according to another embodiment of the present application;
FIG. 7 is a schematic view of a scene of adjusting an air supply range according to an embodiment of the present application;
FIG. 8 is a schematic view of a scene in which a user leaves a shooting range according to an embodiment of the present application;
fig. 9 is a schematic block diagram of a structure of a fan according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. 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 application.
The flow diagrams depicted in the figures are merely illustrative and do not necessarily include all of the elements and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It is to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a schematic block diagram of a fan provided in the present application. The fan in the embodiment of the present application will be described below with reference to fig. 1.
As shown in fig. 1, the fan 10 includes a motor 11, a fan rotor 12, a vertical rod 13, and a base 14. Wherein, the fan rotating head 12 is provided with blades 120, and the upright 13 is provided with a shooting device 15 and a function control device 16. The photographing device 15 may photograph an image in front of the fan 10 and transmit the photographed image to the function control device 16.
It is understood that the fan 10 may include a floor fan, a tower fan, a table fan, a bladeless fan, a wall fan, etc., but may also include an electric heating fan, an air conditioning fan, an air conditioner, etc.
In some embodiments, an internal fill-in light may be installed in the photographing device 15 or an external fill-in light may be an independent light source and is installed in the fan 10.
Illustratively, the camera 15 may be a camera with a white light or an infrared light.
In some embodiments, the camera 15 includes a camera, which may be a normal camera, but may also be other cameras, such as a depth camera.
It can be understood that a normal camera is a camera used only for shooting a target; the depth camera can be used for shooting a depth image besides shooting a target. The function control device 16 can detect the distance of the object from the camera from the depth image.
In some embodiments, the function control device 16 is electrically connected to the camera 15, and is configured to process the image captured by the camera 15 to obtain information in the image.
Illustratively, the function control device 16 may include a processor and a memory. The memory is used for storing image data and computer programs, and the processor is connected with the motor 11 and used for controlling the working state of the motor 11, such as the rotating angle and the rotating speed. The motor 11 can drive the fan rotor 12 to rotate, and also can drive the blades 120 to rotate.
It can be understood that the motor 11 drives the gear inside the fan 10, the gear is connected to one end of a connecting rod, and one end of the connecting rod is fixed, so that the motor 11 can drive the fan rotor 12 to rotate and can control the rotation angle of the fan rotor 12, specifically, the rotation angle can be horizontal rotation or vertical rotation.
It is understood that in the embodiment of the present application, the fan rotor 12 of the fan 10 can swing in the horizontal direction and/or the vertical direction.
The Processor may be a Central Processing Unit (CPU), or may be other general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable gate array (FPGA) or other Programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein the memory may include a nonvolatile storage medium and an internal memory. The internal memory provides an environment for running a computer program in a non-volatile storage medium, which when executed by the processor causes the processor to perform any one of the face recognition based fan adjustment methods.
In fig. 1, the imaging device 15 is a general camera and the function control device 16 includes a processor and a memory, but the imaging device 15 and the function control device 16 are not limited thereto.
Specifically, in the fan 10, the photographing device 15 is used to collect image data and send the collected image data to the function control device 16. The processor in the function control device 16 predicts the identity information and the position coordinates of the user on the acquired image data to obtain the identity information and the position coordinates of the user; then, acquiring historical blowing data of the user according to the identity information of the user, and further determining a blowing mode corresponding to the user; and determining the air supply range corresponding to the user according to the position coordinates. The function control device 16 can control the rotation angle of the motor 11 according to the air supply mode corresponding to the user and the determined air supply range, so as to automatically adjust the air supply range of the fan 10 according to the actual position of the user and supply air in the air supply mode corresponding to the user.
It will be appreciated that the fan 10 of FIG. 1 and the above-described nomenclature for the various components of the fan 10 are for identification purposes only and do not limit the application embodiments accordingly.
The fan adjustment method based on face recognition provided by the embodiment of the present application will be described in detail below based on the fan 10 in fig. 1.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating steps of a fan adjustment method based on face recognition according to an embodiment of the present application. The fan adjusting method based on the face recognition can be applied to the fan, so that the fan can automatically adjust the air supply range according to the actual position of a user and supply air by adopting an air supply mode corresponding to the user.
As shown in fig. 2, the fan adjustment method based on face recognition includes steps S10 to S50.
And step S10, acquiring an image shot by a camera carried by the fan as a target image, wherein the target image comprises at least one user.
In some embodiments, the image captured by the camera mounted on the fan is acquired as the target image, and the target image including at least one user may be obtained by turning on the image captured by the camera mounted on the fan according to the turn-on instruction.
Wherein the opening instruction is an instruction for opening the fan generated according to an operation of a user. For example, the user may operate a knob, a remote control, a touch screen button, or a mobile phone app to turn on a fan, and then generate a turn-on command. Illustratively, when a turn-on instruction is received, a camera is started to shoot images.
Illustratively, if there are two users in the direction of the blowing range, the target image includes two users.
In some embodiments, when an image shot by a camera carried by the fan is acquired as a target image, the light supplement lamp can be turned on to control the light supplement lamp to supplement light for the camera; and then shooting the image subjected to light supplement through a camera to be used as a target image.
For example, when the light of the surrounding environment of the camera is weak, the light supplement lamp is turned on to enhance the image effect of the camera shooting images.
Illustratively, the light supplement lamp can be a white light lamp or a red light lamp which is arranged in the camera, and can also be an independent white light lamp or an independent red light lamp.
Through the light filling effect of light filling lamp, can be so that the color reduction degree of the image that the shooting obtained is high, the image is lifelike, and the signal-to-noise ratio is high, supports backlight compensation function simultaneously, is applicable to the control of prospect object under the environment in a poor light.
In some embodiments, after acquiring an image captured by the camera mounted on the fan, the image may be further preprocessed, for example, brightness equalization processing, contrast enhancement processing, and normalization processing may be performed on the target image to obtain the target image.
In some embodiments, the image is subjected to a brightness equalization process to obtain a brightness equalized image.
It can be understood that when the camera shoots an image, because the light of the indoor environment is dark, the brightness of the shot image picture is low, so that the brightness of the image needs to be equalized, the brightness of the image is enhanced, and the accuracy of subsequently recognizing the user information in the image can be improved.
Illustratively, the captured image is subjected to a brightness equalization process based on the HSV color space.
It is understood that in the HSV color space model, hue H represents the type of color, saturation S represents the degree to which the color is close to the spectral color, and lightness V represents the degree to which the color is bright. Where the hexagonal boundary represents hue H, the horizontal axis represents saturation S, and lightness V is measured along the vertical axis.
In this embodiment, the image captured by the camera is first converted into HSV color space, and the hue, saturation and lightness of the image on the hexagonal boundary, horizontal axis and vertical axis, respectively, are obtained. The lightness V is then adjusted in the HSV color space so that the overall brightness of the image is balanced. Illustratively, the brightness V is adjusted in the vertical axis direction to reach a preset brightness value, which is used to indicate that the brightness of the image reaches an optimal value, for example, 0.85.
In some embodiments, the image after the brightness equalization is subjected to contrast enhancement processing, so as to obtain a contrast-enhanced image.
In this embodiment, according to a histogram equalization algorithm, contrast enhancement processing is performed on the image after the brightness equalization processing.
The histogram equalization algorithm redistributes image pixel values by performing nonlinear stretching on an image so that the number of pixels in a certain gray scale range is substantially the same.
The histogram equalization mapping method comprises the following steps:
Figure BDA0002290027640000061
in the formula, SkRepresenting the probability density distribution of the gray level of the image, k representing the total number of gray levels in the image, nkThe number of pixels representing the k-th gray level, and n represents the sum of the pixels in the image.
The gray level probability density of the obtained image is uniformly distributed by mapping and transforming the pixel gray level of the standard image; meanwhile, the contrast of the image can be improved by increasing the gray dynamic range of the image, so that the accuracy of the user information in the subsequent identification image is improved.
In some embodiments, the contrast-enhanced image is normalized to obtain a target image.
It should be noted that the normalization refers to converting UNIT type data of 0 to 255 of the image data to between 0 and 1. The normalization may include coordinate centering, x-sharpening normalization, scaling normalization, and rotation normalization.
In this embodiment, by performing normalization processing on the image after contrast enhancement, the invariant in the image can be found out, for example, the interference of the image due to uneven light can be reduced, so that the accuracy of user information in the subsequent identification image can be improved.
And step S20, determining the identity information and the position coordinates of the user in the target image based on the face recognition model.
Specifically, the target image is input into a trained face recognition model for recognition, and a prediction identity and a prediction coordinate corresponding to the user and a prediction probability corresponding to the prediction identity and the prediction coordinate are output.
The identity information of the user can be determined according to the predicted identity corresponding to the user; and determining the position coordinates of the user in the target image according to the predicted coordinates corresponding to the user.
Illustratively, the face recognition model may be a convolutional neural network, a constrained boltzmann machine, or a recurrent neural network.
The face recognition model can be obtained by training a preset sample image to be converged in a convolutional neural network. The convolutional neural network processes the sample image through a convolutional layer, a pooling layer and a full-link layer, and outputs the prediction identity and the prediction coordinate corresponding to the user and the prediction probability corresponding to the prediction identity and the prediction coordinate in the sample image. The preset sample images include images of different users at different locations. The trained face recognition model can more accurately predict the identity information and the position coordinates of the user in the image.
In some embodiments, as shown in FIG. 3, FIG. 3 is a schematic view of a target image. The target image acquired by the camera and preprocessed can be input into a trained face recognition model for detection.
In this embodiment, the target image is input into a trained face recognition model, convolution and pooling are performed on the target image for several times, and then a prediction identity and a prediction coordinate corresponding to a user in the target image and a prediction probability corresponding to the prediction identity and the prediction coordinate are obtained through recognition by performing full-connection processing and normalization processing on a processing result.
Illustratively, as shown in fig. 4, fig. 4 is a schematic diagram of a prediction result of the target image. If the target image includes a user, the obtained prediction result may include: [ (methyl, 90%); ((-84, -84), 85%) ]. In the prediction result, (A, 90%) represents the prediction identity and the prediction probability corresponding to the prediction identity, wherein the prediction probability corresponding to the user A and the user A is 90%; (-84 ), 85%) represents the prediction coordinate and the prediction probability corresponding to the prediction coordinate, wherein 85% is the prediction probability of the prediction coordinate, and (-84 ) represents the coordinate of the face of the user A in the target image, and the unit is pixel.
It is understood that the image coordinate system uses the upper left corner of the image as the origin, and the predicted coordinates can be used as the position coordinates of the user in the target image.
Specifically, after obtaining the prediction probability corresponding to the predicted identity of the user in the target image, it is required to determine whether the prediction probability corresponding to the predicted identity is greater than a first preset threshold value, so as to determine the identity information of the user in the target image.
Illustratively, the first preset threshold may be 80%.
Specifically, if the prediction probability corresponding to the predicted identity is greater than the first preset threshold, the predicted identity is used as the identity information of the user.
In some embodiments, if the predicted probability corresponding to the user a is 90% and is greater than 80% of the first preset threshold, it is determined that the user of the target image is the user a.
Specifically, whether the prediction probability corresponding to the prediction coordinate is greater than a second preset threshold is judged, and if the prediction probability corresponding to the prediction coordinate is greater than the second preset threshold, the prediction coordinate is used as the position coordinate of the user.
Illustratively, the second preset threshold may be 70%.
In some embodiments, if the predicted probability that the predicted coordinate (-84 ) of the user A in the target image corresponds to 85% is greater than 70% of the second preset threshold, the predicted coordinate (-84 ) is taken as the position coordinate of the user A in the target image.
In other embodiments, if the prediction probability corresponding to the predicted coordinate (-84 ) is 60% and is less than 70% of the second preset threshold, the predicted coordinate (-84 ) cannot be used as the position coordinate of the user in the target image, and the predicted coordinate of the user in the target image needs to be obtained again through the face recognition model.
And step S30, acquiring historical blowing data of the user according to the identity information of the user.
Specifically, historical blowing data corresponding to the identity information is obtained according to the identity information of the user, and historical blowing data of the user are obtained, wherein the historical blowing data comprise a blowing mode set by the user.
It should be noted that, the memory in the function control device 16 stores the historical blowing data of the user, so that the historical blowing data corresponding to the identity information can be queried from the memory according to the identity information of the user to obtain the historical blowing data of the user.
Wherein the historical blowing data may include an air blowing mode set by the user. The air supply mode set by the user can reflect the air blowing preference or air blowing habit of the user.
For example, the blowing mode may be a directional blowing or a swing blowing.
For another example, the blowing mode may include blowing speeds of different gears, such as high-gear blowing, medium-gear blowing, and low-gear blowing.
And step S40, determining an air supply mode corresponding to the user according to the historical air supply data.
Specifically, if the target image comprises a user, determining an air supply mode corresponding to the user according to historical air blowing data corresponding to the user.
In some embodiments, if the historical blowing data corresponding to the user is directional blowing, the blowing mode of directional blowing is used as the blowing mode corresponding to the user. And if the historical blowing data corresponding to the user is high-grade blowing, taking the blowing mode of high-grade blowing as the blowing mode corresponding to the user.
In other embodiments, if the historical blowing data corresponding to the user includes high-grade blowing air and medium-grade blowing air, the blowing mode corresponding to the user is determined according to the respective times of the high-grade blowing air and the medium-grade blowing air. For example, the middle-range air supply with the higher frequency is set as the air supply mode corresponding to the user.
In some embodiments, if the target image includes at least two users, the blowing mode corresponding to each of the at least two users is determined according to the historical blowing data corresponding to the at least two users.
For example, if the target image includes user A and user B. For example, if the historical blowing data corresponding to the user A is directional blowing, the air supply mode of the directional blowing is used as the air supply mode corresponding to the user A; and if the historical blowing data corresponding to the user B is swinging blowing, taking the air supply mode of swinging blowing as the air supply mode corresponding to the user B.
In some embodiments, if the corresponding blowing modes of the two users determined according to the historical blowing data are different, the respective corresponding blowing modes of the at least two users are displayed for the user to select, and the blowing mode selected by the user is obtained.
For example, the air supply modes corresponding to the at least two users may be displayed on a display screen of a remote controller corresponding to the fan for the users to select, and the air supply mode selected by the user may be obtained according to the selection operation of the users in the remote controller.
For example, the air supply modes corresponding to the at least two users may be displayed in the smart phones or wearable devices of the at least two users for the users to select, and the air supply mode selected by the users is obtained according to the selection operation of the users in the smart phones or wearable devices.
The air supply mode is determined according to the historical air supply data of the user, the air supply preference of the user can be reflected better, and the individual requirements of the user are met.
And step S50, determining an air supply range corresponding to the fan according to the position coordinates, adjusting the rotation angle of the fan according to the air supply range and supplying air by adopting the air supply mode.
For example, after the position coordinates of the user in the target image are obtained, the air supply range corresponding to the fan may be set according to the position coordinates.
In some embodiments, if the target image includes a user, determining a deviation angle of the user according to the position coordinates of the user and a field angle of a camera, and then determining an air supply range corresponding to the fan according to the deviation angle.
Wherein the deviation angle is an angle at which the position coordinate of the user deviates from a center line of the field angle.
It is understood that the field angle refers to: and taking the lens of the camera as a vertex, and forming an included angle by passing the object image of the detected target through two edges of the lens in the maximum range.
In this embodiment, determining the deviation angle of the user according to the position coordinates of the user and the field angle of the camera includes: acquiring the length of the target image, and acquiring a first ratio according to the ratio of the abscissa of the position coordinate to the length of the image; and calculating the angle of the user deviating from the central line according to the field angle of the camera and the first ratio to obtain the deviation angle of the user.
Specifically, as shown in fig. 5, fig. 5 is a schematic diagram for determining the deviation angle of the user according to the position coordinates of the user and the field angle of the camera.
And correspondingly, the image coordinate system taking the pixel value as the unit is converted into the image coordinate system taking the centimeter as the unit. Where the conversion ratio is equal to 28 pixels per centimeter.
Illustratively, the length of the target image may be defined as w and the abscissa of the position coordinate as l, where w and l are converted from image pixel value representation to centimeter representation.
In fig. 5, an angle a is a half of the field angle of the camera, and h is a distance from the camera to a central point of the target image; the angle b is an angle of deviation of the position coordinates of the user nail relative to the central line of the field angle; the point C is a position coordinate of the center point of the user nail, and the abscissa of the user nail can be denoted as l.
The tangent formula of the triangle can be obtained as follows:
Figure BDA0002290027640000111
Figure BDA0002290027640000112
further obtaining a calculation formula of the deviation angle:
Figure BDA0002290027640000113
it will be appreciated that w/2 refers to half the length of the target image.
In some embodiments, the deviation angle of the user is calculated according to a similar triangle formula.
Illustratively, the length w of the target image is obtained, and a first ratio is obtained according to a ratio of an abscissa l of the position coordinate to the length of the target image
Figure BDA0002290027640000114
Then according to half field angle a of the camera and the first ratio
Figure BDA0002290027640000115
And calculating the angle of the user deviating from the central line to obtain the deviation angle b of the user nail.
Specifically, the size of the target image is acquired to determine the length of the target image. Illustratively, the length w of the target image is 14 cm.
Illustratively, if the field angle of the camera is 160 °, then a is 80 °; the width w of the target image is 14cm, and w/2 is 7 cm; if the position coordinate is (-3, 3), l is-3; the user's deviation angle b can thus be calculated to be-67 deg..
Specifically, after the deviation angle of the user is calculated, the corresponding air supply range is determined according to the deviation angle.
For example, when the corresponding blowing range is determined according to the deviation angle, the blowing range may be set to be larger than the deviation angle, for example, the deviation angle is shifted to the left by 3 ° and shifted to the right by 3 °, so as to obtain the blowing range corresponding to the deviation angle. If the deviation angle is-67 °, the blowing range may be set to (-70 °, -64 °).
In other embodiments, if the target image includes at least two users, determining deviation angles of the at least two users according to the position coordinates of the at least two users and a field angle of a camera, and then determining a corresponding air supply range according to the deviation angles of the at least two users.
Wherein the deviation angle is an angle at which the position coordinate of the user deviates from a center line of the field angle.
Specifically, as shown in fig. 6, fig. 6 is another scene schematic diagram for determining the deviation angle of the user according to the position coordinates of the user and the field angle of the camera.
In fig. 6, an angle a is an angle at which the position coordinates of the nail of the user deviate from the center line of the angle of view; the angle c is an angle at which the position coordinates of the user b deviate from the center line of the field angle.
In one embodiment, if the position coordinate of the center point of the user a is (-3, 3) and the position coordinate of the center point of the user b is (2, 3), the deviation angle of the user a is-67 ° and the deviation angle of the user b is 58 ° can be calculated according to the calculation formula of the deviation angle.
Specifically, in determining the corresponding air blowing range in accordance with the deviation angle, the air blowing range may be set to be slightly larger than the deviation angle. For example, the deviation angle is shifted to the left by 3 ° or shifted to the right by 3 °, and the air blowing range corresponding to the deviation angle is obtained.
Illustratively, if there are user A and user B, where the angle of deviation of user A is-67 deg. and the angle of deviation of user B is 58 deg., the angle of deviation of user A may be shifted to the left by 3 deg., the angle of deviation of user B may be shifted to the right by 3 deg., and the resulting blowing range is (-70 deg., 61 deg.).
Specifically, the rotation angle of the fan is adjusted to supply air according to the air supply range and in the air supply mode. As shown in fig. 7, fig. 7 is a schematic view of a scene in which the rotation angle of the fan is adjusted to the air supply range and the air supply mode is adopted for air supply.
The rotation angle is an angle at which the fan rotor of the fan repeatedly rotates left and right.
Illustratively, the air supply range of the fan is adjusted according to the mapping relation between the air supply range and the rotation angle of the fan.
It is understood that the mapping relationship means that the angle of the air supply range corresponds to the rotation angle of the fan, for example, the air supply range is (-70 °, 61 °), and the rotation angle of the fan is also (-70 °, 61 °).
Specifically, the function control device 16 may convert the data of the blowing range into a control signal, and transmit the control signal to the motor 11 to control the rotation angle of the motor 11, for example (-70 °, 61 °), so that the blowing range of the fan is adjusted to (-70 °, 61 °).
In some embodiments, if the air supply mode is directional air supply, the rotation angle of the fan is adjusted to the central position of the air supply range, and air supply is performed by using the directional air supply.
For example, if the air supply range corresponding to the user a is (-70 °, -64 °), the rotation angle of the fan is adjusted to-67 ° to perform directional air blowing.
For another example, if there are a user a and a user b, and the air supply range corresponding to the user a and the user b is (-70 °, 61 °), the rotation angle of the fan is adjusted to a position of-5 ° to perform directional blowing.
In some embodiments, if the blowing mode is swing blowing, adjusting the rotation angle of the fan to swing blowing within the blowing range.
For example, if the air supply range corresponding to the user A is (-70 °, -64 °), the fan is adjusted to rotate between-70 ° and-64 ° to perform swinging air blowing.
For another example, if there are a user a and a user b, and the air supply range corresponding to the user a and the user b is (-70 °, 61 °), the rotation angle of the fan is adjusted to be between-70 ° and 61 ° to perform swinging air blowing.
In some embodiments, if the air supply modes are high-grade air supply and swing air supply, and the air supply ranges corresponding to the user A and the user B are (-70 degrees and 61 degrees), the rotation angle of the fan is adjusted between-70 degrees and 61 degrees to perform high-grade air supply.
In some embodiments, if the blowing mode is middle-range blowing and directional blowing, and the blowing range corresponding to the user A is (-70 °, -64 °), the rotation angle of the fan is adjusted to-67 ° for middle-range blowing.
In some embodiments, as shown in fig. 8, after the rotation angle of the fan is adjusted to supply air according to the air supply range, an image captured by a camera mounted on the fan may be continuously collected, and if the image does not include a user, the fan stops supplying air.
In some embodiments, if the user leaves the shooting range of the camera, for example, the user is not in the field angle range of the camera, the image captured by the camera does not include any user. When the user in the image is detected, if the identity information and the position coordinate of the user of any user are not output, a control signal for stopping working is sent to the motor so as to control the motor to stop working.
According to the fan adjusting method based on the face recognition, the accuracy of user information recognition can be improved by preprocessing the shot image; the identity information and the position coordinates of the user in the target image are identified according to the face identification model, so that the accuracy of a prediction result can be improved; according to the identity information of the user, historical blowing data of the user is obtained, an air supply mode corresponding to the user can be determined according to the historical blowing data, and the personalized requirements of the user can be met; the deviation angle of the user is determined according to the position coordinate of the user and the field angle of the camera, the air supply range corresponding to the fan can be determined according to the deviation angle, the effect that the air supply range is adjusted automatically according to the actual position of the user and the air supply mode corresponding to the user is adopted for air supply can be achieved, and comfort and experience of the user during blowing are improved.
Referring to fig. 9, fig. 9 is a schematic block diagram of a fan according to an embodiment of the present disclosure. The fan 10 includes a camera 101, a processor 102, and a memory 103, and the camera 101, the processor 102, and the memory 103 are connected by a bus, such as an I2C (Inter-integrated Circuit) bus.
Specifically, the camera 101 is used to capture an image. The camera 101 may be a general camera, or may be other cameras, such as a depth camera.
The common camera is a camera which can only shoot a target; the depth camera may be used to capture depth images in addition to the target.
Specifically, the Processor 102 may be a Micro-controller Unit (MCU), a Central Processing Unit (CPU), a Digital Signal Processor (DSP), or the like.
Specifically, the Memory 103 may be a Flash chip, a Read-Only Memory (ROM) magnetic disk, an optical disk, a usb disk, or a removable hard disk.
Wherein the processor 102 is configured to run a computer program stored in the memory 103 and to implement the following steps when executing the computer program:
acquiring an image shot by a camera carried by the fan as a target image, wherein the target image comprises at least one user; determining identity information and position coordinates of a user in the target image based on a face recognition model; acquiring historical blowing data of the user according to the identity information of the user; determining an air supply mode corresponding to the user according to the historical air supply data; and determining an air supply range corresponding to the fan according to the position coordinates, adjusting the rotation angle of the fan according to the air supply range, and supplying air by adopting the air supply mode.
In some embodiments, the processor, in enabling determination of the identity information and the location coordinates of the user in the target image based on a face recognition model, enables:
inputting the target image into a trained face recognition model for recognition, and outputting a prediction identity and a prediction coordinate corresponding to the user and a prediction probability corresponding to the prediction identity and the prediction coordinate; if the prediction probability corresponding to the predicted identity is larger than a first preset threshold value, taking the predicted identity as identity information of the user; and if the prediction probability corresponding to the prediction coordinate is greater than a second preset threshold value, taking the prediction coordinate as the position coordinate of the user.
In some embodiments, the processor, when implementing obtaining the historical blowing data of the user according to the identity information of the user, implements:
and acquiring historical blowing data corresponding to the identity information according to the identity information of the user to obtain the historical blowing data of the user, wherein the historical blowing data comprises a blowing mode set by the user.
In some embodiments, the processor, when implementing determining the blowing mode corresponding to the user according to the historical blowing data, implements:
if the target image comprises at least two users, determining air supply modes corresponding to the at least two users according to historical air supply data corresponding to the at least two users; and displaying the air supply modes corresponding to the at least two users for the users to select, and acquiring the air supply mode selected by the users.
In some embodiments, the processor, when implementing setting of the corresponding air supply range according to the position coordinates, implements:
determining a deviation angle of the user according to the position coordinate of the user and a field angle of a camera, wherein the deviation angle is an angle of deviation of the position coordinate of the user relative to a center line of the field angle; and determining a corresponding air supply range according to the deviation angle.
In some embodiments, the processor, when determining the blowing range corresponding to the fan according to the position coordinates, implements:
if the target image comprises at least two users, determining deviation angles of the at least two users according to the position coordinates of the at least two users and the field angle of a camera, wherein the deviation angles are angles of deviation of the position coordinates of the users relative to the center line of the field angle;
and determining a corresponding air supply range according to the deviation angles of at least two users.
In some embodiments, the processor, when performing adjusting of the rotation angle of the fan according to the air supply range and performing air supply by using the air supply mode, performs:
if the air supply mode is directional blowing, adjusting the rotation angle of the fan to the central position of the air supply range and supplying air by adopting the directional blowing; and if the air supply mode is swinging blowing, adjusting the rotation angle of the fan to swing and supply air in the air supply range.
In some embodiments, the fan is further equipped with a fill-in light, and the processor, when implementing the acquiring of the image taken by the camera equipped with the fan as the target image, implements:
turning on the light supplement lamp, and controlling the light supplement lamp to supplement light for the camera; and shooting the image subjected to light supplement through a camera to serve as a target image.
The embodiment of the application further provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, the computer program comprises program instructions, and the processor executes the program instructions to realize any fan adjusting method based on face recognition provided by the embodiment of the application.
The computer readable storage medium may be an internal storage unit of the fan described in the foregoing embodiment, for example, a hard disk or a memory of the fan. The computer readable storage medium may also be an external storage device of the fan, such as a plug-in hard disk provided on the fan, a Smart Media Card (SMC), a Secure Digital Card (SD), a Flash memory Card (Flash Card), and the like.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A fan adjusting method based on face recognition is characterized by comprising the following steps:
acquiring an image shot by a camera carried by the fan as a target image, wherein the target image comprises at least one user;
determining identity information and position coordinates of a user in the target image based on a face recognition model;
acquiring historical blowing data of the user according to the identity information of the user;
determining an air supply mode corresponding to the user according to the historical air supply data;
and determining an air supply range corresponding to the fan according to the position coordinates, adjusting the rotation angle of the fan according to the air supply range, and supplying air by adopting the air supply mode.
2. The fan adjustment method based on face recognition according to claim 1, wherein the determining the identity information and the position coordinates of the user in the target image based on the face recognition model comprises:
inputting the target image into a trained face recognition model for recognition, and outputting a prediction identity and a prediction coordinate corresponding to the user and a prediction probability corresponding to the prediction identity and the prediction coordinate;
if the prediction probability corresponding to the predicted identity is larger than a first preset threshold value, taking the predicted identity as identity information of the user;
and if the prediction probability corresponding to the prediction coordinate is greater than a second preset threshold value, taking the prediction coordinate as the position coordinate of the user.
3. The fan adjusting method based on face recognition according to claim 1, wherein the obtaining historical blowing data of the user according to the identity information of the user comprises:
and acquiring historical blowing data corresponding to the identity information according to the identity information of the user to obtain the historical blowing data of the user, wherein the historical blowing data comprises a blowing mode set by the user.
4. The fan adjusting method based on face recognition according to claim 1, wherein the determining an air supply mode corresponding to the user according to the historical air blowing data comprises:
if the target image comprises at least two users, determining air supply modes corresponding to the at least two users according to historical air supply data corresponding to the at least two users;
and displaying the air supply modes corresponding to the at least two users for the users to select, and acquiring the air supply mode selected by the users.
5. The fan adjusting method based on face recognition according to claim 1, wherein the setting of the corresponding air supply range according to the position coordinates includes:
determining a deviation angle of the user according to the position coordinate of the user and a field angle of a camera, wherein the deviation angle is an angle of deviation of the position coordinate of the user relative to a center line of the field angle;
and determining a corresponding air supply range according to the deviation angle.
6. The method for adjusting a fan based on face recognition according to claim 1, wherein the determining an air supply range corresponding to the fan according to the position coordinates includes:
if the target image comprises at least two users, determining deviation angles of the at least two users according to the position coordinates of the at least two users and the field angle of a camera, wherein the deviation angles are angles of deviation of the position coordinates of the users relative to the center line of the field angle;
and determining a corresponding air supply range according to the deviation angles of at least two users.
7. The method for adjusting the fan based on the face recognition, according to the air supply range, and by adopting the air supply mode to supply air, comprises the following steps:
if the air supply mode is directional blowing, adjusting the rotation angle of the fan to the central position of the air supply range and supplying air by adopting the directional blowing;
and if the air supply mode is swinging blowing, adjusting the rotation angle of the fan to swing and supply air in the air supply range.
8. The fan adjustment method based on face recognition according to claim 1, wherein the fan is further provided with a supplementary lighting lamp;
the acquiring of the image shot by the camera carried by the fan as a target image includes:
turning on the light supplement lamp, and controlling the light supplement lamp to supplement light for the camera;
and shooting the image subjected to light supplement through a camera to serve as a target image.
9. A fan, comprising a camera, a memory, and a processor;
the camera is used for collecting images;
the memory is used for storing a computer program;
the processor, configured to execute the computer program and when executing the computer program, implement the fan adjustment method based on face recognition according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to implement the face recognition-based fan adjustment method according to any one of claims 1 to 8.
CN201911176267.5A 2019-11-26 2019-11-26 Fan adjusting method based on face recognition, fan and storage medium Pending CN112943661A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911176267.5A CN112943661A (en) 2019-11-26 2019-11-26 Fan adjusting method based on face recognition, fan and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911176267.5A CN112943661A (en) 2019-11-26 2019-11-26 Fan adjusting method based on face recognition, fan and storage medium

Publications (1)

Publication Number Publication Date
CN112943661A true CN112943661A (en) 2021-06-11

Family

ID=76225056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911176267.5A Pending CN112943661A (en) 2019-11-26 2019-11-26 Fan adjusting method based on face recognition, fan and storage medium

Country Status (1)

Country Link
CN (1) CN112943661A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107061339A (en) * 2017-06-30 2017-08-18 广东美的环境电器制造有限公司 Electric fan and its control method
CN107246714A (en) * 2017-06-28 2017-10-13 广东美的制冷设备有限公司 Air conditioning control method and its equipment
CN107314511A (en) * 2017-08-23 2017-11-03 广东美的制冷设备有限公司 The control method and device of air-conditioning equipment, air-conditioning
CN108495056A (en) * 2018-06-12 2018-09-04 努比亚技术有限公司 Photographic method, mobile terminal and computer readable storage medium
CN109376672A (en) * 2018-10-31 2019-02-22 银河水滴科技(北京)有限公司 Target object localization method and device based on living things feature recognition
CN110222764A (en) * 2019-06-10 2019-09-10 中南民族大学 Shelter target detection method, system, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107246714A (en) * 2017-06-28 2017-10-13 广东美的制冷设备有限公司 Air conditioning control method and its equipment
CN107061339A (en) * 2017-06-30 2017-08-18 广东美的环境电器制造有限公司 Electric fan and its control method
CN107314511A (en) * 2017-08-23 2017-11-03 广东美的制冷设备有限公司 The control method and device of air-conditioning equipment, air-conditioning
CN108495056A (en) * 2018-06-12 2018-09-04 努比亚技术有限公司 Photographic method, mobile terminal and computer readable storage medium
CN109376672A (en) * 2018-10-31 2019-02-22 银河水滴科技(北京)有限公司 Target object localization method and device based on living things feature recognition
CN110222764A (en) * 2019-06-10 2019-09-10 中南民族大学 Shelter target detection method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107314511B (en) Control method and device of air conditioning equipment and air conditioner
CN106973278B (en) A kind of automatic white balance device and method with reference to face color character
US8902328B2 (en) Method of selecting a subset from an image set for generating high dynamic range image
US9704250B1 (en) Image optimization techniques using depth planes
CN104978710B (en) A kind of method and apparatus that face brightness is adjusted based on identification of taking pictures
WO2020073572A1 (en) Control method, control device, depth camera, and electronic device
WO2016134534A1 (en) Method for automatically adjusting camera and electronic device
US20110254846A1 (en) User adaptive display device and method thereof
CN109974230B (en) Operation control method, operation control device, air conditioner and computer readable storage medium
CN112949347B (en) Fan adjusting method based on human body posture, fan and storage medium
US10382734B2 (en) Electronic device and color temperature adjusting method
JP2017053603A (en) Air conditioner
JP2016048128A (en) Air conditioner
CN113584843B (en) Circulating fan control method, circulating fan and storage medium
CN112855594A (en) Air supply control method, fan and computer readable storage medium
CN109313883A (en) Image orientation based on orientation of faces detection
CN112696372A (en) Fan adjusting method, fan and storage medium
CN112377444A (en) Intelligent fan adjusting method and device, intelligent fan and control panel
CN106686320A (en) Tone mapping method based on numerical density balance
US11830200B2 (en) Ambient temperature reporting through infrared facial recognition
CN111240217B (en) State detection method and device, electronic equipment and storage medium
CN111963473B (en) Fan control method and device and fan
CN112943661A (en) Fan adjusting method based on face recognition, fan and storage medium
JP2017152866A (en) Image processing system and image processing method
CN112926357A (en) Method for controlling inclination angle of fan, fan and computer readable storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210611

RJ01 Rejection of invention patent application after publication