CN112860372A - Method and device for shooting image, electronic equipment and storage medium - Google Patents

Method and device for shooting image, electronic equipment and storage medium Download PDF

Info

Publication number
CN112860372A
CN112860372A CN202011624250.4A CN202011624250A CN112860372A CN 112860372 A CN112860372 A CN 112860372A CN 202011624250 A CN202011624250 A CN 202011624250A CN 112860372 A CN112860372 A CN 112860372A
Authority
CN
China
Prior art keywords
target
scene
shot
target object
video frame
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.)
Granted
Application number
CN202011624250.4A
Other languages
Chinese (zh)
Other versions
CN112860372B (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 CN202011624250.4A priority Critical patent/CN112860372B/en
Publication of CN112860372A publication Critical patent/CN112860372A/en
Application granted granted Critical
Publication of CN112860372B publication Critical patent/CN112860372B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
    • 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/61Control of cameras or camera modules based on recognised objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the invention discloses a method and a device for shooting images, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a target object to be shot and determining a target scene to which the target object to be shot belongs; and if the scene correlation attribute in the target scene and the object attribute of the target object to be shot meet the preset attribute relationship, triggering to shoot and/or record a target image comprising the target scene and the target object to be shot. According to the technical scheme, the technical problems that when a screen capture button is triggered manually by a user to capture the current video frame and the video frame is played fast, when the screen capture button is triggered, the image of the actual screen capture is different from the image to be captured by the user, so that the corresponding video frame cannot be captured are solved, when the object attribute of the object to be shot and the scene attribute of the scene to which the object belongs are detected to meet the preset attribute relationship, the current video frame can be automatically captured, and the screen capture accuracy and convenience are improved.

Description

Method and device for shooting image, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of games, in particular to a method and a device for shooting images, electronic equipment and a storage medium.
Background
At present, with the popularization of intelligent terminals, more and more handgames can be installed on the intelligent terminals. The user may release the pressure based on a hand trip installed on the mobile terminal. In the game process of the user, when a certain plot, a certain scene or a certain skill is reached and a current frame image needs to be captured, the user can manually trigger a capture button.
It can be understood that when the current frame image needs to be captured, the user is required to manually trigger a screenshot button in the terminal operating system to capture the screen. If the current game scene is intense, the user may not be able to trigger the corresponding key to implement the screenshot function, for example, the user is participating in the role PK, and at this time, the corresponding screenshot key may not be triggered, thereby causing a problem that the screenshot cannot be implemented, that is, a technical problem that the screenshot operation is inconvenient in the game process; or when the screen capture key is triggered, because a certain time delay exists in the actual screen capture, the triggering time and the actual screen capture time are different, so that the difference between the video frame of the screen capture and the video frame to be actually captured is caused, namely the difference between the video frame of the actual screen capture and the video frame to be captured by the user is caused, and the technical problem of inaccurate screen capture exists.
Disclosure of Invention
The invention provides a method and a device for shooting images, electronic equipment and a storage medium, which are used for realizing the technical effect of accurately, conveniently and effectively capturing the screen of a corresponding video frame.
In a first aspect, an embodiment of the present invention provides a method for capturing an image, where the method includes:
acquiring a target object to be shot and determining a target scene to which the target object to be shot belongs;
and triggering to shoot and/or record a target image comprising the target scene and the target object to be shot if the scene correlation attribute in the target scene and the object attribute of the target object to be shot meet a preset attribute relationship.
In a second aspect, an embodiment of the present invention further provides an apparatus for capturing an image, where the apparatus includes:
the target scene determining module is used for acquiring a target object to be shot and determining a target scene to which the target object to be shot belongs;
and the target image determining module is used for triggering to shoot and/or record a target image comprising the target scene and the target object to be shot if the scene correlation attribute in the target scene and the object attribute of the target object to be shot meet a preset attribute relationship.
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, cause the one or more processors to implement a method of capturing images as in any of the embodiments of the invention.
In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used to perform the method of capturing images according to any of the embodiments of the present invention.
The technical scheme of the embodiment of the invention shows that the video frame displayed on the interface is commemorative to the user by acquiring the target object to be shot in real time or at intervals and determining the target scene to which the target object to be shot belongs when determining that the scene correlation attribute and the object attribute in the target scene meet the preset attribute relationship, and at the moment, the user possibly triggers the operation of capturing the current video frame, namely triggering the shooting and/or recording of the target image including the target object to be shot, thereby solving the problem that the current video frame can be captured only by manually triggering the screen capturing key by the user when the screen capturing is carried out in the prior art, the operation is inconvenient, and the difference exists between the image obtained by actual screen capturing and the image to be captured by the user when the screen capturing key is triggered due to the fast playing of the video frame and the certain time delay of the screen capturing, the method and the device have the advantages that the corresponding video frame cannot be captured, so that the current video frame can be automatically captured as long as the detected object attribute and the detected scene attribute meet the preset attribute relationship, and the technical effects of screen capture accuracy, convenience and high efficiency are improved.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flowchart of a method for capturing an image according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus for capturing an image according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to 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.
Example one
Fig. 1 is a schematic flow chart of a method for capturing an image according to an embodiment of the present invention, which is applicable to a situation in which, in a game scene, if it is detected that a current video frame meets a preset requirement, a screen capture operation may be automatically performed, so as to obtain a target image.
Before the technical solution of the present embodiment is described, an application scenario may be exemplarily described. The current game can be an application program, the application program can be installed on the intelligent terminal, and when a user triggers the application program installed on the intelligent terminal, a game scene can be entered. The current game scenes are mostly situations of upgrading monster, adventure memory or growth memory, the scenes and the abilities of characters corresponding to different levels of characters and level cards are different, the abilities of the characters can be understood as fighting attributes of the characters, skin attributes of the characters and the like, generally, the higher the level of the characters is, the better the skin is, the larger the fighting value is, and the stronger the fighting ability is. Each game scene is displayed on the terminal device in the form of a video frame in many cases. In order to improve user experience, each video frame picture in a game scene is usually drawn more beautifully, a user can capture the video frame picture for wallpaper, or a displayed video frame is just the highlight moment of each role in the game, and is usually captured and stored. In the actual application process, if a user determines that the video frame picture in the current scene is more enjoyable or has commemorative significance, the current video frame is usually also captured and stored.
However, when the current video frame is captured, a screen capture button on the intelligent terminal needs to be triggered, for example, a combination button carried by a mobile phone system, or a screen capture control is triggered after the mobile phone system returns to a main page. Furthermore, as the game scene is played by video frames, namely one frame by one frame, and the video frames are continuously played while the user triggers the screen capture button, a certain time delay exists between the moment of triggering the screen capture button and the moment of actually capturing the screen, so that a certain difference exists between the video frames of actually capturing the screen and the video frames which the user wants to capture and store, and the user experience is poor.
As shown in fig. 1, the method of this embodiment includes:
s110, obtaining a target object to be shot, and determining a target scene to which the target object to be shot belongs.
After the object to be shot is a game interface entering a target game, a displayed main character, namely the object to be shot can be a main character in a game scene. The subject character may be, but is not limited to, a hero, monster, other player, etc. in the game scene. The target game can be an application installed on an intelligent terminal, for example, the intelligent terminal can be a mobile phone or a PC terminal. When the user triggers the application program corresponding to the target game, the resource corresponding to the target game can be loaded, and meanwhile, the game interface corresponding to the target game can be accessed. At least one target object to be photographed may be included in the game interface. All displayed subjects on the display interface can be called target objects to be shot, and the subject operated by the current terminal equipment can also be used as the target objects to be shot. The target scene may be a scene corresponding to the current game level, or a scene corresponding to different video frames marked in advance.
Determining whether the target object to be shot is included in the current video frame, that is, determining whether the target object to be shot is included in the video frame displayed on the display interface may be: when specific game content is displayed, corresponding video frame data can be obtained first, a video frame displayed on the terminal device is obtained after the video frame data is rendered, and whether a target object to be shot is included in the current video frame can be determined according to rendering data in the process of rendering the video frame data of the corresponding video frame. If yes, the target object to be shot can be obtained. It can also be: after the video frame data are rendered and displayed on a display interface of the terminal equipment, detecting whether a target object to be shot is included in each video frame based on a detection module; or when a game scene is made, whether a target object to be shot is included in the current scene is determined, and if yes, the video frame can be marked. The target scene may be a scene of a target object to be photographed in a current video frame. That is, the target scene may be the same or different for each video frame, and its specific content is related to the specific content of the video frame. The target scene may be a video frame which includes other elements besides the main character, and the other elements may be: mountains, water, houses, trees, lights, buildings, etc.
Specifically, when video frame data displayed on the game interface is rendered, whether a target object to be shot is included in the video frame can be determined, and if yes, a target scene corresponding to the target object to be shot can be determined according to the video frame data; after rendering the video frame data and displaying the rendered video frame data on a display screen of the mobile terminal, determining whether a target object to be shot and a corresponding scene exist or not based on the monitoring module, determining whether the target object to be shot is included or not can be the object to be shot marked in advance, after detecting a picture in the video frame, acquiring each element, determining whether each element is a prestored element or not, and if so, determining that the video frame includes the target object to be shot; alternatively, whether the target object to be photographed is included in each video frame may be marked in advance, and when the video frames are displayed, whether the target object to be photographed exists may be determined according to the mark.
In this embodiment, the obtaining a target object to be photographed and determining a target scene to which the target object to be photographed belongs includes: the method comprises the steps of obtaining a target video frame corresponding to the current moment in an animation video, and determining a target object to be shot in the target video frame and a target scene to which the target object to be shot belongs.
Wherein, the game displayed on the terminal is generally displayed frame by frame. The animation video can be obtained by combining one video frame and one video frame in a game scene. I.e. the animated video is made up of video frames during the game. The video frame currently being processed may be taken as the target video frame. Whether the target object to be shot and the target scene to which the target object to be shot belongs are included in the current target video frame can be determined based on the monitoring module.
Specifically, when each video frame is displayed, the currently displayed video frame, that is, the target video frame, may be determined based on a preset monitoring module, and it may be detected whether the target video frame includes the target object to be photographed and the target scene to which the target object to be photographed belongs.
It should be noted that, when the video frame is displayed on the terminal, the video frame data of the corresponding video frame may be rendered first, and it may be determined whether the object to be shot and the belonging target scene are included according to the corresponding data in the rendering process.
That is to say, the acquiring a target object to be photographed and determining a target scene to which the target object to be photographed belongs includes: the method comprises the steps of obtaining animation data corresponding to each video frame in the current animation, and determining a target object to be shot in each video frame and a target scene in a target video frame to which the target object to be shot belongs before rendering the animation data.
In this embodiment, after the target object to be photographed and the target scene to which the target object to be photographed belongs are acquired, the corresponding target scene may be processed to determine a scene mode of the target scene; and if the scene mode is the night mode, acquiring scene association attributes in the target scene to determine whether to shoot and/or record a target image including the target object to be shot or not based on the scene association attributes.
To further determine whether to record the current video frame, it may be determined whether a scene mode of the target scene matches a preset mode. The preset mode may be a night mode, i.e., a night view mode.
The night mode may be understood as a night mode. When the night scene mode is detected, the scene attribute in the current video frame can be acquired.
Specifically, when rendering data, the target scene may be determined according to the corresponding data. And determines the specific scene mode, namely the night mode or the day mode, in the process of determining the target scene. Determining its specific scene mode may be: the method comprises the steps that when each video frame is created, a scene mode corresponding to each video frame can be marked, and when the current video frame is played, the corresponding mark can be called to determine the scene mode corresponding to the video frame; or, when the data is rendered, determining the scene mode according to the corresponding data; or, when the video frame is displayed, the scene mode of the current video frame is determined based on the set monitoring module, the related data corresponding to the night mode or the related parameters are preset in the monitoring module, and the corresponding scene mode can be determined based on the parameters.
And S120, if the scene correlation attribute in the target scene and the object attribute of the target object to be shot meet a preset attribute relationship, triggering to shoot and/or record a target image comprising the target scene and the target object to be shot.
In this embodiment, after the scene mode of the target scene is determined, the relevant parameters may be obtained in combination with the scene mode, and then whether to trigger shooting and/or recording of the current video frame is determined in combination with the relevant parameters.
Optionally, determining a scene mode of the target scene; and if the scene mode is the night mode, acquiring scene association attributes in the target scene to determine whether to shoot and/or record a target image including the target object to be shot or not based on the scene association attributes.
The scene association attribute may be the number of light sources in the target scene, position information of the light sources in the video frame, and intensity information of light emitted by the light sources. The object position information may be a specific position of the target object to be photographed in the target scene.
Specifically, when the scene mode is determined to be the night mode, the number of light sources, the light source intensity, and the light source position information in the scene mode may be extracted. The screen capturing operation may be triggered when the number of the detected light sources reaches a preset threshold value of the number of the light sources.
Of course, if the scene attribute information includes the light source position information, the object position information of the target object to be shot can be determined, the relative angle between the light source and the object is determined according to the light source position information and the object position information, and the screen capture and/or screen recording operation can be automatically triggered as long as the relative angle is detected to meet the preset shooting angle range.
The preset shooting angle range is predetermined, for example, the preset shooting angle range may be determined by determining which images at relative angles are preferred by the user according to the images corresponding to the historical screen shots of each user. Optionally, the preset relative angle in determining the preset position relationship may be: after a user manually captures a screen to obtain a corresponding image, whether the image comprises a target light source and a target object to be shot or not can be determined, and if yes, a relative angle between the target light source and the target object to be shot can be determined. The corresponding images can be processed as much as possible, and the screen capture proportion under different relative shooting angles can be determined. The relative angle in the preset positional relationship may be determined according to the screen capture ratio.
Illustratively, ten thousand images of a user's screen shot are acquired, which include the object to be photographed and the target light source. The relative shooting angle between the target light source and the object to be shot in each image can be respectively determined and recorded, for example, the space vector of the target light source and the space coordinate information of the target object to be shot are obtained, and the target angle between the target light source and the target object to be shot is determined to be 10 degrees according to the space vector and the space coordinate information, and then the angle can be recorded. And repeating the steps for ten thousand times, and respectively determining the target angle between the target object to be shot and the target light source. Determining the occurrence frequency of each target angle, and taking the corresponding angle when the occurrence frequency is higher than a preset threshold value as a preset shooting angle within a preset shooting angle range, wherein the preset threshold value is 500 optionally.
It should be noted that a fixed angle or an angle range may be stored in the preset shooting angle range. Each angle in the preset shooting angle range may be determined according to an actual shooting effect, or may be set according to an empirical value, and a specific determination manner thereof may be described in the above description.
Specifically, after the relative angle is determined according to the light source position information and the object position information, whether the relative angle is within a preset shooting angle range can be determined, and then screen capture operation can be triggered.
In this embodiment, if the scene correlation attribute in the target scene and the object attribute of the target object meet a preset attribute relationship, triggering to shoot and/or record a target image including the target scene and the target object, includes: and triggering to shoot and/or record a target image comprising the target scene and the target object to be shot if the number of the light sources is detected to reach a light source number threshold in a preset attribute relationship and the object position information of the target object to be shot in the light source position information meets the preset position relationship in the preset attribute relationship.
The preset attribute relationship may include a light source number threshold, and the preset position relationship may include a relative angle, and optionally, the relative angle may be [0,45 ]. According to the position information of the object and the position information of the light source, the relative angle of the target between the object and the light source can be determined, for example, 30 degrees is within the range of the preset position relation, and meanwhile, the number 30 of the light sources in the video frame reaches the preset light source number threshold value 25, so that the scene displayed in the current video frame is relatively good, the video frame possibly wanted by the user can be displayed, and at the moment, the screen can be shot and stored.
Specifically, after determining the number of light sources and the position information of the light sources in the current video frame, that is, in the target scene, it may be determined whether the number of the light sources reaches a preset light source number threshold, and meanwhile, it may be determined whether a relative angle between the position information of the light sources and the position information of the object is within a preset shooting angle range, and if so, a screen capture signal may be sent to the screen capture module, so that the screen capture module may capture the current video frame according to the received screen capture signal.
It should be noted that, in order to improve the user experience, the screen can be automatically captured without the perception of the user. In order to further improve the user experience, because the content difference between the previous video frame and the next video frame is not particularly large, a plurality of video frames can be continuously intercepted from the current moment and stored, so that the user can subsequently select the video frame with higher matching degree.
Or, if the user starts the function of automatically screening the target image, a plurality of video frames can be continuously captured, and the similarity processing is performed on the content of the video frames, optionally, if the similarity of the plurality of video frames is low, the video frame captured for the first time can be automatically retained; if the similarity of the video frames is higher, the definition and the richness of the video frames can be further determined, and images with higher richness and definition can be reserved. Richness is understood to mean that more content remains in the video frame. Furthermore, in order to facilitate the user to trace back the captured image, the reserved target image and the deleted image may be stored in different subfiles of the same main file in the terminal memory or the game memory, respectively, so that the user may further confirm whether the reserved target image and the deleted target image are correct. Of course, in order to avoid the problem of resource occupation, the deleted image may be cleaned regularly.
Of course, if the user does not turn on the function of filtering the target image, the user can confirm the image to be retained by himself. At this time, the target images can all be stored in the subfolders that are desired to be reserved, and the timing is prevented from being cleaned up.
It should be noted that, if the screen recording function is triggered, the corresponding game video frame is recorded according to the preset screen recording duration, optionally 1S. For example, if the screen recording function is called, the screen recording function can be automatically started, and the screen recording can be stopped when the screen recording duration between the current moment and the moment of triggering the screen recording reaches the preset screen recording duration. At this time, a plurality of video frames may be obtained, which video frames are to be specifically reserved or deleted may be determined by the above method, and details are not repeated herein.
On the basis of the technical scheme, the target image is stored in a target storage space, and when the operation of triggering the acquisition of the target image is detected, the corresponding target image is called from the target storage space.
The target image is an image obtained by screen capture. The screen shot images can be stored in the target storage space. The storage to the storage space has the advantages that: the user can confirm the corresponding scene according to the user, or the screenshot image can be used in other scenes.
On the basis of the technical scheme, after the target image is obtained, the screen capture time of the target image can be determined, and the animation set can be created according to the screen capture time.
Here, the screen capture time may be understood as the time when the screen capture includes the target photographic subject. And storing the shot target image into a storage space so that the user can view the corresponding game picture when the game is finished. Or after the target image is obtained, if it is detected that the rendering effect of the target image does not reach the preset effect, the target image may be called and further rendered, so as to improve the display effect of the image.
The animation set can be directly manufactured after the target image is obtained through screen capture, and can be displayed on a display interface in a small window mode so that a user can enjoy corresponding display effect; of course, it may also be possible to create an animation set when the game is ended, and display the animation set on the display interface, so that the user can enjoy highlight pictures corresponding to the user or other characters at various angles. By the mode, the comprehensiveness of the user in watching the corresponding picture is improved, and therefore the technical effect of user experience is improved.
The technical scheme of the embodiment of the invention determines the current position information of the target object to be shot and the projection information of the projection object in real time or at intervals, judges whether the preset display effect is met between the target object to be shot and the projection information according to the relative position information between the current position information and the projection information, if the preset display effect is met, the video frame displayed on the interface is commemorative to the user, at the moment, the user possibly needs to trigger the operation of capturing the current video frame, namely, the shooting and/or recording of the target image including the target object to be shot is triggered, the problems that the current video frame can be captured only by manually triggering a screen capturing key by the user during screen capturing in the prior art and the operation is inconvenient are solved, and the actual captured image is different from the image to be captured by the user when the screen capturing key is triggered due to the fact that the video frame is played fast, the technical problem that the corresponding video frame cannot be captured is solved, the current video frame can be automatically captured as long as the display effect between the projection information and the target object to be shot is detected to be the same as the preset display effect, and the technical effects of screen capturing accuracy, convenience and high efficiency are improved.
Example two
Fig. 2 is a schematic structural diagram of an apparatus for capturing an image according to a third embodiment of the present invention, the apparatus including: a target scene determination module 210 and a target image determination module 220.
The target scene determining module 210 is configured to obtain a target object to be photographed and determine a target scene to which the target object to be photographed belongs; the target image determining module 220 is configured to trigger shooting and/or recording of a target image including the target scene and the target object to be shot if the scene correlation attribute in the target scene and the object attribute of the target object to be shot satisfy a preset attribute relationship.
The technical scheme of the embodiment of the invention determines the current position information of the target object to be shot and the projection information of the projection object in real time or at intervals, judges whether the preset display effect is met between the target object to be shot and the projection information according to the relative position information between the current position information and the projection information, if the preset display effect is met, the video frame displayed on the interface is commemorative to the user, at the moment, the user possibly needs to trigger the operation of capturing the current video frame, namely, the shooting and/or recording of the target image including the target object to be shot is triggered, the problems that the current video frame can be captured only by manually triggering a screen capturing key by the user during screen capturing in the prior art and the operation is inconvenient are solved, and the actual captured image is different from the image to be captured by the user when the screen capturing key is triggered due to the fact that the video frame is played fast, the technical problem that the corresponding video frame cannot be captured is solved, the current video frame can be automatically captured as long as the display effect between the projection information and the target object to be shot is detected to be the same as the preset display effect, and the technical effects of screen capturing accuracy, convenience and high efficiency are improved.
On the basis of the technical scheme, the target scene determining module is further configured to obtain a target video frame corresponding to the current moment in the animation video, and determine a target object to be shot in the target video frame and a target scene to which the target object to be shot belongs.
On the basis of the above technical solution, the target scene determining module is further configured to:
the method comprises the steps of obtaining animation data corresponding to each video frame in the current animation, and determining a target object to be shot in each video frame and a target scene in a target video frame to which the target object to be shot belongs before rendering the animation data.
On the basis of the above technical solution, the target image determining module, before being configured to trigger shooting and/or recording of a target image including the target scene and the target object to be shot if the scene correlation attribute in the target scene and the object attribute of the target object to be shot satisfy a preset attribute relationship, is further configured to:
determining a scene mode of the target scene; and if the scene mode is the night mode, acquiring scene association attributes in the target scene to determine whether to shoot and/or record a target image including the target object to be shot or not based on the scene association attributes.
On the basis of the above technical solution, the target image determining module, before being configured to trigger shooting and/or recording of a target image including the target scene and the target object to be shot if the scene correlation attribute in the target scene and the object attribute of the target object to be shot satisfy a preset attribute relationship, is further configured to:
acquiring scene correlation attributes of the target scene, wherein the scene correlation attributes comprise the number of light sources in the target scene, light source intensity information of each light source and light source position information of each light source; and determining the object position information of the target object to be shot.
On the basis of the above technical solution, the target image determining module is further configured to:
and triggering to shoot and/or record a target image comprising the target scene and the target object to be shot if the number of the light sources is detected to reach a light source number threshold in a preset attribute relationship and the object position information of the target object to be shot in the light source position information meets the preset position relationship in the preset attribute relationship.
On the basis of the above technical solution, the target image determining module is further configured to:
and if the number of the light sources reaches a light source number threshold value in a preset attribute relationship and the relative angle between the light source position information and the object position information is within a preset angle range, triggering to shoot and/or record a target image comprising the target scene and the target object to be shot.
The device for shooting the image, provided by the embodiment of the invention, can execute the method for shooting the image, provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention. FIG. 3 illustrates a block diagram of an exemplary electronic device 30 suitable for use in implementing embodiments of the present invention. The electronic device 30 shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 3, the electronic device 30 is in the form of a general purpose computing device. The components of the electronic device 30 may include, but are not limited to: one or more processors or processing units 301, a system memory 302, and a bus 303 that couples various system components including the system memory 302 and the processing unit 301.
Bus 303 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, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 30 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 30 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 302 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)304 and/or cache memory 305. The electronic device 30 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 306 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, 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 (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 303 by one or more data media interfaces. Memory 302 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 308 having a set (at least one) of program modules 307 may be stored, for example, in memory 302, such program modules 307 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 307 generally perform the functions and/or methodologies of the described embodiments of the invention.
The electronic device 30 may also communicate with one or more external devices 309 (e.g., keyboard, pointing device, display 310, etc.), with one or more devices that enable a user to interact with the electronic device 30, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 30 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interfaces 311. Also, the electronic device 30 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 312. As shown, the network adapter 312 communicates with the other modules of the electronic device 30 via the bus 303. It should be appreciated that although not shown in FIG. 3, other hardware and/or software modules may be used in conjunction with electronic device 30, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 301 executes various functional applications and data processing, such as implementing a method of capturing an image provided by an embodiment of the present invention, by executing a program stored in the system memory 302.
Example four
A fourth embodiment of the present invention also provides a storage medium containing computer-executable instructions for performing a method of capturing an image when executed by a computer processor.
The method comprises the following steps: acquiring a target object to be shot and determining a target scene to which the target object to be shot belongs;
and triggering to shoot and/or record a target image comprising the target scene and the target object to be shot if the scene correlation attribute in the target scene and the object attribute of the target object to be shot meet a preset attribute relationship.
Computer storage media for embodiments of the invention may employ 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 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.
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 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 of capturing an image, comprising:
acquiring a target object to be shot and determining a target scene to which the target object to be shot belongs;
and triggering to shoot and/or record a target image comprising the target scene and the target object to be shot if the scene correlation attribute in the target scene and the object attribute of the target object to be shot meet a preset attribute relationship.
2. The method according to claim 1, wherein the obtaining of the target object to be photographed and the determining of the target scene to which the target object to be photographed belongs comprises:
the method comprises the steps of obtaining a target video frame corresponding to the current moment in an animation video, and determining a target object to be shot in the target video frame and a target scene to which the target object to be shot belongs.
3. The method according to claim 1, wherein the obtaining of the target object to be photographed and the determining of the target scene to which the target object to be photographed belongs comprises:
the method comprises the steps of obtaining animation data corresponding to each video frame in the current animation, and determining a target object to be shot in each video frame and a target scene in a target video frame to which the target object to be shot belongs before rendering the animation data.
4. The method according to claim 1, wherein before triggering to capture and/or record the target image including the target scene and the target object to be captured if the scene correlation attribute in the target scene and the object attribute of the target object to be captured satisfy a preset attribute relationship, the method further comprises:
determining a scene mode of the target scene;
and if the scene mode is the night mode, acquiring scene association attributes in the target scene to determine whether to shoot and/or record a target image including the target object to be shot or not based on the scene association attributes.
5. The method according to claim 1, wherein before triggering to capture and/or record the target image including the target scene and the target object to be captured if the scene correlation attribute in the target scene and the object attribute of the target object to be captured satisfy a preset attribute relationship, the method further comprises:
acquiring scene correlation attributes of the target scene, wherein the scene correlation attributes comprise the number of light sources in the target scene, light source intensity information of each light source and light source position information of each light source;
and determining the object position information of the target object to be shot.
6. The method according to claim 5, wherein the triggering of shooting and/or recording the target image including the target scene and the target object to be shot if the scene correlation attribute in the target scene and the object attribute of the target object to be shot satisfy a preset attribute relationship comprises:
and triggering to shoot and/or record a target image comprising the target scene and the target object to be shot if the number of the light sources is detected to reach a light source number threshold in a preset attribute relationship and the object position information of the target object to be shot in the light source position information meets the preset position relationship in the preset attribute relationship.
7. The method according to claim 6, wherein if it is detected that the number of light sources reaches a threshold value of the number of light sources in a preset attribute relationship and the object position information of the target object to be photographed exists in the light source position information and satisfies a preset position relationship in the preset attribute relationship, then triggering to photograph and/or record a target image including the target scene and the target object to be photographed comprises:
and if the number of the light sources reaches a light source number threshold value in a preset attribute relationship and the relative angle between the light source position information and the object position information is within a preset angle range, triggering to shoot and/or record a target image comprising the target scene and the target object to be shot.
8. An apparatus for capturing an image, comprising:
the target scene determining module is used for acquiring a target object to be shot and determining a target scene to which the target object to be shot belongs;
and the target image determining module is used for triggering to shoot and/or record a target image comprising the target scene and the target object to be shot if the scene correlation attribute in the target scene and the object attribute of the target object to be shot meet a preset attribute relationship.
9. 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 a method of capturing images as claimed in any one of claims 1-7.
10. A storage medium containing computer executable instructions for performing the method of capturing an image of any one of claims 1-7 when executed by a computer processor.
CN202011624250.4A 2020-12-31 2020-12-31 Method and device for shooting image, electronic equipment and storage medium Active CN112860372B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011624250.4A CN112860372B (en) 2020-12-31 2020-12-31 Method and device for shooting image, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011624250.4A CN112860372B (en) 2020-12-31 2020-12-31 Method and device for shooting image, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112860372A true CN112860372A (en) 2021-05-28
CN112860372B CN112860372B (en) 2023-05-30

Family

ID=75999355

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011624250.4A Active CN112860372B (en) 2020-12-31 2020-12-31 Method and device for shooting image, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112860372B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108200351A (en) * 2017-12-21 2018-06-22 深圳市金立通信设备有限公司 Image pickup method, terminal and computer-readable medium
CN108683850A (en) * 2018-05-15 2018-10-19 维沃移动通信有限公司 A kind of shooting reminding method and mobile terminal
CN108810413A (en) * 2018-06-15 2018-11-13 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment, computer readable storage medium
CN109240576A (en) * 2018-09-03 2019-01-18 网易(杭州)网络有限公司 Image processing method and device, electronic equipment, storage medium in game
CN109951664A (en) * 2019-03-31 2019-06-28 联想(北京)有限公司 Recording method and device
CN109976634A (en) * 2019-03-18 2019-07-05 北京智明星通科技股份有限公司 A kind of game APP screenshot method and equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108200351A (en) * 2017-12-21 2018-06-22 深圳市金立通信设备有限公司 Image pickup method, terminal and computer-readable medium
CN108683850A (en) * 2018-05-15 2018-10-19 维沃移动通信有限公司 A kind of shooting reminding method and mobile terminal
CN108810413A (en) * 2018-06-15 2018-11-13 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment, computer readable storage medium
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
CN109951664A (en) * 2019-03-31 2019-06-28 联想(北京)有限公司 Recording method and device

Also Published As

Publication number Publication date
CN112860372B (en) 2023-05-30

Similar Documents

Publication Publication Date Title
WO2021114710A1 (en) Live streaming video interaction method and apparatus, and computer device
WO2018000619A1 (en) Data display method, device, electronic device and virtual reality device
CN112827172B (en) Shooting method, shooting device, electronic equipment and storage medium
CN111882634A (en) Image rendering method, device and equipment and storage medium
CN111858318A (en) Response time testing method, device, equipment and computer storage medium
CN110102057B (en) Connecting method, device, equipment and medium for cut-scene animations
CN112843733A (en) Method and device for shooting image, electronic equipment and storage medium
CN112843691B (en) Method and device for shooting image, electronic equipment and storage medium
CN112843695B (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
CN112861612A (en) Method and device for shooting image, electronic equipment and storage medium
CN112860372B (en) Method and device for shooting image, electronic equipment and storage medium
CN111212234A (en) Shooting method, device, equipment and storage medium
CN112843696A (en) Shooting method, shooting device, electronic equipment and storage medium
CN112860360B (en) Picture shooting method and device, storage medium and electronic equipment
CN112791401B (en) Shooting method, shooting device, electronic equipment and storage medium
CN114466140B (en) Image shooting method and device
CN114245032B (en) Automatic switching method and system for video framing, video player and storage medium
CN112843678B (en) Method and device for shooting image, electronic equipment and storage medium
CN112843692B (en) Method and device for shooting image, electronic equipment and storage medium
CN112774199B (en) Target scene picture restoration method and device, electronic equipment and storage medium
CN112532904B (en) Video processing method and device and electronic equipment
CN112843711A (en) Method and device for shooting image, electronic equipment and storage medium
CN115278107A (en) Video processing method and device, electronic equipment and storage medium
CN114143429A (en) Image shooting method, image shooting device, electronic equipment and computer readable 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