CN112839171B - Picture shooting method and device, storage medium and electronic equipment - Google Patents

Picture shooting method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112839171B
CN112839171B CN202011626727.2A CN202011626727A CN112839171B CN 112839171 B CN112839171 B CN 112839171B CN 202011626727 A CN202011626727 A CN 202011626727A CN 112839171 B CN112839171 B CN 112839171B
Authority
CN
China
Prior art keywords
target object
current
camera
determining
display
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.)
Active
Application number
CN202011626727.2A
Other languages
Chinese (zh)
Other versions
CN112839171A (en
Inventor
赵男
胡婷婷
包炎
刘超
施一东
李鑫培
师锐
董一夫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Mihoyo Tianming Technology Co Ltd
Original Assignee
Shanghai Mihoyo Tianming Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Mihoyo Tianming Technology Co Ltd filed Critical Shanghai Mihoyo Tianming Technology Co Ltd
Priority to CN202011626727.2A priority Critical patent/CN112839171B/en
Publication of CN112839171A publication Critical patent/CN112839171A/en
Application granted granted Critical
Publication of CN112839171B publication Critical patent/CN112839171B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters

Abstract

The invention discloses a picture shooting method, a picture shooting device, a storage medium and electronic equipment, wherein the method comprises the following steps: identifying a shooting instruction, and determining a target object corresponding to the shooting instruction; determining a pre-display state of the target object in a current picture based on root node position information of the target object, a current state of the target object and current parameters of a camera; and when the pre-display state meets the preset display requirement, executing the shooting instruction. The method comprises the steps of determining a current picture previewed before shooting according to current parameters of a camera, a root node of a target object and the current state, verifying the current picture according to the pre-display state of the target object in the current picture and a preset display requirement, and obtaining a picture meeting the preset display requirement when verification is successful, so that the picture shooting quality is improved, and the problems of memory occupation, calculation amount waste and the like caused by a large number of low-quality pictures are solved.

Description

Picture shooting method and device, storage medium and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a picture shooting method, a picture shooting device, a storage medium and electronic equipment.
Background
In order to record animation such as storyline, player interaction and the like in a network game, the conventional game is provided with a function of recording animation or taking pictures. When a game player wants to record a certain animation or a certain frame of picture, the shooting button can be triggered to achieve the purpose of recording.
At present, in the game process, if a game player needs to shoot a game picture, the game player often intercepts the game picture through manual operation of the player. In such a manual screen capturing manner, since screen capturing operations of a Player are not performed in time or screen capturing is forgotten, various key pictures cannot be obtained in time, for example, an interactive picture with a Non-Player Character (NPC), a battle picture with BOSS, a special effect picture releasing skills during battle, and the like, the Player cannot easily obtain a picture passing through the game. Meanwhile, the manual screenshot may also cause inaccurate screenshot opportunity and miss a proper game picture due to network delay of player equipment or machine stutter.
Disclosure of Invention
The invention provides a picture shooting method, a picture shooting device, a storage medium and electronic equipment, and aims to improve the quality of shot images.
In a first aspect, an embodiment of the present invention provides a picture shooting method, including:
identifying a shooting instruction, and determining a target object corresponding to the shooting instruction;
determining a pre-display state of the target object in a current picture based on root node position information of the target object, a current state of the target object and current parameters of a camera;
and when the pre-display state meets the preset display requirement, executing the shooting instruction.
In a second aspect, an embodiment of the present invention further provides a picture capturing apparatus, including:
the target object identification module is used for identifying a shooting instruction and determining a target object corresponding to the shooting instruction;
the pre-display state determining module is used for determining the pre-display state of the target object in the current picture based on the root node position information of the target object, the current state of the target object and the current parameters of the camera;
and the shooting module is used for executing the shooting instruction when the pre-display state meets the preset display requirement.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, the one or more programs cause the one or more processors to implement a picture taking method as provided by any embodiment of the invention.
In a fourth aspect, embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the program is executed by a processor to implement the picture-taking method according to any of the embodiments of the present invention.
According to the technical scheme, after the shooting instruction is identified, the current picture previewed before shooting is determined according to the current parameters of the camera, the root node of the target object and the current state, the target object is in the pre-display state and the preset display requirement in the current picture, the current picture is verified, and when the verification is successful, the picture meeting the preset display requirement is obtained, so that the picture shooting quality is improved, and the problems of memory occupation, calculation amount waste and the like caused by a large number of low-quality pictures are avoided.
Drawings
Fig. 1 is a schematic flowchart of a picture shooting method according to an embodiment of the present invention;
fig. 2 is a side view of a photographing range provided by an embodiment of the present invention;
fig. 3a is a schematic diagram of a pre-display state of a target object in a shooting range according to an embodiment of the present invention;
fig. 3b is a schematic diagram of a pre-display state of a target object in a shooting range according to an embodiment of the present invention, and fig. 3c is a schematic diagram of a pre-display state of a target object in a shooting range according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a picture shooting apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fourth 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.
Example one
Fig. 1 is a schematic flowchart of a picture taking method according to an embodiment of the present invention, where this embodiment is applicable to a situation where a picture is taken during a network game, and the method can be executed by a picture taking apparatus provided in an embodiment of the present invention, and the apparatus can be implemented by software and/or hardware, and the apparatus can be integrated in an electronic device such as a computer, a mobile phone, and the like. The method specifically comprises the following steps:
and S110, identifying a shooting instruction, and determining a target object corresponding to the shooting instruction.
S120, determining the pre-display state of the target object in the current picture based on the root node position information of the target object, the current state of the target object and the current parameters of the camera.
And S130, when the pre-display state meets the preset display requirement, executing the shooting instruction.
The shooting instruction may be a control instruction for shooting each object in the current scene. It should be noted that the objects in the current scene include, but are not limited to, a Player Character, a BOSS, a scene marker, a Non-Player Character (NPC) and a skill body. The scenery markers may be dynamic natural scenery markers such as wind, grass, horse, sky or waterfall, or static solid building markers such as stones, roofs or benches. Player-manipulated characters include, but are not limited to, characters and animals, and skill sets include, but are not limited to, skill sets for active release skills and skill sets for passive release skills.
The photographing instruction may be triggered to be generated based on object attribute information or scene attribute information of an object in a current scene. The object attribute information includes, but is not limited to, location information, orientation angle information, attack range information, and special effects attribute information. The special effect attribute information comprises a special effect action range, a special effect duration, a special effect gorgeous degree or a special effect rarity degree of the skill body. Specifically, the shooting instruction is generated based on object attribute information or a scene type of each object in the current scene, and the shooting instruction includes at least one of the following:
if at least one target skill body is detected to be released, generating a shooting instruction; the target skill body is a skill body with a large special effect action range, a long special effect duration, a high special effect gorgeous degree or a high special effect rareness degree;
if the object distance between the reference object and other objects except the reference object is smaller than a preset distance threshold, generating a shooting instruction; wherein the object distance may be determined based on location information of the object; the reference object is a key object in each object and can be determined based on the scene type;
if the orientation angle difference between the reference object and other objects except the reference object is smaller than a preset angle difference threshold value, generating a shooting instruction; wherein the orientation angle difference may be determined based on orientation angle information of the object;
and if other objects except the reference object are contained in the attack range of the reference object, generating a shooting instruction.
In this embodiment, the scene attribute information includes, but is not limited to, a scene identifier. The scene identifier is an identifier corresponding to the scene. Scene identifications which can trigger shooting of scenes are stored in a data table in advance. Specifically, the scene identifier of the current scene is compared with each scene identifier in the data table, and if the data table includes the scene identifier of the current scene, a shooting instruction is generated.
In this embodiment, at least one object triggering the shooting instruction may be determined as the target object, or an object in the current scene triggering the shooting instruction may be determined as the target object. When a plurality of objects in the current scene are provided, the target object can be determined according to the object priority, or the objects in the previous scene are sequentially used as the target objects to trigger shooting of the objects.
The target object may be one or more of a player manipulation character, a BOSS, a scene marker, a game non-player character, and a skill body.
For any camera (non-player perspective camera), the pre-display state of the target object in the current picture under the current parameters of the camera is determined based on the current parameters of the camera and the attribute information of the shot target object. Wherein the current screen may be a preview screen before the photographing instruction. The pre-display state of the target object is judged and adjusted in the preview state before the shooting instruction is executed, so that the pre-display state of the target object in the preview picture is adjusted until the pre-display state meets the preset display requirement, the shooting instruction is executed, the shooting picture meeting the preset display requirement is obtained, and the image quality of the shooting picture is improved.
Optionally, the root node of the target object may be a central point of a connecting line of feet of the target object, or a bottom central point, for example, a central point of a bottom edge of an object such as a building or a plant, that is, a position corresponding to the edge coordinate mean value. The current state of the target object may be an extended state of the target object relative to the root node, which in some embodiments includes a vertical extension parameter and a horizontal extension parameter. For example, the expansion state of the human or animal subject is different in different motion states, for example, the longitudinal expansion parameter corresponding to the standing motion is larger than the longitudinal expansion parameter corresponding to the jumping motion, and the lateral expansion parameter corresponding to the arm unfolding is larger than the lateral expansion parameter corresponding to the arm sagging. The current state of the target object can be determined according to the action of the target object at the current moment. For example, for an object such as a plant or a building, the expansion state may be different according to different scenes, for example, the expansion state of a tree object in an ice and snow scene is different from that of a tree object in a warm scene, and the expansion state of an object such as a plant or a building before and after a skill attack is different.
Optionally, the current parameters of the camera include position information, an angle, and a wide angle range of the camera. The position information of the camera may be three-dimensional position information, and the camera may be position-adjusted in height as well as in a horizontal plane. The angle of the camera comprises a horizontal angle and a pitching angle, the horizontal angle and/or the pitching angle can be adjusted according to requirements, the wide-angle range is the range covered by the camera, and the wide-angle range can be increased or decreased.
The method includes determining a shooting range at a target object position by current parameters of the camera, forming a current picture based on a target object being within the shooting range, and determining a pre-display state of the target object based on the target object being within the shooting range.
Optionally, determining a pre-display state of the target object in the current picture based on the root node position information of the target object, the current state of the target object, and the current parameter of the camera, includes: determining a mapping relation between a shooting range and a distance corresponding to the camera according to the wide-angle range of the camera; determining a shooting range corresponding to the current distance based on the current distance between the target object and the camera, the camera angle and the mapping relation; and determining the pre-display state of the target object in the obtained shooting range according to the root node position information of the target object and the current state.
Exemplarily, referring to fig. 2, fig. 2 is a side view of a shooting range provided by an embodiment of the present invention. And determining a shooting range at any distance from the camera according to the wide angle range of the camera, wherein the width of the shooting range is determined based on the transverse angle range of the wide angle range, and the length of the shooting range is determined based on the longitudinal angle range of the wide angle range. In fig. 2, the distance between the first shooting range and the camera is smaller than the distance between the second shooting range and the camera.
The angle of the camera controls the direction of the shooting range, the current distance between the target object and the camera controls the size of the shooting range, for example, matching is carried out in a mapping relation according to the current distance, and the size information of the shooting range corresponding to the current size is determined, wherein the current distance between the target object and the camera is determined based on the root node position information of the target object and the position information of the camera. Position information of the photographing range, such as coordinate information and size information of a center point of the photographing range, or coordinate information of each vertex of the photographing range, is determined according to the position information and the angle of the camera. Specifically, the coordinate information of the center point of the shooting range is determined according to the position information of the camera, the current distance between the target object and the camera, and the camera angle (for example, the coordinate information may be determined based on a trigonometric function); size information of a photographing range is controlled based on a current distance of the target object from the camera.
Optionally, determining a pre-display state of the target object in the obtained shooting range according to the root node position information of the target object and the current state, includes: determining an expansion parameter of the target object relative to a root node according to the current state; and determining the pre-display state of the target object in the obtained shooting range based on the expansion parameters and the root node position information.
In some embodiments, the different states of the target object are provided with corresponding identifiers, and the expansion state of the target object relative to the root node at the current moment can be determined according to the identifiers and the size information of each part of the target object. For example, for a human object, the identifier a corresponds to a standing state, the identifier B corresponds to a jumping state, and the identifier C corresponds to a state of the developing skill 1, the motion of each part of the target object can be determined according to each identifier, and the corresponding expansion parameter can be obtained based on the size information of each part of the target object.
For example, for a standing state, the height of the target object is 170mm, the shoulder width is 40mm, and the root node is the central point of the connecting line of the feet of the target object, and it can be known that the longitudinal expansion parameter of the target object relative to the root node is 170mm, and the lateral expansion parameter is ± 20mm respectively.
In some embodiments, the extended state of the target object comprises an extended state of each region of the target object, the extended state of each region comprising an extended range of the region relative to the root node, wherein the extended range comprises a vertical extension parameter range and a horizontal extension parameter range. Illustratively, for a standing state, the height of the target object is 170mm, the shoulder width is 40mm, the leg length is 100mm, the trunk length is 50mm, and the head length is 20mm, it can be seen that the longitudinal extension parameter range of the leg relative to the root node is (0, 100 mm), the longitudinal extension parameter range of the trunk relative to the root node is (100mm, 150mm), and the longitudinal extension parameter range of the head relative to the root node is (150mm, 170mm). Similarly, the range of the lateral expansion parameter of each part is determined based on the width of each part.
And determining the pre-display state of the target object in the shooting range according to the root node position information and the extension parameters of the target object, and the position information and the size information of the shooting range. For example, the edge coordinate information of the target object may be compared with the edge coordinate information of the shooting range, and if it is determined that the edge of the target object is located within the edge of the shooting range according to the comparison result, it may be determined that the target object is within the shooting range. Exemplarily, referring to fig. 3a, 3b and 3c, fig. 3a, 3b and 3c are schematic views of a pre-display state of a target object in a shooting range, respectively. In fig. 3c, the target object is outside the shooting range, in fig. 3b, the target object is within the shooting range, and in fig. 3a, a part of the target object is within the shooting range.
In some embodiments, the pre-display state of the target object in the current screen includes a display position of the target object in the current screen; correspondingly, the preset display requirements include: and when the comparison is successful, namely the display part of the target object in the pre-display state comprises the preset part in the preset display requirement, determining that the current picture meets the preset display requirement. And if any preset part is not included in the previous picture or only the local part of the preset part is included in the included display part, determining that the current picture does not meet the preset display requirement.
Alternatively, the preset portions of the different types of internal objects may be different, for example, when the target object is a human object or an animal object, the preset portions may be a head, a trunk, four limbs, and the like, and when the target object is a plant, a building, and the like, the preset portions may be an upper half portion, a lower half portion, and the like. The preset parts of different target objects can be preset and can be called according to the names or the identifications of the target objects.
In this embodiment, the display region of the current screen may be determined based on whether or not the extended parameter range of each region in the target object is within the imaging range. Illustratively, whether each part is in the current picture is determined according to the size information of the shooting range, the position information of the root node of the target object and the expansion parameter range of each part of the target object relative to the root node. Illustratively, the position of the root node in the shooting range is determined according to the position information of the root node of the target object, for example, the root node is located at the center position in the shooting range, the size information of the shooting range is 200mm × 200mm, the distance between the root node and the upper edge of the shooting range is 100mm, the longitudinal extension parameter range of the leg of the target object relative to the root node is (0, 100 mm), the longitudinal extension parameter range of the trunk relative to the root node is (100mm, 150mm), and the longitudinal extension parameter range of the head relative to the root node is (150mm, 170mm), it can be known that the leg of the target object is in the shooting range, the trunk and the head are not in the shooting range, that is, the pre-display state of the target object in the current picture is the leg including the target object. And if the preset display requirement is that the head of the target object is included in the current picture, the current picture does not meet the preset display requirement.
In some embodiments, the pre-display state of the target object in the current screen includes a ratio of a display portion of the target object in the current screen to the whole target object, and accordingly, the pre-set display requirement includes that the ratio of the display portion to the whole target object is greater than a first threshold. The size information of the display portion is specified from the display portion within the imaging range, and the ratio of the display portion to the entire target object is specified from the size information of the display portion and the entire size information of the target object. And comparing the ratio with a first threshold value in the preset display requirement, and if the ratio of the display part relative to the whole target object is greater than or equal to the first threshold value, determining that the current picture meets the preset display requirement. And if the occupation ratio of the display part relative to the whole target object is smaller than a first threshold value, determining that the current picture does not meet the preset display requirement. Optionally, the first threshold corresponding to different target objects may be the same or different.
In this embodiment, the distance between the root node and each edge of the shooting range is determined according to the position of the root node of the target object within the shooting range and the size information of the shooting range, and the occupation ratio of the display portion of the target object with respect to the entire target object is determined according to the extension parameter of the target object and the distance between the root node and each edge of the shooting range. Specifically, the display part parameter and the non-display part parameter in the current picture are determined according to the expansion parameter of the target object and the distance between the root node and each edge of the shooting range, and the proportion of the display part relative to the whole target object is determined based on the proportion of the display part parameter and the expansion parameter of the target object. Illustratively, the root node is located at the center position in the shooting range, the size information of the shooting range is 200mm × 200mm, then the distance between the root node and the upper edge of the shooting range is 100mm, the longitudinal expansion parameter of the target object relative to the root node is 170mm, the lateral expansion parameters are respectively ± 20mm, it is known that the cluster of the root node and the longitudinal edge of the shooting range is smaller than the longitudinal expansion parameter of 100, the longitudinal display ratio is 10/17, the distance between the root node and the lateral edge of the shooting range is greater than the lateral expansion parameter, the lateral display ratio is 100%, and the proportion of the display part relative to the whole target object is the product of the lateral display ratio and the longitudinal display ratio, i.e., 10/17.
In some embodiments, the pre-display state of the target object in the current frame includes a screen occupation ratio of a display portion in the current frame, and accordingly, the pre-setting display requirement includes: and the screen occupation ratio of the display part in the current picture is greater than a second threshold value. Determining the size information of the display part in the shooting range according to the display part in the shooting range, determining the screen occupation ratio of the display part in the current picture according to the ratio of the size information of the display part to the size information of the shooting range, comparing the screen occupation ratio with a second threshold value in a preset display requirement, and determining that the current picture meets the preset display requirement if the screen occupation ratio is greater than or equal to the second threshold value; and if the screen occupation ratio is smaller than a second threshold value, determining that the current picture does not meet the preset display requirement.
In this embodiment, the screen occupation ratio of the display part in the current screen may be determined based on the size information of the shooting range and the display part parameter in the shooting range. Illustratively, the size information of the shooting range is 200mm × 200mm, the parameter of the display region and the parameter of the non-display region in the current frame are determined according to the extension parameter of the target object and the distance between the root node and each edge of the shooting range, illustratively, the root node is located at the center position in the shooting range, the parameter of the longitudinal extension of the target object relative to the root node is 170mm, the parameter of the lateral extension is ± 20mm, respectively, the longitudinal parameter of the displayable region in the shooting range is 100mm, and the lateral parameter is ± 20mm, therefore, the area of the display region in the current frame is 100mm × 40mm, and therefore, the occupied screen ratio of the display region in the current frame is (100 mm × 40 mm)/(200 mm) =10%.
The root node may be outside the imaging range, and the local part of the target object within the imaging range may be determined based on the distance between the root node and each edge of the imaging range and the extension parameter of the target object.
In some embodiments, two or three of a display position of the target object in the current picture, an occupation ratio of the display position in the current picture, and an occupation ratio of the display position relative to the whole target object may be determined, and in response, the preset display requirements include two or three of the preset position of the target object, an occupation ratio of the display position relative to the whole target object being greater than a first threshold, and an occupation ratio of the display position in the current picture being greater than a second threshold, the preset display states are verified respectively, if the preset display states all satisfy corresponding verification requirements in the preset display requirements, it is determined that the current picture satisfies the preset display requirements, and if any one of the preset display states does not satisfy the corresponding verification requirements in the preset display requirements, it is determined that the current picture does not satisfy the preset display requirements.
In some embodiments, when two or more target objects are provided, each target object may be verified separately, and if each target object meets the corresponding preset display requirement, it is determined that the current frame meets the preset display requirement, and the shooting instruction is executed. For example, the person object may be verified by the screen occupation ratio of the preset portion and the display portion, and the building object may be verified by the screen occupation ratio of the display portion, which is not limited herein. And if any target object does not meet the corresponding preset display requirement, determining that the current picture does not meet the preset display requirement.
In some embodiments, when the number of target objects is two or more, verification of the preset display requirement may be performed according to priorities of the plurality of target objects. For example, the preset display requirement may be verified for at least one target object with the highest priority, for example, the priorities of a human object, an animal object, a building object, and a plant object are sequentially decreased, and if two human objects and one building object are included in the current scene, the preset display requirement may be verified for two human objects. And if at least one target object with the highest priority meets the corresponding preset display requirement, determining that the current picture meets the preset display requirement. The method is suitable for complex scenes, and the condition that a plurality of target objects cannot be considered is avoided.
And if the current picture meets the preset display requirement, executing a shooting instruction, acquiring data in the current picture to form the shooting instruction, if the pre-display state does not meet the preset display requirement, adjusting the current parameters of the camera until the pre-display state of the target object meets the preset display requirement, and executing the shooting instruction to obtain the shot picture.
Optionally, the step of obtaining the shooting picture by the shooting instruction may be to obtain data of a target object in the current shooting range, render the data of the target object, and obtain the shooting picture, or store the data of the target object, so as to render the shooting picture by reading the stored data of the target object at any time.
According to the technical scheme, after the shooting instruction is identified, the current picture previewed before shooting is determined according to the current parameters of the camera, the root node of the target object and the current state, the pre-display state and the preset display requirement of the target object in the current picture are verified, and when the verification is successful, the picture meeting the preset display requirement is obtained, so that the picture shooting quality is improved, and the problems of memory occupation, calculation amount waste and the like caused by a large number of low-quality pictures are solved.
On the basis of the above embodiment, the method further includes: and if the pre-display state does not meet the preset display requirement, adjusting the current parameters of the camera.
In some embodiments, the position information, the angle, and the wide-angle range of the adjusting camera may be synchronously adjusted, for example, adjusting directions corresponding to the position information, the angle, and the wide-angle range, respectively, are determined, each parameter is sequentially adjusted based on a unit adjusting value of each parameter, and after any parameter is adjusted, whether a current picture meets a preset display requirement is circularly determined, and adjustment of each parameter is stopped until the preset display requirement is met.
In some embodiments, the adjustment may be based on the priority of adjusting the position information, the angle, and the wide angle range of the camera, respectively. Illustratively, the priorities of the angle, the position information and the wide-angle range are sequentially decreased, the angle, the position information and the wide-angle range are sequentially adjusted, and if the parameter for adjusting the previous priority cannot meet the preset display requirement, the parameter for adjusting the next priority is adjusted. And stopping adjusting each parameter until the display requirement is preset. Alternatively, the priorities of the angle, the position information, and the wide angle range may be set according to user requirements.
In some embodiments, the adjusted parameter types and the adjustment manners of the parameter types may be determined according to the difference between the pre-display state of the target object in the current screen and the pre-display requirement, and the adjustment manners include an adjustment direction and an adjustment value. Optionally, if the display position of the target object in the current picture does not meet the preset position in the preset display requirement, determining an adjustment direction of at least one of an angle adjustment parameter, a position change parameter, and a wide-angle range adjustment parameter of the camera according to a relative position of the preset position of the target object and the shooting range, and determining an adjustment value of at least one of the angle adjustment parameter, the position change parameter, and the wide-angle range adjustment parameter according to a position difference between the preset position of the target object and the shooting range, where the adjustment value is positively correlated with the position difference.
Optionally, it may also be determined whether the current shooting range meets the size information of the preset portion according to the size information of each preset portion of the target object and the size information of the shooting range, and if not, the position information of the camera is adjusted to increase the distance between the camera and the target object and expand the shooting range of the camera at the position of the target object. And if the adjusted shooting range meets the size information of the preset part, determining at least one of an angle adjusting parameter, a position change parameter and a wide angle range adjusting parameter of the camera according to the relative position of the preset part of the target object and the shooting range.
In some embodiments, if the occupancy ratio of the display position of the target object in the current picture does not satisfy the second threshold, the wide-angle range may be decreased, or the position information of the camera may be adjusted to reduce the distance between the camera and the target object, and the shooting range of the camera at the position of the target object may be narrowed until the second threshold is satisfied.
Optionally, when there are two target objects, if the first target object satisfies the second threshold and the second target object does not satisfy the second threshold, the position information or the angle of the camera may be adjusted, for example, the camera may be adjusted to move to the position of the second target object, for example, move to a vertical line of a midpoint of a connecting line of the two target objects, or determine a distance ratio between the camera and each target object according to a volume ratio of the two target objects; it is also possible, for example, to move the angle of the camera in the direction of the second target object.
In some embodiments, if the ratio of the display position of the target object in the current frame to the entire target object is smaller than the first threshold, the position information, the angle, or the wide-angle range of the camera may be adjusted, for example, the wide-angle range may be increased, or the angle of the camera may be moved in a direction in which a position of the target object is not within the shooting range, or the position information of the camera may be moved in a direction in which a position of the target object is not within the shooting range. For example, when only the head of the target object is included in the current screen, the position information or the angle of the camera may be moved to a torso portion or a foot portion, which is not displayed on the target object, where the torso portion or the foot portion may be below or on the side of the head.
In some embodiments, the current picture, the attribute information of the target object, and the current parameters of the camera may be input into a pre-trained parameter adjustment model, and the parameter adjustment model outputs the parameters to be adjusted and the adjustment values of the parameters. And updating the current parameters of the video-saving camera according to the parameters output by the parameter adjusting model and the adjustment of each parameter, and executing a shooting instruction after the adjustment is finished.
In the embodiment, the parameters of the camera are adjusted under the condition that the preview picture does not meet the preset display requirement, so that the picture meeting the preset display requirement is obtained, and the picture shooting quality is improved.
Example two
Fig. 4 is a schematic structural diagram of a picture taking apparatus according to an embodiment of the present invention. The device comprises:
the target object identification module 210 is configured to identify a shooting instruction and determine a target object corresponding to the shooting instruction;
a pre-display state determination module 220, configured to determine a pre-display state of the target object in a current picture based on root node position information of the target object, a current state of the target object, and a current parameter of a camera;
a shooting module 230, configured to execute the shooting instruction when the pre-display state meets a preset display requirement.
Optionally, the current parameters of the camera include position information, an angle, and a wide-angle range of the camera.
Optionally, the pre-display state determining module 220 includes:
the mapping relation determining unit is used for determining the mapping relation between the shooting range and the distance corresponding to the camera according to the wide-angle range of the camera;
a shooting range determining unit, configured to determine a shooting range corresponding to the current distance based on the current distance between the target object and the camera, the camera angle, and the mapping relationship;
and the pre-display state determining unit is used for determining the pre-display state of the target object in the obtained shooting range according to the root node position information of the target object and the current state.
Optionally, the pre-display state determining unit is configured to:
determining an expansion parameter of the target object relative to a root node according to the current state;
and determining the pre-display state of the target object in the obtained shooting range based on the expansion parameters and the root node position information.
Optionally, the pre-display state of the target object in the current screen includes at least one of a display position of the target object in the current screen, an occupation ratio of the display position relative to the whole target object, and an occupation ratio of the display position in the current screen.
Optionally, the preset display requirement includes: the current picture comprises at least one of a preset part of a target object, the occupation ratio of the display part relative to the whole target object is larger than a first threshold value, and the occupation ratio of the display part in the current picture is larger than a second threshold value.
Optionally, the apparatus further comprises:
and the parameter adjusting module is used for adjusting the current parameters of the camera if the pre-display state does not meet the preset display requirement.
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.
EXAMPLE III
Fig. 5 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 5 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention. The device 12 is typically an electronic device that undertakes picture processing functions.
As shown in fig. 5, electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 that couples the various components (including the memory 28 and the processing unit 16).
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer-readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer device readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only, the storage device 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, 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 (e.g., 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 40, with program product 40 having a set of program modules 42 that are configured to carry out the functions of embodiments of the invention. Program product 40 may be stored, for example, in memory 28, and such program modules 42 include, but are not limited to, one or more application programs, other program modules, and program data, each of which examples or some combination 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.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, mouse, camera, etc., and display), one or more devices that enable a user to interact with electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), wide Area Network (WAN), and/or a public Network such as the internet) via the Network adapter 20. As shown, the network adapter 20 communicates with the other modules of the electronic device 12 over the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive Arrays, RAID (Redundant Arrays of Independent Disks) devices, tape drives, and data backup storage devices, to name a few.
The processor 16 executes various functional applications and data processing by running the program stored in the memory 28, for example, implementing the picture taking method provided by the above-described embodiment of the present invention, including:
identifying a shooting instruction, and determining a target object corresponding to the shooting instruction;
determining a pre-display state of the target object in a current picture based on root node position information of the target object, a current state of the target object and current parameters of a camera;
and when the pre-display state meets the preset display requirement, executing the shooting instruction.
Of course, those skilled in the art can understand that the processor can also implement the technical solution of the picture shooting method provided by any embodiment of the present invention.
Example four
A fourth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, the program, when executed by a processor, implementing the steps of the picture taking method provided in any embodiment of the present invention, the method including:
identifying a shooting instruction, and determining a target object corresponding to the shooting instruction;
determining a pre-display state of the target object in a current picture based on root node position information of the target object, a current state of the target object and current parameters of a camera;
and when the pre-display state meets the preset display requirement, executing the shooting instruction.
Computer storage media for embodiments of the present invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. 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 any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may 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.
Computer program code for carrying out operations for embodiments 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 and 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).
It is to be noted that the foregoing description is only exemplary of the invention and that the principles of the technology may be employed. Those skilled in the art will appreciate that the present invention is not limited to the particular embodiments described herein, and that various obvious changes, rearrangements and substitutions will now be apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in some detail by the above embodiments, the invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the invention, and the scope of the invention is determined by the scope of the appended claims.

Claims (7)

1. A picture taking method, comprising:
identifying a shooting instruction, and determining a target object corresponding to the shooting instruction;
determining a pre-display state of the target object in a current picture based on root node position information of the target object, a current state of the target object and current parameters of a camera;
when the pre-display state meets a preset display requirement, executing the shooting instruction;
the current parameters of the camera comprise position information, an angle and a wide angle range of the camera;
the determining a pre-display state of the target object in a current picture based on the root node position information of the target object, the current state of the target object and the current parameters of a camera comprises:
determining a mapping relation between a shooting range and a distance corresponding to the camera according to the wide-angle range of the camera;
determining a shooting range corresponding to the current distance based on the current distance between the target object and the camera, the camera angle and the mapping relation;
determining a pre-display state of the target object in an obtained shooting range according to the root node position information of the target object and the current state;
the determining the pre-display state of the target object in the obtained shooting range according to the root node position information of the target object and the current state comprises the following steps:
determining an expansion parameter of the target object relative to a root node according to the current state;
and determining the pre-display state of the target object in the obtained shooting range based on the expansion parameters and the root node position information.
2. The method according to claim 1, wherein the pre-display state of the target object in the current screen comprises at least one of a display position of the target object in the current screen, a ratio of the display position to the whole target object, and a ratio of the display position to the screen of the current screen.
3. The method of claim 2, wherein the preset display requirements comprise: the current picture comprises at least one of a preset part of a target object, the occupation ratio of the display part relative to the whole target object is greater than a first threshold value, and the occupation ratio of the display part in the current picture is greater than a second threshold value.
4. The method of claim 1, further comprising:
and if the pre-display state does not meet the preset display requirement, adjusting the current parameters of the camera.
5. A picture taking apparatus, comprising:
the target object identification module is used for identifying a shooting instruction and determining a target object corresponding to the shooting instruction;
the pre-display state determining module is used for determining the pre-display state of the target object in the current picture based on the root node position information of the target object, the current state of the target object and the current parameters of the camera;
the shooting module is used for executing the shooting instruction when the pre-display state meets a preset display requirement;
the current parameters of the camera comprise position information, an angle and a wide angle range of the camera;
the pre-display state determination module includes:
the mapping relation determining unit is used for determining the mapping relation between the shooting range and the distance corresponding to the camera according to the wide-angle range of the camera;
a shooting range determining unit, configured to determine a shooting range corresponding to the current distance based on the current distance between the target object and the camera, a camera angle, and the mapping relationship;
the pre-display state determining unit is used for determining the pre-display state of the target object in the obtained shooting range according to the root node position information of the target object and the current state;
the pre-display state determination unit is configured to:
determining an expansion parameter of the target object relative to a root node according to the current state; and determining the pre-display state of the target object in the obtained shooting range based on the expansion parameters and the root node position information.
6. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the picture-taking method as claimed in any one of claims 1-4.
7. A computer-readable storage medium on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the picture-taking method as claimed in any one of claims 1 to 4.
CN202011626727.2A 2020-12-31 2020-12-31 Picture shooting method and device, storage medium and electronic equipment Active CN112839171B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011626727.2A CN112839171B (en) 2020-12-31 2020-12-31 Picture shooting method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011626727.2A CN112839171B (en) 2020-12-31 2020-12-31 Picture shooting method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112839171A CN112839171A (en) 2021-05-25
CN112839171B true CN112839171B (en) 2023-02-10

Family

ID=75924542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011626727.2A Active CN112839171B (en) 2020-12-31 2020-12-31 Picture shooting method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112839171B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190240A (en) * 2022-06-29 2022-10-14 广东小天才科技有限公司 Terminal shooting method and device, computer equipment and computer readable storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011008704A (en) * 2009-06-29 2011-01-13 Canon Inc Image processing apparatus, image processing method and program
CN103443823A (en) * 2011-01-17 2013-12-11 松下电器产业株式会社 Captured image recognition device, captured image recognition system, and captured image recognition method
CN105812664A (en) * 2016-03-22 2016-07-27 广东欧珀移动通信有限公司 Mobile terminal photographing method and mobile terminal
CN106161930A (en) * 2016-06-27 2016-11-23 乐视控股(北京)有限公司 Camera control method and device
CN106843897A (en) * 2017-02-09 2017-06-13 腾讯科技(深圳)有限公司 A kind of method and apparatus for intercepting game picture
CN107438161A (en) * 2017-07-31 2017-12-05 广东欧珀移动通信有限公司 Shooting picture processing method, device and terminal
CN107735643A (en) * 2015-06-29 2018-02-23 富士胶片株式会社 Camera device and image capture method
CN109240576A (en) * 2018-09-03 2019-01-18 网易(杭州)网络有限公司 Image processing method and device, electronic equipment, storage medium in game
CN109976634A (en) * 2019-03-18 2019-07-05 北京智明星通科技股份有限公司 A kind of game APP screenshot method and equipment
CN110785993A (en) * 2018-11-30 2020-02-11 深圳市大疆创新科技有限公司 Control method and device of shooting equipment, equipment and storage medium
CN111756990A (en) * 2019-03-29 2020-10-09 阿里巴巴集团控股有限公司 Image sensor control method, device and system
CN111773693A (en) * 2020-07-09 2020-10-16 网易(杭州)网络有限公司 Method and device for processing view in game and electronic equipment
CN111888762A (en) * 2020-08-13 2020-11-06 网易(杭州)网络有限公司 Method for adjusting visual angle of lens in game and electronic equipment
CN112130946A (en) * 2020-09-22 2020-12-25 西安宇视信息科技有限公司 Aircraft information display method and device, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6222951B2 (en) * 2013-03-15 2017-11-01 オリンパス株式会社 Imaging apparatus, imaging system, and imaging method
US20160307368A1 (en) * 2015-04-17 2016-10-20 Lytro, Inc. Compression and interactive playback of light field pictures

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011008704A (en) * 2009-06-29 2011-01-13 Canon Inc Image processing apparatus, image processing method and program
CN103443823A (en) * 2011-01-17 2013-12-11 松下电器产业株式会社 Captured image recognition device, captured image recognition system, and captured image recognition method
CN107735643A (en) * 2015-06-29 2018-02-23 富士胶片株式会社 Camera device and image capture method
CN105812664A (en) * 2016-03-22 2016-07-27 广东欧珀移动通信有限公司 Mobile terminal photographing method and mobile terminal
CN106161930A (en) * 2016-06-27 2016-11-23 乐视控股(北京)有限公司 Camera control method and device
CN106843897A (en) * 2017-02-09 2017-06-13 腾讯科技(深圳)有限公司 A kind of method and apparatus for intercepting game picture
CN107438161A (en) * 2017-07-31 2017-12-05 广东欧珀移动通信有限公司 Shooting picture processing method, device and terminal
CN109240576A (en) * 2018-09-03 2019-01-18 网易(杭州)网络有限公司 Image processing method and device, electronic equipment, storage medium in game
CN110785993A (en) * 2018-11-30 2020-02-11 深圳市大疆创新科技有限公司 Control method and device of shooting equipment, equipment and storage medium
CN109976634A (en) * 2019-03-18 2019-07-05 北京智明星通科技股份有限公司 A kind of game APP screenshot method and equipment
CN111756990A (en) * 2019-03-29 2020-10-09 阿里巴巴集团控股有限公司 Image sensor control method, device and system
CN111773693A (en) * 2020-07-09 2020-10-16 网易(杭州)网络有限公司 Method and device for processing view in game and electronic equipment
CN111888762A (en) * 2020-08-13 2020-11-06 网易(杭州)网络有限公司 Method for adjusting visual angle of lens in game and electronic equipment
CN112130946A (en) * 2020-09-22 2020-12-25 西安宇视信息科技有限公司 Aircraft information display method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112839171A (en) 2021-05-25

Similar Documents

Publication Publication Date Title
US11948260B1 (en) Streaming mixed-reality environments between multiple devices
US9345967B2 (en) Method, device, and system for interacting with a virtual character in smart terminal
US20200312042A1 (en) Three dimensional reconstruction of objects based on geolocation and image data
US9728011B2 (en) System and method for implementing augmented reality via three-dimensional painting
JP6894962B2 (en) Image data capture method, device, and program for free-viewpoint video
WO2020098465A1 (en) Method and device for image display, storage medium and electronic device
US20230050933A1 (en) Two-dimensional figure display method and apparatus for virtual object, device, and storage medium
CN111836110A (en) Display method and device of game video, electronic equipment and storage medium
CN112839171B (en) Picture shooting method and device, storage medium and electronic equipment
CN108421240A (en) Court barrage system based on AR
US20200082603A1 (en) Information processing apparatus, information processing method and storage medium
CN112843693B (en) Method and device for shooting image, electronic equipment and storage medium
CN112866562B (en) Picture processing method and device, electronic equipment and storage medium
CN112843694A (en) Picture shooting method and device, storage medium and electronic equipment
CN112860360B (en) Picture shooting method and device, storage medium and electronic equipment
CN112843739B (en) Shooting method, shooting device, electronic equipment and storage medium
CN112843732A (en) Method and device for shooting image, electronic equipment and storage medium
CN112839170B (en) Shooting method, shooting device, electronic equipment and storage medium
CN112891940A (en) Image data processing method and device, storage medium and computer equipment
CN112843691A (en) Method and device for shooting image, electronic equipment and storage medium
CN108965859B (en) Projection mode identification method, video playing method and device and electronic equipment
CN112774199A (en) Target scene picture restoration method and device, electronic equipment and storage medium
CN112807698B (en) Shooting position determining method and device, electronic equipment and storage medium
CN112843715B (en) Shooting visual angle determining method, device, equipment and storage medium
CN112822396B (en) Shooting parameter determining method, device, 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
GR01 Patent grant
GR01 Patent grant