Circulating fan control method, circulating fan and storage medium

文档序号:184626 发布日期:2021-11-02 浏览:32次 中文

阅读说明:本技术 循环扇控制方法、循环扇及存储介质 (Circulating fan control method, circulating fan and storage medium ) 是由 陈小平 唐清生 于 2020-04-30 设计创作,主要内容包括:本申请涉及智能家居领域,具体公开了一种循环扇控制方法、循环扇及存储介质,所述方法包括:获取所述深度摄像头采集的包括挂放衣物的彩色深度图像,所述彩色深度图像包括深度信息;根据所述深度信息确定所述循环扇在第一方向上的吹风距离;将所述彩色深度图像输入预先训练的识别模型,以确定所述挂放衣物的潮湿区域;基于所述潮湿区域在所述彩色深度图像中的位置确定所述潮湿区域的边界坐标;根据所述边界坐标和所述吹风距离计算所述循环扇在第二方向上的左右偏转角度区间,以根据所述左右偏转角度区间调节所述循环扇的送风范围。使循环扇能够根据晾衣架上挂放衣物的实际干湿情况对送风范围进行实时调节。(The application relates to the field of smart home, and particularly discloses a circulating fan control method, a circulating fan and a storage medium, wherein the method comprises the following steps: acquiring a color depth image which is acquired by the depth camera and comprises hung clothes, wherein the color depth image comprises depth information; determining the blowing distance of the circulating fan in the first direction according to the depth information; inputting the color depth image into a pre-trained recognition model to determine a wet area for hanging clothes; determining boundary coordinates of the wet area based on a location of the wet area in the color depth image; and calculating a left and right deflection angle interval of the circulating fan in the second direction according to the boundary coordinate and the blowing distance so as to adjust the air supply range of the circulating fan according to the left and right deflection angle interval. The circulating fan can adjust the air supply range in real time according to the actual dry and wet condition of clothes hung on the clothes hanger.)

1. A control method of a circulation fan is characterized in that a depth camera is arranged on the circulation fan, and comprises the following steps:

acquiring a color depth image which is acquired by the depth camera and comprises hung clothes, wherein the color depth image comprises depth information;

determining the blowing distance of the circulating fan in the first direction according to the depth information;

inputting the color depth image into a pre-trained recognition model to determine a wet area for hanging clothes;

determining boundary coordinates of the wet area based on a location of the wet area in the color depth image;

and calculating a left and right deflection angle interval of the circulating fan in the second direction according to the boundary coordinate and the blowing distance so as to adjust the air supply range of the circulating fan according to the left and right deflection angle interval.

2. The method of claim 1, wherein determining boundary coordinates of the wet area based on its position in the color depth image comprises:

acquiring a plurality of pixel point coordinates of the moisture area for hanging clothes in the color depth image;

and screening the coordinates of the pixel points to obtain the boundary coordinates of the humid area.

3. The circulation fan control method according to claim 1, characterized by further comprising:

and calculating the vertical deflection angle interval of the circulating fan in the third direction according to the boundary coordinate and the blowing distance.

4. The circulating fan control method according to claim 3, wherein the boundary coordinates include an upper boundary coordinate and a lower boundary coordinate, and the calculating of the up-down deflection angle section of the circulating fan in the third direction from the boundary coordinates and the blowing distance includes:

acquiring a reference line of the color depth image, and calculating an upper image distance between the upper boundary coordinate and the reference line and a lower image distance between the lower boundary coordinate and the reference line;

respectively calculating an upper deflection distance and a lower deflection distance of the circulating fan in a third direction according to the upper image distance and the lower image distance based on a deflection distance calculation formula;

calculating an upper deflection angle and a lower deflection angle of the circulating fan according to the upper deflection distance, the lower deflection distance and the blowing distance respectively by using an inverse trigonometric function formula;

and determining an upper deflection angle interval and a lower deflection angle interval of the circulating fan based on the upper deflection angle and the lower deflection angle.

5. The circulation fan control method according to claim 1, wherein the boundary coordinates include a left boundary coordinate and a right boundary coordinate, and the calculating a left-right deflection angle section of the circulation fan in the second direction from the boundary coordinates and the blowing distance includes:

acquiring a reference line of the color depth image, and calculating a left image distance between the left boundary coordinate and the reference line and a right image distance between the right boundary coordinate and the reference line;

respectively calculating a left deflection distance and a right deflection distance of the circulating fan in a second direction according to the left image distance and the right image distance based on a deflection distance calculation formula;

calculating a left deflection angle and a right deflection angle of the circulating fan according to the left deflection distance, the right deflection distance and the blowing distance respectively by using an inverse trigonometric function formula;

and determining a left and right deflection angle interval of the circulating fan based on the left deflection angle and the right deflection angle.

6. The circulating fan control method according to claim 5, wherein the determining a left-right deflection angle section of the circulating fan based on the left deflection angle and the right deflection angle includes:

determining the position of the wetting area in the depth color image according to the left boundary coordinate, the right boundary coordinate and the reference line;

determining the left and right deflection directions of the circulating fan according to the position of the moisture area in the depth color image;

and determining a left deflection angle interval and a right deflection angle interval of the circulating fan according to the left deflection direction, the right deflection direction, the left deflection angle and the right deflection angle.

7. The circulation fan control method according to claim 4 or 5, wherein the deflection distance calculation formula is as follows:

wherein, WiDenotes a deflection distance, F denotes an air blowing distance, F denotes a focal length of the camera, xiIndicating image distance and i indicating orientation.

8. The circulation fan control method according to claim 1, characterized by further comprising:

acquiring a sample image, wherein the sample image comprises a wet-state clothes image and a corresponding dry-state clothes image which are shot by a depth camera;

marking the sample image according to the wet state and the dry state to construct sample data;

and based on the convolutional neural network, performing model training according to the sample data to obtain an identification model, and taking the obtained identification model as a pre-trained identification model.

9. A circulation fan, comprising a depth camera, a memory, and a processor;

the camera is used for collecting a color depth image including clothes hung on the camera;

the memory is used for storing a computer program;

the processor is configured to execute the computer program and to implement the circulation fan control method according to any one of claims 1 to 8 when executing the computer program.

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 circulation fan control method according to any one of claims 1 to 8.

Technical Field

The application relates to the field of smart home, in particular to a circulating fan control method, a circulating fan and a storage medium.

Background

In rainy or wet weather, clothes aired on the clothes hanger cannot be aired in time due to weather, and bacteria can grow on the clothes when the clothes are wet for a long time, so that skin diseases are caused. Therefore, in order to dry the clothes on the clothes hanger in time, the circulating fan can be used for blowing air to the position of the clothes hanger, so as to promote air circulation and accelerate the drying speed of the clothes.

However, most of the existing circulating fans need a user to manually adjust the swing angle and the air supply mode of the circulating fan, so that the circulating fan can blow air according to the position of the clothes hanger, wet clothes hung on the clothes hanger are gradually dried in the air blowing process, the circulating fan cannot adjust the air supply range in real time according to the actual dry and wet condition of the clothes hung on the clothes hanger, and the use experience of the user is reduced.

Therefore, how to adjust the air supply range of the circulating fan in real time according to the actual dry and wet condition of the clothes hung on the clothes hanger becomes an urgent problem to be solved.

Disclosure of Invention

The application provides a control method of a circulating fan, the circulating fan and a storage medium, so that the circulating fan can adjust an air supply range in real time according to the actual dry and wet condition of clothes hung on a clothes hanger.

In a first aspect, the present application provides a method for controlling a circulation fan, where the circulation fan is provided with a depth camera, and the method includes:

acquiring a color depth image which is acquired by the depth camera and comprises hung clothes, wherein the color depth image comprises depth information;

determining the blowing distance of the circulating fan in the first direction according to the depth information;

inputting the color depth image into a pre-trained recognition model to determine a wet area for hanging clothes;

determining boundary coordinates of the wet area based on a location of the wet area in the color depth image;

and calculating a left and right deflection angle interval of the circulating fan in the second direction according to the boundary coordinate and the blowing distance so as to adjust the air supply range of the circulating fan according to the left and right deflection angle interval.

In a second aspect, the present application further provides a circulation fan, including a depth camera, a memory, and a processor;

the camera is used for collecting a color depth image including clothes hung on the camera;

the memory is used for storing a computer program;

the processor is configured to execute the computer program and to implement the circulation fan control method as described above when executing the computer program.

In a third aspect, the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the loop fan control method as described above.

The method comprises the steps of acquiring a color depth image which is acquired by a depth camera and contains hung clothes, determining the blowing distance of a circulating fan according to depth information in the color depth image, inputting the color depth image into a pre-trained recognition model to determine a wet area where the clothes are hung, determining the boundary coordinate of the wet area based on the position of the wet area in the color depth image, and finally calculating the left and right deflection angle intervals of the circulating fan in the second direction according to the boundary coordinate and the blowing distance, so that the air supply range of the circulating fan can be adjusted according to the left and right deflection angle intervals. Confirm to hang the wet region of putting the clothing according to the colored depth image who gathers to deflection angle interval about confirming the circulation fan according to the space range in wet region, thereby confirm the air supply scope of circulation fan, make the circulation fan can carry out accurate the blowing to the space range of hanging the wet region of putting the clothing, and along with hanging the gradually dry of putting the clothing, the circulation fan can be according to wet region in time adjustment air supply region, has improved convenience and the precision to circulation fan control.

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 circulation fan provided by an embodiment of the present application;

FIG. 2 is a schematic diagram illustrating steps of a training method for recognizing a model according to an embodiment of the present application;

FIG. 3 is a schematic diagram illustrating steps of a method for controlling a circulation fan according to an embodiment of the present disclosure;

fig. 4 is a schematic diagram of a blowing distance of a circulation fan in a first direction according to an embodiment of the present application;

FIG. 5 is a schematic diagram illustrating the steps provided by an embodiment of the present application for determining the coordinates of the boundary of a wet area;

fig. 6 is a schematic view of a deflection distance of the circulation fan in a second direction according to an embodiment of the present application;

FIG. 7 is a schematic diagram of a step of calculating a left-right deflection angle interval of the circulation fan in the second direction according to an embodiment of the present application;

FIG. 8 is a schematic diagram of a step of determining an angle interval of vertical deflection of a circulation fan according to an embodiment of the present application;

FIG. 9 is a schematic diagram illustrating steps of another method for controlling a circulation fan according to an embodiment of the present disclosure;

fig. 10 is a schematic step diagram of calculating an up-down deflection angle interval of the circulation fan in the third direction according to the embodiment of the present application.

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.

The embodiment of the application provides a circulating fan control method, a circulating fan control system and a storage medium.

Referring to fig. 1, fig. 1 is a schematic block diagram of a circulation fan according to an embodiment of the present disclosure. The circulation fan 10 includes a depth camera 11, a processor 12, and a memory 13, wherein the depth camera 11, the processor 12, and the memory 13 are connected by a bus.

The memory 13 may include a nonvolatile storage medium and an internal memory, among others.

The non-volatile storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause a processor to perform any of the loop fan control methods.

The depth camera 11 is used for collecting color depth images, and in the embodiment of the present application, is mainly used for collecting depth images including clothes hanging in the blowing range of the circulating fan.

The processor 12 is used to provide computing and control capabilities to support the operation of the overall terminal device.

The internal memory provides an environment for running a computer program in the nonvolatile storage medium, and the computer program, when executed by the processor, causes the processor to execute any one of the loop fan control methods.

It will be understood that the structure shown in fig. 1 is a block diagram of only a part of the structure related to the present application, and does not constitute a limitation of the circulation fan to which the present application is applied, and a specific circulation fan may include more or less components than those shown in the drawings, or combine some components, or have a different arrangement of components.

It should be understood that Processor 12 may be a Central Processing Unit (CPU), and that the Processor may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

Wherein, in one embodiment, the processor is configured to execute a computer program stored in the memory to implement the steps of:

acquiring a color depth image which is acquired by the depth camera and comprises hung clothes, wherein the color depth image comprises depth information;

determining the blowing distance of the circulating fan in the first direction according to the depth information;

inputting the color depth image into a pre-trained recognition model to determine a wet area for hanging clothes;

determining boundary coordinates of the wet area based on a location of the wet area in the color depth image;

and calculating a left and right deflection angle interval of the circulating fan in the second direction according to the boundary coordinate and the blowing distance so as to adjust the air supply range of the circulating fan according to the left and right deflection angle interval.

In one embodiment, the processor, in effecting said determining boundary coordinates of the wetting zone based on the location of the wetting zone in the colour depth image, is operable to effect:

acquiring a plurality of pixel point coordinates of the moisture area for hanging clothes in the color depth image;

and screening the coordinates of the pixel points to obtain the boundary coordinates of the humid area.

In one embodiment, the processor is further configured to implement:

and calculating the vertical deflection angle interval of the circulating fan in the third direction according to the boundary coordinate and the blowing distance.

In one embodiment, the boundary coordinates include an upper boundary coordinate and a lower boundary coordinate, and the processor, when implementing the calculating of the up-down deflection angle interval of the circulation fan in the third direction according to the boundary coordinates and the blowing distance, is configured to implement:

acquiring a reference line of the color depth image, and calculating an upper image distance between the upper boundary coordinate and the reference line and a lower image distance between the lower boundary coordinate and the reference line;

respectively calculating an upper deflection distance and a lower deflection distance of the circulating fan in a third direction according to the upper image distance and the lower image distance based on a deflection distance calculation formula;

calculating an upper deflection angle and a lower deflection angle of the circulating fan according to the upper deflection distance, the lower deflection distance and the blowing distance respectively by using an inverse trigonometric function formula;

and determining an upper deflection angle interval and a lower deflection angle interval of the circulating fan based on the upper deflection angle and the lower deflection angle.

In one embodiment, the boundary coordinates include a left boundary coordinate and a right boundary coordinate, and the processor, when implementing the calculating of the left-right deflection angle interval of the circulation fan in the second direction according to the boundary coordinates and the blowing distance, is configured to implement:

acquiring a reference line of the color depth image, and calculating a left image distance between the left boundary coordinate and the reference line and a right image distance between the right boundary coordinate and the reference line;

respectively calculating a left deflection distance and a right deflection distance of the circulating fan in a second direction according to the left image distance and the right image distance based on a deflection distance calculation formula;

calculating a left deflection angle and a right deflection angle of the circulating fan according to the left deflection distance, the right deflection distance and the blowing distance respectively by using an inverse trigonometric function formula;

and determining a left and right deflection angle interval of the circulating fan based on the left deflection angle and the right deflection angle.

In one embodiment, the processor, in effecting said determining a left-right deflection angle interval for the circulation fan based on the left deflection angle and the right deflection angle, is adapted to effect:

determining the position of the wetting area in the depth color image according to the left boundary coordinate, the right boundary coordinate and the reference line;

determining the left and right deflection directions of the circulating fan according to the position of the moisture area in the depth color image;

and determining a left deflection angle interval and a right deflection angle interval of the circulating fan according to the left deflection direction, the right deflection direction, the left deflection angle and the right deflection angle.

In one embodiment, the deflection distance calculation formula is as follows:

wherein, WiDenotes a deflection distance, F denotes an air blowing distance, F denotes a focal length of the camera, xiIndicating image distance and i indicating orientation.

In one embodiment, the processor is further configured to implement:

acquiring a sample image, wherein the sample image comprises a wet-state clothes image and a corresponding dry-state clothes image which are shot by a depth camera;

marking the sample image according to the wet state and the dry state to construct sample data;

and based on the convolutional neural network, performing model training according to the sample data to obtain an identification model, and taking the obtained identification model as a pre-trained identification model.

Referring to fig. 2, fig. 2 is a schematic diagram illustrating steps of a training method for recognition models according to an embodiment of the present disclosure. The recognition model is obtained by model training based on a convolutional neural network, and can be obtained by training with other networks.

As shown in fig. 2, the training method of the recognition model is used to train the recognition model for application to the cyclic fan control method. The training method comprises a step S201 and a step S203.

S201, obtaining a sample image, wherein the sample image comprises a wet-state clothes image and a corresponding dry-state clothes image which are shot by a depth camera.

Specifically, a depth camera is used for shooting a clothes image of the same clothes in a wet state and a clothes image in a dry state, so that the shot clothes images are used as sample images together.

The image of the piece of clothing in the wet state may be that the piece of clothing is all in the wet state, or that a part of the piece of clothing is in the wet state, for example, a one-piece dress may be that the piece of one-piece dress is all in the wet state, or that a skirt pendulum of the one-piece dress is in the wet state.

In the specific implementation process, in the process of shooting the sample image, the clothes with different colors and different materials can be shot so as to improve the diversity of the sample image and improve the recognition accuracy of the recognition model obtained by training.

S202, marking the sample image according to the wet state and the dry state to construct sample data.

Specifically, images in a wet state and images in a dry state in the sample images are respectively labeled, so that sample data is constructed, and the identification model is conveniently trained according to the labeled sample data.

Wherein, for the image of the clothes part in the wet state, the wet part and the dry part can be respectively marked, thereby constructing sample data.

And S203, based on the convolutional neural network, performing model training according to the sample data to obtain an identification model, and taking the obtained identification model as a pre-trained identification model.

Specifically, the sample data is input into the convolutional neural network for model training by using the convolutional neural network, and after multiple iterative training and verification, the finally obtained recognition model is used as a pre-trained recognition model.

In some embodiments, because the circulation fan control method is applied to the circulation fan, the trained model can be stored in the circulation fan, so that the data processing speed and the reaction speed of the model are increased, the interaction speed is increased, and more real-time experience is brought to a user.

In some embodiments, in order to ensure the normal operation of the circulation fan and quickly identify the state of hanging clothes, the trained identification model is compressed, and the compressed model is stored in the identification device of the circulation fan.

The compression processing specifically includes quantization processing and the like on the recognition model to reduce the size of the recognition model, so that the recognition model can be conveniently stored in the recognition device of the circulation fan with smaller capacity.

According to the training method provided by the embodiment, the clothes images in the wet state and the dry state are obtained, the sample images are labeled, the sample data are constructed, finally, model training is carried out according to the sample data based on the convolutional neural network to obtain the recognition model, the obtained recognition model is applied to the circulating fan control method, and the accuracy of determining the dry state and the wet state of the hung clothes through image recognition is improved.

Referring to fig. 3, fig. 3 is a schematic step diagram of a method for controlling a circulation fan according to an embodiment of the present disclosure. The control method of the circulating fan can be applied to the circulating fan shown in fig. 1, the blowing distance of the circulating fan in the first direction is determined through the depth image containing the hung clothes, then the wet area where the clothes are hung is identified according to the color depth image containing the hung clothes, the boundary coordinates of the wet area are determined, the left and right deflection angle intervals of the circulating fan are obtained through calculation, and therefore the air supply range of the circulating fan is adjusted, and the circulating fan can better supply air to the wet area where the clothes are hung.

As shown in fig. 3, the method for controlling the circulation fan specifically includes: step S301 to step S305.

S301, acquiring a color depth image which is acquired by the depth camera and comprises a hung clothes.

Wherein the color depth image comprises depth information. And starting the depth camera on the circulating fan, and acquiring a color depth image which is acquired by the depth camera on the circulating fan and comprises hung clothes by the processor so as to further process the acquired color depth image.

In some embodiments, to reduce the power consumption of the depth camera on the circulation fan, the depth camera may be controlled to be turned on every preset period, for example, every 6 hours. And after the clothes hanger is started, acquiring a color depth image near the clothes hanger, and performing image recognition on the acquired color depth image near the clothes hanger to judge whether clothes are hung on the clothes hanger or not, if the clothes are hung on the clothes hanger, continuously acquiring the color depth image including the hung clothes, and if the clothes are not hung on the clothes hanger, closing the depth camera.

It should be noted that, for convenience of description, the depth camera mounted on the circulation fan in the present application is acquired when the circulation fan is at an initial position, that is, when the deflection angle of the fan head of the circulation fan is 0, when acquiring the color depth image including the hung clothes.

S302, determining the blowing distance of the circulating fan in the first direction according to the depth information.

The first direction is a first direction of the circulation fan relative to the hung clothes, wherein the first direction can be a horizontal longitudinal direction, and the blowing distance is a distance between the hung clothes and the circulation fan in the horizontal longitudinal direction. As shown in fig. 4, F denotes an air blowing distance.

The pixel points in the depth image represent the distance from the object at the specific coordinate to the plane of the depth camera in the field of view of the depth camera. Accordingly, through the depth information included in the color depth image, the blowing distance of the circulation fan in the first direction with respect to the hung laundry may be determined.

In some embodiments, the circulation fan control method further includes: and determining the blowing gear of the circulating fan according to the blowing distance.

Specifically, the gear of blowing of circulation fan is higher, and then wind-force is big more, and it is far away also that it blows, consequently, acquires the distance interval of blowing of each gear of circulation fan respectively, after obtaining the distance of blowing, can judge the gear of blowing of circulation fan according to this distance of blowing for circulation fan can automatically regulated wind-force, and it is convenient to use.

S303, inputting the color depth image into a pre-trained recognition model to determine the wet area for hanging clothes.

Specifically, the color depth image is input into a recognition model trained in advance, the recognition model carries out image recognition on the hung clothes, and the wet area of the hung clothes is determined from the color depth image of the hung clothes.

Since the colors of the clothes in the wet and dry states are slightly different for the clothes with the same color, the color depth image can be subjected to image recognition by training a recognition model in advance so as to determine the wet area of the clothes.

S304, determining boundary coordinates of the wetting area based on the position of the wetting area in the color depth image.

Specifically, the position of the moisture area in the color depth image is determined, and the boundary coordinate of the moisture area is determined according to the position of the moisture area.

The coordinate of the boundary coordinate is a coordinate system established by taking the position of the camera on the circulating fan as an origin.

In some embodiments, referring to fig. 5, determining the boundary coordinates of the wetting area may specifically include steps S3041 and S3042.

S3041, obtaining coordinates of a plurality of pixel points of the damp area hung with clothes in the color depth image.

Specifically, after the identification model identifies the wet area where the clothes are hung, a plurality of pixel point coordinates of the wet area in the whole color depth image are obtained, wherein the plurality of pixel point coordinates jointly form the wet area where the clothes are hung.

S3042, screening the coordinates of the pixel points to obtain boundary coordinates of the humid area.

Specifically, a plurality of pixel point coordinates forming a damp area for hanging clothes are respectively screened, so that boundary coordinates of the damp area are obtained.

The boundary coordinates may include an upper boundary coordinate, a lower boundary coordinate, a left boundary coordinate, and a right boundary coordinate.

When the upper boundary coordinate and the lower boundary coordinate are screened, the abscissa of each pixel point coordinate can be screened, the pixel point coordinate corresponding to the maximum value of the abscissa is taken as the right boundary coordinate, and the pixel point coordinate corresponding to the minimum value of the abscissa is taken as the left boundary coordinate.

And if the pixel point coordinate corresponding to the maximum value of the abscissa and/or the pixel point coordinate corresponding to the minimum value of the abscissa are multiple, taking any one as the right boundary coordinate or the left boundary coordinate.

When the upper boundary coordinate or the lower boundary coordinate is screened, the vertical coordinate of each pixel point coordinate can be screened, the pixel point coordinate corresponding to the maximum value of the vertical coordinate is taken as the upper boundary coordinate, and the pixel point coordinate corresponding to the minimum value of the vertical coordinate is taken as the lower boundary coordinate.

And if the pixel point coordinate corresponding to the maximum value of the vertical coordinate and/or the pixel point coordinate corresponding to the minimum value of the vertical coordinate is multiple, taking any one as the upper boundary coordinate or the lower boundary coordinate.

S305, calculating a left-right deflection angle interval of the circulating fan in the second direction according to the boundary coordinate and the blowing distance, and adjusting the air supply range of the circulating fan according to the left-right deflection angle interval.

Specifically, the second direction is a second direction of the circulation fan relative to the hung clothes, and after the boundary coordinates are obtained, the deflection distance of the circulation fan in the second direction can be calculated according to the boundary coordinates and the blowing distance.

The second direction may be a horizontal transverse direction, and the deflection distance of the circulation fan in the second direction relative to the hung clothes may also be referred to as a distance between the hung clothes and the head of the circulation fan in the transverse horizontal direction, as shown in fig. 6, W represents the deflection distance.

The left and right deflection distances of the circulating fan in the second direction can be calculated according to the boundary coordinates and the blowing distance, and then the left and right deflection angle intervals of the circulating fan in the second direction can be calculated according to the left and right deflection distances and the blowing distance, so that the air supply range of the circulating fan can be adjusted by the circulating fan according to the left and right deflection angle intervals.

In some embodiments, referring to fig. 7, the calculating the left-right deflection angle interval of the circulation fan in the second direction specifically includes steps S3051 to S3054.

S3051, acquiring a reference line of the color depth image, and calculating a left image distance between the left boundary coordinate and the reference line and a right image distance between the right boundary coordinate and the reference line.

The reference line refers to the position of a plane where the depth camera installed on the circulating fan is located in a coordinate system.

In the calculation of the left image distance, the abscissa in the left boundary coordinate and the abscissa of the reference line may be subtracted, and the absolute value of the difference may be taken as the left image distance.

For example, if the left boundary coordinate is (-20,40), the right boundary coordinate is (60,40), the reference line is x-25, the left image distance is | -20-25| -45, and the right image distance is |60-25| -35.

S3052, respectively calculating a left deflection distance and a right deflection distance of the circulating fan in the second direction according to the left image distance and the right image distance based on a deflection distance calculation formula.

Specifically, after the left image distance and the right image distance are calculated, the left deflection distance and the right deflection distance of the circulation fan in the second direction may be calculated respectively according to the deflection distance calculation formula.

Wherein, the calculation formula of the deflection distance is as follows:

wherein, WiDenotes a deflection distance, F denotes an air blowing distance, F denotes a focal length of the camera, xiIndicating image distance and i indicating orientation. Wherein, the orientation can be up, down, left and right.

S3053, calculating a left deflection angle and a right deflection angle of the circulating fan according to the left deflection distance, the right deflection distance and the blowing distance respectively by using an inverse trigonometric function formula.

Specifically, a left deflection included angle between the hung clothes and the circulating fan is calculated according to the blowing distance and the left deflection distance by using an inverse trigonometric function formula, and a right deflection included angle between the hung clothes and the circulating fan is calculated according to the blowing distance and the right deflection distance by using an inverse trigonometric function formula.

For example, when the blowing distance and the left yaw distance are known, the calculation formula of the left yaw angle may be:

wherein, angle A is a left deflection angle WLeft side ofIndicating the left deflection distance and F the blowing distance.

Similarly, when the blowing distance and the right yaw distance are known, the right yaw angle is calculated by the formula

Wherein, angle B is a right deflection angle, WRight sideIndicating a right deflection distance and F an air blowing distance.

S3054, determining a left deflection angle interval and a right deflection angle interval of the circulating fan based on the left deflection angle and the right deflection angle.

Specifically, after the left deflection angle and the right deflection angle are calculated, the left and right deflection angle sections of the circulating fan in the second direction can be determined.

In some embodiments, as shown in fig. 8, the left and right deflection angle intervals of the circulation fan are determined, specifically including step S3054a to step S3054 c.

S3054a, determining the position of the wetting area in the depth color image according to the left boundary coordinate, the right boundary coordinate and the datum line.

Specifically, the position of the moisture area in the depth color image, namely the position of the moisture area relative to the circulating fan, is determined according to the left boundary coordinate, the right boundary coordinate and a reference line of the moisture area on which the clothes are hung.

The position of the moisture area relative to the circulating fan can be that the moisture area is completely on the left side of the circulating fan, the moisture area is completely on the right side of the circulating fan, and the moisture area is partially on the left side of the circulating fan and partially on the right side of the circulating fan.

If the difference between the abscissa of the left boundary coordinate and the reference line is a negative number, and the difference between the abscissa of the right boundary coordinate and the reference line is a positive number, it indicates that the damp area hung with the clothes is partially on the left side of the circulating fan and partially on the right side of the circulating fan.

If the difference between the abscissa of the left boundary coordinate and the abscissa of the right boundary coordinate and the reference line is negative, it indicates that the damp area hung with clothes is on the left side of the circulating fan.

If the difference between the abscissa of the left boundary coordinate and the abscissa of the right boundary coordinate and the reference line is positive, the wetting area for hanging clothes is completely on the right side of the circulating fan.

If the difference value between the abscissa of the left boundary coordinate or the abscissa of the right boundary coordinate and the reference line is 0, it indicates that the left boundary or the right boundary of the damp area on which the clothes are hung is just facing the circulating fan.

S3054b, determining the left and right deflection directions of the circulating fan according to the positions of the hung clothes in the depth color image.

Specifically, when the wet area where the laundry is hung is entirely on the left side of the circulation fan, the left-right deflection direction of the circulation fan is always deflected on the left side of the initial position of the circulation fan.

When the damp area for hanging clothes is on the right side of the circulating fan, the left and right deflection direction of the circulating fan is always on the right side of the initial position of the circulating fan.

When the part of the damp area for hanging the clothes is on the left side of the circulating fan and the part of the damp area is on the right side of the circulating fan, the left and right deflection directions of the circulating fan are that the damp area deflects on the left side of the initial position of the circulating fan firstly and then deflects on the right side of the initial position of the circulating fan; or the fan is deflected firstly at the right side of the initial position of the circulating fan and then deflected at the left side of the initial position of the circulating fan.

S3054c, determining a left and right deflection angle interval of the circulating fan according to the left and right deflection direction, the left deflection angle and the right deflection angle.

For example, if it is defined that the angle of the circulation fan when it rotates on the right side from the initial position is positive and the angle when it rotates on the left side is negative, then:

when the damp area for hanging the clothes is on the left side of the circulating fan, if the left deflection angle is 70 degrees and the right deflection angle is 15 degrees, the left deflection angle and the right deflection angle of the circulating fan range from minus 15 degrees to minus 70 degrees.

When the damp area for hanging the clothes is on the left side of the circulating fan, if the left deflection angle is 15 degrees and the right deflection angle is 70 degrees, the left and right deflection angle interval of the circulating fan is 15-70 degrees.

When the wet area for hanging clothes is partially arranged on the left side of the circulating fan and partially arranged on the right side of the circulating fan, if the left deflection angle is 15 degrees and the right deflection angle is 70 degrees, the left and right deflection angle interval of the circulating fan is-15-70 degrees.

In the specific implementation process, after the readings of the left deflection angle and the right deflection angle are calculated, the calculated left deflection angle can be reduced by 5 degrees, the calculated right deflection angle can be increased by 5 degrees, and the left deflection angle and the right deflection angle are used as the final left deflection angle and right deflection angle interval of the circulating fan so as to compensate the calculation errors of the left deflection angle and the right deflection angle during calculation and improve the blowing effect of the circulating fan.

According to the control method of the circulation fan provided by the embodiment, the color depth image which is acquired by the depth camera and comprises the hung clothes is obtained, the blowing distance of the circulation fan is determined according to the depth information in the color depth image, then the color depth image is input into the pre-trained recognition model, so that the damp area where the clothes are hung is determined, the boundary coordinate of the damp area is determined according to the position of the damp area in the color depth image, and finally the left and right deflection angle intervals of the circulation fan in the second direction are calculated according to the boundary coordinate and the blowing distance, so that the air supply range of the circulation fan can be adjusted according to the left and right deflection angle intervals. The wetting area for hanging clothes is determined according to the collected color depth image, the left and right deflection angle interval of the circulating fan is determined according to the space range of the wetting area, the air supply range of the circulating fan is determined, the circulating fan can accurately blow the space range of the wetting area for hanging clothes, and convenience and accuracy of control over the circulating fan are improved.

Referring to fig. 9, fig. 9 is a schematic step diagram of another method for controlling a circulation fan according to an embodiment of the present disclosure.

As shown in fig. 9, the method for controlling the circulation fan specifically includes: step S401 to step S406.

S401, acquiring a color depth image which is acquired by the depth camera and comprises a hung clothes;

s402, determining the blowing distance of the circulating fan in the first direction according to the depth information;

s403, inputting the color depth image into a pre-trained recognition model to determine a wet area for hanging clothes;

s404, determining boundary coordinates of the wetting area based on the position of the wetting area in the color depth image;

s405, calculating a left-right deflection angle interval of the circulating fan in a second direction according to the boundary coordinate and the blowing distance;

and S406, calculating an upper deflection angle interval and a lower deflection angle interval of the circulating fan in a third direction according to the boundary coordinate and the blowing distance, and adjusting the air supply range of the circulating fan according to the left deflection angle interval, the right deflection angle interval and the upper deflection angle interval and the lower deflection angle interval.

The third direction may be a vertical direction, in a specific implementation process, the third direction may be a height direction in which the clothes are hung, and the vertical deflection angle interval refers to an interval in which the upper deflection angle and the lower deflection angle of the circulation fan are adjusted according to the height of the damp area in which the clothes are hung.

After the up-down deflection angle interval is obtained through calculation, the air supply range of the circulating fan can be adjusted according to the left-right deflection angle interval and the up-down deflection angle interval, so that the circulating fan can perform overall air blowing on the range area where the clothes are hung.

In some embodiments, the boundary coordinates include an upper boundary coordinate and a lower boundary coordinate. As shown in fig. 10, calculating the vertical deflection angle section of the circulation fan in the third direction specifically includes steps S4061 to S4064.

S4061, acquiring a reference line of the color depth image, and calculating an upper image distance between the upper boundary coordinate and the reference line and a lower image distance between the lower boundary coordinate and the reference line.

The reference line refers to the position of a plane where the depth camera installed on the circulating fan is located in a coordinate system.

In calculating the top image distance, the ordinate in the top boundary coordinate and the ordinate of the reference line may be subtracted, and the absolute value of the difference may be taken as the top image distance.

For example, if the upper boundary coordinate is (-20,100), the lower boundary coordinate is (60,40), the reference line is y equal to 25, the upper image distance is |100-25| -75, and the lower image distance is |40-25| -15.

S4062, based on a deflection distance calculation formula, calculating an upper deflection distance and a lower deflection distance of the circulation fan in a third direction according to the upper image distance and the lower image distance respectively.

Specifically, after the upper image distance and the lower image distance are calculated, the upper image distance and the lower image distance of the circulation fan in the third direction may be calculated, respectively, according to the deflection distance calculation formula.

Wherein, the calculation formula of the deflection distance is as follows:

wherein, WiDenotes a deflection distance, F denotes an air blowing distance, F denotes a focal length of the camera, xiIndicating image distance and i indicating orientation.

S4063, calculating an upper deflection angle and a lower deflection angle of the circulating fan according to the upper deflection distance, the lower deflection distance and the blowing distance respectively by using an inverse trigonometric function formula.

Specifically, a left deflection included angle between the hung clothes and the circulating fan is calculated according to the blowing distance and the left deflection distance by using an inverse trigonometric function formula, and a right deflection included angle between the hung clothes and the circulating fan is calculated according to the blowing distance and the right deflection distance by using an inverse trigonometric function formula.

For example, when the blowing distance and the upper deflecting distance are known, the calculation formula of the upper deflecting angle may be:

wherein, the angle C is an upper deflection angle WOn the upper partRepresents the upper deflection distance and F represents the blowing distance.

Similarly, when the blowing distance and the lower deflecting distance are known, the calculation formula of the lower deflecting angle is as follows:

wherein, angle D is a lower deflection angle, WLower partDenotes a lower deflection distance, and F denotes a blowing distance.

S4064, determining an upper deflection angle interval and a lower deflection angle interval of the circulating fan based on the upper deflection angle and the lower deflection angle.

Specifically, after the upper deflection angle and the lower deflection angle are calculated, the upper and lower deflection angle sections of the circulation fan in the third direction can be determined.

For example, if the upward deflection angle is 70 ° and the downward deflection angle is 15 °, the left-right deflection angle section of the circulation fan is 15 ° to 70 °.

According to the control method of the circulation fan provided by the embodiment, the color depth image which is acquired by the depth camera and comprises the hung clothes is obtained, the blowing distance of the circulation fan is determined according to the depth information in the color depth image, the color depth image is input into the pre-trained recognition model, the moisture area where the clothes are hung is determined, the boundary coordinate of the moisture area is determined according to the position of the moisture area in the color depth image, the left and right deflection angle interval of the circulation fan in the second direction is finally calculated according to the boundary coordinate and the blowing distance, and the up and down deflection angle interval of the circulation fan in the third direction is calculated according to the boundary coordinate and the blowing distance, so that the circulation fan adjusts the air supply range according to the left and right deflection angle interval and the up and down deflection angle interval. The air supply range of the circulating fan is determined according to the width and the height of the wet area for hanging clothes, so that the circulating fan can blow air to the wet areas with different heights, and the convenience and the accuracy of control of the circulating fan are improved.

The embodiment of the application also 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 cycle fan control method provided by the embodiment of the application.

The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device.

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.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:循环扇的控制方法、循环扇及计算机可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!