Character display method and device based on mobile terminal

文档序号:1063460 发布日期:2020-10-16 浏览:38次 中文

阅读说明:本技术 一种基于移动终端的文字显示方法及装置 (Character display method and device based on mobile terminal ) 是由 刘轶 黄锦寿 刘青媛 于 2020-07-03 设计创作,主要内容包括:本申请提供一种基于移动终端的文字显示方法及装置,其中所述方法包括:在图样显示界面中分别加载非透明的目标图样界面和透明的文字内容界面;根据移动终端的倾斜角度,通过所述移动终端的场景采集组件实时获取当前现实场景对应的图像;根据当前现实场景对应的图像判断所述当前现实场景中是否存在光源;在所述当前现实场景中存在光源的情况下,将所述文字内容界面由透明逐渐转变为非透明,使得所述文字内容界面中的文字信息显示在所述目标图样界面中。本申请通过获取光源并根据光源的强度调整图样显示界面中的文字信息的显示或消失,使得玩家需要通过类似于现实中的透光操作获取隐藏在图样显示界面中的文字信息,激发了玩家的积极性。(The application provides a text display method and device based on a mobile terminal, wherein the method comprises the following steps: loading a non-transparent target pattern interface and a transparent text content interface in a pattern display interface respectively; according to the inclination angle of the mobile terminal, acquiring an image corresponding to the current real scene in real time through a scene acquisition component of the mobile terminal; judging whether a light source exists in the current real scene according to an image corresponding to the current real scene; and under the condition that a light source exists in the current real scene, gradually changing the text content interface from transparent to non-transparent so that text information in the text content interface is displayed in the target pattern interface. According to the method and the device, the light source is obtained, the display or disappearance of the character information in the pattern display interface is adjusted according to the intensity of the light source, so that a player needs to obtain the character information hidden in the pattern display interface through a light-transmitting operation similar to the real operation, and the enthusiasm of the player is stimulated.)

1. A character display method based on a mobile terminal is characterized by comprising the following steps:

loading a non-transparent target pattern interface and a transparent text content interface in a pattern display interface respectively;

according to the inclination angle of the mobile terminal, acquiring an image corresponding to the current real scene in real time through a scene acquisition component of the mobile terminal;

judging whether a light source exists in the current real scene according to an image corresponding to the current real scene;

and under the condition that a light source exists in the current real scene, gradually changing the text content interface from transparent to non-transparent so that text information in the text content interface is displayed in the target pattern interface.

2. The method according to claim 1, wherein obtaining image information corresponding to a current real scene in real time through a scene acquisition component of the mobile terminal according to an inclination angle of the mobile terminal comprises:

acquiring the inclination angle of the mobile terminal relative to a player in real time;

judging whether the inclination angle is larger than or equal to a preset angle threshold value;

if so, starting a camera of the mobile terminal, and acquiring an image mapped in the mobile terminal by the current real scene in real time through the camera;

if not, the process is ended.

3. The method of claim 2, wherein determining whether a light source exists in a current real scene according to an image corresponding to the current real scene comprises:

acquiring an RGB color channel numerical value corresponding to each pixel point according to the resolution of the camera;

carrying out weighted summation on the RGB color channel numerical value corresponding to each pixel point according to a preset weight coefficient to generate an illumination brightness value corresponding to each pixel point;

and judging whether a light source exists in the current real scene or not according to the illumination brightness value corresponding to each pixel point.

4. The method according to claim 3, wherein the weighted summation of the RGB color channel values corresponding to each pixel point according to a preset weighting coefficient comprises:

respectively obtaining an R color channel numerical value, a G color channel numerical value and a B color channel numerical value corresponding to each pixel point;

and carrying out weighted summation according to the R color channel numerical value, the G color channel numerical value and the B color channel numerical value corresponding to each pixel point by the following formula:

the illumination brightness value is 0.3 × R color channel number +0.5 × G color channel number +0.2 × B color channel number.

5. The method according to claim 3, wherein determining whether a light source exists in the current real scene according to the illumination brightness value corresponding to each pixel point comprises:

comparing the illumination brightness value corresponding to each pixel point with a preset brightness threshold value;

marking the number of pixel points with the illumination brightness value larger than or equal to the preset brightness threshold;

judging whether the number of the marked pixel points exceeds half of all the pixel points;

if so, confirming that a light source exists in the current real scene;

and if not, determining that no light source exists in the current real scene.

6. The method of claim 5, wherein gradually changing the textual content interface from transparent to non-transparent comprises:

acquiring a corresponding transparency numerical value of the text content interface in an Alpha channel;

and the transparency value is gradually increased in proportion by taking seconds as a unit according to the number of the marked pixel points.

7. The method of claim 5, further comprising:

under the condition that no light source exists in the current real scene or the inclination angle is smaller than a preset angle threshold value, acquiring a corresponding transparency value of the text content interface in an Alpha channel;

judging whether the corresponding transparency numerical value of the text content interface in the Alpha channel is 0 or not;

if yes, ending;

if not, the transparency value is gradually reduced to 0 in proportion to the number of the unmarked pixel points by taking seconds as a unit.

8. A character display device based on a mobile terminal is characterized by comprising:

the interface generation module is configured to load a non-transparent target pattern interface and a transparent text content interface in the pattern display interface respectively;

the image acquisition module is configured to acquire an image corresponding to a current real scene in real time through a scene acquisition component of the mobile terminal according to the inclination angle of the mobile terminal;

the light source judging module is configured to judge whether a light source exists in the current real scene according to an image corresponding to the current real scene;

and the text display module is configured to gradually change the text content interface from transparent to non-transparent under the condition that a light source exists in the current real scene, so that text information in the text content interface is displayed in the target pattern interface.

9. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1-7 when executing the instructions.

10. A computer-readable storage medium storing computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 7.

Technical Field

The present application relates to the field of computer technologies, and in particular, to a text display method and apparatus based on a mobile terminal, a computing device, and a computer-readable storage medium.

Background

In the prior art, most games are provided with a plurality of puzzle solving related game mechanisms, game developers want to give players some puzzles which need to be thought to solve, the players obtain rewards by solving the puzzles, and the puzzles are obtained in the process, however, the players have already contacted a plurality of intuitive puzzle solving tasks, the decryption system is often single in interface brief and direct in information providing mode, and cannot interact with the players while lacking the game interest, so that the game experience of the players is poor.

Disclosure of Invention

In view of this, embodiments of the present application provide a text display method and apparatus based on a mobile terminal, a computing device, and a computer-readable storage medium, so as to solve technical defects in the prior art.

According to a first aspect of the embodiments of the present specification, there is provided a text display method based on a mobile terminal, including:

loading a non-transparent target pattern interface and a transparent text content interface in a pattern display interface respectively;

according to the inclination angle of the mobile terminal, acquiring an image corresponding to the current real scene in real time through a scene acquisition component of the mobile terminal;

judging whether a light source exists in the current real scene according to an image corresponding to the current real scene;

and under the condition that a light source exists in the current real scene, gradually changing the text content interface from transparent to non-transparent so that text information in the text content interface is displayed in the target pattern interface.

According to a second aspect of the embodiments of the present specification, there is provided a text display device based on a mobile terminal, including:

the interface generation module is configured to load a non-transparent target pattern interface and a transparent text content interface in the pattern display interface respectively;

the image acquisition module is configured to acquire an image corresponding to a current real scene in real time through a scene acquisition component of the mobile terminal according to the inclination angle of the mobile terminal;

the light source judging module is configured to judge whether a light source exists in the current real scene according to an image corresponding to the current real scene;

and the text display module is configured to gradually change the text content interface from transparent to non-transparent under the condition that a light source exists in the current real scene, so that text information in the text content interface is displayed in the target pattern interface.

According to a third aspect of embodiments herein, there is provided a computing device comprising a memory, a processor and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of the mobile terminal based text display method when executing the instructions.

According to a fourth aspect of the embodiments of the present specification, there is provided a computer-readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the text display method based on a mobile terminal.

In the embodiment of the description, the light source is obtained, and the display or disappearance of the text information in the pattern display interface is adjusted according to the intensity of the light source, so that the player needs to obtain the text information hidden in the pattern display interface through a light-transmitting operation similar to the reality, and the player has a clear feeling after picking up the light from the mobile terminal, so that the player can increase the interest and the searchability of the game when applied to the puzzle solving system of the game, and the enthusiasm of the player for exploring the game and actively completing various puzzle solving tasks is stimulated.

Drawings

FIG. 1 is a block diagram of a computing device provided by an embodiment of the present application;

fig. 2 is a flowchart of a text display method based on a mobile terminal according to an embodiment of the present application;

fig. 3 is a schematic diagram of a text display method based on a mobile terminal according to an embodiment of the present application;

fig. 4 is another flowchart of a text display method based on a mobile terminal according to an embodiment of the present application;

fig. 5 is another flowchart of a text display method based on a mobile terminal according to an embodiment of the present application;

fig. 6 is another flowchart of a text display method based on a mobile terminal according to an embodiment of the present application;

fig. 7 is another flowchart of a text display method based on a mobile terminal according to an embodiment of the present application;

fig. 8 is another flowchart of a text display method based on a mobile terminal according to an embodiment of the present application;

fig. 9 is another schematic diagram of a text display method based on a mobile terminal according to an embodiment of the present application;

fig. 10 is another schematic diagram of a text display method based on a mobile terminal according to an embodiment of the present application;

fig. 11 is a schematic structural diagram of a text display device based on a mobile terminal according to an embodiment of the present application.

Detailed Description

In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.

The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.

It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can also be referred to as a second and, similarly, a second can also be referred to as a first without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.

First, the noun terms to which one or more embodiments of the present invention relate are explained.

RGB color channels: the RGB color scheme is a color standard in the industry, and various colors are obtained by changing three color channels of red (R), green (G) and blue (B) and superimposing the three color channels on each other, where RGB represents colors of the three channels of red, green and blue, and the color standard almost includes all colors that can be perceived by human vision, and is one of the most widely used color systems at present.

Alpha channel: the alpha channel is an 8-bit grayscale channel that records transparency information in an image with 256 levels of grayscale, defining transparent, opaque, and translucent regions, where white represents opaque, black represents transparent, and gray represents translucent. The larger the transparency value is, the more opaque is, the range is 0-255, namely 255 is opaque, and 0 is fully transparent.

Resolution ratio: the display resolution (screen resolution) is the precision of the screen image and refers to how many pixels can be displayed on the display. Since the dots, lines and planes on the screen are all composed of pixels, the more pixels the display can display, the finer the picture is, and the more information can be displayed in the same screen area, so that the resolution is a very important performance index. The whole image can be thought of as a large chessboard, and the resolution is expressed by the number of all the longitude and latitude intersections. Under the condition of a certain display resolution, the smaller the display screen is, the clearer the image is, on the contrary, when the size of the display screen is fixed, the clearer the image is when the display resolution is higher.

In the present application, a text display method, a text display device, a text display program, and a computer-readable storage medium based on a mobile terminal are provided, and detailed descriptions are individually provided in the following embodiments.

FIG. 1 shows a block diagram of a computing device 100, according to an embodiment of the present description. The components of the computing device 100 include, but are not limited to, memory 110 and processor 120. The processor 120 is coupled to the memory 110 via a bus 130 and a database 150 is used to store data.

Computing device 100 also includes access device 140, access device 140 enabling computing device 100 to communicate via one or more networks 160. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 140 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.

In one embodiment of the present description, the above-described components of computing device 100 and other components not shown in FIG. 1 may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 1 is for purposes of example only and is not limiting as to the scope of the description. Those skilled in the art may add or replace other components as desired.

Computing device 100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 100 may also be a mobile or stationary server.

The mobile terminal in the embodiment of the application can be a portable computer, a mobile phone, a tablet computer or the like. The client has installed and running therein an application that supports a virtual environment, such as an application that supports a 2.5-dimensional environment. The application may be any one of a virtual reality application, a three-dimensional map program, a military simulation program, an ARPG game, a TPS game, an FPS game, and an MOBA game. Alternatively, the application program may be a stand-alone application program, such as a stand-alone three-dimensional game program, or may be a network online application program.

Wherein the processor 120 may perform the steps of the method shown in fig. 2. Fig. 2 is a schematic flowchart illustrating a text display method based on a mobile terminal according to an embodiment of the present application, including steps 201 to 208.

Step 202: and respectively loading a non-transparent target pattern interface and a transparent text content interface in the pattern display interface.

In the embodiment of the application, a puzzle solving system in a game running with a mobile terminal displays puzzles obtained by a player in the game process through a pattern display interface, each puzzle corresponds to one pattern interface displayed in the pattern display interface, the player can collect 'fragments' of the pattern interfaces through various puzzle solving tasks in the game, so as to finally piece up a complete pattern interface and complete a specific puzzle, for example, as shown in fig. 3, for a 'Jiuzhou quote' puzzle solving system, the puzzles are displayed to the player through a plurality of pattern display interfaces with a page effect, a pattern interface displaying patterns is displayed in the pattern display interface with each page effect, each pattern corresponds to one puzzle, such as 'lightning pattern', 'boar pattern' or 'kite pattern', and the like, and meanwhile, a transparent text content interface is also superposed on each pattern interface, the character content interface comprises character information for describing each pattern, and the character information is in a non-visible transparent state in a normal state.

Step 204: and acquiring an image corresponding to the current real scene in real time through a scene acquisition component of the mobile terminal according to the inclination angle of the mobile terminal.

In an embodiment of the present application, as shown in fig. 4, the step 204 includes steps 402 to 406.

Step 402: and acquiring the inclination angle of the mobile terminal relative to the player in real time.

In the embodiment of the application, in order to simulate the real paper light transmission process and determine that the player really faces the mobile terminal to the light source, the game system firstly detects the inclination angle of the display screen of the mobile terminal relative to the player through a gyroscope component carried by the mobile terminal.

Step 404: judging whether the inclination angle is larger than or equal to a preset angle threshold value; if yes, go to step 406; if not, the process is ended.

In an embodiment of the application, the game system further determines whether the tilt angle is greater than or equal to a preset angle threshold, wherein the angle threshold may be set to 45 °, that is, the player is required to tilt the mobile terminal to a specific direction by more than 45 ° at least, as a prerequisite for determining that the player faces the mobile terminal to the light source.

Step 406: and starting a camera of the mobile terminal, and acquiring an image of the current real scene mapped in the mobile terminal in real time through the camera.

In the embodiment of the application, the game system collects the light source after the detection angle is correct, the game system controls to request the camera use right of the mobile terminal of the player so as to start the camera, and the current real scene is shot through the camera so as to collect the image of the current real scene mapped in the mobile terminal in real time, wherein the light source is preferably sunlight.

This application is through utilizing the gyroscope subassembly among the mobile terminal to monitor mobile terminal's screen for the inclination of putting of player, as the prerequisite of judging whether mobile terminal is towards the light source to utilize human engineering's thought to simulate out the operation of lifting up the paper and aiming at light sources such as sunlight in the reality, increased player's recreation interest.

Step 206: and judging whether a light source exists in the current real scene according to the image corresponding to the current real scene.

In an embodiment of the present application, as shown in fig. 5, the step 206 includes steps 502 to 506.

Step 502: and acquiring the RGB color channel numerical value corresponding to each pixel point according to the resolution of the camera.

In the embodiment of the application, the game system acquires, according to the resolution of the camera, RGB color channel values corresponding to each pixel point corresponding to an image constituting a previous real scene, for example, if the resolution of the camera is one thousand, it indicates that the image mapped in the mobile terminal in the current real scene is composed of one thousand pixel points, and the game system acquires the RGB color channel values corresponding to one thousand pixel points.

Step 504: and carrying out weighted summation on the RGB color channel numerical value corresponding to each pixel point according to a preset weight coefficient to generate an illumination brightness value corresponding to each pixel point.

In the embodiment of the present application, as shown in fig. 6, the step 504 includes steps 602 to 604.

Step 602: and respectively acquiring the R color channel numerical value, the G color channel numerical value and the B color channel numerical value corresponding to each pixel point.

In the above embodiment, when the resolution of the camera is one thousand, the game system obtains the R color channel numerical value, the G color channel numerical value, and the B color channel numerical value corresponding to one thousand pixel points, respectively.

Step 604: and carrying out weighted summation according to the R color channel numerical value, the G color channel numerical value and the B color channel numerical value corresponding to each pixel point by the following formula:

the illumination brightness value is 0.3 × R color channel number +0.5 × G color channel number +0.2 × B color channel number.

In the formula, each color channel value is multiplied by a preset weight coefficient and summed to finally obtain an illumination brightness value corresponding to each pixel point, wherein the illumination brightness of the light source mainly depends on the G color channel value, so the weight coefficient of the G color channel value is the largest, and the value range of each color channel value is [0, 1 ].

The image that this application was shot to the camera through predetermined RGB conversion rule carries out the feature extraction, acquires the illumination brightness value that every pixel corresponds to acquire the illumination intensity in the current real scene, realized reliably, rationally and the high-efficient intensity of confirming the light source.

Step 506: and judging whether a light source exists in the current real scene or not according to the illumination brightness value corresponding to each pixel point.

In the embodiment of the present application, as shown in fig. 7, the step 506 includes steps 702 to 710.

Step 702: and comparing the illumination brightness value corresponding to each pixel point with a preset brightness threshold value.

In the above embodiment, the game system compares the calculated illumination brightness value corresponding to each pixel point with a preset brightness threshold, where the brightness threshold may be generally set to 0.5, and may be adjusted according to specific situations.

Step 704: and marking the number of the pixel points with the illumination brightness value more than or equal to the preset brightness threshold value.

In the above embodiment, the game system compares the illumination brightness value corresponding to each pixel with a preset brightness threshold, and under the condition that the illumination brightness value corresponding to the pixel is greater than or equal to the preset brightness threshold, determines that the image content mapped by the pixel is a light source, and marks the pixel as a light source pixel.

Step 706: judging whether the number of the marked pixel points exceeds half of all the pixel points; if yes, go to step 708; if not, go to step 710.

Step 708: confirming that a light source exists in the current real scene.

Step 710: and confirming that no light source exists in the current real scene.

In the above embodiment, when the number of the marked pixels exceeds half of all the pixels, it indicates that the image content mapped by at least half of all the pixels constituting the image is a light source, and the game system may determine that a light source exists in the current display scene shot by the camera, that is, the camera is aligned with the light source.

This application is through obtaining the preceding image of camera, thereby it calculates the illumination brightness value of every pixel to obtain the RGB colour channel numerical value of every pixel in the image be greater than under the luminance threshold value that illumination brightness value predetermines, mark the pixel as the light source pixel, when being recorded as the pixel of light source pixel and surpassing the half numerical value of all pixel of whole image, just be recorded as there is the light source before the camera, thereby make the text content interface that is hidden in the pattern display interface can slowly appear, thereby realize carrying out the complete simulation that the printing opacity shows hidden information to the paper in the reality, thereby the interaction between recreation and the player has been increased, the enthusiasm of the player exploration recreation is sent out.

Step 208: and under the condition that a light source exists in the current real scene, gradually changing the text content interface from transparent to non-transparent so that text information in the text content interface is displayed in the target pattern interface.

In the embodiment of the present application, as shown in fig. 8, gradually changing the text content interface from transparent to non-transparent includes steps 802 to 804.

Step 802: and acquiring a corresponding transparency numerical value of the text content interface in an Alpha channel.

In the above embodiment, when a light source exists in the current real scene, the game system obtains the corresponding transparency value of the text content interface in the Alpha channel, and when the text content interface is in the initial transparent state, the corresponding transparency value of the text content interface in the Alpha channel is 0.

Step 804: and the transparency value is gradually increased in proportion by taking seconds as a unit according to the number of the marked pixel points.

In the above embodiment, as shown in fig. 9, the game system determines the increasing speed of the transparency value according to the number of the marked pixels in a direct proportion, and gradually increases the transparency value in units of seconds, so that the text content interface is gradually transited from transparent to translucent and opaque, and text information in the text content interface is displayed in the target pattern interface, thereby simulating an effect of hiding information when paper is made to be transparent in reality.

The method and the device have the advantages that the display of the text content is realized by changing the corresponding transparency value of the text content interface in the Alpha channel, the display speed depends on the number of the marked pixel points, namely the illumination intensity of the light source, so that the situation in reality is more fitted, and the game bring-in feeling of a player is stronger.

In an embodiment of the present application, as shown in fig. 10, the method further includes steps 1002 to 1006.

Step 1002: and under the condition that the light source does not exist in the current real scene or the inclination angle is smaller than a preset angle threshold value, acquiring a corresponding transparency value of the text content interface in an Alpha channel.

In the embodiment of the application, when the game system determines that the light source does not exist in the current real scene or the inclination angle is smaller than the preset angle threshold, it may be determined that the mobile terminal is not aligned with the light source, and at this time, the game system may also obtain the corresponding transparency value of the text content interface in the Alpha channel.

Step 1004: judging whether the corresponding transparency numerical value of the text content interface in the Alpha channel is 0 or not; if yes, ending; if not, go to step 1006.

In the embodiment of the application, if the corresponding transparency value of the text content interface in the Alpha channel is not 0, it indicates that the text information in the text content interface is in a visible or semi-visible state, but since the mobile terminal is not aligned with the light source at this time, the text content interface needs to be changed into a transparent state so that the text information becomes an invisible transparent state.

Step 1006: and the transparency value is gradually reduced to 0 in proportion to the number of the unmarked pixel points by taking seconds as a unit.

In the embodiment of the application, the game system determines the reduction speed of the transparency value according to the number of the unmarked pixel points in a direct proportion, and gradually reduces the transparency value by taking seconds as a unit until the transparency value is 0, so that the text content interface is gradually transited from opaque or semi-transparent to transparent, the text information in the text content interface disappears in the target pattern interface, and the effect of hiding the information in the pattern interface in reality is simulated.

The situation in the reality is simulated in the application, under the condition that the player recovers the mobile terminal to the light-shading state or the light source intensity is insufficient, the text content interface can be in proportion for hours according to the light source intensity, so that the authenticity and the integrity of a game mechanism are ensured, and the player obtains complete game experience.

Corresponding to the above method embodiment, this specification further provides an embodiment of a text display device based on a mobile terminal, and fig. 11 shows a schematic structural diagram of the text display device based on the mobile terminal according to an embodiment of this specification. As shown in fig. 11, the apparatus includes:

the interface generation module 1101 is configured to load a non-transparent target pattern interface and a transparent text content interface in the pattern display interface respectively;

the image acquisition module 1102 is configured to acquire an image corresponding to a current real scene in real time through a scene acquisition component of the mobile terminal according to an inclination angle of the mobile terminal;

the light source judging module 1103 is configured to judge whether a light source exists in a current real scene according to an image corresponding to the current real scene;

a text display module 1104 configured to gradually change the text content interface from transparent to non-transparent in the presence of a light source in the current real scene, so that text information in the text content interface is displayed in the target pattern interface.

Optionally, the image acquiring module 1102 includes:

an angle acquisition unit configured to acquire an inclination angle of the mobile terminal with respect to the player in real time;

an angle determination unit configured to determine whether the inclination angle is equal to or greater than a preset angle threshold; if yes, executing a shooting unit; if not, ending;

the shooting unit is configured to start a camera of the mobile terminal and acquire an image of a current real scene mapped in the mobile terminal in real time through the camera.

Optionally, the light source determining module 1103 includes:

the color acquisition unit is configured to acquire an RGB color channel numerical value corresponding to each pixel point according to the resolution of the camera;

the brightness value calculation unit is configured to perform weighted summation on the RGB color channel numerical values corresponding to each pixel point according to a preset weight coefficient, and generate an illumination brightness value corresponding to each pixel point;

and the brightness judging unit is configured to judge whether a light source exists in the current real scene according to the illumination brightness value corresponding to each pixel point.

Optionally, the luminance value calculating unit includes:

a numerical value obtaining subunit configured to obtain an R color channel numerical value, a G color channel numerical value, and a B color channel numerical value corresponding to each pixel point, respectively;

a weighted summation subunit configured to perform weighted summation according to the R color channel value, the G color channel value, and the B color channel value corresponding to each pixel point by the following formula:

the illumination brightness value is 0.3 × R color channel number +0.5 × G color channel number +0.2 × B color channel number.

Optionally, the light source determining module 1103 includes:

the threshold comparison unit is configured to compare the illumination brightness value corresponding to each pixel point with a preset brightness threshold;

the pixel point marking unit is configured to mark the number of pixel points of which the illumination brightness value is greater than or equal to the preset brightness threshold value;

the pixel point counting unit is configured to judge whether the number of the marked pixel points exceeds half of all the pixel points; if so, confirming that the light source exists in the current real scene, and if not, confirming that the light source does not exist in the current real scene.

Optionally, the text display module 1104 includes:

the first transparent acquisition unit is configured to acquire a corresponding transparency value of the text content interface in an Alpha channel;

a text display subunit configured to gradually increase the transparency value in units of seconds in proportion to the number of the marked pixels.

Optionally, the text display module 1104 further includes:

the second transparent obtaining unit is configured to obtain a corresponding transparency value of the text content interface in an Alpha channel under the condition that it is confirmed that no light source exists in the current real scene or the inclination angle is smaller than a preset angle threshold;

the transparency judging unit is configured to judge whether a corresponding transparency numerical value of the text content interface in an Alpha channel is 0; if yes, ending; if not, executing a character disappearing subunit;

a text disappearance subunit configured to gradually decrease the transparency value to 0 in proportion to the number of the unmarked pixel points in seconds.

The light source is obtained, the display or disappearance of the character information in the pattern display interface is adjusted according to the intensity of the light source, so that the player needs to obtain the character information hidden in the pattern display interface through a light-transmitting operation similar to the reality, the interestingness and the searchability of the game can be increased when the light-transmitting device is applied to a riddle-solving system of the game, and the enthusiasm of the player for exploring the game and actively completing various riddle-solving tasks is stimulated.

An embodiment of the present application further provides a computing device, including a memory, a processor, and computer instructions stored on the memory and executable on the processor, where the processor executes the instructions to implement the following steps:

loading a non-transparent target pattern interface and a transparent text content interface in a pattern display interface respectively;

according to the inclination angle of the mobile terminal, acquiring an image corresponding to the current real scene in real time through a scene acquisition component of the mobile terminal;

judging whether a light source exists in the current real scene according to an image corresponding to the current real scene;

and under the condition that a light source exists in the current real scene, gradually changing the text content interface from transparent to non-transparent so that text information in the text content interface is displayed in the target pattern interface.

An embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions, when executed by a processor, implement the steps of the text display method based on a mobile terminal as described above.

The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the computer-readable storage medium and the technical solution of the text display method based on the mobile terminal belong to the same concept, and details that are not described in detail in the technical solution of the computer-readable storage medium can be referred to the description of the technical solution of the text display method based on the mobile terminal.

The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.

The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer memory, Read-only memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.

It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.

In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, 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 of the application and the practical application, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:游戏数据的处理方法及装置、电子设备、存储介质

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类