ELECTRONIC DEVICE AND CONTROL METHOD APPLIED ON THE ELECTRONIC DEVICE

An electronic device includes a camera assembly, a function assembly, and a controller. The camera assembly is configured to capture a first depth image of a first user and a second depth image of the first user. The controller is configured to determine a first spatial position between the first user and the camera assembly according to the first depth image, and control the function assembly to execute a first action according to the first spatial position. The controller further configured to determine a relative displacement between the first user and the camera assembly according to the first depth image and the second depth image, and control the function assembly to execute a second action according to the relative displacement. The second action is an action to adjust a result of the function assembly based on the first action. A method and a non-transitory storage medium are also provided.

FIELD

The subject matter herein generally relates to an electric technology, and particularly to an electronic device and a control method applied on the electronic device.

BACKGROUND

Now, some control systems of some electronic devices cannot identify information of users, and thus, cannot control functions of the electronic devices according to results of identification. Thus, a barrier may be encountered by the user during using one electronic device. For example, a control system of a loudspeaker box cannot identify the information of the user, and cannot control the function of the loudspeaker box according to the result of identification. And, the user needs to operate a corresponding button on the loudspeaker box by hand, and the loudspeaker box can accordingly accomplish a corresponding function. However, the user cannot operate a volume adjustment button on the loudspeaker box manually anytime, so during a movement of the user away from the loudspeaker box, a volume heard by the user may be too small, and during a movement of the user toward the loudspeaker box, a volume heard by the user may be too large. Therefore, an experience of the user may be influenced.

SUMMARY

An embodiment of the present application provides an electronic device, a control method applied on the electronic device, and a non-transitory storage medium capable of identifying information of users, controlling functions of the electronic devices according to results of identification, thus it is convenient for the use.

In a first aspect, an embodiment of the present application provides an electronic device. The electronic device includes a camera assembly, a function assembly, and a controller. The camera assembly is configured to capture a first depth image of a first user and a second depth image of the first user. The first depth image of the first user is a first frame of a depth image captured by the camera assembly in which the first user is present after the camera assembly is turned on. The second depth image of the first user and the first depth image of the first user are continuous depth images. The controller is configured to determine a first spatial position between the first user and the camera assembly according to the first depth image, and control the function assembly to execute a first action according to the first spatial position. The controller is further configured to determine a relative displacement between the first user and the camera assembly according to the first depth image and the second depth image, and control the function assembly to execute a second action according to the relative displacement, the second action is an action to adjust a result of the function assembly based on the first action.

According to some embodiments of the present application, the function assembly includes a playing assembly. The first spatial position includes a first distance. The controller is further configured to determine a first volume according to the first distance, and control the playing assembly to play sound at the first volume.

According to some embodiments of the present application, the relative displacement includes a distance of the relative displacement. The controller is further configured to determine a size of change in a volume according to the distance of the relative displacement, and adjust a size of the volume of the sound played by the playing assembly on the first volume according to the size of change in the volume.

According to some embodiments of the present application, the function assembly includes a display assembly, the first spatial position includes a first distance. The controller is further configured to determine a first brightness according to the first distance, and control the display assembly to display information at a first brightness.

According to some embodiments of the present application, the relative displacement includes a distance of the relative displacement. The controller is further configured to determine a size of change in a brightness according to the distance of the relative displacement, and adjust a size of the brightness of the information displayed by the display assembly on the first brightness according to the size of change in the brightness.

According to some embodiments of the present application, the function assembly includes a driving assembly, the first spatial position includes a first relative direction. The controller is further configured to determine a first angle according to the first relative direction, and control the driving assembly to drive a display assembly and/or a playing assembly to rotate the first angle, causing the display assembly and/or the playing assembly to face the first user.

According to some embodiments of the present application, the relative displacement includes a direction of the relative displacement. The controller is further configured to determine a size of change in an angle according to the direction of the relative displacement, and control the driving assembly to drive the display assembly and/or the playing assembly to rotate the size of change in the angle on the first angle, causing the display assembly and/or the playing assembly to face the first user.

According to some embodiments of the present application, the camera assembly is further configured to capture a third depth image of a second user. The controller is further configured to determine a third spatial position between the second user and the camera assembly according to the third depth image, and control the function assembly to execute a third action according to the third spatial position if a third distance of the third spatial position is less than a first distance of the first spatial position or if the third distance of the third spatial position is less than a second distance of a second spatial position determined from the second depth image.

According to some embodiments of the present application, the electronic device further includes a sound reception assembly, the sound reception assembly is configured to receive voice information of the first user. The controller is further configured to control the camera assembly to turn on according to the voice information of the first user.

In a second aspect, an embodiment of the present application provides a control method. The method controls a camera assembly to capture a first depth image of a first user. The first depth image of the first user is a first frame of a depth image captured by the camera assembly in which the first user is present after the camera assembly is turned on. The method determines a first spatial position between the first user and the camera assembly according to the first depth image. The method controls a function assembly to execute a first action according to the first spatial position. The method controls the camera assembly to capture a second depth image of the first user. The second depth image of the first user and the first depth image of the first user are continuous depth images. The method determines a relative displacement between the first user and the camera assembly according to the first depth image and the second depth image. The method further controls the function assembly to execute a second action according to the relative displacement, the second action is an action to adjust a result of the function assembly based on the first action.

According to some embodiments of the present application, the first spatial position includes a first distance. The control method further determines a first volume according to the first distance, and controls a playing assembly of the function assembly to play sound at the first volume.

According to some embodiments of the present application, the relative displacement includes a distance of the relative displacement. The control method further determines a size of change in a volume according to the distance of the relative displacement, and adjusts a size of the volume of the sound played by the playing assembly on the first volume according to the size of change in the volume.

According to some embodiments of the present application, the first spatial position includes a first distance. The control method determines a first brightness according to the first distance, and controls a display assembly of the function assembly to display information at a first brightness.

According to some embodiments of the present application, the relative displacement includes a distance of the relative displacement. The control method further determines a size of change in a brightness according to the distance of the relative displacement, and adjusts a size of the brightness of the information displayed by the display assembly on the first brightness according to the size of change in the brightness.

According to some embodiments of the present application, the first spatial position includes a first relative direction. The control method further determines a first angle according to the first relative direction, and controls a driving assembly of the function assembly to drive a display assembly and/or a playing assembly to rotate the first angle, causing the display assembly and/or the playing assembly to face the first user.

According to some embodiments of the present application, the relative displacement includes a direction of the relative displacement. The control method further determines a size of change in an angle according to the direction of the relative displacement, and controls the driving assembly to drive the display assembly and/or the playing assembly to rotate the size of change in the angle on the first angle, causing the display assembly and/or the playing assembly to face the first user.

According to some embodiments of the present application, the control method further controls the camera assembly to capture a third depth image of a second user, and determines a third spatial position between the second user and the camera assembly according to the third depth image. The control method further controls the function assembly to execute a third action according to the third spatial position if a third distance of the third spatial position is less than a first distance of the first spatial position or if the third distance of the third spatial position is less than a second distance of a second spatial position determined from the second depth image.

According to some embodiments of the present application, the control method further controls the camera assembly to turn on according to voice information of the first user.

In a third aspect, an embodiment of the present application provides a non-transitory storage medium storing a set of commands, when the set of commands being executed by at least one processor of an electronic device, causing the at least one processor to control a camera assembly to capture a first depth image of a first user. The first depth image of the first user being a first frame of a depth image captured by the camera assembly in which the first user is present after the camera assembly is turned on. The non-transitory storage medium further causes the at least one processor to determine a first spatial position between the first user and the camera assembly according to the first depth image, and control a function assembly to execute a first action according to the first spatial position. The non-transitory storage medium further causes the at least one processor to control the camera assembly to capture a second depth image of the first user; the second depth image of the first user and the first depth image of the first user being continuous depth images. The non-transitory storage medium further causes the at least one processor to determine a relative displacement between the first user and the camera assembly according to the first depth image and the second depth image, and control the function assembly to execute a second action according to the relative displacement, the second action is an action to adjust a result of the function assembly based on the first action.

According to some embodiments of the present application, the non-transitory storage medium further causes the at least one processor to determine a size of change in a volume according to a distance of the relative displacement, and adjust a size of the volume of the sound played by a playing assembly of the function assembly on a first volume formed by the first action according to the size of change in the volume. The non-transitory storage medium further causes the at least one processor to determine a size of change in a brightness according to the distance of the relative displacement, and adjust a size of the brightness of the information displayed by a display assembly of the function assembly on a first brightness formed by the first action according to the size of change in the brightness.

In the disclosure, after the camera assembly captures the first depth image of the first user, the controller determines the first spatial position between the first user and the camera assembly according to the first depth image, and controls the function assembly to execute the first action according to the first spatial position, thus the electronic device can identify the first user on a position, and provide the corresponding service for the first user according to a first result of the identification. And after the camera assembly captures the second depth image of the first user, the controller determines the relative displacement between the first user and the camera assembly according to the first depth image and the second depth image, and controls the function assembly to execute the second action according to the relative displacement, thus the electronic device can identify the first user who is moving, and provide the corresponding service for the first user according to a second result of the identification.

DETAILED DESCRIPTION

“A plurality of” in this application means two or more. In the descriptions of this application, terms such as “first” and “second” are merely used for distinction and description, and should not be understood as an indication or implication of relative importance or an indication or implication of an order.

In addition, the term “for example” in the embodiments of this application is used to represent giving an example, an illustration, or a description. Any embodiment or implementation solution described as an “example” in this application should not be explained as being more preferred or having more advantages than another embodiment or implementation solution. Exactly, the term “example” is used to present a concept in a specific manner.

A brief description of related technologies is as follows.

Now, a control system of an electronic device cannot identify information of a user, and accordingly cannot automatically control a function of the electronic device according to a result of identification. Or, an identification manner of the control system of the electronic device is single and an identification capability of the control system of the electronic device is weak. For example, the control system of the electronic device can turn on the electronic device according to a voice command of the user. Thus, an experience of the user may be influenced. For example, a control system of a loudspeaker box cannot identify the information of the user, and accordingly cannot control the function of the loudspeaker box according to the result of identification. And, the user needs to operate a corresponding button on the loudspeaker box by hand, and the loudspeaker box can accordingly achieve a corresponding function. In an application scenario, the user cannot operate a volume adjustment button on the loudspeaker box by hand anytime, thus the volume of a sound played by the loudspeaker box cannot be adjusted anytime, and the loudspeaker box is held constant volume.

For avoiding operating the volume adjustment button on the loudspeaker box manually, another loudspeaker box can automatically adjust the played volume of the sound. However, during a movement of the user away from the loudspeaker box, a volume of the sound played by the another loudspeaker box may be held constant, thus a volume heard by the user may be too small. And during a movement of the user toward the loudspeaker box, the volume of the sound played by the another loudspeaker box is held constant, thus a volume heard by the user may be too large. For example, in a short time, the user may move from a position A to another position B, and then return back to the position A. The position A relative to the position B is away from the loudspeaker box. However, during the movement of the user from the position A to the position B, and from the position B to the position A, the volume of the sound played by the loudspeaker box is held constant. Thus, during the movement of the user, the volume heard by the user may be too large. Thus, an experience of the user may be influenced.

The disclosure provides an electronic device and a control method capable of identifying the information of the user and controlling the electronic device in real time according to the result of the identification, thus it is convenient for the user to use the electronic device.

The electronic device of the present embodiment can be a household appliance, for example, a loudspeaker box, a television, a dehumidifier, an air cleaner, or the like.

Referring toFIG.1,FIG.1is a block diagram illustrating an electronic device according to an embodiment of the present disclosure. The electronic device100includes a controller10, a camera assembly20, and a function assembly30. The controller10is coupled to the camera assembly20and the function assembly30. The camera assembly20can be a depth camera assembly20. The camera assembly20can be configured to capture a depth image of the user. The depth image of the user can include position information of the user in real space. In detail, a pixel gradation value of the depth image represents a distance in real space between the user and the camera assembly20, and a pixel position of the depth image represents an orientation of the user in real space. Thus, the controller10can determine a spatial position between the user and the camera assembly20according to the depth image, and determine a relative displacement between the user and the camera assembly20according to different depth images. The controller10can further generate a first control command according to the spatial position, and generate a second control command according to the relative displacement. The controller10can further control the function assembly30to execute a first action according to the first control command, and control the function assembly30to execute a second action according to the second control command, thus the function assembly30can achieve a corresponding function.

In detail, the controller10can compare each depth image and a number of pre-stored image models of the user to determine whether a user is present in a corresponding depth image. When the user is present in the depth image, the controller10can determine the spatial position between the user and the camera assembly20, and control the function assembly30to execute the first action according to the first control command.

The controller10can further determine the relative displacement between the user and the camera assembly20, and control the function assembly30to execute the second action according to the second control command. It can be understood that the controller10can omit to generate the control command, and directly control the function assembly30to execute the first action according to the spatial position, and directly control the function assembly30to execute the second action according to the relative displacement, the disclosure is not limited herein.

It can be understood that the controller10can be omitted.

Referring toFIG.2, the electronic device100is shown in detail. The electronic device100ofFIG.2is similar to the electronic device100ofFIG.1, except that:

InFIG.2, in the embodiment, the electronic device100further includes a sound reception assembly40. The sound reception assembly40is coupled to the controller10. The sound reception assembly40is configured to receive voice information of the user, and transmit the received voice information to the controller10. The controller10can generate a third control command according to the voice information. The controller10can further control the camera assembly20and/or the function assembly30to execute an action according to the third control command, thus the function module can achieve a corresponding function.

It can be understood that, the electronic device100can include both the sound reception assembly40and the camera assembly20, thus the electronic device100can achieve a voice recognition function and a spatial position recognition function, the electronic device100can accordingly have a number of identification capabilities, and an identification capability for the information of the user can be accordingly improved.

In some embodiments, the function assembly30includes a display assembly32, a playing assembly33, and a driving assembly34.

The display assembly32is configured to display information, for example display real-time information. The display assembly32can include a display screen. The display assembly32can be a LCD (liquid crystal display), a OLED (organic light-emitting diode), an AMOLED (active-matrix organic light emitting diode), a FLED (flex light-emitting diode), a MiniLED, a MicroLED, a Micro-OLED, a QLED (quantum dot light emitting diodes), or the like. The playing assembly33is configured to play the sound. The sound can be music, a broadcast, or the like. The playing assembly33can include a loudspeaker unit, a crossover, and so on. The crossover is configured to optimize the sound. For example, the crossover can perform an amplitude-frequency characteristic correction and a phase-frequency characteristic correction on an electric signal. The loudspeaker unit is configured to convert the corrected electric signal to the sound, and play the sound. The driving assembly34is configured to drive the display assembly32and the playing assembly33to rotate. The driving assembly34can include a motor, and so on.

In some embodiments, the electronic device100can further include a communication unit35. The communication unit35can be a Wi-Fi unit, a Bluetooth unit, or the like. The communication unit35is configured to enable the electronic device100to establish a connection with an internet, to achieve an information obtained from the internet. For example, the communication unit35can enable the electronic device100to obtain the real-time information from the internet. The real-time information can be time, date, news, and so on. The communication unit35can further enable the electronic device100to transmit the real-time information to the controller10. The controller10can process the real-time information and transmit the processed real-time information to the display assembly32to display. In some embodiments, a priority of the third control command is higher than a priority of the first control command, and a priority of the third control command is higher than a priority of the second control command. Namely, a priority of the sound reception assembly40is higher than a priority of the camera assembly20. Thus, when the function assembly30receives the first control command and the third control command, the function assembly30preferentially executes the third control command. And when the function assembly30receives the second control command and the third control command, the function assembly30preferentially executes the third control command.

For example, when the user enters into a position identification range of the camera assembly20, the camera assembly20captures the depth image of the user and transmits the depth image of the user to the controller10. The controller10generates the first control command according to the depth image of the user. The first control command is configured to indicate to start the driving assembly34and indicate the driving assembly34to drive the display assembly32and the playing assembly33to rotate. At the moment, the sound reception assembly40receives the voice information of the user, and the controller10generates the third control command according to the voice information of the user. The third control command is configured to indicate the driving assembly34to stop driving the display assembly32and the playing assembly33. According to the first control command and the third control command, the controller10performs the third control command, namely the controller10can control the driving assembly34to stop driving the display assembly32and the playing assembly33.

The position identification range of the camera assembly20can be a preset range, for example a field of view of 5 meters from the camera assembly20, the disclosure is not limited herein.

Referring also toFIG.3,FIG.3is a schematic view illustrating the electronic device100shown inFIG.2according to another embodiment of the present disclosure. The electronic device100further includes a cabinet50. The cabinet50includes a cabinet main body51and a top cover52. The cabinet main body51is movably coupled to the top cover52. In some embodiments, the cabinet main body51and the top cover52each can be a cylinder, a central axis of the cabinet main body51and a central axis of the top cover52are coincided, and a cross-sectional area of the cabinet main body51is greater than a cross-sectional area of the top cover52. It can be understood that, a shape of the cabinet main body51and a shape of the top cover52can be others, for example each can be a cuboid, the disclosure is not limited herein.

The camera assembly20includes one or more cameras21. Each camera21is configured to capture a depth image. In some embodiments, the one or more cameras21are arranged on a sidewall of the top cover52and are spaced from each other, thus it is convenient for the one or more cameras21to capture the depth image of the user. As shown inFIG.5,FIG.5shows a top view of the electronic device100, three cameras21are arranged equidistantly on the sidewall of the top cover52, the horizontal position identification ranges of the three cameras21are respectively S1, S2, and S3. The horizontal position identification ranges of the camera assembly20is a total of the horizontal position identification ranges of the three cameras21. It can be understood that, the position identification range of the camera assembly20can be adjusted via adjusting a number of the cameras21and adjusting the position where the cameras21are arranged on the top cover52, for example, when the number of the cameras21is four, the position identification range of the camera assembly20is a range which is 360 degrees around the electronic device100and 5 meters from the camera assembly20, the disclosure is not limited herein.

The cabinet main body51defines a receiving space. The receiving space is internal to the cabinet main body51. The receiving space is configured to receive some component of the electronic device100. For example, the receiving space can receive the controller10, the communication unit35, and the sound reception assembly40. In the embodiment, the controller10, the communication unit35, and the sound reception assembly40are fixed in the receiving space. The display assembly32and the playing assembly33each is arranged on the cabinet main body51. The display assembly32and the playing assembly33are arranged in transverse rows or in longitudinal rows on the cabinet main body51, or a number of playing assemblies are arranged around the display assembly32. It can be understood that, the position of the playing assembly33and the position of the display assembly32can be others, the disclosure is not limited herein.

The driving assembly34is arranged at a bottom of the cabinet main body51. The driving assembly34is configured to drive the cabinet main body51to rotate, the cabinet main body51is configured to bring the display assembly32and the playing assembly33to rotate. It can be understood that, the cabinet main body51is rotatably coupled to the top cover52. When the driving assembly34drives the cabinet main body51to rotate, the top cover52can keep still, thus the cameras21arranged on the sidewall of the top cover52can capture the depth image steadily.

In some embodiments, a speed for capturing the depth image by the camera assembly20is quicker, the cameras21can capture any quick movement of the user. The capturing assembly is configured to capture a first depth image of the first user and a second depth image of the first user. In some embodiments, the second depth image of the first user is different from the first depth image of the first user. Once the camera assembly20captures one depth image, the controller10immediately obtains the one depth image from the camera assembly20. For example, once the camera assembly20captures the first depth image, the controller10immediately obtains the first depth image from the camera assembly20, and once the camera assembly20captures the second depth image, the controller10immediately obtains the second depth image from the camera assembly20.

The first depth image can represent a first spatial position between the first user and the camera assembly20within the position identification range of the camera assembly20. The second depth image can represent a second spatial position between the first user and the camera assembly20within the position identification range of the camera assembly20. The position identification range of the camera assembly20can include an identification distance and an identification angle. The identification distance of the capturing assembly is LW0, as shown inFIG.4A. The identification angle of the capturing assembly is an angle range which is rotated by 0 degrees to 360 degrees on a distance between the camera assembly20and a point L, as shown inFIG.4B. It can be understood that, the identification distance of the capturing assembly and the identification range of the capturing assembly can be set according to practical situations, for example, the identification angle can be from 0 degrees to 120 degrees, the disclosure is not limited herein.

The first spatial position includes a first distance and a first relative direction. For example, as shown inFIG.4A, the first distance LW1can be a distance between the first user and the camera assembly20when the first user is at a first position W1. And for example, as shown inFIG.4B, the first relative direction θ1can be an angle formed by a first line segment connecting the first position W1and the camera assembly20and a second line segment connecting the camera assembly20and the point L. The second spatial position includes a second distance and a second relative direction. For example, as shown inFIG.4A, the second distance LW2can be a distance between the first user and the camera assembly20when the first user is at the second position W2. And for example, as shown inFIG.4B, the second relative direction θ2can be an angle formed by a third line segment connecting the second position W2and the camera assembly20and a fourth line segment connecting the camera assembly20and the point L.

The controller10is configured to determine the first spatial position between the first user and the camera assembly20according to the first depth image, and control the function assembly30to execute the first action according to the first spatial position. In some embodiments, the first depth image can be a first frame of the depth image captured by the camera assembly20in which at least one user is present after the camera assembly20is turned on, and the second depth image can be a second frame of the depth image captured by the camera assembly20after the camera assembly20captures the first frame of the depth image. It can be understood that, if there is no first user in the depth image obtained continuous after the first depth image, the procedure ends.

The controller10can take the first distance and/or the first relative direction as one or more control parameters, to control the display assembly32, the playing assembly33, and/or the driving assembly34to execute the first action. In some embodiments, the controller10controls the playing assembly33to play sound at a first volume and the display assembly32to display information at a first brightness according to the first distance. Namely, the first volume and the first brightness is formed by the first action.

For example, as shown inFIG.5andFIG.6, in the first depth image, the first user is at the first position, when the first position is the position W1, the controller10controls the playing assembly33to play at a first level volume and the display assembly32to display at a first level brightness. When the first position is the position W1′, the controller10controls the playing assembly33to play at a second level volume and the display assembly32to display at a second level brightness. Where the position W1is away from the electronic device100relative to the position W1′, the first level volume is greater than the second level volume, and the first level brightness is greater than the second level brightness.

In some embodiment, the electronic device100further stores a first relationship among a distance range, a volume, and a brightness. For example, when the distance range is 0˜3 meters, a corresponding volume is one level, and a corresponding brightness is one level, and when the distance range is 3˜6 meters, a corresponding volume is two levels, and a corresponding brightness is two levels. When the distance between the first position and the electronic device100is within the distance range 0˜3 meters, the controller10can control the playing assembly33to play at the one level volume and the display assembly32to display at the one level brightness. In some embodiments, the first relationship can be stored in the controller10. It can be understood that, the first relationship can be stored in a storage unit of the electronic device100, the disclosure is not limited herein. In some embodiments, the first distance can be directly proportional to the size of the volume and the size of the brightness, the disclosure is not limited herein.

It can be understood that, the controller10can control the playing assembly33to play sound at the first volume according to the first distance, thus the first user can always hear an appropriate size of the volume while the first user is at any first position. The controller10can control the displaying assembly33to display information at the first brightness according to the first distance, the first user can feel an appropriate size of the brightness while the first user is at any first position, thus the first user can see the displayed information clearly.

In some embodiments, the controller10can control the driving assembly34to drive the displaying assembly33and/or the playing assembly33to rotate a first angle according to the first relative direction, causing the display assembly32and/or the playing assembly33to face the first user. For example, as shown inFIG.5, in an initial state, the display assembly32and/or the playing assembly33on the cabinet main body51face the point L. In the first depth image, the first user is at the first position. InFIG.5, when the first position is the position W1, the controller10controls the driving assembly34to drive the cabinet main body51to rotate an angle θ1. At the moment, as shown inFIG.7, the cabinet main body51brings the display assembly32and the playing assembly33to rotate the angle θ1, causing the display assembly32and the playing assembly33to face the first user. When the display assembly32faces the first user, the first user can see the information displayed by the display assembly32timely. When the playing assembly33faces the first user, there is no obstacle between the first user and the loudspeaker of the playing assembly33, thus the first user can hear the sound clearly.

It can be understood that, the display assembly32facing the first user can be a display screen of the display assembly32facing the first user, and the playing assembly33facing the first user can be a loudspeaker of the playing assembly33facing the first user, the disclosure is not limited herein.

In some embodiments, the electronic device100further stores a second relationship between a direction range and the angle. For example, when the direction range is 0 degrees˜10 degrees, a corresponding angle is 5 degrees. When the angle formed by the first line segment connecting the first position W1and the camera assembly20and the second line segment connecting the camera assembly20and the point L is within the direction range 0 degrees˜10 degrees, the controller10can determine that the first angle is 5 degrees according to the second relationship, and control the driving assembly34to drive the display assembly32and/or the playing assembly33to rotate an angle 5 degrees, causing the display assembly32and/or the playing assembly33to face the first user. In some embodiments, the second relationship can be stored in the controller10. It can be understood that, the second relationship can be stored in the storage unit of the electronic device100, the disclosure is not limited herein. In some embodiments, the first angle is equal to the first relative direction, the disclosure is not limited herein.

It can be understood that, the number of the cameras21of the camera assembly20and the position of the cameras21arranged on the top cover52can influence the position identification range of the camera assembly20and a shape of a boundary of the position identification range of the camera assembly20, thus when the first user is at different positions of the boundary of the position identification range of the camera assembly20, the first spatial position between the first user and the camera assembly20can be different. The controller10can determine the first spatial position between the first user and the camera assembly20according to the first depth image, and control the function assembly30to execute the first action according to the first spatial position between the first user and the camera assembly20. Thus, the electronic device100can also provide a facilitated service for the first user at any position of the boundary of the position identification range of the camera assembly20.

The controller10is further configured to determine a relative displacement between the first user and the camera assembly20according to the first depth image and the second depth image, and control the function assembly30to execute the second action according to the relative displacement. The second action is an action to adjust a result of the function assembly based on the first action. The result of the function assembly can include the size of the volume of the sound played by the playing assembly, the size of the brightness of the information displayed by the display assembly, and the angle of the display assembly and/or the playing assembly.

The relative displacement includes a distance of the relative displacement and a direction of the relative displacement. Namely, the controller10can further take the distance of the relative displacement and/or the direction of the relative displacement as one or more control parameters, to control the display assembly32, the playing assembly33, and/or the driving assembly34to execute the second action.

In detail, the controller10is further configured to determine the second spatial position between the first user and the camera assembly20according to the second depth image, and determine the relative displacement between the first user and the camera assembly20according to the first spatial position and the second spatial position.

As shown inFIG.5, the first user moves from the first position W1to the second position W2, the distance of the relative displacement between the first user and the camera assembly20is a difference value obtained by the second distance Lw1subtracting the first distance Lw2, namely LW. And the direction of the relative displacement between the first user and the camera assembly20is a difference value obtained by the second relative direction θ2subtracting the first relative direction θ1, namely θ′. Where when the distance of the relative displacement between the first user and the camera assembly20is a positive value, it represents that the first user moves away from the camera assembly20. When the distance of the relative displacement between the first user and the camera assembly20is a negative value, it represents that the first user moves toward the camera assembly20. When the direction of the relative displacement between the first user and the camera assembly20is a positive value, it represents that the first user moves clockwise about the camera assembly20. When the direction of the relative displacement between the first user and the camera assembly20is a negative value, it represents that the first user moves anticlockwise about the camera assembly20.

In some embodiments, the controller10can determine a size of change in the volume and a size of change in the brightness according to the distance of the relative displacement. The controller10can further adjust the size of the volume of the sound played by the playing assembly33on the first volume according to the size of the change in the volume, and adjust the size of the brightness of the information displayed by the display assembly32on the first brightness according to the size of the change in the brightness. The distance of the relative displacement is directly proportional to the size of the change in the volume, and the distance of the relative displacement is directly proportional to the size of the change in the brightness. For example, as shown inFIG.5, in the first depth image, the first user is at the first position W1, and in the second depth image, the first user is at the second position W2. When the first user moves from the first position W1to the second position W2, the controller10determines that the size of the change in the volume is minus one level and the size of the change in the brightness is minus one level according to the distance of the relative displacement, and controls the size of the volume played by the playing assembly33to reduce one level from the first level volume to a third level volume, and the size of the brightness displayed by the display assembly32to reduce one level from the first level brightness to a third level brightness.

In some embodiments, the electronic device100can further store a third relationship among the distance of the relative displacement, the size of the change in the volume, and the size of the change in the brightness. The controller10can further determine the size of the change in the volume and the size of the change in the brightness according to the third relationship and the distance of the relative displacement. In some embodiments, the third relationship can be stored in the controller10. It can be understood that, the third relationship can be stored in the storage unit of the electronic device100, the disclosure is not limited herein.

It can be understood that, the disclosure determines a distance of the relative displacement according to two continuous depth images of the first user, thus the disclosure can accurately detect any quicker movement of the first user. The disclosure determines a size of the change in the volume according to the distance of the relative displacement, and controls the size of the volume played by the playing assembly33, the disclosure can adjust the volume in real time during any indefinitely small quick movement of the first user, thus the first user can always hear an appropriate size of the volume. The disclosure determines a size of the change in the brightness according to the distance of the relative displacement, and controls the size of the brightness displayed by the display assembly32, the disclosure can adjust the brightness in real time during any indefinitely small quick movement of the first user, thus the first user can always feel an appropriate size of the brightness and can see the displayed information clearly.

In some embodiments, the controller10determines a size of change in the angle according to the direction of the relative displacement, and controls the driving assembly34to drive the display assembly32and/or the playing assembly33to rotate the size of the change in the angle on the first angle, causing the display assembly32and/or the playing assembly33to face the first user. For example, as shown inFIG.5, in the first depth image, the first user is at the first position W1, and in the second depth image, the first user is at the second position W2. When the first user moves from the first position W1to the second position W2, the controller10determines that the size of the change in the angle is plus θ′ according to the direction of the relative displacement, and controls the driving assembly34to drive the cabinet main body51to rotate the angle θ′ clockwise. The cabinet main body51brings the display assembly32and the playing assembly33to rotate the angle θ′ clockwise, causing the display assembly32and the playing assembly33to face the first user. When the display assembly32faces the first user, the first user can see the information displayed by the display assembly32timely during any indefinitely small quick movement of the first user. When the playing assembly33faces the first user, there is no obstacle between the first user and the loudspeaker of the playing assembly33thus the first user can hear the sound clearly during any indefinitely small quick movement of the first user.

It can be understood that, the disclosure controls the function assembly30to execute the second action according to the relative displacement, thus the electronic device100can provide a facilitated service for the first user during any indefinitely small and quick movement of the first user.

Thus, after the camera assembly20captures the first depth image, the controller10determines the first spatial position between the first user and the camera assembly20according to the first depth image, and controls the function assembly30to execute the first action according to the first spatial position. Thus, the electronic device100can identify the spatial position of the user in the depth image, and provide a corresponding function service for the user according to an identification result of the spatial position of the user. After the camera assembly20captures the second depth image, the controller10determines the relative displacement between the first user and the camera assembly20according to the first depth image and the second depth image, and controls the function assembly30to execute the second action according to the relative displacement. The second action is an action to adjust based on the first action. Thus, the electronic device100can identify any indefinitely small quick movement of the user, and provide a corresponding function service for the user according to an identification result of the any indefinitely small quick movement of the user.

In some embodiments, the size of the change of the angle is equal to the direction of the relative displacement, the disclosure is not limited herein.

In some embodiments, the controller10can further obtain a third depth image of a second user, and determine a third spatial position between the second user and the camera assembly20according to the third depth image of the second user.

The third depth image can represent a third spatial position between the second user and the camera assembly20within the position identification range of the camera assembly20. It can be understood that, the user in the position identification range may be not only one, for example, as shown inFIG.5, in the position identification range, the first user is at the first position W1, and the second user is at a third position W3. The controller10can determine the third spatial position between the second user and the camera assembly20according to the third depth image. The third spatial position includes a third distance and a third relative direction, for example, as shown inFIG.5, the third distance is Lw3, and the third relative direction is θ3.

If the third distance of the third spatial position is less than the first distance or the second distance, the controller10can further control the function assembly30to execute a third action according to the third spatial position.

It can be understood that, the third distance of the third spatial position being less than the first distance or the second distance, represents that the second user is closer to the camera assembly20than the first user. The camera assembly20can preferentially control the function assembly30to execute the third action according to the third spatial position, thus the electronic device100can preferentially provide the facilitated service for the second user who is closer to the camera assembly20than the first user.

It can be understood that, the second user can be in the first depth image or the second depth image; if the third distance of the third spatial position is greater than the first distance and the second distance, the electronic device100can preferentially provide the facilitated service to the first user, the disclosure is not limited herein.

In some embodiments, as shown inFIG.5, the first user is at the first position W1, the display assembly32and the playing assembly33each faces the first user, the playing assembly33plays the sound at the first level volume and the display assembly32displays the content at the first level brightness. At the moment, the second user enters into the position identification range of the camera assembly20, and is at the third position W3. The camera assembly20captures the third depth image of the second user who is at the third position W3, the controller10determines the third distance Lw3and the third relative direction θ3according to the third depth image. The controller10compares the first distance Lw1and the third distance Lw3, and determines that the third distance Lw3is less than the first distance Lw1. The controller10further controls the display assembly32and the playing assembly33to rotate from facing the first user to facing the second user according to the third relative direction θ3, and controls the playing assembly33to play the sound at the third volume and the displaying assembly33to display the content at the third brightness.

In some embodiments, the controller10is further configured to control the function assembly30to execute a fourth action according to a voice command, for example, the controller10is further configured to control the camera assembly20to be at a turned on state according to the voice command. It can be understood that, the camera assembly20is at a turned off state at the initial state.

In detail, the camera assembly20at the turned on state represents that, the camera assembly20can capture a fourth depth image of the object in the position identification range. For example, when the cameras21of the camera assembly20is turned on, there is some objects (for example a desk and a wall) in the position identification range, the camera assembly20can capture the fourth depth image including the desk and the wall.

In some embodiments, the sound reception assembly40receives the voice of the first user for turning on the camera assembly20, and transmits the voice to the controller10. The controller10can generate a corresponding third control command according to the voice, and turn on the camera assembly20according to the corresponding third control command. Thus, the camera assembly20can capture the fourth depth image of the object in the position identification range. The voice for turning on the camera assembly20can be defined in advance, the voice can be, for example “turn on” or “play the sound”. It can be understood that, the manner to turn on the camera assembly20can be other, for example turn on the camera assembly20by hand, the disclosure is not limited herein.

It can be understood that, after the camera assembly20captures the second depth image, the camera assembly20further captures the fifth depth image. The fifth depth image and the second depth image are continuous depth images. The controller10can determine continuously a new relative displacement between the first user and the camera assembly20according to the second depth image and the fifth depth image, and control continuously the function assembly30to execute a fifth action according to the new relative displacement. The fifth action is an action to adjust based on the second action.

It can be understood that, the electronic device100can perform continuously the aforementioned procedure until an end condition is met, for example the camera assembly20is turned off, the electronic device100is turned off, or the first user moves out from the position identification range of the camera assembly20, the disclosure is not limited herein.

Referring toFIG.8, a control method is provided. The control method is applied on the electronic device. In detail, the control method is applied on the controller of the electronic device. The control method includes:S101, controlling the camera assembly to capture the first depth image of the first user; the first depth image of the first user is the first frame of depth image captured by the camera assembly in which the first user is present after the camera assembly is turned on.S102, determining the first spatial position between the first user and the camera assembly according to the first depth image.S103, controlling the function assembly to execute the first action according to the first spatial position.S104, controlling the camera assembly to capture the second depth image of the first user, the second depth image of the first user and the first depth image of the first user are continuous depth images.S105, determining the relative displacement between the first user and the camera assembly according to the first depth image and the second depth image.S106, controlling the function assembly to execute the second action according to the relative displacement, the second action is an action to adjust a result of the function assembly based on the first action.

In some embodiments, the first spatial position includes the first distance and the first relative direction, the S106further includes:S201, determining the first volume and the first brightness according to the first distance.S202, controlling the playing assembly to play sound at the first volume and the display assembly to display information at the first brightness.S203, determining the first angle according to the first relative direction.S204, controlling the driving assembly to drive the display assembly and/or the playing assembly to rotate the first angle, causing the display assembly and/or the playing assembly to face the first user.

It can be understood that, the S203˜S204can be executed before the S201˜S202, or the S203˜S204can be executed at the same time with the S201˜S202.

In some embodiments, the relative displacement includes the distance of the relative displacement and the direction of the relative displacement, the S106includes:S301, determining the size of the change in the volume and the size of the change in the brightness according to the distance of the relative displacement.S302, adjusting the size of the volume of the sound played by the playing assembly on the first volume according to the size of the change in the volume, and adjusting the size of the brightness of the information displayed by the display assembly on the first brightness according to the size of the change in the brightness.S303, determining the size of the change in the angle according to the direction of the relative displacement.S304, controlling the driving assembly to drive the display assembly and/or the playing assembly to rotate the size of the change in the angle on the first angle, causing the display assembly and/or the playing assembly to face the first user.

It can be understood that, the S303˜S304can be executed before the S301˜S302, or the S303˜S304can be executed at the same time with the S301˜S302.

In some embodiments, the control method further includes:S401, controlling the camera assembly to capture the third depth image of the second user.S402, determining the third spatial position between the second user and the camera assembly according to the third depth image.S403, controlling the function assembly to execute the third action according to the third spatial position if the third distance of the third spatial position is less than the first distance or if the third distance of the third spatial position is less than the second distance.

It can be understood that, the S401˜S403can be executed after any of the S102˜S105.

In some embodiments, before S101, the control method further includes:S501, controlling the camera assembly to turn on according to the voice command.

In some embodiments, the controller can include a storage unit11and a processor12, as shown inFIG.9. InFIG.9, the electronic device100further includes the camera assembly20and the function assembly30. The storage unit11may be configured to store a software program and module/unit. The processor12runs the software program and module/unit stored in the storage unit11, and invokes the data stored in the storage unit11, to implement various functions of the electronic device. The storage unit11may include a program storage area and a data storage area. The program storage area may store an operating system, an application program required by at least one function (such as an image display function), and the like. The data storage area may store data (such as the second vehicle and so on) created according to use of the electronic device, and the like. In addition, the storage unit11may include a non-transitory storage medium, such as a hard disk, a memory, or the like. It can be understood that, the storage unit11may further include a non-transitory storage medium, such as a pluggable hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one magnetic disk storage device, a flash storage unit, or another volatile solid-state storage device.

The processor12can include one or more central processing units (CPUs), and further include one or more general-purpose processors, one or more digital signal processors (DSPs), one or more application specific integrated circuits (ASICs), one or more field-programmable gate arrays (FPGAs), or other one or more programmable logic devices, one or more discrete gates or transistor logics, one or more discrete hardware components, and so on. The processor12can be a microprocessor or the processor can be any conventional processor. The processor12is the control center of the electronic device, and is connected to various parts of the electronic device by using various interfaces and lines.

A person skilled in the art may understand that, the structure shown inFIG.9imposes no limitation on the electronic device, and the electronic device may include more or fewer components than those shown in the figure, or combine some components, or divide some components, or have different component arrangements.

It can be understood that, the controller can be omitted from the electronic device, and the electronic device can include the storage unit11and the processor12as shown inFIG.9, the disclosure is not limited herein.

The disclosure further provides a storage medium configured to store one or more programs. A processor of the electronic device can execute the one or more programs to accomplish the steps of the exemplary method.

In the several embodiments provided in the present application, it should be understood that the disclosed device and method may be implemented in other manners. For example, the described device embodiment is merely exemplary. For example, the module division or the unit division is merely a logical function division and there may be other bases of division in actual implementation. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not performed.

Based on the description of the foregoing implementation manners, a person skilled in the art may clearly understand that the present disclosure may be implemented by software in addition to necessary universal hardware, or by dedicated hardware, including a dedicated integrated circuit, a dedicated CPU, a dedicated memory, a dedicated component, and the like. Generally, any functions that can be performed by a computer program can be easily implemented using corresponding hardware. Moreover, a specific hardware structure used to achieve a same function may be of various forms, for example, in a form of an analog circuit, a digital circuit, a dedicated circuit, or the like. However, as for the present disclosure, software program implementation is a better implementation manner in most cases. Based on such an understanding, the technical solutions of the present disclosure essentially or the part contributing to the prior art may be implemented in a form of a software product. The software product is stored in a readable storage medium, such as a floppy disk, a universal serial bus (USB) flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc of a computer, and includes several instructions for instructing a computer device (which may be a personal computer, a server, a network device, and the like) to perform the methods described in the embodiments of the present disclosure.

All or some of the foregoing embodiments may be implemented by means of software, hardware, firmware, or any combination thereof. When software is used to implement the embodiments, the embodiments may be implemented completely or partially in a form of a computer program product.

Those skilled in the art should understand that, the present disclosure is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that are made by those skilled in the art will not depart from the scope of the present disclosure. Therefore, although the present disclosure has been described in detail by the above embodiments, the present disclosure is not limited to the above embodiments, and more other equivalent embodiments may be included without departing from the concept of the present disclosure, and the scope of the present disclosure is determined by the scope of the appended claims.