Virtual portrait and user height difference adjusting method and device and virtual robot

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

阅读说明:本技术 虚拟人像与用户高度差的调整方法、装置及虚拟机器人 (Virtual portrait and user height difference adjusting method and device and virtual robot ) 是由 杜国威 于 2020-04-30 设计创作,主要内容包括:本发明适用于虚拟人像的控制技术领域,尤其涉及一种虚拟人像与用户的高度差的调整方法、装置、虚拟机器人、存储介质及计算机设备。所述方法包括:检测所述用户发出的声音,获取所述声音的声音信息;根据所述声音信息定位所述声源的第一空间位置;根据所述声源的第一空间位置计算所述用户的第一高度,若所述虚拟人像的第二高度高于所述用户的第一高度,则计算所述虚拟人像与所述用户的高度差;根据所述高度差控制所述虚拟人像执行相应的操作。借此,本发明通过调整所述虚拟人像的高度,减少用户与虚拟人像之间的高度差,提升用户体验,增加用户与虚拟人像之间的亲切感。(The invention is applicable to the technical field of control of virtual figures, and particularly relates to a method and a device for adjusting the height difference between a virtual figure and a user, a virtual robot, a storage medium and computer equipment. The method comprises the following steps: detecting the sound emitted by the user, and acquiring sound information of the sound; locating a first spatial position of the sound source according to the sound information; calculating a first height of the user according to the first spatial position of the sound source, and calculating a height difference between the virtual portrait and the user if the second height of the virtual portrait is higher than the first height of the user; and controlling the virtual portrait to execute corresponding operation according to the height difference. Therefore, the height difference between the user and the virtual portrait is reduced by adjusting the height of the virtual portrait, the user experience is improved, and the sense of intimacy between the user and the virtual portrait is increased.)

1. A method for adjusting the height difference between a virtual portrait and a user is characterized by comprising the following steps:

detecting sound emitted by the user, and acquiring sound information of the sound, wherein the sound is a sound source;

locating a first spatial position of the sound source according to the sound information;

calculating a first height of the user according to the first spatial position of the sound source, judging whether a second height of the virtual portrait is higher than the first height of the user, and calculating a height difference between the virtual portrait and the user if the second height is higher than the first height;

and controlling the virtual portrait to execute corresponding operation according to the height difference so as to reduce the height difference.

2. The method for adjusting the height difference between the virtual portrait and the user according to claim 1, further comprising: and scanning an external image, acquiring information of the image, and positioning a second spatial position of the user according to the information of the image.

3. The method for adjusting the height difference between the virtual portrait and the user according to claim 1, wherein the step of controlling the virtual portrait to perform corresponding operations according to the height difference so as to reduce the height difference comprises:

judging whether the height difference is larger than a first threshold value or not, and if the height difference is larger than the first threshold value, controlling the virtual portrait to execute a lying down gesture;

if the height difference is smaller than the first threshold value and larger than a second threshold value, controlling the virtual portrait to perform a squatting posture;

and if the height difference is smaller than the second threshold value, controlling the virtual portrait to execute a head-lowering gesture.

4. An apparatus for adjusting a height difference between a virtual portrait and a user, comprising:

the voice detection module is used for detecting the voice sent by the user and acquiring the voice information of the voice, wherein the voice is a sound source;

the first spatial position calculation module is used for positioning a first spatial position of the sound source according to the sound information;

a distance measurement and calculation module for calculating a first height of the user from a first spatial position of the sound source;

the height difference calculating module is used for judging whether the second height of the virtual portrait is higher than the first height of the user or not, and calculating the height difference between the virtual portrait and the user if the second height is higher than the first height;

and the control module is used for controlling the virtual portrait to execute corresponding operation according to the height difference so as to reduce the height difference.

5. The apparatus for adjusting the difference between the height of the virtual portrait and the height of the user according to claim 4, further comprising:

and the camera module is used for scanning an external image, acquiring the information of the image and positioning the second spatial position of the user according to the information of the image.

6. The apparatus for adjusting the difference between the height of the virtual portrait and the height of the user according to claim 4, wherein the control module further comprises:

the first threshold value judging submodule is used for judging whether the height difference is larger than a first threshold value;

the first control submodule is used for controlling the virtual portrait to execute a lying down gesture if the height difference is larger than the first threshold;

the second threshold judgment submodule is used for judging whether the height difference is larger than a second threshold or not when the first threshold judgment submodule judges that the height difference is smaller than the first threshold;

the second control submodule is used for controlling the virtual portrait to execute a squatting posture if the height difference is smaller than the first threshold and larger than a second threshold; and if the height difference is smaller than the second threshold value, controlling the virtual portrait to execute a head-lowering gesture.

7. A virtual robot comprising the apparatus for adjusting the difference between the height of the virtual figure of any one of claims 4 to 6 and the height of a user.

8. The virtual robot as claimed in claim 7, wherein the height of the virtual figure is 500-650 mm, and the virtual figure is a three-dimensional image generated by holographic projection technology.

9. A storage medium storing a computer program for executing the method for adjusting the height difference between the virtual portrait and the user according to any one of claims 1 to 3.

10. A computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the method for adjusting the height difference between the virtual portrait and the user according to any one of claims 1 to 3 when executing the computer program.

Technical Field

The invention relates to the technical field of control of virtual figures, in particular to a method and a device for adjusting the height difference between a virtual figure and a user, a virtual robot, a storage medium and computer equipment.

Background

In the prior art, a virtual robot identifies the face and the action of a user through a camera and a human body sensor, when the user returns home, a virtual portrait in the virtual robot shows smile, calls the user personally, and actively develops interaction. In addition, the virtual robot can report information such as weather and news through a network, and can remotely control electric appliances such as a television, an electric lamp, and cold air in a home by using an infrared function. The height of a typical virtual portrait is about half a meter, while the height of a typical normal adult is about 1.5-1.8 m. Due to the height difference, in a general use scene, devices such as a virtual robot and the like are placed on a desktop of a living room, when a user lies on a sofa and looks at a virtual portrait, the user can feel high-level and close even if the height difference is 0.5m, the overall experience is not particularly good, and the conversation between the user and the virtual portrait is not convenient. How to solve the problem of poor experience caused by the height difference between the user and the virtual portrait in various life and work scenes is the problem to be solved by the scheme.

In view of the above, the prior art is obviously inconvenient and disadvantageous in practical use, and needs to be improved.

Disclosure of Invention

In view of the foregoing drawbacks, the present invention provides a method and an apparatus for adjusting a height difference between a virtual portrait and a user, a virtual robot, a storage medium, and a computer device, so as to reduce the height difference between the user and the virtual portrait, improve user experience, and increase a sense of intimacy between the user and the virtual portrait.

In order to achieve the above object, the present invention provides a method for adjusting a height difference between a virtual portrait and a user, comprising:

detecting sound emitted by the user, and acquiring sound information of the sound, wherein the sound is a sound source;

locating a first spatial position of the sound source according to the sound information;

calculating a first height of the user according to the first spatial position of the sound source, judging whether a second height of the virtual portrait is higher than the first height of the user, and calculating a height difference between the virtual portrait and the user if the second height is higher than the first height;

and controlling the virtual portrait to execute corresponding operation according to the height difference so as to reduce the height difference.

According to the method for adjusting the height difference between the virtual portrait and the user, the method further comprises the following steps: and scanning an external image, acquiring information of the image, and positioning a second spatial position of the user according to the information of the image.

According to the method for adjusting the height difference between the virtual portrait and the user, the step of controlling the virtual portrait to execute corresponding operation according to the height difference so as to reduce the height difference comprises the following steps:

judging whether the height difference is larger than a first threshold value or not, and if the height difference is larger than the first threshold value, controlling the virtual portrait to execute a lying down gesture;

if the height difference is smaller than the first threshold value and larger than a second threshold value, controlling the virtual portrait to perform a squatting posture;

and if the height difference is smaller than the second threshold value, controlling the virtual portrait to execute a head-lowering gesture.

In order to achieve another object of the present invention, there is also provided an apparatus for adjusting a height difference between a virtual portrait and a user, including:

the voice detection module is used for detecting the voice sent by the user and acquiring the voice information of the voice, wherein the voice is a sound source;

the first spatial position calculation module is used for positioning a first spatial position of the sound source according to the sound information;

a distance measurement and calculation module for calculating a first height of the user from a first spatial position of the sound source;

the height difference calculating module is used for judging whether the second height of the virtual portrait is higher than the first height of the user or not, and calculating the height difference between the virtual portrait and the user if the second height is higher than the first height;

and the control module is used for controlling the virtual portrait to execute corresponding operation according to the height difference so as to reduce the height difference.

According to the invention, the device for adjusting the height difference between the virtual portrait and the user further comprises:

and the camera module is used for scanning an external image, acquiring the information of the image and positioning the second spatial position of the user according to the information of the image.

According to the adjusting device of the height difference between the virtual portrait and the user, the control module further comprises:

the first threshold value judging submodule is used for judging whether the height difference is larger than a first threshold value;

the first control submodule is used for controlling the virtual portrait to execute a lying down gesture if the height difference is larger than the first threshold;

the second threshold judgment submodule is used for judging whether the height difference is larger than a second threshold or not when the first threshold judgment submodule judges that the height difference is smaller than the first threshold;

the second control submodule is used for controlling the virtual portrait to execute a squatting posture if the height difference is smaller than the first threshold and larger than a second threshold; and if the height difference is smaller than the second threshold value, controlling the virtual portrait to execute a head-lowering gesture.

In order to achieve another object of the present invention, there is also provided a virtual robot including any one of the above-described virtual figures and a user height difference adjusting device.

According to the virtual robot, the height of the body of the virtual portrait is 500-650 mm, and the virtual portrait is a three-dimensional image generated by a holographic projection technology.

In order to achieve another object of the present invention, there is also provided a storage medium storing a computer program for executing any one of the above-described methods for adjusting a height difference between a virtual portrait and a user.

In order to achieve another object of the present invention, there is also provided a computer device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements any one of the above-mentioned methods for adjusting a height difference between a virtual portrait and a user when executing the computer program.

The method comprises the steps of detecting the sound emitted by a user to obtain the sound information of the sound, wherein the sound is a sound source; locating a first spatial position of the sound source according to the sound information; calculating a first height of the user according to the first spatial position of the sound source, judging whether a second height of the virtual portrait is higher than the first height of the user, and calculating a height difference between the virtual portrait and the user if the second height is higher than the first height; and controlling the virtual portrait to execute corresponding operation according to the height difference so as to reduce the height difference. Therefore, the height difference between the user and the virtual portrait is reduced by adjusting the height of the virtual portrait, the user experience is improved, and the sense of intimacy between the user and the virtual portrait is increased.

Drawings

Fig. 1 is one of schematic diagrams of a virtual robot and an apparatus for adjusting a height difference between a virtual portrait and a user according to a preferred embodiment of the present invention;

FIG. 2 is a second schematic view of an apparatus for adjusting the height difference between a virtual portrait and a user according to a preferred embodiment of the present invention;

FIG. 3 is a flow chart of a method for adjusting the height difference between a virtual portrait and a user according to a preferred embodiment of the present invention;

fig. 4 is a schematic structural diagram of a computer device provided by the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

It should be noted that references in the specification to "one embodiment," "an example embodiment," etc., indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not intended to refer to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to effect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.

Moreover, where certain terms are used throughout the description and following claims to refer to particular components or features, those skilled in the art will understand that manufacturers may refer to a component or feature by different names or terms. This specification and the claims that follow do not intend to distinguish between components or features that differ in name but not function. In the following description and in the claims, the terms "include" and "comprise" are used in an open-ended fashion, and thus should be interpreted to mean "include, but not limited to. In addition, the term "connected" as used herein includes any direct and indirect electrical connection. Indirect electrical connection means include connection by other means.

Referring to fig. 1 to 2, in a first embodiment of the present invention, there is provided an apparatus 100 for adjusting a height difference between a virtual portrait and a user, including:

the voice detection module 10 is configured to detect a voice emitted by the user, and acquire voice information of the voice, where the voice is a sound source;

a first spatial position calculating module 20, configured to locate a first spatial position of the sound source according to the sound information;

a distance measurement and calculation module 30 for calculating a first height of the user from a first spatial position of the sound source;

a height difference calculating module 40, configured to determine whether a second height of the virtual portrait is higher than a first height of the user, and if the second height is higher than the first height, calculate a height difference between the virtual portrait and the user;

and the control module 50 is configured to control the virtual portrait to perform a corresponding operation according to the height difference so as to reduce the height difference.

In this embodiment, in order to improve user experience, the virtual robot generates a virtual portrait through a holographic projection technology to interact with a user, the virtual portrait is preferably a three-dimensional image generated through the holographic projection technology, and the holographic projection technology belongs to one of 3D technologies, and refers to a technology for recording and reproducing a real three-dimensional image of an object by using an interference principle. Then, with the guidance of science fiction movies and commercial propaganda, the concept of holographic projection is gradually extended to commercial activities such as stage performance, exhibition and exhibition. In the interference process of the holographic technology, the superposition of the wave crest and the wave crest is higher, the superposition of the wave crest and the wave trough can be flattened, so that a series of irregular and light-dark alternate stripes can be generated, and phase information is converted into intensity information to be recorded on a photosensitive material. When the user interacts with the virtual portrait in a living or working scene, the height of the virtual portrait is higher than that of the user, so that the user has a feeling of being high-lying. The height of the body of the virtual portrait is generally 0.5m, the user places the virtual robot 500 on the desktop, the height of the body of the desktop is assumed to be 0.3 m, at this time, the height of the virtual portrait is 0.8m, if the user lies on a sofa, the height is 0.4m, a height difference of 0.4m is formed between the virtual portrait and the user, and the height of the virtual portrait is adjusted through the device 100, so that the height difference can be reduced. Specifically, the device 100 for adjusting the height difference between the virtual portrait and the user comprises a sound detection module 10, a first spatial position calculation module 20, a distance measurement and calculation module 30, a height difference calculation module 40 and a control module 50; detecting the sound emitted by the user through a sound detection module 10, and positioning a first spatial position of the user according to the detected sound information by matching with a first spatial position calculation module 20; when the first spatial position information is obtained, the first height of the user may be calculated according to the first spatial position of the sound source through the distance measurement and calculation module 30, and the distance measurement and calculation module 30 may be a distance measuring instrument; when the height difference calculating module 40 determines that the second height of the virtual portrait is higher than the first height of the user, the virtual portrait needs to be controlled to execute corresponding operations, for example, bending over, squatting, lowering head, and the like, so as to reduce the height difference, and the control module 50 controls the virtual portrait to execute the corresponding operations according to the height difference. Therefore, by adopting the device 100, the height of the virtual portrait can be reduced in cooperation with the user, so that the intimacy between the virtual portrait and the user is increased, and the user experience is improved.

Referring to fig. 2, in one embodiment of the present invention, the apparatus 100 further comprises:

the camera module 60 is configured to scan an external image, obtain information of the image, and position a second spatial position of the user according to the information of the image.

In this embodiment, when the user does not make a sound and needs to detect the position of the user, the position of the user may be captured by setting the camera module 60; the camera module 60 is a camera including a camera head; the camera module 60 and the sound detection module 10 are in a complementary relationship to each other, and are used for locating the spatial position of the user. In different scenes, the camera module 60 and the sound detection module 10 may be different from each other. If the image acquisition of the camera module 60 is limited in the night scene, the sound source direction of the sound detection module 10 is taken as the leading factor, and the sound detection module 10 detects the spatial position of the user who makes a sound, and determines the positional relationship of the user who makes a sound in a specific space. When a sound source is detected, the camera of the camera module 60 rotates to the sound source position, and at the same time, the user's movement in the sound source direction is detected, and the user's eyes or speaking height is detected. And when the camera module 60 captures the second spatial position of the user, the virtual portrait is turned to the user, so that the interactive experience between the user and the virtual portrait is increased.

In an embodiment of the present invention, the sound detection module 10 includes a microphone array formed by a plurality of microphones, and detects the sound emitted by the user through the microphone array formed by the plurality of microphones to obtain the sound information of the sound.

In this embodiment, a plurality of microphones are distributed at different positions in space according to a predetermined sequence to detect the sound (sound source) emitted by the user, and the first spatial position calculation module 20 performs signal processing on the sound output by each microphone in the microphone array, so as to form spatial directivity. Determining a positional relationship with the user. By this method, it is possible to suppress sound interference other than the target sound, and suppress not only noise but also human voice in other directions.

Referring to fig. 2, in one embodiment of the present invention, the first spatial position calculation module 20 includes:

a semantic judgment sub-module 21, configured to match the sound information with a sentence library, and judge whether the sound information has a semantic meaning;

and the spatial position calculating submodule 22 is used for calculating a first spatial position of the sound source according to the sound information when the sound information has semantic meaning.

In this embodiment, if the semantic determination sub-module 21 determines that the sound detected by the sound detection module 10 has a semantic meaning, the first spatial position calculation module 20 calculates the first spatial position of the sound source from the sound information. The semantic sound is a sound indicating that the user interacts with the virtual portrait or a sound indicating that the user is moving, such as a slipper sound. And the virtual portrait can be subjected to height difference adjustment operation in the process of interacting with the user by judging whether the sound information has semantics.

Referring to fig. 2, in one embodiment of the present invention, the control module 50 further comprises:

a first threshold judgment submodule 51, configured to judge whether the height difference is greater than a first threshold;

the first control submodule 52 is configured to control the virtual portrait to execute a prone upside down gesture if the height difference is greater than the first threshold;

a second threshold value judging submodule 53, configured to, when the first threshold value judging submodule 51 judges that the height difference is smaller than the first threshold value, judge whether the height difference is larger than a second threshold value;

a second control sub-module 54, configured to control the virtual portrait to perform a squatting posture if the height difference is smaller than the first threshold and larger than a second threshold; and if the height difference is smaller than the second threshold value, controlling the virtual portrait to execute a head-lowering gesture.

Specifically, the first threshold value is 0.7 m;

the second threshold is 0.2 meters.

In the embodiment, the height of the body of the general virtual portrait is 0.5m, and the height of the body of the person is 1.5-1.8 m; therefore, when the height difference between the virtual portrait and the sound source of the user speaking is detected to be less than 0.2m, the virtual portrait compensates the visual experience difference caused by the height difference through operations of adjusting the head, such as head lowering, head raising and the like. When the height difference between the virtual portrait and the speaking sound source of the user is detected to be larger than 0.2m and smaller than 0.7m, the virtual portrait adopts a natural posture of squatting and the like to reduce the height difference to prioritize the visual difference, and the difference part is filled up by operations of raising head, lowering head and the like. If the height of the sound source of the user is 0.4m (assuming that the user lies on a sofa), and the height of the virtual portrait is 0.8m (the height of the body of the virtual portrait is 0.5, and the height of the body of the table top is 0.3 m), the height of the virtual portrait after squatting is 0.5m, and the height difference of 0.1m is compensated by head-lowering operation. When detecting that the height difference between the virtual portrait and the speaking sound source of the user is larger than 0.7m, the virtual portrait can make up the visual difference by using postures of lying, lying on the stomach and the like, so that the interaction between the user and the virtual portrait is more natural and flexible.

Referring to fig. 2, in one embodiment of the present invention, the control module 50 further comprises:

a third threshold judgment submodule 55, configured to judge whether the height difference is greater than a third threshold;

and a third control sub-module 56, configured to control the virtual portrait to tilt downward to form a predetermined angle with the ground if the height difference is greater than the third threshold.

In particular, said third threshold value is 0.7 m;

the angle ranges from 50 degrees to 65 degrees.

In this embodiment, when the height difference between the virtual portrait and the sound source of the user is detected to be greater than 0.7m, the virtual portrait is deflected as a whole, and if the virtual portrait is detected to stand vertically on the ground, when the height difference between the virtual portrait and the sound source is detected to be greater than 0.7m, the angle of the virtual portrait as a whole is deflected by 30 °, that is, the angle with the ground is 60 °.

Referring to fig. 3, in an embodiment of the present invention, there is further provided a method for adjusting a height difference between a virtual portrait and a user, including:

step S301, detecting the sound emitted by the user, and acquiring the sound information of the sound, wherein the sound is a sound source; realized by the sound detection module 10;

step S302, positioning a first spatial position of the sound source according to the sound information; by the first spatial position calculation module 20;

step S303, calculating a first height of the user according to the first spatial position of the sound source, which is implemented by the distance measurement and calculation module 30; judging whether the second height of the virtual portrait is higher than the first height of the user, and if the second height is higher than the first height, calculating the height difference between the virtual portrait and the user; by the height difference calculation module 40.

Step S304, controlling the virtual portrait to execute corresponding operation according to the height difference so as to reduce the height difference; by the control module 50.

In this embodiment, the height difference between the user and the virtual portrait is reduced by adjusting the height of the virtual portrait, so that the user interacts with the virtual portrait more naturally. Specifically, the sound detection module 10 detects the sound emitted by the user, and cooperates with the first spatial position calculation module 20 to locate the first spatial position of the user according to the detected sound information; when the first spatial position information is obtained, the first height of the user may be calculated according to the first spatial position of the sound source through the distance measurement and calculation module 30, and the distance measurement and calculation module 30 may be a distance measuring instrument; when the height difference calculating module 40 determines that the second height of the virtual portrait is higher than the first height of the user, the virtual portrait needs to be controlled to execute corresponding operations, for example, bending over, squatting, lowering head, and the like, so as to reduce the height difference, and the control module 50 controls the virtual portrait to execute the corresponding operations according to the height difference. Therefore, the height of the virtual portrait matched with the user can be reduced by adopting the method, so that the intimacy between the virtual portrait and the user is increased, and the user experience is improved.

In one embodiment of the invention, the method further comprises: scanning an external image, acquiring information of the image, and positioning a second spatial position of the user according to the information of the image; by means of a camera module 60.

In this embodiment, when the user does not make a sound and needs to detect the position of the user, the position of the user may be captured by setting the camera module 60; the camera module 60 is a camera including a camera head; the camera module 60 and the sound detection module 10 are in a complementary relationship to each other, and are used for locating the spatial position of the user. In different scenes, the camera module 60 and the sound detection module 10 may be different from each other. If the image acquisition of the camera module 60 is limited in the night scene, the sound source direction of the sound detection module 10 is taken as the leading factor, and the sound detection module 10 detects the spatial position of the user who makes a sound, and determines the positional relationship of the user who makes a sound in a specific space. When a sound source is detected, the camera of the camera module 60 rotates to the sound source position, and at the same time, the user's movement in the sound source direction is detected, and the user's eyes or speaking height is detected. And when the camera module 60 captures the second spatial position of the user, the virtual portrait is turned to the user, so that the interactive experience between the user and the virtual portrait is increased.

In one embodiment of the present invention, the step S301 includes:

and detecting the sound emitted by the user through a microphone array consisting of a plurality of microphones to acquire the sound information of the sound.

In this embodiment, a plurality of microphones are distributed at different positions in space according to a predetermined sequence to detect the sound (sound source) emitted by the user, and the first spatial position calculation module 20 performs signal processing on the sound output by each microphone in the microphone array, so as to form spatial directivity. Determining a positional relationship with the user. By this method, it is possible to suppress sound interference other than the target sound, and suppress not only noise but also human voice in other directions.

In an embodiment of the present invention, the step S302 further includes:

matching the sound information with a sentence library, and judging whether the sound information has semantics; realized by a semantic judgment submodule 21;

if the sound information has semantics, calculating a first spatial position of the sound source according to the sound information; by the spatial position calculation submodule 22.

In this embodiment, the height of the virtual portrait is adjusted during the interaction with the user, and the sound information is matched with the sentence library, and if the sound information has semantics, the virtual portrait is considered to interact with the user, so that the first spatial position calculation module 20 calculates the first spatial position of the sound source according to the sound information.

In one embodiment of the present invention, step S304 includes:

judging whether the height difference is larger than a first threshold value or not; realized by the first threshold judgment submodule 51; if the height difference is larger than the first threshold value, controlling the virtual portrait to execute a lying down gesture; by the first control sub-module 52;

if the height difference is smaller than the first threshold and larger than a second threshold, the judgment is performed by a second threshold judgment submodule 53; controlling the virtual portrait to perform a squatting posture, which is achieved by a second control submodule 54;

if the height difference is smaller than the second threshold, the judgment is performed by a second threshold judgment submodule 53; the virtual portrait is controlled to perform a heads-down gesture, which is performed by the second control sub-module 54.

Preferably, the first threshold is 0.7 meters;

the second threshold is 0.2 meters.

In this embodiment, when it is detected that the height difference between the virtual portrait and the sound source of the user speaking is less than 0.2m, the virtual portrait compensates for the difference in visual experience caused by the height difference by adjusting the head operation, such as lowering the head, raising the head, and the like. When the height difference between the virtual portrait and the speaking sound source of the user is detected to be larger than 0.2m and smaller than 0.7m, the virtual portrait adopts a natural posture of squatting and the like to reduce the height difference to prioritize the visual difference, and the difference part is filled up by operations of raising head, lowering head and the like. If the height of the sound source of the user is 0.4m (assuming that the user lies on a sofa), and the height of the virtual portrait is 0.8m (the height of the body of the virtual portrait is 0.5, and the height of the body of the table top is 0.3 m), the height of the virtual portrait after squatting is 0.5m, and the height difference of 0.1m is compensated by head-lowering operation. When detecting that the height difference between the virtual portrait and the sound source of the user speaking is larger than 0.7m, the virtual portrait can make up the visual difference by using postures of lying, lying on the stomach and the like.

In one embodiment of the present invention, step S304 includes:

judging whether the height difference is greater than a third threshold value or not, and realizing the judgment through a third threshold value judgment submodule 55; if the height difference is larger than the third threshold value, the virtual portrait is controlled to incline downwards to form a preset angle with the ground, and the control is realized through a third control sub-module 56.

Preferably, the third threshold is 0.7 m;

the angle ranges from 50 degrees to 65 degrees.

In this embodiment, when the height difference between the virtual portrait and the sound source of the user is detected to be greater than 0.7m, the virtual portrait is deflected as a whole, and if the virtual portrait is detected to stand vertically on the ground, when the height difference between the virtual portrait and the sound source is detected to be greater than 0.7m, the angle of the virtual portrait as a whole is deflected by 30 °, that is, the angle with the ground is 60 °.

The present invention also provides a virtual robot 500 including the apparatus 100 for adjusting the height difference between a virtual portrait and a user according to any of the above embodiments. In the above embodiments, the structure of the adjustment device for the height difference between the specific virtual portrait and the user has been described. And will not be described in detail herein.

Preferably, the height of the body of the virtual portrait is 500-650 mm, and the virtual portrait is a three-dimensional image generated by a holographic projection technology.

The present invention also provides a storage medium storing a computer program for executing any one of the above task scheduling methods. Such as computer program instructions, which when executed by a computer, may invoke or otherwise provide methods and/or techniques in accordance with the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on fixed or removable storage media and/or transmitted via a data stream over a broadcast or other signal-bearing medium and/or stored on a storage medium of a computer device operating in accordance with the program instructions. Here, according to an embodiment of the present application, a computer device 400 as shown in fig. 4 is included, the computer device 400 preferably includes a storage medium 200 for storing a computer program and a processor 300 for executing the computer program, wherein when the computer program is executed by the processor 300, the computer device 400 is triggered to execute the method and/or the technical solution according to the foregoing embodiments.

It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the above steps or functions. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.

The method according to the invention can be implemented on a computer as a computer-implemented method, or in dedicated hardware, or in a combination of both. Executable code for the method according to the invention or parts thereof may be stored on a computer program product. Examples of computer program products include memory devices, optical storage devices, integrated circuits, servers, online software, and so forth. Preferably, the computer program product comprises non-transitory program code means stored on a computer readable medium for performing the method according to the invention when said program product is executed on a computer.

In a preferred embodiment, the computer program comprises computer program code means adapted to perform all the steps of the method according to the invention when the computer program is run on a computer. Preferably, the computer program is embodied on a computer readable medium.

In summary, the sound information of the sound is obtained by detecting the sound emitted by the user, wherein the sound is a sound source; locating a first spatial position of the sound source according to the sound information; calculating a first height of the user according to the first spatial position of the sound source, judging whether a second height of the virtual portrait is higher than the first height of the user, and calculating a height difference between the virtual portrait and the user if the second height is higher than the first height; and controlling the virtual portrait to execute corresponding operation according to the height difference so as to reduce the height difference. Therefore, the height difference between the user and the virtual portrait is reduced by adjusting the height of the virtual portrait, the user experience is improved, and the sense of intimacy between the user and the virtual portrait is increased.

The present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof, and it should be understood that various changes and modifications can be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

The invention also discloses A1, a method for adjusting the height difference between the virtual portrait and the user, which comprises the following steps:

detecting sound emitted by the user, and acquiring sound information of the sound, wherein the sound is a sound source;

locating a first spatial position of the sound source according to the sound information;

calculating a first height of the user according to the first spatial position of the sound source, judging whether a second height of the virtual portrait is higher than the first height of the user, and calculating a height difference between the virtual portrait and the user if the second height is higher than the first height;

and controlling the virtual portrait to execute corresponding operation according to the height difference so as to reduce the height difference.

A2, the method for adjusting the height difference between the virtual portrait and the user according to A1, the method further comprising: and scanning an external image, acquiring information of the image, and positioning a second spatial position of the user according to the information of the image.

A3, according to the method for adjusting the height difference between the virtual portrait and the user in a1, the step of detecting the sound made by the user and acquiring the sound information of the sound, wherein the step of using the sound as a sound source includes:

and detecting the sound emitted by the user through a microphone array consisting of a plurality of microphones to acquire the sound information of the sound.

A4, the method for adjusting the difference in height between the virtual portrait and the user according to A3, the step of locating the first spatial position of the sound source according to the sound information further comprising:

matching the sound information with a sentence library, and judging whether the sound information has semantics;

and if the sound information has semantics, calculating a first spatial position of the sound source according to the sound information.

A5, according to the method for adjusting the height difference between the virtual portrait and the user in A1, the step of controlling the virtual portrait to perform corresponding operations according to the height difference so as to reduce the height difference comprises:

judging whether the height difference is larger than a first threshold value or not, and if the height difference is larger than the first threshold value, controlling the virtual portrait to execute a lying down gesture;

if the height difference is smaller than the first threshold value and larger than a second threshold value, controlling the virtual portrait to perform a squatting posture;

and if the height difference is smaller than the second threshold value, controlling the virtual portrait to execute a head-lowering gesture.

A6, the method for adjusting the height difference between the virtual portrait and the user according to A5, wherein the first threshold value is 0.7 m;

the second threshold is 0.2 meters.

A7, according to the method for adjusting the height difference between the virtual portrait and the user in A1, the step of controlling the virtual portrait to perform corresponding operations according to the height difference so as to reduce the height difference comprises:

and judging whether the height difference is greater than a third threshold value, and if the height difference is greater than the third threshold value, controlling the virtual portrait to incline downwards to form a preset angle with the ground.

A8, according to the method for adjusting the height difference between the virtual portrait and the user described in A7,

the third threshold is 0.7 m;

the angle ranges from 50 degrees to 65 degrees.

B9, an apparatus for adjusting the height difference between a virtual portrait and a user, comprising:

the voice detection module is used for detecting the voice sent by the user and acquiring the voice information of the voice, wherein the voice is a sound source;

the first spatial position calculation module is used for positioning a first spatial position of the sound source according to the sound information;

a distance measurement and calculation module for calculating a first height of the user from a first spatial position of the sound source;

the height difference calculating module is used for judging whether the second height of the virtual portrait is higher than the first height of the user or not, and calculating the height difference between the virtual portrait and the user if the second height is higher than the first height;

and the control module is used for controlling the virtual portrait to execute corresponding operation according to the height difference so as to reduce the height difference.

B10, the device for adjusting the height difference between the virtual portrait and the user according to B9, the device further comprising:

and the camera module is used for scanning an external image, acquiring the information of the image and positioning the second spatial position of the user according to the information of the image.

B11, according to the adjusting device of the height difference between the virtual portrait and the user in B9, the sound detection module comprises a microphone array formed by a plurality of microphones, and the sound emitted by the user is detected by the microphone array formed by the plurality of microphones, so that the sound information of the sound is obtained.

B12, the device for adjusting the height difference between the virtual portrait and the user according to B11, wherein the first spatial position calculating module comprises:

the semantic judgment submodule is used for matching the sound information with a sentence library and judging whether the sound information has semantics;

and the spatial position calculating submodule is used for calculating a first spatial position of the sound source according to the sound information when the sound information has the semantic meaning.

B13, the device for adjusting the height difference between the virtual portrait and the user according to B9, the control module further comprising:

the first threshold value judging submodule is used for judging whether the height difference is larger than a first threshold value;

the first control submodule is used for controlling the virtual portrait to execute a lying down gesture if the height difference is larger than the first threshold;

the second threshold judgment submodule is used for judging whether the height difference is larger than a second threshold or not when the first threshold judgment submodule judges that the height difference is smaller than the first threshold;

the second control submodule is used for controlling the virtual portrait to execute a squatting posture if the height difference is smaller than the first threshold and larger than a second threshold; and if the height difference is smaller than the second threshold value, controlling the virtual portrait to execute a head-lowering gesture.

B14, the device for adjusting the height difference between the virtual portrait and the user according to B13,

the first threshold is 0.7 meters;

the second threshold is 0.2 meters.

B15, the device for adjusting the height difference between the virtual portrait and the user according to B9, the control module further comprising:

a third threshold judgment submodule, configured to judge whether the height difference is greater than a third threshold;

and the third control sub-module is used for controlling the virtual portrait to incline downwards and form a preset angle with the ground if the height difference is greater than the third threshold value.

B16, the device for adjusting the height difference between the virtual portrait and the user according to B15,

the third threshold is 0.7 m;

the angle ranges from 50 degrees to 65 degrees.

C17, a virtual robot comprising the device for adjusting the height difference between the virtual portrait according to any one of B9-B16 and the user.

C18, according to the virtual robot of C17, the height of the body of the virtual portrait is 500-650 millimeters, and the virtual portrait is a three-dimensional image generated through a holographic projection technology.

D19, a storage medium storing a computer program for executing a method for adjusting a height difference between a virtual portrait of any one of a1 to a8 and a user.

E20, a computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the method for adjusting the height difference between a virtual portrait and a user according to any one of a1 to a8 when executing the computer program.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:图像处理的方法和装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类