Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a virtual keyboard calibration method, device, electronic equipment and medium, which can calibrate a virtual keyboard, thereby being beneficial to improving accuracy and efficiency of virtual keyboard input and improving use experience of a user.
In order to achieve the above object, the technical solution provided by the embodiments of the present disclosure is as follows:
in a first aspect, the present disclosure provides a virtual keyboard calibration method, the method comprising:
Responding to a first triggering operation of a user on a target key of a target keyboard, and acquiring first sensing data;
Based on the corresponding relation between the first sensing data and the virtual keys in the virtual keyboard, obtaining the virtual keys corresponding to the first sensing data, wherein the virtual keyboard is displayed in a display interface of the virtual reality head-mounted display device worn by the user;
determining the target key of the target keyboard in response to a second triggering operation of the user on the target key;
and calibrating the virtual keyboard based on whether the virtual key is consistent with the target key.
As an optional implementation manner of the embodiment of the present disclosure, the calibrating the virtual keyboard based on whether the virtual key is consistent with the target key includes:
If the virtual key is inconsistent with the target key, second sensing data corresponding to the second triggering operation is obtained;
And calibrating the virtual keyboard according to the second sensing data and the target key until the virtual key is consistent with the target key.
As an optional implementation manner of the embodiment of the present disclosure, the calibrating the virtual keyboard based on whether the virtual key is consistent with the target key includes:
if the virtual key is inconsistent with the target key, responding to a second triggering operation of the user on a preset key in the target keyboard, and acquiring third sensing data;
And calibrating the virtual keyboard according to the third sensing data and the virtual keys corresponding to the third sensing data in the virtual keyboard.
As an optional implementation manner of the embodiment of the present disclosure, the virtual keyboard is obtained by:
acquiring a target image corresponding to the target keyboard;
Modeling keys contained in the target image to obtain a virtual keyboard display model corresponding to the target keyboard;
performing character recognition on keys contained in the target image, and determining character information corresponding to each key;
and displaying the character information on a key model corresponding to the virtual keyboard display model to obtain the virtual keyboard.
As an optional implementation manner of the embodiment of the present disclosure, modeling the key included in the target image to obtain a virtual keyboard display model corresponding to the target keyboard includes:
performing image detection on keys contained in the target image to obtain first coordinate data of edge feature points corresponding to each key and second coordinate data of rectangular areas containing all keys;
and carrying out graphic modeling based on the first coordinate data and the second coordinate data to obtain a virtual keyboard display model corresponding to the target keyboard.
As an alternative implementation of the embodiments of the present disclosure, the method further includes:
determining character prompt information corresponding to each key based on the type of the input method used by the user;
and displaying the character prompt information on a key model corresponding to the virtual keyboard display model to obtain a virtual keyboard corresponding to the input method type.
As an optional implementation manner of the embodiment of the disclosure, the target keyboard is covered with a keyboard soft film with a built-in touch sensor;
the responding to the first triggering operation of the user to the target key of the target keyboard obtains first sensing data, which comprises the following steps:
and responding to a first triggering operation of a user on a target key of a target keyboard, and acquiring first sensing data through a keyboard soft film of a built-in touch sensor.
In a second aspect, the present disclosure provides a virtual keyboard calibration apparatus, the apparatus comprising:
The first acquisition module is used for responding to a first triggering operation of a user on a target key of a target keyboard to acquire first sensing data;
The second acquisition module is used for acquiring the virtual key corresponding to the first sensing data based on the corresponding relation between the first sensing data and the virtual key in the virtual keyboard, wherein the virtual keyboard is displayed in a display interface of the virtual reality head-mounted display device worn by the user;
The key determining module is used for responding to a second triggering operation of the user on the target key of the target keyboard and determining the target key;
and the calibration module is used for calibrating the virtual keyboard based on whether the virtual key is consistent with the target key.
As an optional implementation manner of the embodiment of the disclosure, the calibration module is specifically configured to:
If the virtual key is inconsistent with the target key, second sensing data corresponding to the second triggering operation is obtained;
And calibrating the virtual keyboard according to the second sensing data and the target key until the virtual key is consistent with the target key.
As an optional implementation manner of the embodiment of the disclosure, the calibration module is further specifically configured to:
if the virtual key is inconsistent with the target key, responding to a second triggering operation of the user on a preset key in the target keyboard, and acquiring third sensing data;
And calibrating the virtual keyboard according to the third sensing data and the virtual keys corresponding to the third sensing data in the virtual keyboard.
As an optional implementation manner of the embodiment of the disclosure, the device further comprises a virtual keyboard determining module;
the virtual keyboard determination module comprises:
The image acquisition unit is used for acquiring a target image corresponding to the target keyboard;
the display model determining unit is used for modeling keys contained in the target image to obtain a virtual keyboard display model corresponding to the target keyboard;
the character information determining unit is used for carrying out character recognition on keys contained in the target image and determining character information corresponding to each key respectively;
And the virtual keyboard determining unit is used for displaying the character information on a key model corresponding to the virtual keyboard display model to obtain the virtual keyboard.
As an optional implementation manner of the embodiment of the present disclosure, the display model determining unit is specifically configured to:
performing image detection on keys contained in the target image to obtain first coordinate data of edge feature points corresponding to each key and second coordinate data of rectangular areas containing all keys;
and carrying out graphic modeling based on the first coordinate data and the second coordinate data to obtain a virtual keyboard display model corresponding to the target keyboard.
As an optional implementation manner of the embodiment of the present disclosure, the virtual keyboard determining module further includes:
the prompt information determining unit is used for determining character prompt information corresponding to each key based on the type of the input method used by the user;
The virtual keyboard determining unit is specifically configured to display the character prompt information on a key model corresponding to the virtual keyboard display model, so as to obtain a virtual keyboard corresponding to the input method type.
As an optional implementation manner of the embodiment of the disclosure, the target keyboard is covered with a keyboard soft film with a built-in touch sensor;
The first acquisition module is specifically configured to acquire first sensing data through a keyboard soft film with a built-in touch sensor in response to a first triggering operation of a user on a target key of a target keyboard.
In a third aspect, the present disclosure also provides an electronic device, including:
One or more processors;
storage means for storing one or more programs,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the virtual keyboard calibration method of any of the embodiments of the present disclosure.
In a fourth aspect, the present disclosure also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a virtual keyboard calibration method according to any of the embodiments of the present disclosure.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the advantages that first sensing data is acquired in response to first triggering operation of a user on a target key of a target keyboard, then virtual keys corresponding to the first sensing data are acquired based on the corresponding relation between the first sensing data and the virtual keys in the virtual keyboard, wherein the virtual keyboard is displayed in a display interface of virtual reality head-mounted display equipment worn by the user, then the target key is determined in response to second triggering operation of the user on the target key of the target keyboard, and finally the virtual keyboard is calibrated based on whether the virtual key is consistent with the target key or not.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein, and it is apparent that the embodiments in the specification are only some, rather than all, of the embodiments of the present disclosure.
The terms "first" and "second" and the like in this disclosure are used to distinguish between different objects and are not used to describe a particular order of objects. For example, the first sensing data and the second sensing data, etc. are used to distinguish between different sensing data, not a particular order of sensing data.
With the continuous development of technology, the diversification of market demands and the development of head-mounted display devices such as virtual reality devices are becoming more and more common, and are applied in many fields such as computer games, offices, health and safety, industry, education and training, and the like. For example, hybrid virtual reality systems are being integrated into various corners of life in mobile communication devices, gaming machines, personal computers, movie theaters, theme parks, laboratories, classrooms, and hospital exercise gyms.
Taking a VR head-mounted display device as an example, two color or black-and-white video cameras are fixed on the VR head-mounted display device according to the positions of eyes of a user, so that an external real physical three-dimensional environment can be captured in real time, then images captured by the two color or black-and-white video cameras are processed in real time through the stereoscopic vision and image rendering technology of a computer, and finally presented to the user through the VR head-mounted display device, and the user can view the external real physical three-dimensional environment in real time through the VR head-mounted display device.
In the perspective function of virtual reality, a typical application scenario is virtual office. A user has a large number of keyboard inputs required during the office with VR. If the input is directly performed by using the physical keyboard, the user cannot see the position of the physical keyboard when wearing the VR headset display device, so that the error rate of keyboard input may be high, even if some keys in the physical keyboard have bump auxiliary positioning, english letters are easy to input, other keys on the physical keyboard including auxiliary keys such as 0-9 numbers, punctuation marks, deletion, rollback and the like are still not easy to input, if VR device with gesture recognition function is used, although the VR device can capture the positions of both hands, the positions of the keyboard cannot be captured, and fingers of the user may block the view of the camera of the VR device, and the keys of the keyboard under other fingers except the thumb and the index finger cannot be judged.
At present, the following modes for solving the keyboard input in VR are available:
1. And opening a perspective window mode for the keyboard position in the VR virtual space so as to see the physical keyboard acquired by the camera and the positions of the hands of the user from the window.
2. And customizing a special keyboard, for example, adding markers at four corners of the keyboard, reconstructing a virtual keyboard corresponding to the key layout and the real-time position of the physical keyboard in the virtual space in real time, and combining a gesture recognition technology to facilitate input.
However, in the 1 st mode, the contour of the physical keyboard is required to be clearly identified by the camera of the VR device, and the contour is acquired and displayed in a high-definition mode, the resolution requirement of the camera is high, the camera built in the VR device is difficult to meet at present, in the 2 nd mode, a special keyboard with high cost is required to be customized, the popularization is difficult, the position of a key under the shielding of a finger of a user is not acquired by the camera, and the error is still easy to occur.
Aiming at the problem that the keyboard input process is easy to make mistakes in the VR, the virtual keyboard can well solve the problem. In this embodiment, when a user uses a target keyboard to perform operation, a virtual keyboard is displayed in a display interface of a VR head-mounted display device worn by the user, firstly, an operating system of the VR head-mounted display device can respond to touch operation (touch operation can be understood as touch operation on the target key but not pressing the target key) of the target key of the user, obtain first sensing data, obtain a virtual key corresponding to the first sensing data based on a corresponding relation between the first sensing data and the virtual key, then, respond to key input operation (key input operation can be understood as pressing the target key) of the target key of the user, determine the target key, and finally, the operating system can calibrate the virtual keyboard based on whether the virtual key is consistent with the target key.
The virtual keyboard calibration method provided by the embodiment of the disclosure can be realized based on the electronic equipment, or a functional module or a functional entity in the electronic equipment.
The electronic device may include a personal computer (personal computer, PC) and an entity keyboard, a notebook computer and an entity keyboard, and the embodiments of the present disclosure are not limited in detail.
By way of example, fig. 1A is a block diagram of a hardware configuration of an electronic device in accordance with one or more embodiments of the present disclosure. As shown in fig. 1A, the electronic apparatus includes at least one of a modem 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface 280. The controller 250 includes a central processor, a video processor, an audio processor, a graphic processor, a RAM, a ROM, and first to nth interfaces for input/output. The display 260 may be at least one of a liquid crystal display, an OLED display, a touch display, and a projection display, and may also be a projection device and a projection screen. The modem 210 receives broadcast television signals through a wired or wireless reception manner, and demodulates audio and video signals, such as EPG audio and video data signals, from a plurality of wireless or wired broadcast television signals. The communicator 220 is a component for communicating with external devices or servers according to various communication protocol types. For example, the communicator may comprise at least one of a Wifi module, a bluetooth module, a wired ethernet module, or other network communication protocol chip or a near field communication protocol chip, and an infrared receiver. The electronic device may establish transmission and reception of control signals and data signals with the server 203 or the local control device 205 through the communicator 220. The detector 230 is used to collect signals of the external environment or interaction with the outside. The controller 250 and the modem 210 may be located in separate devices, i.e., the modem 210 may also be located in an external device to the main device in which the controller 250 is located, such as an external set-top box. The user interface 280 may be used to receive control signals from a control device such as an infrared remote control or the like.
In some embodiments, the controller 250 controls the operation of the electronic device and responds to user operations by various software control programs stored on the memory. The controller 250 controls the overall operation of the electronic device. The user may input a user command through a Graphical User Interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the Graphical User Interface (GUI). Or the user may input the user command by inputting a specific sound or gesture, the user input interface recognizes the sound or gesture through the sensor, and receives the user input command.
In some embodiments, a "user interface" is a media interface for interaction and exchange of information between an application or operating system and a user that enables conversion between an internal form of information and a form acceptable to the user. A commonly used presentation form of a user interface is a graphical user interface (Graphic User Interface, abbreviated GUI), which refers to a graphically displayed user interface related to computer operations. It may be an interface element such as an icon, a window, and a control displayed in a display screen of the electronic device, where the control may include at least one of a visual interface element such as an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, and the like.
Fig. 1B is a schematic software configuration diagram of an electronic device according to one or more embodiments of the present disclosure, as shown in fig. 1B, the system is divided into four layers, namely, an application layer (application layer), an application framework layer (Application Framework layer), a An Zhuoyun line layer (Android runtime) and a system library layer (system runtime layer), and a kernel layer.
In some embodiments, at least one application program is running in the application program layer, and the application programs may be a Window (Window) program, a system setting program or a clock program of an operating system, or may be an application program developed by a third party developer. In particular implementations, applications in the application layer include, but are not limited to, the examples above.
In some embodiments, the system runtime layer provides support for the upper layer, the framework layer, and when the framework layer is in use, the android operating system runs the C/C++ libraries contained in the system runtime layer to implement the functions to be implemented by the framework layer.
In some embodiments, the kernel layer is a layer between hardware and software, and at least comprises at least one of an audio driver, a display driver, a Bluetooth driver, a camera driver, a WIFI driver, a USB driver, an HDMI driver, a sensor driver (such as a fingerprint sensor, a temperature sensor, a pressure sensor, etc.), and a power supply driver.
The virtual keyboard calibration method provided by the embodiment of the application can be realized based on the electronic equipment.
According to the virtual keyboard calibration process provided by the embodiment of the disclosure, first sensing data is acquired in response to a first triggering operation of a user on a target key of a target keyboard, then, based on a corresponding relation between the first sensing data and virtual keys in the virtual keyboard, the virtual key corresponding to the first sensing data is acquired, wherein the virtual keyboard is displayed in a display interface of a virtual reality head-mounted display device worn by the user, then, in response to a second triggering operation of the user on the target key of the target keyboard, the target key is determined, and finally, the virtual keyboard is calibrated based on whether the virtual key is consistent with the target key or not.
For more detailed description of the present solution, the following description will be given by way of example with reference to fig. 2A, and it will be understood that the steps involved in fig. 2A may include more steps, or fewer steps, when actually implemented, and the order of these steps may also be different, so as to enable the virtual keyboard calibration method provided in the embodiment of the present application.
Fig. 2A is a schematic flow chart of a virtual keyboard calibration method according to an embodiment of the present disclosure, and fig. 2B is a schematic diagram of a virtual keyboard calibration method according to an embodiment of the present disclosure. The embodiment is applicable to the situation that the virtual keyboard is calibrated and key input of a user is facilitated. The method of the embodiment can be executed by a virtual keyboard calibration device, and the device can be realized by adopting a hardware/software mode and can be configured in electronic equipment.
As shown in fig. 2A, the method specifically includes the following steps:
S210, responding to a first triggering operation of a user on a target key of a target keyboard, and acquiring first sensing data.
The target keyboard may be understood as an entity keyboard matched with a personal computer or a notebook computer used by a user. The first triggering operation may be understood as a contact operation to a target key, but the target key is not pressed, for example, a finger touch operation. The target key may be understood as any key in the target keyboard, which is not specifically limited in this embodiment. The first sensing data may be understood as coordinate position data acquired according to the first triggering operation, where the coordinate position data may be acquired based on a touch sensor built in the target key, or may be acquired in other manners, and this embodiment is not limited specifically.
When a target key of the target keyboard receives a first trigger operation of a user, first sensing data corresponding to the first trigger operation can be obtained based on a touch sensor built in the target key, and correspondingly, an operating system of the VR head-mounted display device responds to the first operation and obtains the first sensing data by receiving the first sensing data sent by the target keyboard.
S220, based on the corresponding relation between the first sensing data and the virtual keys in the virtual keyboard, obtaining the virtual keys corresponding to the first sensing data.
The virtual keyboard is displayed in a display interface of the virtual reality head-mounted display device worn by the user.
After the first sensing data is acquired, the operating system of the VR head-mounted display device can determine the corresponding relation between the first sensing data and the virtual keys by inquiring a coordinate position data table corresponding to each virtual key in the virtual keyboard stored in the operating system and comparing the first sensing data with the coordinate position data table, namely, the first sensing data corresponds to the coordinate position data of which virtual key, so that the virtual key corresponding to the first sensing data in the virtual keyboard is acquired.
In some embodiments, after the virtual key corresponding to the first sensing data is obtained, displaying the virtual key in the virtual keyboard in a first display manner may be further included.
The first display mode may be a display mode using a first brightness value, a flicker display mode, a display mode using different colors, or the like, which is not particularly limited in this embodiment. The first luminance value may be a preset value, or may be any value as appropriate, which is not specifically limited in this embodiment.
In this embodiment, the virtual key is displayed in the virtual keyboard by adopting the first display mode, so that a user can conveniently see the specific position of the virtual key corresponding to the first trigger operation in the virtual keyboard, and the accuracy of keyboard input is improved.
S230, determining a target key in response to a second triggering operation of the user on the target key of the target keyboard.
The second triggering operation may be understood as an operation of pressing a target key, such as a finger key input operation.
The operating system of the VR head-mounted display device responds to the second triggering operation of the user on the target key of the target keyboard, and the target key corresponding to the second triggering operation can be determined through the identification information which is sent by the target keyboard and corresponds to the target key. The identification information may include character information, position information, and the like of the target key, which is not particularly limited in this embodiment.
In some embodiments, after determining the target key, the method may further specifically include displaying the target virtual key corresponding to the target key in the virtual keyboard in a second display mode.
The second display mode may be a display mode using a second brightness value, a display mode using a different color from the first display mode, or the like, which is not particularly limited in this embodiment. The second luminance value may be a preset value, or may be determined according to circumstances, and the second luminance value is different from the first luminance value for distinguishing, which is not limited in this embodiment.
In this embodiment, the target virtual key corresponding to the target key is displayed in the virtual keyboard in the second display manner, so that the user is conveniently prompted, and whether the target virtual key and the virtual key corresponding to the first sensing data are the same virtual key or not is determined, which is beneficial to improving the accuracy and efficiency of the keyboard input process.
S240, calibrating the virtual keyboard based on whether the virtual key is consistent with the target key.
After the virtual key corresponding to the first sensing data is obtained and the target key is determined, the operating system of the VR head-mounted display device can determine whether the virtual key is consistent with the target key, so that the virtual keyboard is calibrated based on whether the virtual key is consistent with the target key. Specifically, if the virtual key is inconsistent with the target key, it is indicated that an error may occur in the mapping relationship between the virtual keyboard and the target key, and the obtained virtual key is in error, and calibration needs to be performed on the virtual keyboard at this time, if the virtual key is consistent with the target key, it is indicated that the mapping relationship between the virtual keyboard and the target key is basically accurate, calibration may not be performed on the virtual keyboard at this time, and second sensing data corresponding to the second triggering operation may also be obtained, and continuous correction, fitting and fine adjustment are performed on coordinate position data corresponding to the virtual key corresponding to the first sensing data in the coordinate position data table stored in the operating system according to the second sensing data, so that accuracy of the coordinate position data table is ensured.
In this embodiment, first sensing data is obtained in response to a first triggering operation of a user on a target key of a target keyboard, then a virtual key corresponding to the first sensing data is obtained based on a corresponding relation between the first sensing data and the virtual key in the virtual keyboard, wherein the virtual keyboard is displayed in a display interface of a virtual reality head-mounted display device worn by the user, then the target key is determined in response to a second triggering operation of the user on the target key of the target keyboard, and finally the virtual keyboard is calibrated based on whether the virtual key is consistent with the target key.
In some embodiments, the target keyboard is covered with a keyboard soft film with a built-in touch sensor;
the obtaining the first sensing data in response to the first triggering operation of the user to the target key of the target keyboard may specifically include:
and responding to a first triggering operation of a user on a target key of a target keyboard, and acquiring first sensing data through a keyboard soft film of a built-in touch sensor.
Specifically, in the case that the keyboard soft film with the built-in touch sensor is covered on the target keyboard, the keyboard soft film can be connected to a personal computer or a notebook computer and other devices used by a user in a universal serial bus (Universal Serial Bus, USB) mode, so that the sensing data acquired by the touch sensor can be transmitted to the personal computer or the notebook computer and other devices, and the VR head-mounted display device is connected with the personal computer or the notebook computer and other devices, therefore, an operating system of the VR head-mounted display device can respond to a first triggering operation of the user on the target keys of the target keyboard, and acquire the first sensing data through the keyboard soft film with the built-in touch sensor.
In this embodiment, the first sensing data is obtained by the method, which is simple and efficient, and the cost is low.
Fig. 3A is a flow chart of another virtual keyboard calibration method according to an embodiment of the disclosure, and fig. 3B is a schematic diagram of another virtual keyboard calibration method according to an embodiment of the disclosure. The present embodiment mainly describes a procedure of one of calibration methods for calibrating a virtual keyboard.
As shown in fig. 3A, the method specifically includes the following steps:
s310, responding to a first triggering operation of a user on a target key of a target keyboard, and acquiring first sensing data.
S320, based on the corresponding relation between the first sensing data and the virtual keys in the virtual keyboard, obtaining the virtual keys corresponding to the first sensing data.
S330, determining a target key in response to a second triggering operation of the user on the target key of the target keyboard.
And S340, if the virtual key is inconsistent with the target key, acquiring second sensing data corresponding to a second trigger operation.
Specifically, when the finger of the user performs the second triggering operation on the target key, the sensing data generated in the process of pressing the target key may change, so if the virtual key is inconsistent with the target key, the sensing data at the moment when the target keyboard receives the second triggering operation can be obtained, that is, the second sensing data corresponding to the second triggering operation is obtained, and the virtual keyboard can be calibrated conveniently according to the second sensing data and the target key.
And S350, calibrating the virtual keyboard according to the second sensing data and the target key until the virtual key is consistent with the target key.
After the second sensing data corresponding to the second triggering operation is obtained, the target key at the moment is an accurate value, so that the virtual keyboard can be calibrated through the second sensing data and the target key, and then the execution S310-S330 is returned until the virtual key is consistent with the target key, and the calibration process is ended.
The virtual keyboard can be calibrated by acquiring second sensing data corresponding to the finger key input operation, and the mapping relation between the virtual keyboard and the target keyboard can be calibrated by the second sensing data and the target key, namely, the mapping relation between the virtual keyboard and the target keyboard is mainly calibrated by correcting the first sensing data to correspond to the "S" virtual key, correcting the second sensing data to correspond to the "A" virtual key, and then executing S310-S330 until the virtual key is consistent with the target key.
In this embodiment, if the virtual key is inconsistent with the target key, second sensing data corresponding to the second triggering operation is obtained, and the virtual keyboard is calibrated according to the second sensing data and the target key until the virtual key is consistent with the target key.
Fig. 4A is a flow chart of another virtual keyboard calibration method according to an embodiment of the disclosure, and fig. 4B is a schematic diagram of another virtual keyboard calibration method according to an embodiment of the disclosure. The present embodiment mainly describes a procedure of another calibration method for calibrating a virtual keyboard.
As shown in fig. 4A, the method specifically includes the following steps:
s410, responding to a first triggering operation of a user on a target key of a target keyboard, and acquiring first sensing data.
S420, based on the corresponding relation between the first sensing data and the virtual keys in the virtual keyboard, obtaining the virtual keys corresponding to the first sensing data.
And S430, determining a target key in response to a second triggering operation of the user on the target key of the target keyboard.
S440, if the virtual key is inconsistent with the target key, responding to a second triggering operation of a preset key in the target keyboard by the user, and acquiring third sensing data.
The preset keys may be preset number of keys, for example, one key is respectively determined at four corners (upper left corner, upper right corner, lower left corner, lower right corner) of the target keyboard, and may be determined according to specific conditions, and the specific positions and specific numbers of the preset keys are not limited in this embodiment.
If the virtual key is inconsistent with the target key, the calibration can be carried out again, specifically, the corresponding third sensing data is obtained in response to the second triggering operation of the preset key in the target keyboard by the user.
S450, calibrating the virtual keyboard according to the third sensing data and the virtual keys corresponding to the third sensing data in the virtual keyboard.
After the third sensing data is obtained, the operating system of the VR head-mounted display device queries a coordinate position data table corresponding to each virtual key in the virtual keyboard stored in the operating system, compares the third sensing data with the coordinate position data table, and can determine the third sensing data and which coordinate position data of the virtual key corresponds to each other, so that the virtual key corresponding to the third sensing data in the virtual keyboard is obtained, and the virtual keyboard can be calibrated according to the third sensing data and the virtual key corresponding to the third sensing data in the virtual keyboard, namely, the mapping relation between the virtual keyboard and the target keyboard is determined.
In this embodiment, if the virtual key is inconsistent with the target key, the second trigger operation of the preset key in the target keyboard is responded to by the user, the third sensing data is obtained, the virtual keyboard is calibrated according to the third sensing data and the virtual key corresponding to the third sensing data in the virtual keyboard, and the mapping relation between the virtual keyboard and the target keyboard can be determined whether an error occurs or not by returning to the calibration process to calibrate, so that the error cause can be conveniently located.
In some embodiments, the calibration process of the virtual keyboard may include the steps of:
1. Under the condition that a user wears the VR head-mounted display device, photographing the target keyboard through a binocular camera on the VR head-mounted display device to obtain a corresponding image, and identifying the image through an image algorithm by an operating system of the VR head-mounted display device to determine coordinate position data corresponding to all keys in the target keyboard;
2. Under the condition that a user removes the VR head-mounted display device, covering a keyboard soft film with a built-in touch sensor on a target keyboard, connecting the keyboard soft film with a personal computer or a notebook computer and other devices corresponding to the target keyboard through a USB, and starting calibration;
3. Responding to a second triggering operation (for example, 4 preset keys of a Q key, a Z key, a P key and an M key are pressed in sequence) of a preset key in a target keyboard by a user, acquiring third sensing data corresponding to the 4 preset keys respectively, mapping 4 groups of third sensing data and 4 groups of third sensing data in corresponding virtual keys in a virtual keyboard by an operating system of VR head-mounted display equipment, and establishing a mapping relation between the virtual keyboard and the target keyboard;
4. and (5) completing calibration.
It should be noted that after the mapping relation between the virtual keyboard and the target keyboard is established, the sensor of the soft film part outside the key area of the target keyboard may be turned off to reduce the false sensing operation, and the calibration needs to be performed again in case of moving the soft film of the keyboard.
Fig. 5A is a schematic flow chart of a virtual keyboard determining method according to an embodiment of the present disclosure, and fig. 5B is a schematic diagram of a virtual keyboard determining method according to an embodiment of the present disclosure. The present embodiment mainly describes a process of constructing a virtual keyboard.
As shown in fig. 5A, the method specifically includes the following steps:
s510, acquiring a target image corresponding to the target keyboard.
Specifically, the target keyboard can be photographed by the binocular camera on the VR head-mounted display device, so that a target image corresponding to the target keyboard is obtained.
And S520, modeling keys contained in the target image to obtain a virtual keyboard display model corresponding to the target keyboard.
After the target image is obtained, a virtual keyboard display model corresponding to the target keyboard can be obtained by carrying out 2D modeling on all keys contained in the target image through a corresponding modeling method.
In some embodiments, because the target image acquired by the binocular camera on the VR head-mounted display device is a colorless black-and-white image, when modeling the keys included in the target image, the obtained virtual keyboard display model is also a color-free display, but the color style of the virtual keyboard display model can be adjusted through the keyboard skin, so that the use experience and satisfaction of the user are improved.
S530, performing character recognition on keys contained in the target image, and determining character information corresponding to each key.
After the target image is obtained, character information corresponding to each key can be determined by character recognition of all keys included in the target image by a character recognition algorithm, for example, an optical character recognition (Optical Character Recognition, OCR) algorithm.
In this embodiment, S520 may be executed first and S530 may be executed second, S530 may be executed first and S520 may be executed second, S520 and S530 may be executed simultaneously, and the execution order of S520 and S530 is not particularly limited in this embodiment.
And S540, displaying the character information on a key model corresponding to the virtual keyboard display model to obtain the virtual keyboard.
Specifically, after the virtual keyboard display model corresponding to the target keyboard and the character information corresponding to each key are obtained, the character information is displayed on the key model corresponding to the character information in the virtual keyboard display model in a superimposed manner, and the virtual keyboard is obtained.
In the embodiment, the virtual keyboard is obtained through the method, so that the method is simple and efficient, has no cost burden and is high in operability.
Fig. 5C is a schematic diagram of a virtual keyboard display model according to an embodiment of the present disclosure, where, as shown in fig. 5C, a virtual keyboard display model corresponding to a portion of keys in a target keyboard (excluding the first row of keys in the target keyboard, i.e. "Esc key,", and "F12" keys) is provided.
Fig. 5D is a schematic diagram of a virtual keyboard according to an embodiment of the present disclosure, and on the basis of fig. 5C, character information corresponding to a key in a target keyboard is displayed on a key model corresponding to a virtual keyboard display model in fig. 5C, so that the virtual keyboard shown in fig. 5D can be obtained.
In some embodiments, the modeling the key included in the target image to obtain a virtual keyboard display model corresponding to the target keyboard may specifically include:
performing image detection on keys contained in the target image to obtain first coordinate data of edge feature points corresponding to each key and second coordinate data of rectangular areas containing all keys;
and carrying out graphic modeling based on the first coordinate data and the second coordinate data to obtain a virtual keyboard display model corresponding to the target keyboard.
Specifically, the edge detection is performed on the keys contained in the target image through an image detection method, for example, through brightness gradient, the edge of a closed curve is determined to be one key, the rectangular area containing all keys is positioned to be one keyboard, the key shape recognition is performed on the keys contained in the target image, the key shape can be generally divided into a rounded rectangle, a round shape, a quadrangle with one arc side and the like, all the keys are detected and numbered, coordinate data of edge feature points corresponding to all the keys are obtained, and second coordinate data of the rectangular area containing all the keys are determined. The round rectangular key can be provided with four edge characteristic points, the round key can be provided with four tangential points from top to bottom and from left to right, and the round key can be provided with four corner and arc tangential points. After the first coordinate data and the second coordinate data are obtained, graphic modeling is carried out according to the first coordinate data and the second coordinate data, and then a virtual keyboard display model corresponding to the target keyboard can be obtained.
In the implementation, the virtual keyboard display model is obtained through the method, so that the method is simple and quick, does not increase extra cost, and is convenient to operate and use.
Fig. 6A is a schematic diagram of obtaining a virtual keyboard display model according to an embodiment of the present disclosure, and steps corresponding to fig. 6A have been described in the foregoing embodiments, so that repetition is avoided and detailed description is omitted herein.
In some embodiments, the performing graphical modeling based on the first coordinate data and the second coordinate data to obtain a virtual keyboard display model corresponding to the target keyboard may specifically include:
obtaining the difference value between the second coordinate data and each first coordinate data;
And drawing a key model corresponding to each key in the rectangular area based on the difference value and the distance between the adjacent keys to obtain a virtual keyboard display model corresponding to the target keyboard.
Specifically, after the first coordinate data and the second coordinate data are obtained, the difference value between the second coordinate data and each first coordinate data is obtained, the position of each key relative to the whole keyboard can be determined according to the difference value, meanwhile, based on the difference value and the distance between adjacent keys, a key model corresponding to each key is drawn in a rectangular area, and a virtual keyboard display model corresponding to a preset keyboard can be obtained until all keys in the target keyboard are drawn. The space between the key models in the virtual keyboard display model can refer to the space between corresponding keys in the target keyboard, so that the virtual keyboard display model is more attached to the target keyboard.
In this embodiment, the virtual keyboard display model is obtained by the method, so that the accuracy of the virtual keyboard display model can be improved, and the virtual keyboard display model is more attached to the target keyboard.
Fig. 6B is a schematic diagram of another embodiment of obtaining a virtual keyboard display model, and steps corresponding to fig. 6B have been described in the foregoing embodiments, so that repetition is avoided and details are not repeated herein.
In some embodiments, the method may further specifically include:
determining character prompt information corresponding to each key based on the type of the input method used by the user;
and displaying the character prompt information on a key model corresponding to the virtual keyboard display model to obtain a virtual keyboard corresponding to the input method type.
Specifically, when the types of input methods used by the users are different, the character prompt information corresponding to each key is different, based on the type of input method used by the users, the character prompt information corresponding to each key in the target keyboard is determined, and the character prompt information is displayed on the key model corresponding to the character prompt information in the virtual keyboard display model, so that the virtual keyboard corresponding to the type of input method can be obtained.
In this embodiment, the virtual keyboard corresponding to the input method type is obtained through the method, so that the practicability of the virtual keyboard can be further expanded, and better service is provided for the user.
Fig. 7A is a schematic diagram of obtaining a virtual keyboard corresponding to an input method type according to an embodiment of the present disclosure, and steps corresponding to fig. 7A have been described in the foregoing embodiments, so that repetition is avoided and redundant description is omitted herein.
Fig. 7B is a schematic diagram of character prompt information based on a five-stroke input method according to an embodiment of the disclosure, and fig. 7B shows character prompt information corresponding to a part of keys.
Fig. 7C is a schematic diagram of a virtual keyboard based on a foreign language input method according to an embodiment of the disclosure, and fig. 7C shows a virtual keyboard display model corresponding to a portion of keys based on a japanese language input method.
Fig. 8 is a schematic structural diagram of a virtual keyboard calibration device according to an embodiment of the present disclosure, where the device is configured in an electronic device, so as to implement the virtual keyboard calibration method according to any embodiment of the present disclosure. The device specifically comprises the following steps:
a first obtaining module 801, configured to obtain first sensing data in response to a first trigger operation of a user on a target key of a target keyboard;
A second obtaining module 802, configured to obtain a virtual key corresponding to the first sensing data based on a correspondence between the first sensing data and a virtual key in a virtual keyboard, where the virtual keyboard is displayed in a display interface of a virtual reality head-mounted display device worn by the user;
A key determining module 803, configured to determine the target key in response to a second trigger operation of the user on the target key of the target keyboard;
And the calibration module 804 is configured to calibrate the virtual keyboard based on whether the virtual key is consistent with the target key.
As an alternative implementation manner of the embodiment of the present disclosure, the calibration module 804 is specifically configured to:
If the virtual key is inconsistent with the target key, second sensing data corresponding to the second triggering operation is obtained;
And calibrating the virtual keyboard according to the second sensing data and the target key until the virtual key is consistent with the target key.
As an optional implementation manner of the embodiment of the disclosure, the calibration module 804 is further specifically configured to:
if the virtual key is inconsistent with the target key, responding to a second triggering operation of the user on a preset key in the target keyboard, and acquiring third sensing data;
And calibrating the virtual keyboard according to the third sensing data and the virtual keys corresponding to the third sensing data in the virtual keyboard.
As an optional implementation manner of the embodiment of the disclosure, the device further comprises a virtual keyboard determining module;
the virtual keyboard determination module comprises:
The image acquisition unit is used for acquiring a target image corresponding to the target keyboard;
the display model determining unit is used for modeling keys contained in the target image to obtain a virtual keyboard display model corresponding to the target keyboard;
the character information determining unit is used for carrying out character recognition on keys contained in the target image and determining character information corresponding to each key respectively;
And the virtual keyboard determining unit is used for displaying the character information on a key model corresponding to the virtual keyboard display model to obtain the virtual keyboard.
As an optional implementation manner of the embodiment of the present disclosure, the display model determining unit is specifically configured to:
performing image detection on keys contained in the target image to obtain first coordinate data of edge feature points corresponding to each key and second coordinate data of rectangular areas containing all keys;
and carrying out graphic modeling based on the first coordinate data and the second coordinate data to obtain a virtual keyboard display model corresponding to the target keyboard.
As an optional implementation manner of the embodiment of the present disclosure, the virtual keyboard determining module further includes:
the prompt information determining unit is used for determining character prompt information corresponding to each key based on the type of the input method used by the user;
The virtual keyboard determining unit is specifically configured to display the character prompt information on a key model corresponding to the virtual keyboard display model, so as to obtain a virtual keyboard corresponding to the input method type.
As an optional implementation manner of the embodiment of the disclosure, the target keyboard is covered with a keyboard soft film with a built-in touch sensor;
The first obtaining module 801 is specifically configured to obtain first sensing data through a keyboard soft film with a built-in touch sensor in response to a first triggering operation of a user on a target key of a target keyboard.
The virtual keyboard calibration device provided by the embodiment of the present disclosure may execute the virtual keyboard calibration method provided by any embodiment of the present disclosure, and has corresponding functional modules and beneficial effects of the execution method, so that repetition is avoided, and no redundant description is provided herein.
The embodiment of the disclosure provides electronic equipment, which comprises one or more processors and a storage device, wherein the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the virtual keyboard calibration method according to any one of the embodiment of the disclosure.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. As shown in fig. 9, the electronic device includes a processor 910 and a storage 920, where the number of processors 910 in the electronic device may be one or more, and in fig. 9, one processor 910 is exemplified, and where the processor 910 and the storage 920 in the electronic device may be connected by a bus or other means, and in fig. 9, the connection is exemplified by a bus.
The storage device 920 is used as a computer readable storage medium, and may be used to store a software program, a computer executable program, and a module, such as program instructions/modules corresponding to the virtual keyboard calibration method in the embodiments of the present disclosure. The processor 910 executes various functional applications and data processing of the electronic device by running software programs, instructions and modules stored in the storage 920, i.e., implements the virtual keyboard calibration method provided by the embodiments of the present disclosure.
The storage 920 may mainly include a storage program area that may store an operating system, an application program required for at least one function, and a storage data area that may store data created according to the use of the terminal, etc. In addition, storage 920 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, storage 920 may further include memory remotely located relative to processor 910 that may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device provided by the embodiment can be used for executing the virtual keyboard calibration method provided by any embodiment, and has corresponding functions and beneficial effects.
The embodiments of the present disclosure provide a computer readable storage medium, on which a computer program is stored, where the computer program when executed by a processor implements each process executed by the virtual keyboard calibration method described above, and the same technical effects can be achieved, and for avoiding repetition, a detailed description is omitted herein.
The computer readable storage medium may be a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk.
The foregoing description, for purposes of explanation, has been presented in conjunction with specific embodiments. The above discussion in some examples is not intended to be exhaustive or to limit the embodiments to the precise forms disclosed above. Many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles and the practical application, to thereby enable others skilled in the art to best utilize the embodiments and various embodiments with various modifications as are suited to the particular use contemplated.