CN112807684A - Obstruction information acquisition method, device, equipment and storage medium - Google Patents
Obstruction information acquisition method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112807684A CN112807684A CN202011624127.2A CN202011624127A CN112807684A CN 112807684 A CN112807684 A CN 112807684A CN 202011624127 A CN202011624127 A CN 202011624127A CN 112807684 A CN112807684 A CN 112807684A
- Authority
- CN
- China
- Prior art keywords
- target
- main body
- picture
- determining
- subject
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 230000008569 process Effects 0.000 claims abstract description 32
- 230000000903 blocking effect Effects 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 9
- 230000000007 visual effect Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 11
- 230000003287 optical effect Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- 239000013307 optical fiber Substances 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 239000008280 blood Substances 0.000 description 2
- 210000004369 blood Anatomy 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 244000025254 Cannabis sativa Species 0.000 description 1
- 241000196324 Embryophyta Species 0.000 description 1
- 241001465754 Metazoa Species 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000003796 beauty Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011038 discontinuous diafiltration by volume reduction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/52—Controlling the output signals based on the game progress involving aspects of the displayed game scene
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/80—Special adaptations for executing a specific game genre or game mode
- A63F13/822—Strategy games; Role-playing games
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
- A63F2300/60—Methods for processing data by generating or executing the game program
- A63F2300/66—Methods for processing data by generating or executing the game program for rendering three dimensional images
- A63F2300/6653—Methods for processing data by generating or executing the game program for rendering three dimensional images for altering the visibility of an object, e.g. preventing the occlusion of an object, partially hiding an object
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
- A63F2300/80—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
- A63F2300/807—Role playing or strategy games
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a method, a device, equipment and a storage medium for obtaining shelter information. The method comprises the following steps: in the game process, scene information is acquired; if the scene information meets the shooting condition, determining a target subject according to the scene information; judging whether the target main body is shielded; and if the target main body is shielded, acquiring the information of the shielding object. By the technical scheme, the wonderful game picture can be captured from the optimal visual angle, and the information of the shelters sheltering the target main body in the game picture can be extracted.
Description
Technical Field
The embodiment of the invention relates to the technical field of computer vision, in particular to a method, a device, equipment and a storage medium for obtaining shelter information.
Background
With the rapid development of the internet, the network game industry comes to birth and develops vigorously, and the network game has become a sunrise industry with great potential and wide development prospect in the current society.
With the continuous development of game making technology, the making of game pictures is more and more exquisite, the game battle is more and more stimulated, and especially the fighting pictures of action games are always nice and tricky, so people cannot keep the exquisite pictures.
In the prior art, if a game player wants to keep the wonderful moment in the game process, the picture can be captured only through screenshot software, the game process is nervous, the wonderful picture is vanished in the short term, and a user is difficult to capture the wonderful moment in the game process. In the game pictures captured by the intercepting mode, the key pictures can be shielded by some objects to influence the aesthetic feeling of the whole picture, for example, the face of a game character is difficult to shoot the picture with the most commemorative significance and appreciation value. And only pictures in the visual angle of the player can be seen in the game process, so that the player can have better substitution feeling. When a game player is placed in a battle scene, the player often cannot see the panorama of the battle scene, cannot obtain the most shocking picture, and cannot keep the wonderful game picture under the optimal view angle.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for acquiring shelter information, which are used for capturing a wonderful game picture from an optimal visual angle and extracting shelter information for sheltering a target main body in the game picture.
In a first aspect, an embodiment of the present invention provides a method for acquiring obstruction information, including:
in the game process, scene information is acquired;
if the scene information meets the shooting condition, determining a target subject according to the scene information;
judging whether the target main body is shielded;
and if the target main body is shielded, acquiring the information of the shielding object.
Further, determining whether the target subject is occluded comprises:
creating a target camera from the target subject;
and judging whether the target main body is shielded or not according to the target camera.
Further, determining whether the target subject is occluded according to the target camera includes:
identifying a target object based on rays emitted from a corresponding location of the target camera toward the target subject;
if the target object is not a target body, determining that the target body is blocked;
and if the target object is a target subject, determining that the target subject is not blocked.
Further, the method also comprises the following steps:
and if the target object comprises a target body and a non-target body, determining that the target body is blocked.
Further, determining whether the target subject is occluded according to the target camera includes:
acquiring a first picture, wherein the first picture is obtained by hiding a main body except a target main body in scene information;
acquiring a second picture, wherein the second picture is scene information containing a target subject;
acquiring a first weight value of the target main body relative to the first picture;
acquiring a second weight value of the target main body relative to the second picture;
if the first weight value and the second weight value are different, determining that the target main body is shielded;
if the first weight value is the same as the second weight value, determining that the target main body is not shielded.
Further, determining whether the target subject is occluded according to the target camera includes:
acquiring a first picture, wherein the first picture is obtained by hiding a main body except a target main body in scene information;
acquiring a second picture, wherein the second picture is scene information containing a target subject;
acquiring a first weight value of the target main body relative to the first picture;
acquiring a second weight value of the target main body relative to the second picture;
if the first weight value and the second weight value are different, identifying a target object based on rays emitted to the target main body from a position corresponding to the target camera;
if the target object is not a target body, determining that the target body is blocked;
and if the target object is a target subject, determining that the target subject is not blocked.
Further, if the scene information satisfies the shooting condition, determining a target subject according to the scene information, including:
and if the current role is determined to be in the target state according to the scene information, determining a target main body according to the scene information, wherein the target main body comprises the current role.
In a second aspect, an embodiment of the present invention further provides a device for acquiring obstruction information, where the device includes:
the first acquisition module is used for acquiring scene information in the game process;
the determining module is used for determining a target subject according to the scene information if the scene information meets the shooting condition;
the judging module is used for judging whether the target main body is shielded or not;
and the second acquisition module is used for acquiring the information of the sheltering object if the target main body is sheltered.
Further, the judging module includes:
a creation unit configured to create a target camera from the target subject;
and the judging unit is used for judging whether the target main body is shielded or not according to the target camera.
Further, the judging unit includes:
the identification subunit is used for identifying a target object based on rays emitted to the target body from the position corresponding to the target camera;
the first determining subunit is used for determining that the target object is blocked if the target object is not the target object;
and the second determining subunit is used for determining that the target subject is not occluded if the target object is the target subject.
Further, the method also comprises the following steps:
a third determining subunit, configured to determine that the target object is occluded if the target object includes a target subject and a non-target subject.
Further, the determining unit is specifically configured to:
acquiring a first picture, wherein the first picture is obtained by hiding a main body except a target main body in scene information;
acquiring a second picture, wherein the second picture is scene information containing a target subject;
acquiring a first weight value of the target main body relative to the first picture;
acquiring a second weight value of the target main body relative to the second picture;
if the first weight value and the second weight value are different, determining that the target main body is shielded;
if the first weight value is the same as the second weight value, determining that the target main body is not shielded.
Further, the determining unit is further configured to:
acquiring a first picture, wherein the first picture is obtained by hiding a main body except a target main body in scene information;
acquiring a second picture, wherein the second picture is scene information containing a target subject;
acquiring a first weight value of the target main body relative to the first picture;
acquiring a second weight value of the target main body relative to the second picture;
if the first weight value and the second weight value are different, identifying a target object based on rays emitted to the target main body from a position corresponding to the target camera;
if the target object is not a target body, determining that the target body is blocked;
and if the target object is a target subject, determining that the target subject is not blocked.
Further, the determining module is specifically configured to:
and if the current role is determined to be in the target state according to the scene information, determining a target main body according to the scene information, wherein the target main body comprises the current role.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method according to any one of the embodiments of the present invention.
The embodiment of the invention can capture the wonderful game picture from the optimal visual angle, extract the shelter information for sheltering the target main body in the game picture and leave the wonderful picture at the wonderful moment in the game process for the game player.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart of a method for obtaining information of an obstruction in a first embodiment of the invention;
fig. 1a is a schematic diagram of a first method according to a first embodiment of the present invention, for determining whether a target subject is occluded according to a target camera;
fig. 1b is a schematic diagram of a second method according to the first embodiment of the present invention, for determining whether the target subject is occluded according to the target camera;
fig. 1c is a schematic diagram of a third method according to the first embodiment of the present invention, that is, determining whether the target subject is occluded according to the target camera;
fig. 2 is a schematic structural view of a shelter information acquisition apparatus according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device in a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example one
Fig. 1 is a flowchart of a method for acquiring information of a blocking object according to an embodiment of the present invention, where the present embodiment is applicable to a situation of acquiring information of a blocking object in a game screen, and the method can be executed by a device for acquiring blocking object information according to an embodiment of the present invention, and the device can be implemented by software and/or hardware, as shown in fig. 1, the method specifically includes the following steps:
and S110, acquiring scene information in the game process.
The scene information may be content presented by a main body in a game screen, where the main body is related to a game, and for example, the main body may include: current characters, other characters, monsters, plants, mountains, animals, and so on, appear in the game screen.
Each game has its classic scenes, such as a snow mountain scene, a grass scene, a desert scene, an ancient city scene, a playground scene, etc., which are not limited in this embodiment of the present invention.
And S120, if the scene information meets the shooting condition, determining a target subject according to the scene information.
The shooting condition can be that at least one subject in a scene releases skills, or the cool value of at least one subject is greater than a cool value threshold, wherein the cool value is a value calculated according to factors such as the posture and the shape of the subject and is used for quantitatively analyzing the cool degree of the subject; the level of the skin of at least one subject may be higher than the level threshold, or the distance between two subjects may be smaller than the distance threshold, or the frequency of appearance of the subjects may be smaller than the frequency threshold, or at least one subject may be killed, or a subject may have a blood volume reduction of skill released by another subject larger than the single blood volume threshold, or a shooting condition set by the player according to his or her preference, which is not limited in the embodiment of the present invention.
Specifically, the method for determining the target subject according to the scene information may be that a subject satisfying at least one shooting condition in the scene information is determined as the target subject. The number of the target subjects may be one or more, and the number of the target subjects is not limited in the embodiment of the present invention.
For example, if the current scene is that the current character a releases the skill to the monster B, the target subjects are two, the current character a is one target subject, and the monster B is the other target subject.
In a specific example, during the game, if the current game scene is that the current character releases the skill to the monster B and the monster S is killed, the target subject is determined to be the current character and the monster S. It may also be determined that the target subject includes: current character, monster S and monster B. In the game process, if a monster rarely appearing in the game appears in the current game scene, the target subject is determined to be the monster, and the target subject can also be determined to be a player character and a monster which release skills to the monster. In the game process, if a monster or a character with a high color value appears in the current game scene, the target subject is determined to be the monster or the character with the high color value. In the game process, if the current game scene shows a skin with a high grade, the role corresponding to the skin with the high grade is determined as the target subject. In the game process, if the current game scene is a newly developed game scene, determining the main body in the game scene as a target main body.
Optionally, if the scene information satisfies the shooting condition, determining a target subject according to the scene information, including:
and if the current role is determined to be in the target state according to the scene information, determining a target main body according to the scene information, wherein the target main body comprises the current role.
The target state may be a release skill state, a state in which a cool value is greater than a preset cool value, and a state in which a skin level is higher than a level threshold.
In a specific example, during the game, if the current game scene is that the current character releases the skill to the monster B and the monster S is killed, the target subject is determined to be the current character and the monster S. It may also be determined that the target subject includes: current character, monster S and monster B. In the game process, if the current game scene is that the distance between the current character and the monster S is smaller than the distance threshold, the target subject is determined to be the current character and the monster S. In the game process, if the current game scene is the monster S and attacks the current role, the target subject is determined to be the current role and the monster S.
S130, judging whether the target main body is shielded or not.
In a game picture photographed during a game, if other subjects such as a game character and a battle object are blocked, the appearance of the whole picture may be affected, and therefore, it is necessary to determine whether a target subject is blocked in the photographed picture.
Specifically, the determination of whether the target subject is occluded may be a determination of whether the target subject is occluded from any angle, for example, a visual angle of a player, or a shooting angle of a target camera, and the position of the target camera may be set according to scene information. The manner of determining whether the target subject is shielded may be determining whether the target subject is shielded according to a position relationship between the target subject and another subject, or determining whether the target subject is shielded according to information obtained by the target camera, or determining whether the target subject is shielded based on a picture weight value of the target subject, which is not limited in this embodiment of the present invention.
And S140, if the target main body is shielded, acquiring shielding object information.
Specifically, if the target main body is determined to be blocked, the information of the blocking object is obtained and is used for further removing the blocking object in the game picture, and the game picture showing the complete target object is provided for the user to serve as a game souvenir, so that the wonderful game moment can be recorded for the user.
The information of the blocking object may be a form of the blocking object, an area of the blocking object, a type of the blocking object, a specific name of the blocking object, a position blocked by the blocking object, and the like, which is not limited in this embodiment of the present invention.
For example, after it is determined that the target subject is occluded, the information of the occlusion object is obtained, and whether to process the occlusion object is determined according to the information of the occlusion object, for example, if the occlusion object is a butterfly and the occlusion position is on the clothes of the target subject, the occlusion object is not processed. If the shielding object is a butterfly and the shielding position is the face of the target body, the face of the target body cannot be seen clearly, the shielding object needs to be processed to prevent the shielding object from influencing the beauty of the final picture.
Optionally, the determining whether the target subject is occluded includes:
creating a target camera from the target subject;
and judging whether the target main body is shielded or not according to the target camera.
Specifically, a target camera is created so that the target camera can shoot a target subject from an optimal angle, and whether the target subject is blocked is judged according to information acquired by the target camera.
For example, if the number of the target subjects is two, the creation position of the target camera is on a straight line of a midpoint of a position connecting line of the two target subjects, and preferably, the straight line of the position of the target camera is perpendicular to the position connecting line of the two target subjects.
The mode of judging whether the target subject is shielded according to the target camera can be to judge whether the target subject is shielded according to information collected by rays emitted by the target camera, and can be to judge whether the target subject is shielded according to a picture shot by the target camera, wherein the picture is occupied by the target subject. For example, in the game process, if the current game scene is that the current character releases skill to the monster B, the view angle of the game player is from the back view angle of the current character to the monster B, and the best picture of the current character for releasing skill cannot be displayed. The best shooting position is the side position of the center of the current character and the monster. Therefore, a target camera is created, and the initial position of the target camera is determined as the best shooting position. During the game, the optimal shooting position changes along with the change of the current character and the position of the monster B, and further the position of the target camera changes along with the change of the optimal shooting position. And judging whether the target main body is shielded or not according to the information acquired by the target camera.
Optionally, determining whether the target subject is occluded according to the target camera includes:
identifying a target object based on rays emitted from a corresponding location of the target camera toward the target subject;
if the target object is not a target body, determining that the target body is blocked;
and if the target object is a target subject, determining that the target subject is not blocked.
Specifically, in the game process, scene information is acquired, and if the scene information meets shooting conditions, a target subject is determined according to the scene information. The target camera emits a plurality of rays having a certain density from a set position to the target subject, and collects information of the target object irradiated with the rays. If the target objects irradiated by the rays are non-target objects, determining that the target objects are shielded; and if the target objects irradiated by the rays are all target bodies, determining that the target bodies are not shielded.
For example, as shown in fig. 1a, in the game process, the target camera emits a ray with a first preset density to the target subject to acquire information of the target subject, and if the target subject is not the target subject, it is determined that the target subject is occluded.
Optionally, the method further includes:
and if the target object comprises a target body and a non-target body, determining that the target body is blocked.
Specifically, the density degree of the rays can be preset or set according to a target subject, and the sparse rays can filter small obstacles.
Illustratively, in the game process, the target camera emits a ray with a first preset density to a target subject to acquire information of the target subject, and if the target subject is the target subject, it is determined that the target subject is not blocked. And the target camera transmits a ray with a second preset density to the target subject to acquire information of the target subject, and if the target subject comprises the target subject and a non-target subject, the target subject is determined to be shielded.
Optionally, determining whether the target subject is occluded according to the target camera includes:
acquiring a first picture, wherein the first picture is obtained by hiding a main body except a target main body in scene information;
acquiring a second picture, wherein the second picture is scene information containing a target subject;
acquiring a first weight value of the target main body relative to the first picture;
acquiring a second weight value of the target main body relative to the second picture;
if the first weight value and the second weight value are different, determining that the target main body is shielded;
if the first weight value is the same as the second weight value, determining that the target main body is not shielded.
Specifically, in the game process, scene information is acquired, and if the scene information meets shooting conditions, a target subject is determined according to the scene information. The target camera captures a picture from a set position, a first picture obtained by hiding a subject other than the target subject in the scene information, and a second picture containing the scene information of the target subject. Acquiring a first weight value of the target main body relative to the first picture and a second weight value of the target main body relative to the second picture. The first weight value is the area ratio of the target main body to the first picture; the second weight value is the area ratio of the area of the target main body minus the area shielded by the shielding object to the second picture. If the first weight value and the second weight value are different, determining that the target main body is shielded; if the first weight value is the same as the second weight value, determining that the target main body is not shielded.
Illustratively, as shown in fig. 1b, a first weight value of the target subject with respect to the first picture, i.e. a first area ratio of subject 1 with respect to the first picture and a first area ratio of subject 2 with respect to the first picture, are respectively calculated; the area ratio of the target subject to the second picture, i.e. the second area ratio of the occluded area to the second picture subtracted by subject 1 and the second area ratio of subject 2 to the second picture, are calculated respectively. The first area ratio corresponding to the main body 1 is different from the second area ratio corresponding to the main body 1, and the fact that the main body 1 is shielded is determined; the first area ratio corresponding to the main body 2 is the same as the second area ratio corresponding to the main body 2, and it is determined that the main body 2 is not blocked.
Optionally, determining whether the target subject is occluded according to the target camera includes:
acquiring a first picture, wherein the first picture is obtained by hiding a main body except a target main body in scene information;
acquiring a second picture, wherein the second picture is scene information containing a target subject;
acquiring a first weight value of the target main body relative to the first picture;
acquiring a second weight value of the target main body relative to the second picture;
if the first weight value and the second weight value are different, identifying a target object based on rays emitted to the target main body from a position corresponding to the target camera;
if the target object is not a target body, determining that the target body is blocked;
and if the target object is a target subject, determining that the target subject is not blocked.
Specifically, in the game process, scene information is acquired, and if the scene information meets shooting conditions, a target subject is determined according to the scene information. The target camera takes pictures from a set position, and acquires a first picture obtained by hiding a subject except the target subject in the scene information and a second picture containing the scene information of the target subject. Acquiring a first weight value of the target main body relative to the first picture and a second weight value of the target main body relative to the second picture. If the first weight value is different from the second weight value, the target camera emits a ray with a first preset density to the target main body in the game process to acquire information of the target object. If the target objects irradiated by the rays are non-target objects, determining that the target objects are shielded; and if the target objects irradiated by the rays are all target bodies, determining that the target bodies are not shielded.
For example, as shown in fig. 1c, a first weight corresponding to the target subject 1 and a second weight corresponding to the target subject 1 are calculated, and if the first weight and the second weight are different, the target camera sends a ray to the target subject 1, and it is determined that the target subject is blocked according to the collected non-target subject of the target object.
In a specific example, in real time of the game, when shooting is confirmed, whether a blocking object exists is judged, blocking object data information is provided and returned to the program, for example, the method may include the following steps for each target subject after the subject is known and the camera angle is adjusted: emitting n rays to the currently selected target body from the corresponding position of the camera screen; if the object is identified by the ray, judging whether the identified object is a target subject or not; if the target subject is not the target subject, the subject is occluded; the object identified by the ray is a shelter; and returning the information of the obstruction to the program. When the main body is known, after the camera angle is adjusted: step 1, only displaying target bodies (hiding all objects except the target bodies), rendering the target bodies on a camera, determining a picture weight value of each target body in the current camera, step 2, displaying all the target bodies and a scene, rendering again, then obtaining the picture weight value of each target body under the current condition, and step 3, if numerical results in the step 1 and the step 2 of a certain target body are inconsistent, indicating that the target body is shielded by other objects (the difference area is the shielding area). Or, after determining that the target subject is shielded by other objects according to inconsistency of numerical results in the step 1 and the step 2, emitting rays from the camera to the shielded subject, wherein when any object except the target subject is identified, the object identified by the rays is a shielding object; and returning the information of the obstruction to the program.
According to the technical scheme of the embodiment, scene information is acquired in the game process; if the scene information meets the shooting condition, determining a target subject according to the scene information; judging whether the target main body is shielded; and if the target main body is shielded, acquiring the information of the shielding object. The method can capture a wonderful game picture from the optimal visual angle, extract the information of the shielding object shielding the target main body in the game picture, and leave a wonderful perfect picture in the game process for game players.
Example two
Fig. 2 is a schematic structural diagram of a shelter information acquisition apparatus according to a second embodiment of the present invention. The embodiment can be applied to the situation of acquiring information of a shelter in a game picture, the device can be implemented in a software and/or hardware manner, the device can be integrated in any equipment providing the function of acquiring information of the shelter, as shown in fig. 2, the device for acquiring information of the shelter specifically comprises: a first obtaining module 210, a determining module 220, a judging module 230, and a second obtaining module 240.
The first obtaining module 210 is configured to obtain scene information in a game process;
a determining module 220, configured to determine a target subject according to the scene information if the scene information meets a shooting condition;
a determining module 230, configured to determine whether the target subject is occluded;
a second obtaining module 240, configured to obtain the obstruction information if the target subject is obstructed.
Optionally, the determining module includes:
a creation unit configured to create a target camera from the target subject;
and the judging unit is used for judging whether the target main body is shielded or not according to the target camera.
Optionally, the determining unit includes:
the identification subunit is used for identifying a target object based on rays emitted to the target body from the position corresponding to the target camera;
the first determining subunit is used for determining that the target object is blocked if the target object is not the target object;
and the second determining subunit is used for determining that the target subject is not occluded if the target object is the target subject.
Optionally, the method further includes:
a third determining subunit, configured to determine that the target object is occluded if the target object includes a target subject and a non-target subject.
Optionally, the determining unit is specifically configured to:
acquiring a first picture, wherein the first picture is obtained by hiding a main body except a target main body in scene information;
acquiring a second picture, wherein the second picture is scene information containing a target subject;
acquiring a first weight value of the target main body relative to the first picture;
acquiring a second weight value of the target main body relative to the second picture;
if the first weight value and the second weight value are different, determining that the target main body is shielded;
if the first weight value is the same as the second weight value, determining that the target main body is not shielded.
Optionally, the determining unit is further configured to:
acquiring a first picture, wherein the first picture is obtained by hiding a main body except a target main body in scene information;
acquiring a second picture, wherein the second picture is scene information containing a target subject;
acquiring a first weight value of the target main body relative to the first picture;
acquiring a second weight value of the target main body relative to the second picture;
if the first weight value and the second weight value are different, identifying a target object based on rays emitted to the target main body from a position corresponding to the target camera;
if the target object is not a target body, determining that the target body is blocked;
and if the target object is a target subject, determining that the target subject is not blocked.
Optionally, the determining module is specifically configured to:
and if the current role is determined to be in the target state according to the scene information, determining a target main body according to the scene information, wherein the target main body comprises the current role.
The product can execute the method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
According to the technical scheme of the embodiment, scene information is acquired in the game process; if the scene information meets the shooting condition, determining a target subject according to the scene information; judging whether the target main body is shielded; and if the target main body is shielded, acquiring the information of the shielding object. The method can capture a wonderful game picture from the optimal visual angle, extract the information of the shielding object shielding the target main body in the game picture, and leave a wonderful perfect picture in the game process for game players.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a computer device in a third embodiment of the present invention. FIG. 3 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 3 is only an example and should not impose any limitation on the scope of use or functionality of embodiments of the present invention.
As shown in FIG. 3, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
The system Memory 28 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, and commonly referred to as a "hard drive"). Although not shown in FIG. 3, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (a Compact disk-Read Only Memory (CD-ROM)), Digital Video disk (DVD-ROM), or other optical media may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The processing unit 16 executes various functional applications and data processing by running a program stored in the system memory 28, for example, to implement the obstruction information extraction method provided by the embodiment of the present invention:
in the game process, scene information is acquired;
if the scene information meets the shooting condition, determining a target subject according to the scene information;
judging whether the target main body is shielded;
and if the target main body is shielded, acquiring the information of the shielding object.
Example four
A fourth embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for extracting obstruction information according to the embodiments of all inventions of the present application:
in the game process, scene information is acquired;
if the scene information meets the shooting condition, determining a target subject according to the scene information;
judging whether the target main body is shielded;
and if the target main body is shielded, acquiring the information of the shielding object.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (Hyper Text Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A method for acquiring information of a blocking object, comprising:
in the game process, scene information is acquired;
if the scene information meets the shooting condition, determining a target subject according to the scene information;
judging whether the target main body is shielded;
and if the target main body is shielded, acquiring the information of the shielding object.
2. The method of claim 1, wherein determining whether the target subject is occluded comprises:
creating a target camera from the target subject;
and judging whether the target main body is shielded or not according to the target camera.
3. The method of claim 2, wherein determining whether the target subject is occluded from the target camera comprises:
identifying a target object based on rays emitted from a corresponding location of the target camera toward the target subject;
if the target object is not a target body, determining that the target body is blocked;
and if the target object is a target subject, determining that the target subject is not blocked.
4. The method of claim 3, further comprising:
and if the target object comprises a target body and a non-target body, determining that the target body is blocked.
5. The method of claim 2, wherein determining whether the target subject is occluded from the target camera comprises:
acquiring a first picture, wherein the first picture is obtained by hiding a main body except a target main body in scene information;
acquiring a second picture, wherein the second picture is scene information containing a target subject;
acquiring a first weight value of the target main body relative to the first picture;
acquiring a second weight value of the target main body relative to the second picture;
if the first weight value and the second weight value are different, determining that the target main body is shielded;
if the first weight value is the same as the second weight value, determining that the target main body is not shielded.
6. The method of claim 2, wherein determining whether the target subject is occluded from the target camera comprises:
acquiring a first picture, wherein the first picture is obtained by hiding a main body except a target main body in scene information;
acquiring a second picture, wherein the second picture is scene information containing a target subject;
acquiring a first weight value of the target main body relative to the first picture;
acquiring a second weight value of the target main body relative to the second picture;
if the first weight value and the second weight value are different, identifying a target object based on rays emitted to the target main body from a position corresponding to the target camera;
if the target object is not a target body, determining that the target body is blocked;
and if the target object is a target subject, determining that the target subject is not blocked.
7. The method of claim 1, wherein determining a target subject according to the scene information if the scene information satisfies a shooting condition comprises:
and if the current role is determined to be in the target state according to the scene information, determining a target main body according to the scene information, wherein the target main body comprises the current role.
8. An obstruction information acquiring apparatus, comprising:
the first acquisition module is used for acquiring scene information in the game process;
the determining module is used for determining a target subject according to the scene information if the scene information meets the shooting condition;
the judging module is used for judging whether the target main body is shielded or not;
and the second acquisition module is used for acquiring the information of the sheltering object if the target main body is sheltered.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-7 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011624127.2A CN112807684A (en) | 2020-12-31 | 2020-12-31 | Obstruction information acquisition method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011624127.2A CN112807684A (en) | 2020-12-31 | 2020-12-31 | Obstruction information acquisition method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112807684A true CN112807684A (en) | 2021-05-18 |
Family
ID=75854740
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011624127.2A Pending CN112807684A (en) | 2020-12-31 | 2020-12-31 | Obstruction information acquisition method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112807684A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115193038A (en) * | 2022-07-26 | 2022-10-18 | 北京字跳网络技术有限公司 | Interaction control method and device, electronic equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6377277B1 (en) * | 1995-08-10 | 2002-04-23 | Sega Enterprises, Ltd. | Virtual image generation apparatus and method |
JP2006346507A (en) * | 2006-10-04 | 2006-12-28 | Nintendo Co Ltd | Game apparatus and image processing program |
US20140354687A1 (en) * | 2013-06-03 | 2014-12-04 | Nintendo Co., Ltd. | Computer-readable non-transitory storage medium having stored therein information processing program, information processing system, information processing apparatus, and information processing method |
US20170151503A1 (en) * | 2015-12-01 | 2017-06-01 | Square Enix Co., Ltd. | Program product and system |
CN109240576A (en) * | 2018-09-03 | 2019-01-18 | 网易(杭州)网络有限公司 | Image processing method and device, electronic equipment, storage medium in game |
US20190070505A1 (en) * | 2017-09-01 | 2019-03-07 | Square Enix Ltd | Method and system for rendering video game images |
CN110090440A (en) * | 2019-04-30 | 2019-08-06 | 腾讯科技(深圳)有限公司 | Virtual objects display methods, device, electronic equipment and storage medium |
CN111957040A (en) * | 2020-09-07 | 2020-11-20 | 网易(杭州)网络有限公司 | Method and device for detecting shielding position, processor and electronic device |
-
2020
- 2020-12-31 CN CN202011624127.2A patent/CN112807684A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6377277B1 (en) * | 1995-08-10 | 2002-04-23 | Sega Enterprises, Ltd. | Virtual image generation apparatus and method |
JP2006346507A (en) * | 2006-10-04 | 2006-12-28 | Nintendo Co Ltd | Game apparatus and image processing program |
US20140354687A1 (en) * | 2013-06-03 | 2014-12-04 | Nintendo Co., Ltd. | Computer-readable non-transitory storage medium having stored therein information processing program, information processing system, information processing apparatus, and information processing method |
US20170151503A1 (en) * | 2015-12-01 | 2017-06-01 | Square Enix Co., Ltd. | Program product and system |
US20190070505A1 (en) * | 2017-09-01 | 2019-03-07 | Square Enix Ltd | Method and system for rendering video game images |
CN109240576A (en) * | 2018-09-03 | 2019-01-18 | 网易(杭州)网络有限公司 | Image processing method and device, electronic equipment, storage medium in game |
CN110090440A (en) * | 2019-04-30 | 2019-08-06 | 腾讯科技(深圳)有限公司 | Virtual objects display methods, device, electronic equipment and storage medium |
CN111957040A (en) * | 2020-09-07 | 2020-11-20 | 网易(杭州)网络有限公司 | Method and device for detecting shielding position, processor and electronic device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115193038A (en) * | 2022-07-26 | 2022-10-18 | 北京字跳网络技术有限公司 | Interaction control method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10091454B2 (en) | Recording events in a virtual world | |
US20240198221A1 (en) | Method and apparatus for recording scene in game, and device and storage medium | |
CN110598700B (en) | Object display method and device, storage medium and electronic device | |
CN111729307A (en) | Virtual scene display method, device, equipment and storage medium | |
CN112866562B (en) | Picture processing method and device, electronic equipment and storage medium | |
CN112807684A (en) | Obstruction information acquisition method, device, equipment and storage medium | |
CN112843733A (en) | Method and device for shooting image, electronic equipment and storage medium | |
CN114283349A (en) | Data processing method and device, computer equipment and storage medium | |
CN112843731B (en) | Shooting method, shooting device, shooting equipment and storage medium | |
CN112843691B (en) | Method and device for shooting image, electronic equipment and storage medium | |
CN112843730A (en) | Shooting method, device, equipment and storage medium | |
CN112843739B (en) | Shooting method, shooting device, electronic equipment and storage medium | |
CN112839170B (en) | Shooting method, shooting device, electronic equipment and storage medium | |
CN112843732B (en) | Method and device for shooting image, electronic equipment and storage medium | |
CN112843709B (en) | Shooting method, shooting device, shooting equipment and storage medium | |
CN112843688A (en) | Shooting method, device, equipment and storage medium | |
CN112843722B (en) | Shooting method, shooting device, shooting equipment and storage medium | |
CN112843690B (en) | Shooting method, shooting device, shooting equipment and storage medium | |
CN112843695A (en) | Method and device for shooting image, electronic equipment and storage medium | |
CN112843696A (en) | Shooting method, shooting device, electronic equipment and storage medium | |
CN112822555A (en) | Shooting method, shooting device, electronic equipment and storage medium | |
CN112861612A (en) | Method and device for shooting image, electronic equipment and storage medium | |
CN112843736A (en) | Method and device for shooting image, electronic equipment and storage medium | |
CN112791396B (en) | Shooting picture generation method and device, electronic equipment and storage medium | |
CN112843678B (en) | Method and device for shooting image, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210518 |
|
RJ01 | Rejection of invention patent application after publication |