A display method, device, storage medium and terminal for augmented reality
By obtaining the field angle and resolution of the augmented reality device, as well as the user's observation angle, the text display parameters of virtual information are calculated, which solves the problem of inconsistent presentation of virtual information in the prior art and improves the user experience.
Patent Information
- Application Number
- CN202411054431.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-02
AI Technical Summary
Existing augmented reality terminal devices fail to effectively consider the field of view, resolution and user observation perspective when presenting virtual information, resulting in inconsistent pictures when there is too much or too little information content, affecting the user experience.
By obtaining the field angle and resolution of the augmented reality display device, and the user's observation angle, the text display font size, line height and white space height of the virtual information are calculated, and the content is displayed according to these parameters to suit different devices and users Habit.
Improves the user's experience of reading virtual information when wearing augmented reality devices, ensuring that the information is presented more reasonable and comfortable.
Smart Images

Figure CN118569205B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an augmented reality display method, device, storage medium and terminal. Background Art
[0002] Augmented Reality (AR) technology is a technology that cleverly integrates virtual information with the real world. It simulates computer-generated text, images, three-dimensional models, music, videos and other virtual information and applies them to the real world. AR terminal devices have micro-displays, optical engines, electronic circuits, etc., which can render and generate the information content required by the wearer and integrate and superimpose it with the real environment in the form of virtual imaging, presenting it in the wearer's field of vision.
[0003] It is understandable that the information content required by the wearer changes in real time according to the actual situation. The layout of the virtual display screen should change according to the specific information content, and adapt to the content of text, pictures, numbers, symbols, etc. of the information content. Moreover, the layout of the virtual display screen is also related to the software and hardware parameters of the terminal device itself. The software and hardware parameters of terminal devices of different types and specifications are different, and even these software and hardware parameters of the same terminal device may change. At present, the AR terminal devices on the market do not take these into account when presenting virtual information content to the wearer, resulting in the entire screen being awkward and uncoordinated in some cases (such as very much or very little information content), which gives the wearer a poor user experience. Summary of the invention
[0004] The embodiments of the present application provide an augmented reality display method, device, storage medium and terminal, which can improve the user's viewing experience.
[0005] The present application provides an augmented reality display method, including:
[0006] Obtain the field of view and resolution of the augmented reality display device, as well as the user's viewing angle;
[0007] Get the standard text width ratio of the virtual information to be displayed;
[0008] Determine the text display font size corresponding to the virtual information according to the resolution, field of view, viewing angle, and standard text width ratio;
[0009] Based on the text display font size, determine the text display line height and text display margin height corresponding to the virtual information;
[0010] The content of the virtual information is typeset and displayed according to the text display font size, text display line height, and text display margin height.
[0011] In some embodiments, the resolution includes the length and width of the virtual display screen of the augmented reality display device;
[0012] The text display font size corresponding to the virtual information is determined based on the resolution, field of view, viewing angle, and standard text width ratio, including:
[0013] Determine the width of the target display area corresponding to the virtual information according to the length, field of view and viewing angle;
[0014] Determine the text display font size based on the target display area width and the standard text width ratio.
[0015] In some embodiments, determining the width of the target display area corresponding to the virtual information according to the length, the field of view angle, and the viewing angle includes:
[0016] A first ratio is calculated according to the observation angle and the field angle;
[0017] The multiplication value of the first ratio and the length is calculated to obtain the width of the target display area.
[0018] In some embodiments, determining the text display font size based on the target display area width and the standard text width ratio includes:
[0019] Calculate the multiplication value of the target display area width and the standard text width ratio to obtain the text display width of a single text;
[0020] Determine the text display font size based on the text display width.
[0021] In some embodiments, the content of the virtual information includes a first type of text and a second type of text, and the standard text width ratio includes a first standard text width ratio corresponding to the first type of text and a second standard text width ratio corresponding to the second type of text;
[0022] The text display font size corresponding to the virtual information is determined based on the resolution, field of view, viewing angle, and standard text width ratio, including:
[0023] Determine a first text display font size corresponding to the first type of text according to the resolution, the field of view, the viewing angle, and the first standard text width ratio;
[0024] The second text display font size corresponding to the second type of text is determined according to the resolution, the field of view, the viewing angle, and the ratio of the second standard text width.
[0025] In some embodiments, determining the text display line height and text display margin height corresponding to the virtual information based on the text display font size includes:
[0026] Obtain a first preset line spacing corresponding to the first type of text, and a second preset line spacing corresponding to the second type of text;
[0027] Calculating a difference between a first preset line spacing and a second preset line spacing;
[0028] Calculate the text display line height based on the difference, the second text display font size and the preset coefficient;
[0029] Based on the text display line height, determine the text display margin height, wherein the text display margin height is not less than the text display line height.
[0030] In some embodiments, the method further comprises:
[0031] Determine the text display line length corresponding to the virtual information based on the field of view;
[0032] The content of the virtual information is typeset and displayed according to the text display line length, text display font size, text display line height, and text display margin height.
[0033] Accordingly, an embodiment of the present application further provides an augmented reality display device, comprising:
[0034] A first acquisition unit, used to acquire the field of view and resolution of the augmented reality display device, and the viewing angle of the user;
[0035] A second acquisition unit, used to acquire a standard text width ratio of the virtual information to be displayed;
[0036] A first determination unit, configured to determine a text display font size corresponding to the virtual information according to a resolution, a field of view, an observation angle, and a standard text width ratio;
[0037] A second determining unit, configured to determine a text display line height and a text display margin height corresponding to the virtual information based on the text display font size;
[0038] The display unit is used to typeset and display the content of the virtual information according to the text display font size, text display line height and text display blank height.
[0039] Correspondingly, an embodiment of the present application further provides a storage medium, which stores a plurality of instructions, and the instructions are suitable for loading by a processor to execute the augmented reality display method as described above.
[0040] Correspondingly, an embodiment of the present application further provides a terminal, including a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the augmented reality display method as described above.
[0041] The embodiment of the present application obtains the field of view and resolution of the augmented reality display device and the user's viewing angle; obtains the standard text width ratio of the virtual information to be displayed; then, according to the resolution, field of view, viewing angle and standard text width ratio, determines the text display font size corresponding to the virtual information; further, based on the text display font size, determines the text display line height and text display blank height corresponding to the virtual information; finally, according to the text display font size, text display line height and text display blank height, typesets and displays the content of the virtual information. In this way, it is convenient for users to read virtual information when wearing augmented reality display devices, and improves the user's viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0043] Figure 1 A flowchart of an augmented reality display method provided in an embodiment of the present application.
[0044] Figure 2 A schematic diagram of an application scenario of an augmented reality display method provided in an embodiment of the present application.
[0045] Figure 3 A schematic diagram of virtual information display of an augmented reality display method provided in an embodiment of the present application.
[0046] Figure 4 A schematic diagram of the layout of a text display area of an augmented reality display method provided in an embodiment of the present application.
[0047] Figure 5 A schematic diagram of the change in text display line length with field of view angle in an augmented reality display method provided in an embodiment of the present application.
[0048] Figure 6 A structural block diagram of an augmented reality display device provided in an embodiment of the present application.
[0049] Figure 7 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0051] The embodiments of the present application provide an augmented reality display method, device, storage medium and computer equipment. Specifically, the augmented reality display method of the embodiments of the present application can be executed by a computer device. Among them, the computer device can be a local terminal or a remote server and other devices. The local terminal can be an AR device, including augmented reality wearable glasses and augmented reality head-mounted display. The remote server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0052] For example, the display method of augmented reality can be executed on a server, which can receive data collected by the terminal (which may include display parameters of the augmented reality display device and display information of the virtual information to be displayed), execute the display method program of augmented reality according to the received data, obtain the execution result, and then send the execution result to the terminal, so that the terminal controls the display of the virtual information according to the execution result. The terminal and the server are connected in communication.
[0053] For example, the augmented reality display method can be executed on a terminal, which can obtain the field of view angle and resolution of the augmented reality display device, as well as the user's observation angle; obtain the standard text width ratio of the virtual information to be displayed; determine the text display font size corresponding to the virtual information based on the resolution, field of view angle, observation angle and standard text width ratio; determine the text display line height and text display blank height corresponding to the virtual information based on the text display font size; and layout and display the content of the virtual information based on the text display font size, text display line height and text display blank height.
[0054] Based on the above problems, the embodiments of the present application provide an augmented reality display method, device, storage medium and terminal, which can improve the user's viewing experience. The following are detailed descriptions. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0055] See also Figure 1 , Figure 1 This is a flow chart of an augmented reality display method provided in an embodiment of the present application. Taking the augmented reality display method applied to a terminal as an example, the specific flow of the augmented reality display method may be as follows:
[0056] 101. Obtain the field of view and resolution of the augmented reality display device and the user's observation perspective.
[0057] In the embodiment of the present application, an augmented reality display device, also known as an AR display device, refers to a display device that can enhance reality or virtual reality effects. The user's perceptual experience is enhanced by adding virtual information to the real world. Specifically, a simulated visual environment is provided through a physical display optical lens, allowing the user to see a digital display and the world through the glasses, providing the wearer with virtual images, videos, animations or information content, allowing virtual elements to be added to the real world they can see through the glasses.
[0058] Among them, augmented reality display devices may include wearable mobile terminal devices, such as head-mounted AR devices, AR glasses, etc.
[0059] In some embodiments, the augmented reality display device in this solution may be a head-mounted AR device.
[0060] Among them, the field of view and resolution are the display parameters of the augmented reality display device. For most devices, they are fixed at the factory, and of course they may change in subsequent use. The field of view (FOV) represents the maximum range outline of the virtual equivalent screen where the virtual display content is located, that is, the angle between the edge of the screen and the line connecting the eyes. The value of FOV will directly affect the range of the virtual display screen. The larger the angle, the wider the range of the virtual display screen that the user can see. For example, the field of view can be 120 degrees, and the direction can be horizontal, that is, the horizontal field of view is 120 degrees; resolution refers to the number of pixels that can be displayed on the virtual display screen of the augmented reality display device. For example, the resolution is expressed as: length (number of pixels) x width (number of pixels).
[0061] In some embodiments, the field of view angle and resolution of the augmented reality display device can be set at the factory and saved in the augmented reality display device as display parameters of the augmented reality display device. Obtaining the field of view angle and resolution of the augmented reality display device may include: reading the display parameters of the augmented reality display device to obtain the field of view angle and resolution.
[0062] In some embodiments, the field of view and resolution of the augmented reality display device may be stored in a server, that is, the server stores the device identification (such as the device model, etc.) of the augmented reality display device and the corresponding display parameters (the display parameters at least include the resolution and field of view, etc.). Then, obtaining the field of view and resolution of the augmented reality display device may include: obtaining the display parameters corresponding to the device model from the server according to the device model, thereby obtaining the field of view and resolution.
[0063] In some embodiments, the triggering event for obtaining the field of view angle and resolution of the augmented reality display device may include: when it is detected that the augmented reality display device needs to display information.
[0064] In some embodiments, the display parameters of the augmented reality display device may change. After the display parameters of the augmented reality display device change, in order to obtain accurate field of view and resolution to calculate appropriate content layout information, it is necessary to re-acquire the display parameters of the augmented reality display device.
[0065] For example, when the hardware device of the augmented reality display device is replaced or repaired, it is necessary to re-acquire the display parameters of the augmented reality display device to obtain the field of view and resolution of the augmented reality display device.
[0066] For example, after the augmented reality display device performs a system upgrade, it is necessary to reacquire the display parameters of the augmented reality display device to obtain the field of view and resolution of the augmented reality display device.
[0067] The viewing angle refers to the best angle of the wearer's (i.e., the user wearing the augmented reality display device) visual field occupied by the text display area. The best angle can be data obtained from manual testing and pre-set in the system. Alternatively, the best viewing angle can be obtained by obtaining the reading habits of the current user and analyzing the best viewing angle of the current user based on the reading habits.
[0068] In some embodiments, the optimal viewing angle of the current user obtained based on reading habit analysis may include: obtaining eye movement information of the current user when watching virtual reality images while wearing an augmented reality display device multiple times within a historical time period, and calculating the current user's optimal viewing angle based on multiple eye movement information.
[0069] In some embodiments, the optimal viewing angle of the current user obtained based on the reading habit analysis may include: obtaining the adjustment information of the display area when the current user reads through other display devices multiple times in the historical time period, for example, setting the display area to a size of mxn, and then determining the optimal viewing angle of the current user when reading based on the adjustment information. The optimal viewing angle may also be determined by other methods, which are not listed here one by one.
[0070] For example, see Figure 2 , Figure 2 A schematic diagram of an application scenario of an augmented reality display method provided in an embodiment of the present application. Figure 2 The viewing angle a of the wearer viewing the text display area is shown.
[0071] 102. Obtain a standard text width ratio of virtual information to be displayed.
[0072] Among them, virtual information refers to information simulated and generated by computer technology, which may include text, images, etc. Virtual information can be superimposed on the real environment for display through augmented reality display devices.
[0073] In an embodiment of the present application, the virtual information to be displayed refers to virtual information that needs to be displayed through an augmented reality display device, and the virtual information may include text content.
[0074] The standard text width ratio refers to the ratio of the standard design text width corresponding to the text in the virtual information to the standard design display area.
[0075] Among them, when virtual information is generated, there will be corresponding standard design text width and standard design display area. The standard design text width is the horizontal width of a single character in the text in the virtual information, and the standard design display area is the area used to display the text content in the virtual information.
[0076] That is, the standard design text width and the standard design display area width change along with the virtual information, and when the virtual information is determined, the data of the standard design text width and the standard design display area are also determined.
[0077] The standard design text width of the virtual information is pre-set. There are multiple ways to set the standard design text width. For example, the standard design text width can be set according to the text type in the virtual information. Different text types can correspond to different standard design text widths.
[0078] In some embodiments, the standard design text widths corresponding to different virtual information may be the same or different. When the virtual information to be displayed changes, the corresponding standard design text width and standard design display area will also change, and the standard design text width, standard design display area, etc. of the virtual information need to be re-acquired.
[0079] Among them, the standard design display area width refers to the standard design width of the text display area corresponding to the virtual information in the virtual display screen of the augmented reality display device, and the text display area can be used to display the text content in the virtual information.
[0080] The standard design display area width may be initially set, and the standard design display area width may be set in a variety of ways, for example, the standard design display area width may be set according to the number of texts in the virtual information, the type of texts, etc. Different numbers of texts and / or types of texts may correspond to different display standard design area widths.
[0081] For example, the virtual information may be a pop-up box information, and the standard design display area width may be the width of the pop-up box.
[0082] In some embodiments, the text in the virtual information may include multiple types of text, for example, may include a first type of text and a second type of text. The standard design text widths of the first type of text and the second type of text may be different.
[0083] The text width of the first type of text may be a first standard text width, and the text width of the second type of text may be a second standard text width.
[0084] For example, the first type of text may be a title text, and the second type of text may be a body text. The text width of the title text may be greater than the width of the body text.
[0085] For example, see Figure 3 , Figure 3 A schematic diagram of virtual information display of an augmented reality display method provided in an embodiment of the present application. Figure 3 The virtual information shown includes a title text and a body text, wherein the standard design text width of the title text may be w1, and the standard design text width of the body text may be w2, wherein the standard design text width of the title text is greater than the standard design text width of the body text, that is, w1>w2.
[0086] In some embodiments, the virtual information may also include a variety of other types of text, and other types of text also have corresponding standard design text widths, which will not be described one by one here.
[0087] Among them, there are many ways to determine the standard text width ratio, for example, it can be determined based on the ratio of the standard design text width to the width of the standard design display area, or it can be determined based on the standard design text width and the style of the standard design display area.
[0088] In some embodiments, obtaining the standard text width ratio of the virtual information to be displayed may include the following operations:
[0089] The ratio of the standard design text width to the width of the standard design display area is calculated to obtain the standard text width ratio.
[0090] Specifically, it can be calculated according to the following formula:
[0091] r = w0 / w;
[0092] Among them, w0 refers to the standard design text width corresponding to the virtual information, w refers to the width of the standard design display area corresponding to the virtual information, and r refers to the proportion of the standard text width.
[0093] In some embodiments, the virtual information may include a first type of text (such as title text), and obtaining the standard text width ratio of the virtual information to be displayed may include the following operations:
[0094] The ratio of the first standard design text width to the width of the standard design display area is calculated to obtain the first standard text width ratio.
[0095] Specifically, it can be calculated according to the following formula:
[0096] r1=w1 / w;
[0097] Among them, w1 refers to the first standard design text width corresponding to the first type of text in the virtual information, w refers to the width of the standard design display area corresponding to the virtual information, and r1 refers to the proportion of the first standard text width corresponding to the first type of text.
[0098] In some embodiments, the virtual information may include the second type of text (such as body text), and obtaining the standard text width ratio of the virtual information to be displayed may include the following operations:
[0099] The ratio of the second standard design text width to the width of the standard design display area is calculated to obtain the second standard text width ratio.
[0100] Specifically, it can be calculated according to the following formula:
[0101] r2=w2 / w;
[0102] Among them, w2 refers to the second standard design text width corresponding to the second type of text in the virtual information, w refers to the width of the standard design display area corresponding to the virtual information, and r2 refers to the proportion of the second standard text width corresponding to the second type of text.
[0103] In some embodiments, the standard text width ratio can be determined based on the standard design text width and the style of the standard design display area. For example, the style of the standard design display area can include a wide shape (that is, the width of the area is larger) and a narrow shape (that is, the width of the area is smaller). When the style belongs to the wide shape, it can be determined that the number of texts displayed in a single line is larger, that is, the standard text width ratio is smaller; when the style belongs to the narrow shape, it can be determined that the number of texts displayed in a single line is smaller, that is, the standard text width ratio is larger.
[0104] 103. Determine the text display font size corresponding to the virtual information according to the resolution, field of view, viewing angle, and standard text width ratio.
[0105] The text display font size refers to the size of a single character when displaying text.
[0106] In some embodiments, the step of “determining the text display font size corresponding to the virtual information according to the resolution, the field of view, the viewing angle, and the standard text width ratio” may include the following operations:
[0107] Determine the width of the target display area corresponding to the virtual information according to the length, field of view and viewing angle;
[0108] Determine the text display font size based on the target display area width and the standard text width ratio.
[0109] The target display area width refers to the optimal display width of the text display area in the virtual information in the virtual display screen of the current augmented reality display device.
[0110] In some embodiments, the step of “determining the width of the target display area corresponding to the virtual information according to the length, the field of view angle, and the observation angle” may include the following operations:
[0111] A first ratio is calculated according to the observation angle and the field angle;
[0112] The multiplication value of the first ratio and the length is calculated to obtain the width of the target display area.
[0113] In the embodiment of the present application, a design formula is used to calculate the target display area width, as follows:
[0114] W = pxa / f;
[0115] Wherein, p refers to the length in resolution, a refers to the viewing angle, and f refers to the field angle. First, the ratio of the viewing angle a to the field angle f can be calculated as a first ratio, and then the multiplication value of the first ratio and the length p in resolution is calculated to obtain the target display area width W.
[0116] Among them, the observation angle a is the optimal observation angle for the general population obtained by experimental testing. It can be a fixed constant or a group of constants preset in the AR device for the wearer to choose and set, or it can be automatically generated based on the wearer's physiological characteristics, usage habits, personal preferences and other data.
[0117] In some embodiments, in order to prevent the target display area width from exceeding the virtual display screen due to the user's viewing angle being greater than the field of view of the augmented reality device, the viewing angle may be compared with the field of view before calculating the target display area width.
[0118] For example, if the viewing angle is greater than the field of view, the following formula can be used to calculate the width of the target display area:
[0119] W = px 1;
[0120] If the viewing angle is not greater than the field of view, the following formula can be used to calculate the width of the target display area:
[0121] W=pxa / f.
[0122] In some embodiments, the step of “determining the text display font size based on the target display area width and the standard text width ratio” may include the following operations:
[0123] Calculate the multiplication value of the target display area width and the standard text width ratio to obtain the text display width of a single text;
[0124] Determine the text display font size based on the text display width.
[0125] In the embodiment of the present application, a design formula is used to calculate the text display font size, as follows:
[0126] F = W x r;
[0127] Wherein, W refers to the width of the target display area. The multiplication of the target display area width W and the standard text width ratio r is calculated to obtain the text display width F of a single character. Furthermore, the corresponding text display font size can be determined according to the text display width of a single character.
[0128] The correspondence between different text display widths and text display font sizes is preset, and after the text display width is calculated, the corresponding text display font size can be found from the correspondence according to the calculated text display width.
[0129] In some embodiments, when the virtual information includes multiple types of text, the display font sizes of different types of text can be calculated separately to facilitate user viewing. The step of "determining the text display font size corresponding to the virtual information according to the resolution, field of view, viewing angle, and standard text width ratio" may include the following operations:
[0130] Determine a first text display font size corresponding to the first type of text according to the resolution, the field of view, the viewing angle, and the first standard text width ratio;
[0131] The second text display font size corresponding to the second type of text is determined according to the resolution, the field of view, the viewing angle, and the ratio of the second standard text width.
[0132] Among them, determining the first text display font size corresponding to the first category of text based on the resolution, field of view angle, observation angle and the proportion of the first standard text width can include: determining the target display area width corresponding to the virtual information based on the length, field of view angle and observation angle; and then determining the first text display font size based on the display area width, the target display area width, the first standard text width, the field of view angle and the observation angle.
[0133] In the embodiment of the present application, the formula for calculating the first text display font size may be as follows:
[0134] F1=W x r1;
[0135] Among them, W refers to the width of the target display area. The multiplication of the target display area width W and the first standard text width ratio r1 is calculated to obtain the text display width of a single character corresponding to the first type of text, that is, F1. Furthermore, the corresponding text display font size can be determined according to the text display width of a single character corresponding to the first type of text: F1, as the first text display font size.
[0136] The correspondence between the text display width and the text display font size may be preset, and different text display widths may correspond to different text display font sizes. For example, the larger the text display width, the larger the corresponding text display font size.
[0137] Among them, determining the second text display font size corresponding to the second type of text based on the resolution, field of view angle, observation angle and the proportion of the second standard text width can include: determining the target display area width corresponding to the virtual information based on the length, field of view angle and observation angle; and then determining the second text display font size based on the display area width, the target display area width, the second standard text width, field of view angle and observation angle.
[0138] In the embodiment of the present application, the formula for calculating the second text display font size may be as follows:
[0139] F2=W x r2;
[0140] Among them, W refers to the width of the target display area. The multiplication of the target display area width W and the second standard text width ratio r2 is calculated to obtain the text display width of a single character corresponding to the second type of text, that is, F2. Furthermore, the corresponding text display font size can be determined according to the text display width of a single character corresponding to the second type of text: F2, as the second text display font size.
[0141] Based on the above scheme, the text display font size suitable for different device parameters and different observation angles can be adaptively calculated according to the device parameters of the augmented reality display device and the user's observation angle, so that the virtual display screen is adapted to the text display font size to facilitate user reading.
[0142] 104. Based on the text display font size, determine the text display line height and the text display margin height of the virtual information.
[0143] Among them, the text display line height refers to the height of a single line of text when displaying text.
[0144] The text display margin height refers to the height between the last line of text and the bottom of the text display area when displaying text.
[0145] In some embodiments, the step of “determining the text display line height and the text display margin height of the virtual information based on the text display font size” may include the following operations:
[0146] Obtain a first preset line spacing corresponding to the first type of text, and a second preset line spacing corresponding to the second type of text;
[0147] Calculating a difference between a first preset line spacing and a second preset line spacing;
[0148] Calculate the text display line height based on the difference, the second text display font size and the preset coefficient;
[0149] Based on the text display line height, determine the text display margin height, wherein the text display margin height is not less than the text display line height.
[0150] Among them, the first preset line spacing refers to the distance between the baseline and the bottom line of a single text line of the first type of text; the second preset line spacing refers to the distance between the baseline and the bottom line of a single text line of the second type of text.
[0151] For example, see Figure 4 , Figure 4 A schematic diagram of the layout of the text display area of an augmented reality display method provided in an embodiment of the present application. Figure 4 In the text display area of the virtual information shown, the first type of text is the title text, and the second type of text is the body text. Among them, ul1 is the top line of the text line of the title text, bl1 is the baseline of the text line of the title text, and dl1 is the bottom line of the text line of the title text; ul2 is the top line of the text line of the body text, bl2 is the baseline of the text line of the body text, and dl2 is the bottom line of the text line of the body text.
[0152] Among them, l1 refers to the distance between the baseline and the bottom line of the text line of the title text, that is, the first preset line spacing; l2 refers to the distance between the baseline and the bottom line of the text line of the body text, that is, the second preset line spacing.
[0153] In the embodiment of the present application, the top line, the baseline, and the bottom line of the text line may be preset.
[0154] In an embodiment of the present application, the calculation formula for calculating the text display line height may be as follows:
[0155] H=l1-l2+S2(k2+1) / 2;
[0156] Among them, l1 refers to the first preset line spacing; l2 refers to the second preset line spacing, S2 is the second text display font size corresponding to the second type of text, and k2 is the preset coefficient (the preset coefficient can be a preset value). First, the difference between the first preset line spacing l1 and the second preset line spacing l2 can be calculated; the sum of k2 and 1 is calculated, and the sum is multiplied by the second text display font size: S2 and divided by 2 to obtain a calculation result. Finally, the difference can be added to the calculation result to obtain the text display line height H.
[0157] Furthermore, the text display margin height may be determined according to the text display line height H. For example, the text display margin height may be set to be ≥ the text display line height.
[0158] For example, see Figure 4 ,like Figure 4In the text display area of the virtual information shown, the calculated height between the baseline bl1 of the text line of the title text and the baseline bl2 of the text line of the main text is the text display line height H, and the height S between the bottom line dl2 of the text line of the main text and the bottom border of the text display area is the text display blank height, where S is greater than the text display line height H.
[0159] 105. The content of the virtual information is typeset and displayed according to the text display font size, the text display line height, and the text display margin height.
[0160] Specifically, typesetting the text in the virtual information according to the text display font size, text display line height and text display margin height calculated above can include setting the font size of the text in the virtual information to the text display font size, setting the distance between text lines in the virtual information to the text display line height, and setting the text margin distance in the virtual information to the text display margin height, thereby obtaining the typeset text, and then displaying the typeset text through an augmented reality display device, thereby facilitating users to efficiently read the text content displayed by the augmented reality display device.
[0161] In some embodiments, in order to ensure that the number of characters displayed in a single text line during the display of virtual information does not exceed the optimal viewing angle range for user reading, the method may further include the following steps:
[0162] Determine the text display line length corresponding to the virtual information based on the field of view;
[0163] The content of the virtual information is typeset and displayed according to the text display line length, text display font size, text display line height, and text display margin height.
[0164] The text display line length refers to the length of a single line of text when displaying text. The text display line length can be used to control the number of characters in a single text line.
[0165] In some embodiments, in order to improve the text display effect of the augmented reality display device, the step of "determining the text display line length of the virtual information to be displayed based on the field of view angle" may include the following operations:
[0166] If the field of view angle is greater than the preset angle, the preset display line length is obtained to obtain the text display line length;
[0167] If the viewing angle is not greater than the preset angle, the multiplication value of the viewing angle and the first coefficient is calculated to obtain the text display line length.
[0168] The preset angle may be the actual viewing angle observed by the user. The larger the preset angle, the larger the horizontal distance observed by the user. Different people have their own personalized comfortable viewing angles, which are generally within a range. The preset angle can be set in a variety of ways. For example, the system can collect relevant information to automatically set it, or the user can set it by himself through human-computer interaction.
[0169] For example, the system may collect relevant information for automatic setting, including: obtaining the current user's observation and reading habits, and setting the most suitable observation angle for the current user according to the current user's reading habits as the preset angle. Alternatively, the system may obtain the current user's physiological data and automatically calculate and predict the most suitable observation angle as the preset angle.
[0170] For another example, the user setting may include: providing a parameter configuration interface, the parameter configuration interface may include a preset angle, and the user may set the preset angle in the parameter configuration interface. Alternatively, in the parameter configuration application, the user may set the preset angle by voice input.
[0171] In general, this preset angle can be configured in a range of 80-120 degrees.
[0172] In some embodiments, since different users have different viewing angles, different preset angles may be set according to different users.
[0173] In the embodiment of the present application, a first formula is designed to calculate the text display line length, as follows:
[0174] L = k1 xf, (f ≤ m);
[0175] L = n, (f>m);
[0176] Wherein, k1 is the first coefficient (the first coefficient may be a preset value), f is the field of view angle, and by calculating the multiplication value of k1 and f, the text display line length L is obtained. Wherein, m is a preset angle, and in the embodiment of the present application, when the field of view angle f is less than or equal to the preset angle, the text display line length changes with the change of the field of view angle, that is, the larger the field of view angle, the longer the text display line length.
[0177] Among them, n is the preset display line length, that is, the maximum display line length. In the embodiment of the present application, when the field of view angle f is greater than the preset angle, the text display line length takes a fixed value, that is, the preset display line length, to avoid the text line length being too long, resulting in too many characters displayed in a single text line, affecting the user's viewing experience.
[0178] For example, see Figure 5 , Figure 5A schematic diagram of the change in text display line length with field of view angle in an augmented reality display method provided in an embodiment of the present application. Figure 5 The functional relationship between the text display line length L and the field of view angle f is shown, including: when the field of view angle f is less than or equal to m, the text display line length increases as the field of view angle f increases; when the field of view angle f is greater than m, the text display line length is a fixed display line length n.
[0179] In the present application scheme, after determining the text display width through the above steps, the text display line length is further determined, so that the number of characters displayed in a single text line can be determined based on the text display width and the text display line length, which can further improve the display layout effect of virtual information.
[0180] Among them, typesetting the text in the virtual information according to the calculated text display line length, text display font size, text display line height and text display margin height can include: setting the single-line display length of the text in the virtual information to the text display line length; setting the font size of the text in the virtual information to the text display font size, setting the distance between text lines in the virtual information to the text display line height, and setting the text margin distance in the virtual information to the text display margin height, thereby obtaining the typeset text, and then displaying the typeset text through an augmented reality display device, giving the current user a good experience in viewing the virtual information through the virtual display screen.
[0181] The embodiment of the present application discloses an augmented reality display method. The augmented reality display method includes: obtaining the field of view and resolution of the augmented reality display device, as well as the user's viewing angle; obtaining the standard text width ratio of the virtual information to be displayed; determining the text display font size corresponding to the virtual information based on the resolution, field of view, viewing angle, and standard text width ratio; determining the text display line height and text display blank height corresponding to the virtual information based on the text display font size; and typeset displaying the content of the virtual information based on the text display font size, text display line height, and text display blank height. In this way, it is convenient for users to read virtual information when wearing augmented reality display devices, thereby improving the user's viewing experience.
[0182] In order to better implement the augmented reality display method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the augmented reality display method. The meanings of the terms are the same as those in the augmented reality display method, and the specific implementation details can refer to the description in the method embodiment.
[0183] See also Figure 6 , Figure 6The structure block diagram of an augmented reality display device provided in an embodiment of the present application, the augmented reality display device can be applied to AR terminal devices such as augmented reality wearable glasses and augmented reality head-mounted displays, and the device may include:
[0184] A first acquisition unit 301 is used to acquire the field of view and resolution of the augmented reality display device and the viewing angle of the user;
[0185] The second acquisition unit 302 is used to acquire the standard text width ratio of the virtual information to be displayed;
[0186] A first determining unit 303 is used to determine the text display font size corresponding to the virtual information according to the resolution, the field of view, the viewing angle, and the standard text width ratio;
[0187] A second determining unit 304 is used to determine a text display line height and a text display margin height corresponding to the virtual information based on the text display font size;
[0188] The display unit 305 is used to typeset and display the content of the virtual information according to the text display font size, the text display line height and the text display margin height.
[0189] In some embodiments, the resolution includes the length and width of the virtual display screen of the augmented reality display device; the first determining unit 303 may include:
[0190] A first determining subunit, configured to determine a width of a target display area corresponding to the virtual information according to the length, the field of view angle, and the observation viewing angle;
[0191] The second determination subunit is used to determine the text display font size based on the target display area width and the standard text width ratio.
[0192] In some embodiments, the first determining subunit may be specifically used for:
[0193] Calculating a first ratio according to the observation angle and the field angle;
[0194] The multiplication value of the first ratio and the length is calculated to obtain the width of the target display area.
[0195] In some embodiments, the second determining subunit may be specifically used for:
[0196] Calculate the multiplication value of the target display area width and the standard character width ratio to obtain the character display width of a single character;
[0197] The text display font size is determined according to the text display width.
[0198] In some embodiments, the content of the virtual information includes a first type of text and a second type of text, and the standard text width ratio includes a first standard text width ratio corresponding to the first type of text and a second standard text width ratio corresponding to the second type of text; the first determining unit 303 may include:
[0199] A third determining subunit is used to determine a first text display font size corresponding to the first type of text according to the resolution, the field of view angle, the observation angle, and the first standard text width ratio;
[0200] The fourth determination subunit is used to determine the second text display font size corresponding to the second type of text according to the resolution, the field of view angle, the observation angle and the second standard text width ratio.
[0201] In some embodiments, the second determining unit 304 may include:
[0202] A first acquisition subunit, used to acquire a first preset line spacing corresponding to the first type of text, and a second preset line spacing corresponding to the second type of text;
[0203] A first calculation subunit, configured to calculate a difference between the first preset line spacing and the second preset line spacing;
[0204] A second calculation subunit, configured to calculate the text display line height based on the difference, the second text display font size and a preset coefficient;
[0205] The fifth determining subunit is used to determine the text display margin height based on the text display line height, wherein the text display margin height is not less than the text display line height.
[0206] In some embodiments, the apparatus may further include:
[0207] A third determining unit, configured to determine a text display line length corresponding to the virtual information based on the field of view;
[0208] The second display unit is used to typeset and display the content of the virtual information according to the text display line length, the text display font size, the text display line height and the text display blank height.
[0209] The embodiment of the present application discloses an augmented reality display device, which acquires the field of view and resolution of the augmented reality display device and the user's viewing angle through a first acquisition unit 301; the second acquisition unit 302 acquires the standard text width ratio of the virtual information to be displayed; the first determination unit 303 determines the text display font size corresponding to the virtual information according to the resolution, the field of view, the viewing angle and the standard text width ratio; the second determination unit 304 determines the text display line height and the text display blank height corresponding to the virtual information based on the text display font size; the display unit 305 typesets and displays the content of the virtual information according to the text display font size, the text display line height and the text display blank height. In this way, the user's viewing experience can be improved.
[0210] The present application also provides a terminal. Figure 7 As shown, the terminal may include a radio frequency (RF) circuit 601, a memory 602 including one or more storage media, an input unit 603, a display module 604, a sensor 605, an audio circuit 606, a wireless fidelity (WiFi) module 607, a processor 608 including one or more processing cores, and a power supply 609. Those skilled in the art will appreciate that Figure 7 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0211] The radio frequency circuit 601 can be used for receiving and sending signals during the process of sending and receiving information. In particular, after receiving the downlink information of the base station, it is handed over to one or more processors 608 for processing; in addition, the uplink data is sent to the base station. Generally, the radio frequency circuit 601 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM) card, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the radio frequency circuit 601 can also communicate with the network and other devices through wireless communication.
[0212] The memory 602 can be used to store software programs and modules. The processor 608 executes various functional applications and augmented reality display by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 608 and the input unit 603 with access to the memory 602.
[0213] The input unit 603 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in a specific embodiment, the input unit 603 may include a touch-sensitive surface and other input devices. The touch-sensitive surface, also known as a touch display screen or a touchpad, can collect user touch operations on or near it (such as operations performed by the user using fingers, stylus, or any other suitable object or accessory on or near the touch-sensitive surface), and drive the corresponding connection device according to a pre-set program. In addition to the touch-sensitive surface, the input unit 603 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
[0214] The display module 604 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the server, which can be composed of graphics, text, icons, videos and any combination thereof. The display module 604 may include a display panel, and optionally, the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch-sensitive surface may cover the display panel, and when the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor 608 to determine the type of touch event, and then the processor 608 provides corresponding visual output on the display panel according to the type of touch event.
[0215] The terminal may also include at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and the backlight when the server is moved to the ear.
[0216] The audio circuit 606, the speaker, and the microphone can provide an audio interface between the user and the server. The audio circuit 606 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 606 and converted into audio data, and then the audio data is processed by the output processor 608 and sent to, for example, a terminal through the radio frequency circuit 601, or the audio data is output to the memory 602 for further processing. The audio circuit 606 may also include an earplug jack to provide communication between an external headset and the server.
[0217] WiFi is a short-range wireless transmission technology. The terminal can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 607. It provides users with wireless broadband Internet access. Figure 7 A WiFi module 607 is shown, but it is understandable that it is not a necessary component of the terminal and can be omitted as needed without changing the essence of the application.
[0218] The processor 608 is the control center of the terminal, and uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and modules stored in the memory 602, and calling data stored in the memory 602, it executes various functions of the server and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 608 may include one or more processing cores; preferably, the processor 608 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 608.
[0219] The terminal also includes a power supply 609 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 608 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 609 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0220] Specifically in this embodiment, the processor 608 in the terminal will load the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 608 will run the applications stored in the memory 602 to implement various functions:
[0221] Obtain the field of view and resolution of the augmented reality display device, as well as the user's viewing angle;
[0222] Get the standard text width ratio of the virtual information to be displayed;
[0223] Determine the text display font size corresponding to the virtual information according to the resolution, field of view, viewing angle, and standard text width ratio;
[0224] Based on the text display font size, determine the text display line height and text display margin height corresponding to the virtual information;
[0225] The content of the virtual information is typeset and displayed according to the text display font size, text display line height, and text display margin height.
[0226] This solution obtains the field of view and resolution of the augmented reality display device and the user's viewing angle; obtains the standard text width ratio of the virtual information to be displayed; then, according to the resolution, field of view, viewing angle and standard text width ratio, determines the text display font size corresponding to the virtual information; further, based on the text display font size, determines the text display line height and text display blank height corresponding to the virtual information; finally, according to the text display font size, text display line height and text display blank height, typeset and display the content of the virtual information. In this way, it is convenient for users to read virtual information when wearing augmented reality display devices, and improves the user's viewing experience.
[0227] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a storage medium and loaded and executed by a processor.
[0228] To this end, an embodiment of the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any of the augmented reality display methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:
[0229] Obtain the field of view and resolution of the augmented reality display device, as well as the user's viewing angle;
[0230] Get the standard text width ratio of the virtual information to be displayed;
[0231] Determine the text display font size corresponding to the virtual information according to the resolution, field of view, viewing angle, and standard text width ratio;
[0232] Based on the text display font size, determine the text display line height and text display margin height corresponding to the virtual information;
[0233] The content of the virtual information is typeset and displayed according to the text display font size, text display line height, and text display margin height.
[0234] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0235] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0236] Since the instructions stored in the storage medium can execute the steps in any augmented reality display method provided in the embodiments of the present application, the beneficial effects that can be achieved by any augmented reality display method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0237] The above is a detailed introduction to the display method, device, storage medium and terminal of augmented reality provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for displaying augmented reality, characterized in that: The method comprises: Obtain the field of view and resolution of the augmented reality display device, as well as the user's viewing angle; Obtaining a standard text width ratio of virtual information to be displayed, wherein the content of the virtual information includes a first type of text and a second type of text; Determining a text display font size corresponding to the virtual information according to the resolution, the field of view, the viewing angle, and the standard text width ratio; Obtaining a first preset line spacing corresponding to the first type of text and a second preset line spacing corresponding to the second type of text; Calculating a difference between the first preset line spacing and the second preset line spacing; Calculate the text display line height based on the difference, the text display font size of the second type of text, and a preset coefficient; Based on the text display line height, determine the text display blank height, wherein the text display blank height is not less than the text display line height; The content of the virtual information is typeset and displayed according to the text display font size, the text display line height, and the text display margin height.
2. The method according to claim 1, characterized in that: The resolution includes the length and width of the virtual display screen of the augmented reality display device; The determining, according to the resolution, the field of view, the viewing angle, and the standard text width ratio, of a text display font size corresponding to the virtual information includes: Determining a width of a target display area corresponding to the virtual information according to the length, the field of view angle, and the observation viewing angle; The text display font size is determined based on the target display area width and the standard text width ratio.
3. The method according to claim 2, characterized in that The determining, according to the length, the field of view angle, and the observation viewing angle, a width of a target display area corresponding to the virtual information includes: Calculating a first ratio according to the observation angle and the field angle; The multiplication value of the first ratio and the length is calculated to obtain the width of the target display area.
4. The method according to claim 2, characterized in that: The determining the text display font size based on the target display area width and the standard text width ratio includes: Calculate the multiplication value of the target display area width and the standard character width ratio to obtain the character display width of a single character; The text display font size is determined according to the text display width.
5. The method according to claim 1, characterized in that The standard text width ratio includes a first standard text width ratio corresponding to the first type of text and a second standard text width ratio corresponding to the second type of text; The determining, according to the resolution, the field of view, the viewing angle, and the standard text width ratio, of a text display font size corresponding to the virtual information includes: Determining a first text display font size corresponding to the first type of text according to the resolution, the field of view angle, the observation angle, and the first standard text width ratio; A second text display font size corresponding to the second type of text is determined according to the resolution, the field of view angle, the observation angle, and the second standard text width ratio.
6. The method according to claim 1, characterized in that The method further comprises: Determine a text display line length corresponding to the virtual information based on the field of view; The content of the virtual information is typeset and displayed according to the text display line length, the text display font size, the text display line height, and the text display margin height.
7. An augmented reality display device, characterized in that: The device comprises: A first acquisition unit, used to acquire the field of view and resolution of the augmented reality display device, and the viewing angle of the user; A second acquisition unit is used to acquire a standard text width ratio of virtual information to be displayed, wherein the content of the virtual information includes a first type of text and a second type of text; A first determining unit, configured to determine a text display font size corresponding to the virtual information according to the resolution, the field of view, the viewing angle, and the standard text width ratio; A second determination unit is used to obtain a first preset line spacing corresponding to the first type of text and a second preset line spacing corresponding to the second type of text; calculate the difference between the first preset line spacing and the second preset line spacing; calculate the text display line height based on the difference, the text display font size of the second type of text and a preset coefficient; determine the text display blank height based on the text display line height, wherein the text display blank height is not less than the text display line height; The display unit is used to typeset and display the content of the virtual information according to the text display font size, the text display line height and the text display blank height.
8. A storage medium, characterized in that: The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the augmented reality display method according to any one of claims 1 to 6.
9. A terminal, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the augmented reality display method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Augmented reality method and augmented reality device
CN106373197A
Method and system for displaying cultural relics based on augmented reality
CN109213728A
Virtual information display method and system
CN109429053A
Virtual reality character display method and device and virtual reality equipment
CN109696953A
Visual large screen aided design method based on human visual characteristics
CN114282285A
