Dynamic photo shooting method and device, electronic equipment and storage medium
By receiving input in the shooting preview interface, starting Hitchcock shooting mode, adjusting the camera position and lens focal length in real time, and generating dynamic photos showing Hitchcock special effects, it solves the problem that ordinary devices can find it difficult to directly acquire the special effect image, and achieves an efficient and flexible shooting process.
Patent Information
- Application Number
- CN202510702695.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-08-01
AI Technical Summary
In the prior art, it is difficult for ordinary mobile phones and sports cameras to directly collect images with Hitchcock special effects, and it usually needs to be realized by post-cutting dynamic images, which is cumbersome and not very flexible.
It provides a dynamic photo shooting method. By receiving input in the shooting preview interface, starting Hitchcock shooting mode, adjusting the camera position and lens focal length in real time, generating videos that present Hitchcock special effects, the foreground object position is fixed, and the background object is deformed frame by frame, simplifying the shooting process.
It realizes direct shooting of dynamic photos that presents Hitchcock special effects on ordinary devices, without post-editing, and improves shooting efficiency and flexibility.
Smart Images

Figure CN120416652A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of imaging technology, and particularly relates to a method, apparatus, electronic device, and storage medium for taking dynamic photos. Background Art
[0002] The Hitchcock zoom refers to the process of collecting images with Hitchcock special effects during image acquisition by simultaneously changing the position of the camera and the focal length of the lens. That is, by simultaneously changing the position of the camera and the focal length of the lens, the size of the main subject in the image remains unchanged, while the background undergoes perspective distortion, creating a visual effect of spatial compression or stretching.
[0003] However, usually only some complex devices, such as electronic devices including a camera with track movement and a synchronous zoom lens, can use the Hitchcock zoom technology to collect images. Ordinary mobile devices such as mobile phones and action cameras usually can only obtain images with Hitchcock special effects by manually editing the captured dynamic images after the dynamic images are captured. Thus, the process of obtaining images with Hitchcock special effects is relatively cumbersome and lacks flexibility. Summary of the Invention
[0004] The objective of the embodiments of this application is to provide a method, apparatus, electronic device, and storage medium for taking dynamic photos, which can improve the efficiency of obtaining images with Hitchcock special effects.
[0005] In a first aspect, the embodiments of this application provide a method for taking dynamic photos, which includes: receiving a first input to a shooting preview interface; in response to the first input, taking a dynamic photo, where the dynamic photo includes a video presenting Hitchcock special effects, and the position of the foreground object in the video is fixed.
[0006] In some embodiments of this application, the shooting preview interface includes a first control; before receiving the first input to the shooting preview interface, the method further includes:
[0007] receiving a second input to the first control;
[0008] in response to the second input, starting the Hitchcock shooting mode;
[0009] Taking a dynamic photo in response to the first input includes:
[0010] in response to the first input, taking a dynamic photo in the Hitchcock shooting mode.
[0011] In some embodiments of this application, the shooting preview interface includes a second control and a third control;
[0012] Before receiving the first input to the shooting preview interface, the method further includes:
[0013] Upon receiving a third input to the second control, display a first prompt message and a first prompt box. The first prompt message is used to prompt the shooting operation of Hitchcock's backward dolly shot, and the area selected by the first prompt box is the maximum display range of the foreground object;
[0014] Alternatively, upon receiving a fourth input to the third control, display a second prompt message and a second prompt box. The second prompt message is used to prompt the shooting operation of Hitchcock's forward dolly shot, and the area selected by the second prompt box is the maximum display range of the foreground object.
[0015] In some embodiments of the present application, the method further includes:
[0016] Upon receiving a third input to the second control, display a first shooting guidance window. The first shooting guidance window includes the dolly shot prompt information for Hitchcock's backward dolly shot and a first example file; the first example file is used to demonstrate the dolly shot effect of Hitchcock's backward dolly shot;
[0017] Alternatively, upon receiving a fourth input to the third control, display a second shooting guidance window. The second shooting guidance window includes the dolly shot prompt information for Hitchcock's forward dolly shot and a second example file; the second example file is used to demonstrate the dolly shot effect of Hitchcock's forward dolly shot.
[0018] In some embodiments of the present application, the first shooting guidance window includes a fourth control, and the second shooting guidance window includes a fifth control;
[0019] Before receiving a first input to the shooting preview interface, the method further includes:
[0020] When the first shooting guidance window is displayed, in response to an input to the fourth control, hide the first shooting guidance window;
[0021] Alternatively, when the second shooting guidance window is displayed, in response to an input to the fifth control, hide the second shooting guidance window.
[0022] In some embodiments of the present application, the dolly shot prompt information includes at least one of the following: descriptive information of the shooting operation steps, title of the prompt message.
[0023] In some embodiments of the present application, the method further includes:
[0024] When the first prompt message and the first prompt box are displayed and the foreground object is within the first prompt box, update the color of the first prompt box from a first color to a second color, and display a third prompt message. The third prompt message is used to prompt the moving direction and moving speed of the electronic device and to prompt the start of shooting;
[0025] Alternatively, when the second prompt message and the second prompt box are displayed and the foreground object is within the second prompt box, update the color of the second prompt box from the first color to the second color, and display a fourth prompt message for prompting the moving direction and moving speed of the electronic device and indicating the start of shooting;
[0026] Wherein, the electronic device is a device for shooting dynamic photos.
[0027] In some embodiments of the present application, the method further includes:
[0028] After the third prompt message is displayed, in response to a first input to the shooting control in the shooting preview interface, display a fifth prompt message for prompting the moving direction and moving speed of the electronic device;
[0029] Alternatively, after the fourth prompt message is displayed, in response to a first input to the shooting control in the shooting preview interface, display a sixth prompt message for prompting the moving direction and moving speed of the electronic device.
[0030] In some embodiments of the present application, before receiving the first input to the shooting preview interface, the method further includes:
[0031] Perform shooting scene detection on the shooting preview interface;
[0032] Determine a camera movement method matching the detected shooting scene;
[0033] Display a seventh prompt message for prompting the camera movement method matching the shooting scene.
[0034] In some embodiments of the present application, the dynamic photo further includes a cover image;
[0035] Shooting a dynamic photo includes:
[0036] Use the image captured by the camera at the input moment of the first input as the cover image, and start recording a video of a reference duration from the input moment.
[0037] In some embodiments of the present application, in response to the first input, shooting a dynamic photo includes:
[0038] In response to the first input, during the process of shooting a dynamic photo, identify the foreground area in each frame of the preview image displayed in the shooting preview interface, crop the image of the cropping area in each frame of the preview image, generate a video of a reference duration based on the image of each cropping area, and generate a cover image based on the first image; the first image is the image of the cropping area cropped from the preview image captured by the camera at the input moment of the first input;
[0039] The method further includes:
[0040] During the process of taking a dynamic photo, in the shooting preview interface, display the image of each frame's cropping area;
[0041] Among them, the cropping area is determined based on the size of the foreground area and the reference ratio, and the foreground area includes the foreground object.
[0042] In some embodiments of the present application, in response to the first input, taking a dynamic photo includes:
[0043] In response to the first input, during the process of taking a dynamic photo, identify the foreground area in each frame of the preview image displayed in the shooting preview interface, generate a video with a reference duration based on each frame of the preview image, and generate a cover image based on the second image, where the second image is the preview image captured by the camera at the input moment of the first input;
[0044] The method further includes:
[0045] During the process of taking a dynamic photo, display each frame of the preview image in the shooting preview interface, and display a foreground frame in each frame of the preview image; among them, when the foreground object moves, the foreground frame moves following the foreground object;
[0046] Among them, the foreground area includes the foreground object, and the foreground frame is used to frame the foreground object and guide the dynamic photo taker to place the foreground object in the preview image; during the process of taking a dynamic photo, the size of the foreground frame changes with the change of the shooting distance.
[0047] In some embodiments of the present application, in the case of using the Hitchcock backward camera movement method, as the shooting distance becomes larger, the foreground frame becomes smaller frame by frame;
[0048] In the case of using the Hitchcock forward camera movement method, as the shooting distance becomes smaller, the foreground frame becomes larger frame by frame.
[0049] In some embodiments of the present application, in the case of using the Hitchcock backward camera movement method, the background object in the video becomes larger frame by frame;
[0050] In the case of using the Hitchcock forward camera movement method, the background object in the video becomes smaller frame by frame.
[0051] In some embodiments of the present application, after taking a dynamic photo in response to the first input, the method further includes:
[0052] Associate and store the cover image with the video, and associate and store each video frame in the video with the corresponding video frame acquisition parameters.
[0053] In some embodiments of the present application, after taking a dynamic photo in response to the first input, the method further includes:
[0054] Associate and store the cover image with the video, and associate and store each video frame in the video, the video frame acquisition parameters corresponding to each video frame, and the change parameters corresponding to each video frame;
[0055] Among them, the change parameters are determined based on the position information of the cropped area in each video frame, the size of the cropped area in each video frame, and the size of each video frame. The change parameters are used to adjust the size of the image in the cropped area of each video frame; the change parameters include at least one of the following: scaling ratio, motion trajectory vector.
[0056] In some embodiments of the present application, the video frame acquisition parameters include at least one of the following: the acquisition timestamp of the video frame, the motion data of the electronic device when acquiring the video frame, and the lens parameters when acquiring the video frame;
[0057] The motion data includes at least one of the following: gyroscope data, gravity sensor data, acceleration data, optical image stabilization data;
[0058] The lens parameters include at least one of the following: lens focal length change parameter, lens number, aperture size.
[0059] In some embodiments of the present application, after receiving a first input to the shooting preview interface, the method further includes:
[0060] In response to the first input, display a shooting progress animation effect, and the shooting progress animation effect is used to prompt the shooting progress of the dynamic photo.
[0061] In some embodiments of the present application, the method further includes:
[0062] Display an editing interface of the video. The editing interface includes a speed change setting control; the speed change setting control is used to set the playing speed of the video;
[0063] Receive a fifth input to the speed change setting control. The speed change setting control includes a slider, and the fifth input is used to move the slider;
[0064] In response to the fifth input, play the video at the playing speed corresponding to the end position of the slider movement.
[0065] In some embodiments of the present application, in response to the fifth input, playing the video at the speed corresponding to the end position of the slider movement includes:
[0066] In response to the fifth input, when the fifth input is an input to move the slider in the first direction, play the video at a first speed, and the first speed is greater than a third speed; the third speed is the playing speed of the video before receiving the fifth input;
[0067] In response to a fifth input, when the fifth input is an input for moving the slider in a second direction, which is the opposite direction of the first direction, play the video at a second speed, and the second speed is less than the third speed.
[0068] In some embodiments of the present application, playing the video at a first speed includes:
[0069] Extract M video frames from the video based on the first speed, the third speed, and the number of video frames of the video, and play the video after frame extraction, where M is a positive integer and M is less than the number of video frames of the video.
[0070] Playing the video at a second speed includes:
[0071] Insert N video frames into the video based on the second speed, the third speed, and the number of video frames of the video, and play the video after frame insertion, where N is a positive integer.
[0072] In some embodiments of the present application, the background object in the video gradually deforms and enlarges frame by frame as the shooting distance increases;
[0073] Alternatively, the background object in the video gradually deforms and shrinks frame by frame as the shooting distance decreases.
[0074] In some embodiments of the present application, the foreground object in the video gradually deforms frame by frame as the shooting distance changes.
[0075] In a second aspect, an embodiment of the present application provides a dynamic photo shooting device, which includes: a receiving module for receiving a first input to a shooting preview interface; a shooting module for shooting a dynamic photo in response to the first input, where the dynamic photo includes a video presenting a Hitchcock effect, and the position of the foreground object in the video is fixed.
[0076] In some embodiments of the present application, the above shooting preview interface includes a first control; the above device further includes a processing module;
[0077] The above receiving module is further configured to receive a second input to the first control before receiving the first input to the shooting preview interface;
[0078] The above processing module is configured to start the Hitchcock shooting mode in response to the second input;
[0079] The above shooting module is specifically configured to shoot a dynamic photo in the Hitchcock shooting mode in response to the first input.
[0080] In some embodiments of the present application, the above shooting preview interface includes a second control and a third control; the device further includes a display module;
[0081] The above display module is configured to display a first prompt message and a first prompt box when receiving a third input to a second control before receiving a first input to the shooting preview interface. The first prompt message is used to prompt the shooting operation of Hitchcock backward dolly zoom, and the area selected by the first prompt box is the maximum display range of the foreground object;
[0082] Alternatively, the above display module is further configured to display a second prompt message and a second prompt box when receiving a fourth input to a third control before receiving a first input to the shooting preview interface. The second prompt message is used to prompt the shooting operation of Hitchcock forward dolly zoom, and the area selected by the second prompt box is the maximum display range of the foreground object.
[0083] In some embodiments of the present application, the above display module is further configured to display a first shooting guide window when receiving a third input to the second control. The first shooting guide window includes dolly zoom prompt information for Hitchcock backward dolly zoom and a first example file; the first example file is used to demonstrate the dolly zoom effect of Hitchcock backward dolly zoom;
[0084] Alternatively, the above display module is further configured to display a second shooting guide window when receiving a fourth input to the third control. The second shooting guide window includes dolly zoom prompt information for Hitchcock forward dolly zoom and a second example file; the second example file is used to demonstrate the dolly zoom effect of Hitchcock forward dolly zoom.
[0085] In some embodiments of the present application, the first shooting guide window includes a fourth control, and the second shooting guide window includes a fifth control.
[0086] The above processing module is further configured to hide the first shooting guide window in response to an input to the fourth control when the first shooting guide window is displayed before receiving a first input to the shooting preview interface;
[0087] Alternatively, the above processing module is further configured to hide the second shooting guide window in response to an input to the fifth control when the second shooting guide window is displayed before receiving a first input to the shooting preview interface.
[0088] In some embodiments of the present application, the dolly zoom prompt information includes at least one of the following: descriptive information of the shooting operation steps, a title of the prompt message.
[0089] In some embodiments of the present application, the above display module is further configured to update the color of the first prompt box from a first color to a second color and display a third prompt message when the first prompt message and the first prompt box are displayed and the foreground object is within the first prompt box. The third prompt message is used to prompt the moving direction and moving speed of the electronic device and to prompt the start of shooting;
[0090] Alternatively, the above display module is further configured to, when the second prompt message and the second prompt box are displayed and the foreground object is within the second prompt box, update the color of the second prompt box from the first color to the second color, and display a fourth prompt message, where the fourth prompt message is used to prompt the moving direction and moving speed of the electronic device and to prompt the start of shooting;
[0091] Wherein, the electronic device is a device for shooting dynamic photos.
[0092] In some embodiments of the present application, the above display module is further configured to, after displaying the third prompt message, in response to a first input to the shooting control in the shooting preview interface, display a fifth prompt message, where the fifth prompt message is used to prompt the moving direction and moving speed of the electronic device;
[0093] Alternatively, the above display module is further configured to, after displaying the fourth prompt message, in response to a first input to the shooting control in the shooting preview interface, display a sixth prompt message, where the sixth prompt message is used to prompt the moving direction and moving speed of the electronic device.
[0094] In some embodiments of the present application, the above processing module is further configured to perform a shooting scene detection on the shooting preview interface before receiving the first input to the shooting preview interface; and determine a camera movement mode matching the detected shooting scene;
[0095] The above display module is further configured to display a seventh prompt message, where the seventh prompt message is used to prompt the camera movement mode matching the shooting scene.
[0096] In some embodiments of the present application, the dynamic photo further includes a cover image;
[0097] The above shooting module is specifically configured to use the image captured by the camera at the input moment of the first input as the cover image, and start recording a video of a reference duration from the input moment.
[0098] In some embodiments of the present application, the above shooting module is specifically configured to, in response to the first input, during the process of shooting a dynamic photo, identify the foreground area in each frame of preview image displayed in the shooting preview interface, crop the image of the cropped area in each frame of preview image, generate a video of a reference duration based on the image of each cropped area, and generate a cover image based on the first image; the first image is the image of the cropped area cropped from the preview image captured by the camera at the input moment of the first input;
[0099] The above display module is further configured to, during the process of shooting a dynamic photo, display the image of each cropped area in the shooting preview interface;
[0100] Among them, the cropping area is determined based on the size of the foreground area and a reference ratio, and the foreground area includes foreground objects.
[0101] In some embodiments of the present application, the above-mentioned shooting module is specifically configured to, in response to a first input, during the process of shooting a dynamic photo, identify the foreground area in each frame of preview image displayed on the shooting preview interface, generate a video with a reference duration based on each frame of preview image, and generate a cover image based on a second image, where the second image is the preview image captured by the camera at the input moment of the first input;
[0102] The above-mentioned display module is further configured to, during the process of shooting a dynamic photo, display each frame of preview image on the shooting preview interface, and display a foreground frame in each frame of preview image; wherein, when the foreground object moves, the foreground frame moves following the foreground object;
[0103] Among them, the foreground area includes foreground objects, and the foreground frame is used to frame the foreground objects and guide the dynamic photo shooter to place the foreground objects in the preview image; during the process of shooting a dynamic photo, the size of the foreground frame changes with the change of the shooting distance.
[0104] In some embodiments of the present application, in the case of adopting the shooting method of Hitchcock backward dolly, as the shooting distance becomes larger, the foreground frame becomes smaller frame by frame; or, in the case of adopting the shooting method of Hitchcock forward dolly, as the shooting distance becomes smaller, the foreground frame becomes larger frame by frame.
[0105] In some embodiments of the present application, in the case of adopting the shooting method of Hitchcock backward dolly, the background objects in the video become larger frame by frame; or, in the case of adopting the shooting method of Hitchcock forward dolly, the background objects in the video become smaller frame by frame.
[0106] In some embodiments of the present application, the above-mentioned processing module is further configured to, after shooting a dynamic photo in response to a first input, associate and store the cover image with the video, and associate and store each video frame in the video with the corresponding video frame acquisition parameters.
[0107] In some embodiments of the present application, the above-mentioned processing module is further configured to, after shooting a dynamic photo in response to a first input, associate and store the cover image with the video, and associate and store each video frame in the video, the corresponding video frame acquisition parameters of each video frame, and the change parameters corresponding to each video frame;
[0108] Among them, the change parameters are determined based on the position information of the cropping area in each video frame, the size of the cropping area in each video frame, and the size of each video frame, and the change parameters are used to adjust the size of the image in the cropping area of each video frame; the change parameters include at least one of the following: scaling ratio, motion trajectory vector.
[0109] In some embodiments of the present application, the above video frame acquisition parameters include at least one of the following: the acquisition timestamp of the video frame, the motion data of the electronic device when acquiring the video frame, and the lens parameters when acquiring the video frame;
[0110] The above motion data includes at least one of the following: gyroscope data, gravity sensor data, acceleration data, and optical image stabilization data;
[0111] The above lens parameters include at least one of the following: the lens focal length change parameter, the lens number, and the aperture size.
[0112] In some embodiments of the present application, the above display module is further configured to, after receiving a first input to the shooting preview interface, in response to the first input, display a shooting progress animation, and the shooting progress animation is used to prompt the shooting progress of the dynamic photo.
[0113] In some embodiments of the present application, the above display module is further configured to display an editing interface of the video, and the editing interface includes a speed change setting control; the speed change setting control is used to set the playback speed of the video;
[0114] The above receiving module is further configured to receive a fifth input to the speed change setting control, and the speed change setting control includes a slider, and the fifth input is used to move the slider;
[0115] The above processing module is further configured to, in response to the fifth input, play the video at the playback speed corresponding to the end position of the slider movement.
[0116] In some embodiments of the present application, the above processing module is specifically configured to, in response to the fifth input, when the fifth input is an input to move the slider in the first direction, play the video at a first speed, and the first speed is greater than the third speed; the third speed is the playback speed of the video before receiving the fifth input; or, in response to the fifth input, when the fifth input is an input to move the slider in the second direction, the second direction is the opposite direction of the first direction, play the video at a second speed, and the second speed is less than the third speed.
[0117] In some embodiments of the present application, the above processing module is specifically configured to extract M video frames from the video based on the first speed, the third speed, and the number of video frames of the video, and play the video after frame extraction, where M is a positive integer and M is less than the number of video frames of the video.
[0118] Or, the above processing module is specifically configured to insert N video frames into the video based on the second speed, the third speed, and the number of video frames of the video, and play the video after frame insertion, where N is a positive integer.
[0119] In some embodiments of the present application, the background object in the above video is deformed and enlarged frame by frame as the shooting distance increases; or, the background object in the above video is deformed and reduced frame by frame as the shooting distance decreases.
[0120] In some embodiments of the present application, the foreground object in the above video is deformed frame by frame as the shooting distance changes.
[0121] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory. The memory stores a program or instruction that can run on the processor. When the program or instruction is executed by the processor, the steps of the dynamic photo shooting method described in the first aspect are implemented.
[0122] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the dynamic photo shooting method described in the first aspect are implemented.
[0123] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the dynamic photo shooting method described in the first aspect.
[0124] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the dynamic photo shooting method described in the first aspect.
[0125] In an embodiment of the present application, the electronic device receives a first input to the shooting preview interface; in response to the first input, a dynamic photo is taken, and the dynamic photo includes a video with a Hitchcock effect, and the position of the foreground object in the video is fixed. In this way, by inputting to the shooting preview interface, the electronic device can be triggered to directly take a dynamic photo presenting the Hitchcock effect, without subsequent manual editing operations, simplifying the process of obtaining an image with the Hitchcock effect and improving the efficiency and flexibility of taking a dynamic photo with the Hitchcock effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0126] Figure 1 is a schematic flowchart of a dynamic photo shooting method provided by some embodiments of the present application;
[0127] Figure 2A is a schematic diagram of a Hitchcock mode control in a shooting preview interface provided by some embodiments of the present application;
[0128] Figure 2BSchematic diagram of shooting controls in a shooting preview interface provided by some embodiments of the present application;
[0129] Figure 3 Schematic diagram of selecting the Hitchcock dolly zoom shooting method in a shooting preview interface provided by some embodiments of the present application;
[0130] Figure 4 One of the schematic diagrams of the prompt information and prompt box in the shooting preview interface when selecting the Hitchcock backward dolly zoom provided by some embodiments of the present application;
[0131] Figure 5 The second schematic diagram of the process of the prompt information and prompt box in the shooting preview interface when selecting the Hitchcock backward dolly zoom provided by some embodiments of the present application;
[0132] Figure 6 Schematic diagram of the prompt information in the shooting preview interface when starting shooting provided by some embodiments of the present application;
[0133] Figure 7A One of the schematic diagrams of the shooting guidance window for the Hitchcock backward dolly zoom provided by some embodiments of the present application;
[0134] Figure 7B The second schematic diagram of the shooting guidance window for the Hitchcock backward dolly zoom provided by some embodiments of the present application;
[0135] Figure 8A One of the schematic diagrams of the shooting guidance window for the Hitchcock forward dolly zoom provided by some embodiments of the present application;
[0136] Figure 8B The second schematic diagram of the shooting guidance window for the Hitchcock forward dolly zoom provided by some embodiments of the present application;
[0137] Figure 9 Schematic diagram of detecting a shooting scene provided by some embodiments of the present application;
[0138] Figure 10 One of the schematic diagrams of the image of the cropping area provided by some embodiments of the present application;
[0139] Figure 11 The second schematic diagram of the image of the cropping area provided by some embodiments of the present application;
[0140] Figure 12 The third schematic diagram of the image of the cropping area provided by some embodiments of the present application;
[0141] Figure 13 Schematic diagram of displaying the image of the cropping area during the process of shooting a dynamic photo provided by some embodiments of the present application;
[0142] Figure 14 It is a schematic diagram showing a preview image during the process of taking a dynamic photo provided by some embodiments of the present application;
[0143] Figure 15 It is one of the schematic diagrams showing the animation effect of the shooting progress provided by some embodiments of the present application;
[0144] Figure 16 It is the second of the schematic diagrams showing the animation effect of the shooting progress provided by some embodiments of the present application;
[0145] Figure 17 It is the third of the schematic diagrams showing the animation effect of the shooting progress provided by some embodiments of the present application;
[0146] Figure 18 It is a schematic diagram showing the speed change setting of a video on an editing interface provided by some embodiments of the present application;
[0147] Figure 19 It is one of the structural schematic diagrams of a dynamic photo shooting device provided by some embodiments of the present application;
[0148] Figure 20 It is the second of the structural schematic diagrams of a dynamic photo shooting device provided by some embodiments of the present application;
[0149] Figure 21 It is the third of the structural schematic diagrams of a dynamic photo shooting device provided by some embodiments of the present application;
[0150] Figure 22 It is a structural schematic diagram of an electronic device provided by some embodiments of the present application;
[0151] Figure 23 It is a hardware structural schematic diagram of an electronic device provided by some embodiments of the present application. Detailed implementation manners
[0152] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, rather than all, of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.
[0153] The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of this application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are usually of the same kind, and do not limit the number of objects. For example, the first object can be one or more. In addition, "and / or" in the description and claims means at least one of the connected objects, and the character " / ", generally represents an "or" relationship between the associated objects before and after.
[0154] The terms "at least one (item)", "at least one of", etc. in the description and claims of this application refer to any one, any two or a combination of two or more of the objects it contains. For example, at least one (item) of a, b, and c can represent: "a", "b", "c", "a and b", "a and c", "b and c", and "a, b, and c", where a, b, and c can be single or multiple. Similarly, "at least two (items)" means two or more, and its meaning is similar to that of "at least one (item)".
[0155] Including in the embodiments of this application means including but not limited to the objects included.
[0156] The terms used in the implementation part of this application are only used to explain the specific embodiments of this application, rather than being intended to limit this application. The terms related to the embodiments of this application are explained below.
[0157] Identifier: The identifier in this application is text, symbols, images, etc. used to indicate information, and can use controls or other containers as the carrier for displaying information, including but not limited to text identifiers, symbol identifiers, and image identifiers.
[0158] Control: It refers to a graphical element that can be directly operated or perceived by the user during the interaction process, used to receive user input, trigger functions, or display real-time information. It is the interaction bridge between the user and the device or application function, and realizes the transmission of instructions and the feedback of status through a visual form.
[0159] Hitchcock zoom: It refers to simultaneously changing the position of the camera and the focal length of the lens, so that the size of the main body in the picture remains unchanged, while the background produces perspective distortion, creating a visual effect of spatial compression or stretching.
[0160] Dynamic Photo: Essentially, it is a short video combined with audio attached to a static photo. By long - pressing or other operations, the video playback is triggered, and the hardware and software work together to achieve the "living photo" effect. A dynamic photo generally includes a static cover image and a short video, or includes a static cover image and a short video combined with audio. A dynamic photo can be understood as a data set composed of a static cover image and a short video. The static cover image and the short video can be regarded as a whole to understand the data composition of the dynamic photo. A two - way pointer is established between the static cover image and the short video through a lightweight data format or an index file of Extensible Markup Language (XML) to associate the data structures of the static cover image and the short video. Users can play the short video by operating on the static image, such as the common long - press operation. For example, a general dynamic photo includes a static image in Joint Photographic Experts Group (JEPG) format and a video in Moving Picture Experts Group 4 (MP4) format, which are stored associatively. Dynamic photos can also have other names, such as Live Photo, dynamic picture, live photo, etc. When users browse photos in the gallery or album, the first thing they see is this static cover image, which is equivalent to the home page or entrance of the short video, similar to the cover of a book or magazine. This static cover image provides a quick visual overview, allowing users to understand the theme or scene of the content without playing the short video. Therefore, the "cover image" not only technically identifies the static component of the entire dynamic photo but also provides a visual or interactive entrance in the user experience. If a user wants to delete a dynamic photo, both the static cover image and the short video that make up the dynamic photo will be deleted. Correspondingly, if a user wants to share a dynamic photo, the static cover image and the short video that make up the dynamic photo will be sent to the sharing destination together.
[0161] Interface: Refers to the graphical interaction layer that users see through the screen of an electronic device. That is, the "user interface (UI)", which is the media interface for interaction and information exchange between an application or operating system and users. It realizes the conversion between the internal form of information and the form acceptable to users. The user interface is the source code written in specific computer languages such as Java and XML. The interface source code is parsed and rendered on the electronic device and finally presented as content recognizable by users. The common form of presentation of the user interface is the graphical user interface (GUI), which refers to the user interface related to computer operations displayed in a graphical manner. It can be visual interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets (Web widget, Widget) displayed on the display screen of the electronic device.
[0162] Application: Refers to a computer program developed and run on an operating system to complete a certain or several specific tasks. The application runs in user mode, can interact with users, and has a visual user interface.
[0163] Shooting preview interface: It is the interface of the real-time viewfinder screen that users see through the device screen before taking a photo. It is a visual interaction area that is rendered in real time after the image data captured by the camera sensor is processed. It can be a GUI, on which visual interface elements such as buttons, navigation bars, and widgets can be displayed.
[0164] Next, in combination with the accompanying drawings, the dynamic photo shooting method provided by the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.
[0165] The dynamic photo shooting method provided by the embodiments of the present application can be applied to the scenario of shooting dynamic photos. Specifically, the scenario of shooting dynamic photos can include shooting dynamic photos of any object. Among them, the above object can include people, pets, dolls, statues, or any fixed or non-fixed object. The embodiments of the present application do not limit the foreground object to be shot.
[0166] Here, taking the foreground object to be shot as a person or a pet as an example, the scenario of shooting dynamic photos will be described.
[0167] A specific scenario can be shooting dynamic photos of a person. When a user uses a mobile phone to shoot a person, after clicking the shooting button of the camera APP on the mobile phone, the electronic device obtains the video of the few seconds before and after the user clicks the shooting button and generates a dynamic photo of the person.
[0168] Another specific application scenario can be taking dynamic photos of pets. When a user uses a mobile phone to take a photo of a pet, after clicking the shooting button of the camera APP on the mobile phone, the electronic device obtains the video of several seconds before and after the user clicks the shooting button and generates a dynamic photo of the pet.
[0169] The execution subject of the dynamic photo shooting method provided by the embodiments of the present application can be a dynamic photo shooting device. Exemplarily, the dynamic photo shooting device can be an electronic device, or a functional component or functional entity in the electronic device. Hereinafter, taking the execution subject as an electronic device as an example, the dynamic photo shooting method provided by the embodiments of the present application will be described exemplarily.
[0170] Figure 1 is a schematic flowchart of the dynamic photo shooting method provided by the embodiments of the present application. As Figure 1 shown, the dynamic photo shooting method provided by the embodiments of the present application may include the following steps 101 and 102.
[0171] Step 101: The electronic device receives a first input to the shooting preview interface.
[0172] In some embodiments of the present application, the shooting preview interface may include a shooting control, and the first input may be a first input to the shooting control.
[0173] In some embodiments of the present application, the first input may be used to trigger the electronic device to take a dynamic photo.
[0174] In some embodiments of the present application, the first input may be any form of input by the user to the shooting control of the shooting preview interface through the touch area of the electronic device. For example, the touch area may be the screen of the electronic device.
[0175] In some embodiments of the present application, the first input includes but is not limited to: the user touches the shooting control through the touch area of the electronic device by a touch device such as a finger or a stylus, or a specific gesture input by the user, or other feasible inputs. Specifically, it can be determined according to actual usage requirements, and the embodiments of the present application do not make limitations.
[0176] Exemplarily, the touch input may include a single click input, a double click input or a click input of any number of times, or may also include a long press input, a short press input, a slide input, a drag input, a drag and drop input, etc.
[0177] Exemplarily, the specific gesture may be any one of a single click gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double press gesture, and a double click gesture.
[0178] In some embodiments of the present application, when the electronic device has activated the Hitchcock shooting mode, the user can perform touch input on the shooting control in the shooting preview interface through the touch area of the electronic device to control the electronic device to take a photo in the Hitchcock shooting mode. In this way, it can be ensured that subsequent dynamic photo shooting is performed in the Hitchcock shooting mode, so as to be able to take a dynamic photo with Hitchcock special effects.
[0179] In some embodiments of the present application, the above-mentioned Hitchcock shooting mode can be understood as a mode for shooting dynamic photos with Hitchcock special effects.
[0180] Exemplarily, taking the electronic device as a mobile phone, the user can open the camera application (APP, application) in the mobile phone, and the mobile phone displays the shooting preview interface of the camera APP. The shooting preview interface includes shooting controls. The user clicks on the shooting controls, and the mobile phone responds to the user's click operation on the shooting controls to take a dynamic photo.
[0181] Step 102: The electronic device responds to the first input and takes a dynamic photo.
[0182] In some embodiments of the present application, the above-mentioned dynamic photo may include a cover image and a video. The cover image is a static photo, and the video presents Hitchcock special effects. In other words, in response to the first input, the electronic device can take a dynamic photo that presents Hitchcock special effects.
[0183] In some embodiments of the present application, the above-mentioned Hitchcock special effects can be understood as that the proportion of the foreground object in each video frame of the video remains relatively stable, but the background object is severely deformed due to perspective, such as the stretching or compression of background lines, forming a sense of contradiction that violates the conventional visual experience. And the parallel lines in the background image will present dynamic convergence or divergence, presenting a visual effect of spatial squeezing or expansion, while the foreground object seems to be "pinned" in the center of each video frame, producing a surreal floating effect.
[0184] In some embodiments of the present application, the above-mentioned dynamic photo may include a video presenting Hitchcock special effects.
[0185] In some embodiments of the present application, the position of the foreground object in the above-mentioned video is fixed. In other words, as the shooting distance changes, the position of the foreground object in the above-mentioned video remains unchanged, that is, in each video frame of the above-mentioned video, the position of the foreground object is the same.
[0186] In some embodiments of the present application, the foreground object in the above-mentioned video does not deform as the shooting distance changes. In other words, in each video frame of the above-mentioned video, the foreground object does not deform.
[0187] In some embodiments of the present application, the background object in the above video changes with the change of the shooting distance.
[0188] In some embodiments of the present application, as the shooting distance of the background object in the above video increases, it deforms and enlarges frame by frame. Or, as the shooting distance of the background object in the above video decreases, it deforms and shrinks frame by frame.
[0189] In other words, as the shooting distance changes frame by frame, the background object in the above video deforms frame by frame. And, as the shooting distance increases frame by frame, the background object in the above video enlarges frame by frame; or, as the shooting distance decreases frame by frame, the background object in the above video shrinks frame by frame. That is to say, as the shooting distance increases frame by frame, the background object in each video frame of the above video is larger than that in the previous video frame; or, the background object in each video frame of the above video is smaller than that in the previous video frame.
[0190] In some embodiments of the present application, the background object deforming frame by frame can be understood as that the background object generates perspective distortion, presenting a visual effect of spatial compression or spatial stretching.
[0191] In some embodiments of the present application, the dynamic photo taken by the electronic device includes a cover image and a video. The size and dimensions of the foreground object in the video are fixed, and the foreground object in the video does not deform. And, as the shooting distance of the background object in the video increases, it deforms and enlarges frame by frame, or, as the shooting distance of the background object in the video decreases, it deforms and shrinks frame by frame. That is to say, the size and position of the foreground object in the dynamic photo taken by the electronic device remain unchanged, and only the background object scales and deforms frame by frame.
[0192] In some other embodiments of the present application, the dynamic photo taken by the electronic device includes a cover image and a video. The size of the foreground object in the video is fixed, and the foreground object deforms frame by frame with the change of the shooting distance. And, as the shooting distance of the background object in the video increases, it deforms and enlarges frame by frame, or, as the shooting distance of the background object in the video decreases, it deforms and shrinks frame by frame. That is to say, the size and position of the foreground object in the dynamic photo taken by the electronic device remain unchanged, the characteristics of the background object scale frame by frame, and both the foreground object and the background object deform frame by frame.
[0193] In some embodiments of the present application, during the process of an electronic device taking a dynamic photo, the dynamic photo taker moves the electronic device to adjust the distance between the camera of the electronic device and the foreground object. Moreover, the electronic device automatically adjusts the focal length of the camera lens in real time during the process of taking the dynamic photo. In this way, by simultaneously adjusting the shooting distance of the foreground object and the focal length of the camera lens, the position of the foreground object in the captured image can be kept unchanged, while the background undergoes perspective distortion, forming a visual effect of spatial compression or stretching, and finally a dynamic photo presenting the Hitchcock effect is captured.
[0194] The dynamic photo shooting method provided by the embodiments of the present application can trigger the electronic device to directly capture a dynamic photo presenting the Hitchcock effect through an input to the shooting preview interface, without the need for subsequent manual editing operations, simplifying the process of obtaining an image with the Hitchcock effect and improving the efficiency and flexibility of image acquisition.
[0195] In some embodiments of the present application, the above shooting preview interface includes a first control. Before the above step 101, the dynamic photo shooting method provided by the embodiments of the present application may further include the following steps 11 and 12, and the above step 102 may be specifically implemented through the following steps 1021.
[0196] Step 11: The electronic device receives a second input to the first control.
[0197] In some embodiments of the present application, the above first control can be used to start the Hitchcock shooting mode. Exemplarily, this first control can be referred to as a Hitchcock mode control, a Hitchcock mode start control, a Hitchcock shooting mode start control, a Hitchcock shooting mode control, and so on.
[0198] In some embodiments of the present application, the above second input can be used to start the Hitchcock shooting mode.
[0199] In some embodiments of the present application, the above second input can be any form of input by the user to the first control on the shooting preview interface through the touch area of the electronic device.
[0200] Exemplarily, the above second input can be a single click input, a short press input, a long press input, or a single click gesture by the user to the first control. The embodiments of the present application do not limit this.
[0201] It should be noted that for the detailed content of the touch area and the second input, reference can be made to the relevant description of the first input in the above step 101. To avoid repetition, it will not be elaborated here.
[0202] Step 12: The electronic device responds to the second input and starts the Hitchcock shooting mode.
[0203] In some embodiments of the present application, in response to a second input, the electronic device activates the Hitchcock shooting mode. Then, when the user uses the electronic device to take a live photo next, the electronic device can process the preview image during the shooting process using the Hitchcock zoom algorithm to obtain a live photo with Hitchcock special effects.
[0204] In some embodiments of the present application, as Figure 2A shown, the above-mentioned shooting preview interface may include a toolbar, a preview window, camera mode options, album shortcut controls, shooting controls, and camera flip controls, etc. The shooting preview interface includes a toolbar, a preview window, camera mode options, album shortcut controls, shooting controls, and camera flip controls.
[0205] Among them, the above-mentioned toolbar can be used to display one or more function controls, and the one or more function controls may include "flashlight" controls, "live photo" controls, and "frame rate" setting controls, etc. It can be understood that the toolbar may also include more or fewer function controls.
[0206] Among them, the live photo function indicated by the above-mentioned "live photo" control can capture video and audio within a period of time before and after the image is taken, or can capture video and audio within a period of time after the image is taken. For example, the live photo function can record the taken image and the video for 2 seconds in total, that is, 1 second of video before and after the moment when the shooting control is pressed, and the audio for 1 second before and 7 seconds after the moment when the shooting control is pressed, to obtain a live photo containing 2 seconds of video and 8 seconds of audio.
[0207] Among them, the above-mentioned preview window can be used to display the preview image obtained after the image data is rendered in real time, and the preview window can also be called a viewfinder.
[0208] Among them, the camera mode options can be preset function modules that can be selected by the user, used to adapt to different shooting scenarios or operation requirements, and achieve specific shooting effects or creative intentions by adjusting the combination of hardware parameters and software algorithms. As Figure 2A shown, the camera mode options may include "night scene" mode options, "live" mode options, "portrait" mode options, "photo shooting" mode options, etc.
[0209] Among them, the above-mentioned shooting preview interface may further include a Hitchcock mode control, and the Hitchcock shooting function indicated by the Hitchcock mode control can take a live photo with Hitchcock special effects.
[0210] Exemplarily, as Figure 2AAs shown, taking a mobile phone as an example of an electronic device, after the user starts the camera APP in the mobile phone, the mobile phone displays a shooting preview interface 20. The shooting preview interface 20 includes a Hitchcock mode control 21, that is, the above-mentioned first control. After the user clicks on the Hitchcock mode control 21, the mobile phone starts the Hitchcock shooting mode.
[0211] In some embodiments of the present application, the shooting preview interface may include a dynamic photo control. After the user clicks on the dynamic photo control, the electronic device displays the Hitchcock mode control on the shooting preview interface. After the user clicks on the Hitchcock mode control, the mobile phone starts the Hitchcock shooting mode.
[0212] Exemplarily, as Figure 2A shown, taking a mobile phone as an example of an electronic device, after the user starts the camera APP in the mobile phone, the mobile phone displays a shooting preview interface 20. The shooting preview interface 20 includes a "dynamic photo" control. After the user clicks on the "dynamic photo" control, the Hitchcock mode control 21, that is, the above-mentioned first control, is displayed on the shooting preview interface 20 of the mobile phone. After the user clicks on the Hitchcock mode control 21, the mobile phone starts the Hitchcock shooting mode.
[0213] Step 1021: The electronic device responds to the first input and takes a dynamic photo in the Hitchcock shooting mode.
[0214] In some embodiments of the present application, the above-mentioned first input may be an input to the shooting control on the shooting preview interface.
[0215] Exemplarily, in combination with Figure 2A , as Figure 2B shown, taking a mobile phone as an example of an electronic device, after the user clicks on the Hitchcock mode control 21 of the shooting preview interface 20, the user can click on the shooting control 212 on the shooting preview interface 20. The mobile phone responds to the user's click operation on the shooting control 212, that is, the above-mentioned first input, and takes a dynamic photo in the Hitchcock shooting mode.
[0216] In this way, the user triggers the electronic device to start the Hitchcock shooting mode through one input, and then triggers the electronic device to take a dynamic photo in the Hitchcock shooting mode through another input. That is, the user can trigger the electronic device to take a dynamic photo with Hitchcock special effects through two inputs, simplifying the process of the electronic device obtaining a dynamic photo with Hitchcock special effects and improving the efficiency of taking a dynamic photo with Hitchcock special effects.
[0217] In some embodiments of the present application, the above-mentioned shooting preview interface may include a second control and a third control. Before the above-mentioned step 101, the dynamic photo shooting method provided by the embodiments of the present application may further include the following step 13 or step 14.
[0218] Step 13: When receiving a third input to the second control, the electronic device displays a first prompt message and a first prompt box.
[0219] In some embodiments of the present application, the above-mentioned second control may be a control corresponding to the shooting mode of Hitchcock backward dolly shot. Exemplarily, the above-mentioned second control may be referred to as the "Hitchcock - backward dolly shot" control.
[0220] In some embodiments of the present application, when the user inputs to the second control, it can be understood that the user wants to use the shooting mode of Hitchcock backward dolly shot corresponding to the second control to take a dynamic photo.
[0221] In some embodiments of the present application, the above-mentioned third input can be used to trigger the display of prompt information corresponding to the shooting mode of Hitchcock backward dolly shot.
[0222] In some embodiments of the present application, the above-mentioned third input can be any form of input by the user to the second control on the shooting preview interface through the touch area of the electronic device.
[0223] Exemplarily, the above-mentioned third input can be a click input, a short press input, a long press input, or a click gesture, etc. by the user to the second control. The embodiments of the present application do not limit this.
[0224] It should be noted that for the detailed content of the touch area and the third input, reference can be made to the relevant description of the first input in the above-mentioned step 101. To avoid repetition, it will not be elaborated here.
[0225] In some embodiments of the present application, the above-mentioned first prompt message can be used to prompt the shooting operation of Hitchcock backward dolly shot.
[0226] In some embodiments of the present application, the above-mentioned first prompt message can be information that prompts the specific shooting operation of Hitchcock backward dolly shot for the dynamic photo shooter.
[0227] Exemplarily, the above-mentioned first prompt message may include information on the specific shooting operation.
[0228] In some embodiments of the present application, the area framed by the above-mentioned first prompt box is the maximum display range of the foreground object. In other words, the above-mentioned first prompt box can be used to prompt the dynamic photo shooter to place the foreground object within the first prompt box.
[0229] For example, as Figure 3As shown in the figure, taking the electronic device as a mobile phone as an example, the shooting preview interface 20 of the mobile phone includes a "reverse dolly Hitchcock" control 23, which is the above-mentioned second control, and a "forward dolly Hitchcock" control 24, which is the above-mentioned third control. In addition, a "none" control can also be displayed. If the user selects the "none" control, the electronic device shoots ordinary dynamic photos instead of dynamic photos with the Hitchcock effect.
[0230] Then, after the user clicks Figure 3 the "reverse dolly Hitchcock" control 23 in Figure 4 As shown in the figure, taking the foreground object as a person as an example, the mobile phone displays a first prompt box 28 and a first prompt message 31 on the shooting preview interface 20. The first prompt message 31 includes "Place the person inside the frame and keep a distance of 0.7 meters - 3.6 meters from him / her". In addition, the shooting preview interface 20 can also display the "Hitchcock - reverse dolly" information to inform the user that the selected shooting mode is "Hitchcock - reverse dolly".
[0231] It should be noted that the distance of 0.7 meters - 3.6 meters between the above-mentioned camera and the person is only an example. In actual use, the distance between the camera and the foreground object can be set according to the performance of the camera, or can be set by default or by the user according to actual needs. The embodiments of the present application do not limit this. For example, the distance between the camera and the foreground object can be 0.5 meters - 3.0 meters, or 1 meter - 4 meters, etc.
[0232] In some embodiments of the present application, after the electronic device displays the first prompt message and the first prompt box, the dynamic photo shooter can place the foreground object inside the first prompt box according to the prompt of the first prompt message, and then trigger the shooting control of the shooting preview interface. In response to the trigger input of the dynamic photo shooter to the shooting control, that is, the above-mentioned first input, the electronic device shoots a dynamic photo in the shooting mode of Hitchcock reverse dolly. In other words, the above-mentioned first input can be the input of the dynamic photo shooter received by the electronic device when the foreground object is inside the first prompt box. That is, when the foreground object is inside the first prompt box, the dynamic photo shooter will press the shooting control to trigger the electronic device to shoot a dynamic photo in the shooting mode of Hitchcock reverse dolly.
[0233] Step 14: When receiving a fourth input to the third control, the electronic device displays a second prompt message and a second prompt box.
[0234] In some embodiments of the present application, the above-mentioned third control can be a control corresponding to the shooting mode of Hitchcock reverse dolly. Exemplarily, the above-mentioned third control can be called a "Hitchcock - forward dolly" control.
[0235] In some embodiments of the present application, when the user inputs to the third control, it can be understood that the user wants to use the shooting mode of the Hitchcock forward dolly shot corresponding to the third control to shoot a dynamic photo.
[0236] In some embodiments of the present application, the above fourth input can be used to trigger the display of prompt information corresponding to the shooting mode of the Hitchcock forward dolly shot.
[0237] In some embodiments of the present application, the above fourth input can be any form of input by the user to the third control on the shooting preview interface through the touch area of the electronic device.
[0238] Exemplarily, the above fourth input can be a single click input, a short press input, a long press input, or a single click gesture, etc. by the user on the third control. The embodiments of the present application do not limit this.
[0239] It should be noted that for the detailed content of the touch area and the fourth input, reference can be made to the relevant description of the first input in step 101 above. To avoid repetition, it will not be elaborated here.
[0240] In some embodiments of the present application, the above second prompt information can be used to prompt the shooting operation of the Hitchcock forward dolly shot.
[0241] In some embodiments of the present application, the above second prompt information can be information that prompts the specific shooting operation of the Hitchcock forward dolly shot for the dynamic photo shooter.
[0242] Exemplarily, the above second prompt information can include the title of the shooting mode and the information of the specific shooting operation.
[0243] In some embodiments of the present application, the above shooting operation can be understood as the user shooting operation of how to move the electronic device and how to place the foreground object in the preview screen to shoot a dynamic photo with the Hitchcock special effect.
[0244] In some embodiments of the present application, the area framed by the above second prompt box is the maximum display range of the foreground object. In other words, the above second prompt box can be used to prompt the dynamic photo shooter to place the foreground object within the second prompt box.
[0245] For example, taking the electronic device as a mobile phone and the foreground object as a person, on the shooting preview interface of the mobile phone, the second prompt information and the second prompt box are displayed. The second prompt information includes "Hitchcock - Forward Dolly Shot" and "Place the person within the frame and keep a distance of 0.7 meters - 3.6 meters from it".
[0246] It should be noted that the distance of 0.7 meters to 3.6 meters between the above camera and the person is only an example. In actual use, the distance between the camera and the foreground object can be set according to the performance of the camera, or can be set by default or by the user according to actual needs. The embodiments of the present application do not limit this. For example, the distance between the camera and the foreground object can be 0.5 meters to 3.0 meters, or 1 meter to 4 meters, etc.
[0247] In some embodiments of the present application, after the electronic device displays the second prompt message and the second prompt box, the dynamic photo taker can, according to the prompt of the second prompt message, place the foreground object within the second prompt box, and then trigger the shooting control on the shooting preview interface. In response to the trigger input of the dynamic photo taker on this shooting control, that is, the above-mentioned first input, the electronic device takes a dynamic photo in the shooting mode of Hitchcock's forward tracking shot. In other words, the above-mentioned first input can be the input of the dynamic photo taker received by the electronic device when the foreground object is within the second prompt box. That is to say, when the foreground object is within the second prompt box, the dynamic photo taker will press the shooting control to trigger the electronic device to take a dynamic photo in the shooting mode of Hitchcock's forward tracking shot.
[0248] In this way, after the user triggers the control corresponding to the shooting mode of Hitchcock's backward tracking shot or Hitchcock's forward tracking shot, the electronic device displays the shooting operation and the prompt box of Hitchcock's backward tracking shot or Hitchcock's forward tracking shot on the shooting preview interface, and reminds the user to place the foreground object within the prompt box, guiding the user to use the electronic device to take a dynamic photo in the shooting mode of Hitchcock's backward tracking shot or Hitchcock's forward tracking shot, without the user having to remember the cumbersome operation process, improving the convenience and efficiency of taking dynamic photos with Hitchcock special effects.
[0249] In some embodiments of the present application, the dynamic photo shooting method provided by the embodiments of the present application may further include the following step 19 or step 110.
[0250] Step 19: When the first prompt message and the first prompt box are displayed and the foreground object is located within the first prompt box, the electronic device updates the color of the first prompt box from the first color to the second color and displays the third prompt message.
[0251] In some embodiments of the present application, the above-mentioned first color and second color are different colors. Exemplarily, in the above step 13, the color of the first prompt box is the first color, and in the above step 19, the color of the first prompt box is updated to the second color. Exemplarily, the above-mentioned first color is white and the second color is yellow; or, the above-mentioned first color is red and the second color is white; or, the above-mentioned first color is white and the second color is green, etc.
[0252] In some embodiments of the present application, the electronic device updates the color of the first prompt box from the first color to the second color to prompt the foreground object captured by the dynamic photo taker to be within the first prompt box, and the dynamic photo can be taken.
[0253] In some embodiments of the present application, the above third prompt information can be used to prompt the moving direction and moving speed of the electronic device and prompt to start shooting.
[0254] In some embodiments of the present application, the above electronic device can be a device for taking dynamic photos. Exemplarily, the above electronic device can be a camera, a mobile phone with a photographing function, a tablet computer with a photographing function, and other intelligent devices with a photographing function. The embodiments of the present application do not limit this.
[0255] In some embodiments of the present application, when receiving a third input to the second control, the electronic device can detect whether the foreground object is within the first prompt box. If not, the first prompt information is displayed to prompt the dynamic photo taker to place the foreground object within the first prompt box. After the dynamic photo taker moves the electronic device or reminds the foreground object to move its position to place the foreground object within the first prompt box, when the electronic device detects that the foreground object is within the first prompt box, the color of the first prompt box is updated from the first color to the second color. And since the foreground object is already within the first prompt box, the electronic device no longer displays the first prompt information, but instead displays the above third prompt information to prompt the dynamic photo taker to start shooting and prompt the dynamic photo taker how to move the electronic device.
[0256] In some embodiments of the present application, the moving direction of the above electronic device can be moving backward, and the moving speed can be moving smoothly and uniformly.
[0257] Exemplarily, in combination with Figure 4 , as Figure 5 shown, taking the electronic device as a mobile phone as an example, when the foreground object is within the first prompt box 28, the shooting preview interface 28 of the mobile phone displays the third prompt information 32, and the third prompt information 32 is "Press the shutter and move backward smoothly and uniformly". And the mobile phone updates the color of the first prompt box 28 from Figure 3 white in Figure 4 to
[0258] It should be noted that the above step 19 can be executed after the above step 13. That is, when the electronic device receives a third input to the second control, first display a first prompt message and a first prompt box in a first color, and then, when it is detected that the foreground object is within the first prompt box, display a third prompt message and update the color of the first prompt box from the first color to a second color.
[0259] Step 110: When the second prompt message and the second prompt box are displayed and the foreground object is within the second prompt box, the electronic device updates the color of the second prompt box from the first color to the second color and displays a fourth prompt message.
[0260] In some embodiments of the present application, the above fourth prompt message can be used to prompt the moving direction and moving speed of the electronic device and prompt to start shooting.
[0261] It should be noted that the explanations of the first color, the second color and the electronic device can be referred to the relevant descriptions in the above step 19. To avoid repetition, they will not be elaborated here.
[0262] In some embodiments of the present application, when a fourth input to the third control is received, the electronic device can detect whether the foreground object is within the second prompt box. If not, it displays a second prompt message to prompt the dynamic photo taker to place the foreground object within the second prompt box. After the dynamic photo taker moves the electronic device or reminds the foreground object to move its position to place the foreground object within the second prompt box, and then the electronic device detects that the foreground object is within the second prompt box, it updates the color of the second prompt box from the first color to the second color. And since the foreground object is already within the second prompt box, the electronic device no longer displays the second prompt message, but instead displays the above fourth prompt message to prompt the dynamic photo taker that they can start shooting and how to move the electronic device.
[0263] In some embodiments of the present application, the moving direction of the above electronic device can be forward movement, and the moving speed can be stable and uniform movement.
[0264] Exemplarily, taking the electronic device as a mobile phone, when the foreground object is within the second prompt box, the shooting preview interface of the mobile phone displays the fourth prompt message, which is "Press the shutter and move forward smoothly and uniformly", and the mobile phone updates the color of the second prompt box from white to yellow.
[0265] It should be noted that the above step 110 can be executed after the above step 14. That is to say, when the electronic device receives a fourth input to the third control, the second prompt message and the second prompt box in the first color are first displayed, and then, when it is detected that the foreground object is within the second prompt box, the fourth prompt message is displayed, and the color of the second prompt box is updated from the first color to the second color.
[0266] In this way, when the foreground object is within the prompt box, such as within the first prompt box or the second prompt box, the electronic device prompts the dynamic photo taker to start shooting by updating the color of the prompt box and the new prompt message, and prompts the dynamic photo taker to move the direction and speed of the electronic device in the Hitchcock backward dolly or Hitchcock forward dolly shooting mode, so that the user can quickly master the shooting technique even when using this shooting mode for the first time, without the user having to remember cumbersome operation steps, making the dynamic photo shooting more user-friendly and accessible to most people, and improving the efficiency and flexibility of dynamic photo shooting.
[0267] In some embodiments of the present application, the dynamic photo shooting method provided by the embodiments of the present application may further include the following step 111 or step 112.
[0268] Step 111: After displaying the third prompt message, the electronic device, in response to a first input to the shooting control in the shooting preview interface, displays a fifth prompt message.
[0269] In some embodiments of the present application, the above fifth prompt message may be used to prompt the moving direction and moving speed of the electronic device.
[0270] In some embodiments of the present application, the moving direction of the above electronic device may be moving backward, and the moving speed may be moving smoothly and uniformly.
[0271] In some embodiments of the present application, since the third prompt message prompts the dynamic photo taker to start shooting, after seeing the third prompt message, the dynamic photo taker can trigger the shooting control in the shooting preview interface. The electronic device, in response to the user's triggering operation on the shooting control, that is, in response to the above first input, can shoot a dynamic photo in the Hitchcock backward dolly shooting mode and display the fifth prompt message, which is used to prompt that the electronic device moves smoothly and uniformly backward during the shooting of the dynamic photo.
[0272] Exemplarily, in combination with Figure 5 , such as Figure 6As shown, taking the electronic device as a mobile phone as an example, the shooting preview interface 20 of the mobile phone includes a shooting control 212. After the user clicks on the shooting control 212, the mobile phone responds to the click input of the user on the shooting control 212, that is, the above-mentioned first input, and displays a fifth prompt message 33, and the fifth prompt message 33 is "Please move backward smoothly and evenly."
[0273] It should be noted that the above step 111 can be executed after the above step 19. And the above step 111 can be executed simultaneously with the above step 102.
[0274] Step 112: After displaying the fourth prompt message, the electronic device responds to the first input on the shooting control in the shooting preview interface and displays a sixth prompt message.
[0275] In some embodiments of the present application, the above sixth prompt message can be used to prompt the moving direction and moving speed of the electronic device.
[0276] In some embodiments of the present application, the moving direction of the above electronic device can be forward movement, and the moving speed can be smooth and uniform movement.
[0277] In some embodiments of the present application, since the fourth prompt message prompts that the dynamic photo shooter can start shooting, therefore, after seeing the fourth prompt message, the dynamic photo shooter can trigger the shooting control of the shooting preview interface. The electronic device responds to the triggering operation of the user on the shooting control, that is, responds to the above first input, and can shoot a dynamic photo in the shooting mode of Hitchcock's forward tracking shot, and display a sixth prompt message, and the sixth prompt message is used to prompt the electronic device to move forward smoothly and evenly during the shooting of the dynamic photo.
[0278] Exemplarily, taking the electronic device as a mobile phone as an example, the shooting preview interface of the mobile phone includes a shooting control. After the user clicks on the shooting control, the mobile phone responds to the click input of the user on the shooting control, that is, the above first input, and displays a sixth prompt message, and the sixth prompt message is "Please move forward smoothly and evenly."
[0279] It should be noted that the above step 112 can be executed after the above step 110. And the above step 111 can be executed simultaneously with the above step 102.
[0280] In this way, when the electronic device prompts the user to press the shutter button to start shooting the dynamic photo through a prompt message, the user makes a first input to the shooting control on the shooting preview interface. In response to the first input, the electronic device displays new prompt information on the shooting preview interface to prompt the user how to move the electronic device during the shooting process, and then starts shooting the dynamic photo. In this way, even during the shooting of the dynamic photo, there is a prompt message to remind the user how to operate the electronic device, eliminating the need for the user to remember tedious operations, and improving the efficiency of shooting dynamic photos with Hitchcock special effects.
[0281] In some embodiments of the present application, the dynamic photo shooting method provided in the embodiments of the present application may further include the following step 15 or step 16.
[0282] Step 15: When receiving the third input to the second control, the electronic device displays the first shooting guide window.
[0283] In some embodiments of the present application, the user inputs the second control, which can also be understood as the user wanting to view the specific operation of the Hitchcock backward camera shooting mode corresponding to the second control and the resulting film effect.
[0284] In some embodiments of the present application, when a user uses the Hitchcock mode to take a dynamic photo for the first time, the user makes a third input to the second control, and the electronic device can display a first shooting guide window to show the user the Hitchcock backward camera shooting operation and the resulting effect.
[0285] In some embodiments of the present application, the first shooting guide window may include camera movement prompt information of Hitchcock's backward camera movement and the first example file.
[0286] In some embodiments of the present application, the above-mentioned camera movement prompt information may include at least one of the following: description information of the shooting operation steps and a prompt information title.
[0287] For example, the camera movement prompt information may include description information of the shooting operation steps of Hitchcock's backward camera movement. Alternatively, the camera movement prompt information may include description information of the shooting operation steps of Hitchcock's backward camera movement and a title of Hitchcock's backward camera movement. Alternatively, the camera movement prompt information may include a title of Hitchcock's backward camera movement.
[0288] In some embodiments of the present application, the first example file can be used to demonstrate the camera effect of Hitchcock's backward camera movement. For example, the first example file can be a short video or an animated image. For example, the first example file can be a Graphics Interchange Format (GIF) animated image.
[0289] In some embodiments of the present application, the above-mentioned first example file can be used to demonstrate the finished film effect of a dynamic photo taken in the shooting mode of Hitchcock backward tracking shot, and the dynamic photo presents the Hitchcock effect.
[0290] Exemplarily, in combination with Figure 3 , such as Figure 7A shown, taking the electronic device as a mobile phone as an example, after the user clicks on the "Backward Tracking Shot Hitchcock" control 23 of Figure 3 , the mobile phone displays a first shooting guidance window 243 on the shooting preview interface 20. The first shooting guidance window 243 includes the shooting guidance information 243a for Hitchcock backward tracking shot and the first example file 243b. The shooting guidance information 243a includes the description information of the shooting operation steps "1. Place the shooting person within the indication frame; 2. Keep a distance of 0.7m - 3.6m from the shooting person; 3. After the indication frame turns yellow, press the shutter and move backward smoothly and uniformly." and the title of the guidance information "How to use Hitchcock - Backward Tracking Shot?".
[0291] In some other embodiments of the present application, the above-mentioned first shooting guidance window may include an operation method example file and a finished film effect example file. The operation method example file is used to demonstrate the operation steps of using Hitchcock backward tracking shot, and the finished film effect example file is used to demonstrate the effect of the dynamic photo obtained by using Hitchcock backward tracking shot.
[0292] In some embodiments of the present application, the above-mentioned operation method example file may be a video or a GIF, and the above-mentioned finished film effect example file may be a video or a GIF.
[0293] Exemplarily, in combination with Figure 3 , such as Figure 7B shown, taking the electronic device as a mobile phone as an example, after the user clicks on the "Backward Tracking Shot Hitchcock" control 23 of Figure 3 , the mobile phone displays a first shooting guidance window on the shooting preview interface 20. The first shooting guidance window includes an operation method example file 241 and a finished film effect example file 242. In the operation method example file 241, the dynamic photo shooter moves backward, getting farther and farther away from the foreground object. The direction of the arrow in the figure represents the backward movement of the dynamic photo shooter. In the finished film effect example file 242, the foreground object shrinks frame by frame, and the direction of the arrow in the figure represents the foreground object shrinking from A to B frame by frame.
[0294] It should be noted that the above step 15 can be executed before the above step 13.
[0295] Step 16: When receiving a fourth input to the third control, the electronic device displays a second shooting guidance window.
[0296] In some embodiments of the present application, the user inputs the third control, which can also be understood as the user wanting to view the specific operation of the Hitchcock forward camera shooting mode corresponding to the third control and the resulting film effect.
[0297] In some embodiments of the present application, when a user uses the Hitchcock mode to take a dynamic photo for the first time, the user performs a fourth input on the third control, and the electronic device can display a second shooting guide window to show the user the Hitchcock forward camera movement shooting operation and the resulting effect.
[0298] In some embodiments of the present application, the second shooting guide window may include camera movement prompt information of Hitchcock's forward camera movement and a second example file.
[0299] In some embodiments of the present application, the above-mentioned camera movement prompt information may include at least one of the following: description information of the shooting operation steps and a prompt information title.
[0300] For example, the camera movement prompt information may include description information of the shooting operation steps of Hitchcock's forward camera movement. Alternatively, the camera movement prompt information may include description information of the shooting operation steps of Hitchcock's forward camera movement and the title of Hitchcock's forward camera movement. Alternatively, the camera movement prompt information may include the title of Hitchcock's forward camera movement.
[0301] In some embodiments of the present application, the second example file may be used to demonstrate the camera effect of Hitchcock's forward camera movement.
[0302] For example, the second example file may be a short video or an animated image in any format. For example, the second example file may be a GIF animated image.
[0303] In some embodiments of the present application, the second example file may be used to demonstrate the resulting effect of a dynamic photo taken in a Hitchcock forward camera shooting mode, where the dynamic photo presents a Hitchcock special effect.
[0304] For example, in combination Figure 3 ,like Figure 8A As shown, taking the electronic device as a mobile phone as an example, when the user clicks Figure 3After the "Forward Tracking Hitchcock" control 24, the mobile phone displays a second shooting guidance window 253 on the shooting preview interface 20. The second shooting guidance window 253 includes shooting operation prompt information 253a for the Hitchcock forward tracking shot and a second example file 253b. The shooting operation prompt information 253a includes description information of shooting operation steps: "1. Place the person to be shot inside the indication frame; 2. Keep a distance of Xm - Ym from the person to be shot; 3. After the indication frame turns yellow, press the shutter and move forward smoothly and at a constant speed." and a prompt information title "How to use Hitchcock - Forward Tracking Shot?".
[0305] In some other embodiments of the present application, the above-mentioned second shooting guidance window may include an operation method example file and a finished video effect example file. The operation method example file is used to demonstrate the operation steps of using the Hitchcock forward tracking shot, and the finished video effect example file is used to demonstrate the effect of the dynamic photo obtained by using the Hitchcock forward tracking shot.
[0306] In some embodiments of the present application, the above-mentioned operation method example file may be a video or a moving picture, and the above-mentioned finished video effect example file may be a video or a moving picture.
[0307] Exemplarily, in combination with Figure 3 , as Figure 8B shown, taking an electronic device as a mobile phone as an example, after the user clicks on the Figure 3 "Forward Tracking Hitchcock" control 24, the mobile phone displays a second shooting guidance window on the shooting preview interface 20. The second shooting guidance window includes an operation method example file 251 and a finished video effect example file 252. In the operation method example file 251, the dynamic photo shooter moves forward and gets closer and closer to the foreground object. The direction of the arrow in the figure represents the forward movement of the dynamic photo shooter. In the finished video effect example file 252, the foreground object is enlarged frame by frame. The direction of the arrow in the figure represents the foreground object being enlarged from B to A frame by frame.
[0308] It should be noted that the above step 16 can be executed before the above step 14.
[0309] In this way, after the user triggers the Hitchcock forward camera control or the Hitchcock backward camera control, the electronic device can demonstrate to the user the shooting operation steps of the Hitchcock forward camera and the dynamic photo obtained by shooting in the shooting mode of the Hitchcock forward camera, or demonstrate to the user the shooting operation steps of the Hitchcock backward camera and the dynamic photo obtained by shooting in the shooting mode of the Hitchcock backward camera, so that before using the Hitchcock mode to shoot dynamic photos, the user can learn in advance the operation steps of shooting dynamic photos in the shooting mode of the Hitchcock forward camera or backward camera, and learn the effect of the final shot, facilitating the user to select a more suitable or desired Hitchcock mode according to their own needs, enabling the user to shoot satisfactory dynamic photos presenting the Hitchcock special effect, improving the efficiency of shooting dynamic photos presenting the Hitchcock special effect, and thus enhancing the user experience.
[0310] In some embodiments of the present application, the above first shooting guidance window may include a fourth control, and the above second shooting guidance window may include a fifth control. Before step 101 above, the dynamic photo shooting method provided by the embodiments of the present application may further include the following step 17 or step 18.
[0311] Step 17: When the first shooting guidance window is displayed, the electronic device hides the first shooting guidance window in response to an input to the fourth control.
[0312] In some embodiments of the present application, hiding the first shooting guidance window may be understood as not displaying the first shooting guidance window.
[0313] Exemplarily, as Figure 7A shown, the first shooting guidance window 243 may further include a fourth control 243c, and the fourth control 243c is "Got it". After the user clicks the fourth control 243c, the mobile phone can hide the first shooting guidance window 243.
[0314] It should be noted that the above step 17 may be executed after the above step 15.
[0315] Further, after the electronic device hides the first shooting guidance window, the electronic device may display a first prompt message and a first prompt box. That is to say, after executing the above step 17, the above step 13 may be executed.
[0316] Step 18: When the second shooting guidance window is displayed, the electronic device hides the second shooting guidance window in response to an input to the fifth control.
[0317] In some embodiments of the present application, hiding the second shooting guidance window may be understood as not displaying the second shooting guidance window.
[0318] Exemplarily, as Figure 8A shown, the second shooting guide window 253 may further include a fifth control 253c, which is "Got it". After the user clicks the fifth control 253c, the mobile phone may hide the second shooting guide window 253.
[0319] It should be noted that the above step 18 may be executed after the above step 16.
[0320] Furthermore, after the electronic device hides the second shooting guide window, the electronic device may display a second prompt message and a second prompt box. That is to say, after executing the above step 18, the above step 14 may be executed.
[0321] In this way, after the electronic device displays the shooting guide window, if the user has browsed the content of the shooting guide window and can trigger the "Got it" control in the shooting guide window, the electronic device may hide the shooting guide window.
[0322] In some embodiments of the present application, before the above step 101, the dynamic photo shooting method provided by the embodiments of the present application may further include the following steps 113 to 115.
[0323] Step 113: The electronic device performs shooting scene detection on the shooting preview interface.
[0324] In some embodiments of the present application, a viewfinder may be displayed on the shooting preview interface, and the electronic device may detect the shooting scene of the preview image in the viewfinder.
[0325] Exemplarily, the above shooting scenes may include a food scene, a travel scene, a birthday scene, a cute pet interaction scene, a couple gathering scene, and so on.
[0326] Step 114: The electronic device determines a camera movement method that matches the detected shooting scene.
[0327] In some embodiments of the present application, the electronic device may pre-store the mapping relationship between the shooting scene and the camera movement method.
[0328] Exemplarily, the food scene corresponds to the camera movement method of Hitchcock backward camera movement, and the shooting angle is from the food to the person, exaggerating the expressiveness of the person and conveying the deliciousness and amazingness of the food. The couple gathering scene corresponds to the camera movement method of Hitchcock forward camera movement, from far away to the smile on the face of the person, highlighting the specific expression of happiness and sweetness, etc. The cute pet interaction scene corresponds to the camera movement method of Hitchcock forward camera movement, and the shooting angle is from far away to the pet, highlighting the interesting effect of the pet's body shape change.
[0329] Step 115: The electronic device displays a seventh prompt message.
[0330] In some embodiments of the present application, the above seventh prompt message can be used to prompt a camera movement method matching the shooting scene.
[0331] In some embodiments of the present application, the seventh prompt message may include description information of the shooting scene and a camera movement method matching the shooting scene.
[0332] Exemplarily, as Figure 9 shown, taking the electronic device as a mobile phone for example, the preview image displayed on the shooting preview interface 20 of the mobile phone is a puppy. The mobile phone detects that the shooting scene is a cute pet scene, and the cute pet scene corresponds to the Hitchcock forward camera movement method. Then the mobile phone displays the seventh prompt message 210, and the seventh prompt message 210 includes "detecting a cute pet scene and recommending forward camera movement".
[0333] It should be noted that the above step 113 can be executed before the above step 13.
[0334] In this way, by detecting the shooting scene, a camera movement method suitable for the shooting scene is recommended for the user, without the user having to rack their brains to select a camera movement method, which improves the efficiency of selecting a camera movement method, and further improves the efficiency of shooting a dynamic photo with the Hitchcock special effect. Moreover, since the electronic device can automatically recommend a camera movement method suitable for the shooting scene for the user, a novice user who has no knowledge of the Hitchcock technology can also shoot a dynamic photo with the Hitchcock special effect, making the shooting of a dynamic photo with the Hitchcock special effect more flexible and convenient. In addition, since the recommended camera movement method is suitable for the shooting scene, the effect of the obtained dynamic photo with the Hitchcock special effect will be better.
[0335] In some embodiments of the present application, the above dynamic photo further includes a cover image, and the "shooting a dynamic photo" in the above step 102 can be specifically implemented through the following step 1011.
[0336] Step 1011: The electronic device uses the image captured by the camera at the input moment of the first input as the cover image, and starts recording a video with a reference duration from the input moment.
[0337] In some embodiments of the present application, the principle of an electronic device capturing a dynamic photo presenting a Hitchcock effect is as follows: When the Hitchcock mode is enabled, after the dynamic photo taker clicks the capture control, the camera of the electronic device can start recording a video, and each RAW-format video frame recorded is sent to an Image Signal Processor (ISP) for image processing such as demosaicing, white balance calibration, noise reduction, sharpening, dynamic range optimization, etc., to obtain an RGB-format video frame. By converting the color space of the RGB-format video frame, a YUV-format video frame can be obtained, and then the YUV-format video frame is sent to the display module of the electronic device. The display module of the electronic device performs real-time rendering and display on the YUV-format video frame, so that the video frame can be displayed in real time in the capture preview interface, that is, the preview image. Moreover, the image encoder can perform Discrete Cosine Transform (DCT) processing, quantization, and encoding on the YUV-format video frame recorded at the first input time to obtain the cover image of the dynamic photo, and the format of the cover image can be JPEG format. At the same time, the video encoder can obtain all the YUV-format video frames captured by the camera within the reference duration and perform video encoding on the video frames to generate the video of the reference duration.
[0338] In some embodiments of the present application, the image signal processor can first perform cropping processing on each RAW-format video frame to obtain the RAW-format video frame of the cropped area, and then perform image processing such as demosaicing, white balance calibration, noise reduction, sharpening, dynamic range optimization, etc. on the RAW-format video frame of the cropped area to obtain the RGB-format video frame of the cropped area. By converting the color space of the RGB-format video frame of the cropped area, a YUV-format video frame of the cropped area can be obtained, and then the YUV-format video frame of the cropped area is sent to the display module of the electronic device. The display module of the electronic device performs real-time rendering and display on the YUV-format video frame of the cropped area, so that the video frame of the cropped area obtained by cropping the preview image can be displayed in real time in the capture preview interface.
[0339] Exemplarily, the above reference duration can be 3 seconds, 2 seconds, 4 seconds, etc., and the embodiments of the present application do not limit this.
[0340] In some embodiments of the present application, when the camera movement mode of Hitchcock backward tracking is adopted, the background object in the video becomes larger frame by frame. In other words, in two adjacent video frames, the background object in the latter video frame is larger than the background object in the former video frame.
[0341] In some embodiments of the present application, when the camera movement method of Hitchcock forward camera movement is adopted, the background objects in the video become smaller frame by frame. In other words, in two adjacent video frames, the background objects in the latter video frame are smaller than those in the former video frame.
[0342] In some embodiments of the present application, the above-mentioned background objects refer to the content of the background area in the video frame except for the foreground objects. For example, the background objects can be a white wall, a tree, a house, a flower, a blue sky, and so on.
[0343] Thus, different from the prior art in which images before and after the input time of collecting the first input are used to generate ordinary dynamic photos, in the present application, since the user performs Hitchcock forward camera movement or backward camera movement on the electronic device starting from the input time, therefore, in the present application, the image captured by the camera at the input time of the first input is used as the cover image, and starting from the input time, a video with a reference duration is recorded. In this way, not only can a dynamic photo be taken, but the dynamic photo also presents the Hitchcock special effect. Compared with the prior art in which an editing software needs to be used to edit and process an ordinary dynamic photo to achieve the Hitchcock special effect, the operation steps of this solution are simpler, and the efficiency of taking a dynamic photo presenting the Hitchcock special effect is improved.
[0344] In some embodiments of the present application, the above-mentioned step 101 can be specifically implemented through the following step 1012, and the dynamic photo shooting method provided by the embodiments of the present application can further include the following step 1013.
[0345] Step 1012: In response to the first input, during the process of shooting a dynamic photo, the electronic device identifies the foreground area in each frame of preview image displayed on the shooting preview interface, crops the image of the cropping area in each frame of preview image, generates a video with a reference duration based on the image of each cropping area, and generates a cover image based on the first image.
[0346] In some embodiments of the present application, the electronic device can identify the foreground area in each frame of preview image through methods such as image feature points, multi-point lasers, foreground recognition, and subject recognition. The foreground area includes foreground objects.
[0347] In one example, the electronic device can locate the position and size of the foreground object in each frame of preview image through image feature points, and determine the smallest area including the foreground object as the foreground area. The position and size of this foreground area are the position and size of the above-mentioned foreground object in the preview image.
[0348] In some embodiments of the present application, the above-mentioned cropping area is determined based on the size of the foreground area and a reference ratio. The foreground area includes foreground objects.
[0349] In some embodiments of the present application, the above-mentioned reference ratio can be understood as the ratio of the expected foreground area in the finally obtained dynamic photo. In other words, the ratio of the area of the expected foreground area to the total area of the dynamic photo is the reference ratio.
[0350] It should be noted that the above-mentioned reference ratio can be set by default, or set according to the actual shooting scene or actual needs, or set according to experience. The embodiments of the present application do not limit this. Exemplarily, the reference ratio can be 80% or 90% or the like.
[0351] In some embodiments of the present application, for a frame of preview image, the electronic device can determine the size of the cropping area according to the size of the foreground area and the reference ratio in the frame of preview image, and determine the position of the cropping area in the frame of preview image according to the position of the foreground area in the frame of preview image and the reference ratio.
[0352] Exemplarily, as Figure 10 shown, the electronic device can determine the image 41 of the cropping area from the preview image 40 through the above method.
[0353] It should be noted that the position and size of the above-mentioned foreground area change with the position and size of the foreground object in the preview image, and the position and size of the above-mentioned cropping area change with the position and size of the foreground area.
[0354] In some embodiments of the present application, during the process of shooting a dynamic photo, when the distance between the foreground object and the camera changes, that is, when the shooting distance changes, the size of the foreground object in the preview image will change accordingly, the size of the foreground area will also change, and the size of the cropping area will also change with the change of the size of the foreground area.
[0355] Exemplarily, when the distance between the foreground object and the camera becomes smaller, the size of the foreground object in the preview image will become larger, the size of the foreground area will also become larger, and the size of the cropping area will also become larger as the size of the foreground area becomes larger.
[0356] Exemplarily, when the distance between the foreground object and the camera becomes larger, the size of the foreground object in the preview image will become smaller, the size of the foreground area will also become smaller, and the size of the cropping area will also become smaller as the size of the foreground area becomes smaller.
[0357] For example, in combination with Figure 10 , as Figure 11 shown, Figure 10 and Figure 11 are taken of the same foreground object in the same shooting scene. In the preview image 43, the distance between the foreground object and the camera becomes larger, and the size of the cropping area 44 becomes smaller.
[0358] In some embodiments of the present application, when the foreground object is translated or the dynamic photo shooter translates the camera, the foreground object will also be translated in the preview image, that is, the position of the foreground object in the preview image changes, and the position of the cropping area will also be translated along with the translation of the foreground object.
[0359] In some embodiments of the present application, when both the size and position of the foreground object in the preview image change, the size and position of the cropping area will also change accordingly.
[0360] Exemplarily, in combination with Figure 10 , such as Figure 12 shown, Figure 10 and Figure 12 are taken of the same foreground object in the same shooting scene. Compared with Figure 10 , in Figure 12 , the foreground object shrinks and moves to the upper right corner of the preview image 45. Then, in Figure 12 , the size of the cropping area 46 becomes smaller and the cropping area is located in the upper right corner of the preview image 45.
[0361] Exemplarily, in combination with Figure 11 , such as Figure 12 shown, Figure 11 and Figure 12 are taken of the same foreground object in the same shooting scene. Compared with Figure 11 , in Figure 12 , the foreground object enlarges and moves to the upper right corner of the preview image 45. Then, in Figure 12 , the size of the cropping area 46 becomes larger and the cropping area is located in the upper right corner of the preview image 45.
[0362] Generally speaking, regardless of how the distance between the foreground object and the camera and the relative position between the foreground object and the camera change, the electronic device always identifies the foreground area in each frame of the preview image and locks the cropping area, which includes the foreground area and a certain area around it.
[0363] In some embodiments of the present application, for a frame of the preview image, after determining the cropping area in the frame of the preview image, the electronic device can crop out the image of the cropping area from the frame of the preview image to obtain the image of the cropping area. Similarly, for each frame of the preview image, the electronic device can crop the image of each cropping area by using the above method, and finally, multiple frames of images of the cropping areas can be obtained. Then, the electronic device arranges the multiple frames of images of the cropping areas obtained by cropping in the order of the preview images to obtain a video with a reference duration.
[0364] In some embodiments of the present application, the above first image may be an image of a cropped area cropped from a preview image captured by a camera at the input time of the first input.
[0365] In some embodiments of the present application, the preview image captured by the camera at the input time of the first input may be referred to as the first-frame preview image, and the above first image may be an image of a cropped area cropped from the first-frame preview image, which may be referred to as an image of the first-frame cropped area. That is to say, the electronic device uses the image of the first-frame cropped area as the cover image of the live photo.
[0366] It should be noted that for other processing of the preview image, i.e., the video frame, by the electronic device, reference may be made to the relevant description in step 1011 above. To avoid repetition, it will not be elaborated here.
[0367] Step 1013: During the process of taking a live photo, the electronic device displays the image of each frame's cropped area on the shooting preview interface.
[0368] That is to say, during the process of taking a live photo, what is displayed on the shooting preview interface of the electronic device is not the actual preview image, but the image of the cropped area obtained by cropping.
[0369] In some embodiments of the present application, during the process of taking a live photo, the electronic device sequentially displays the images of each frame's cropped area on the shooting preview interface.
[0370] Exemplarily, as Figure 13 shown, during the process of taking a live photo, the electronic device sequentially displays the images 215 of each frame's cropped area on the shooting preview interface 20.
[0371] In some embodiments of the present application, in the case of using the Hitchcock forward tracking shooting method, the background objects in multiple frames of the cropped area images become smaller frame by frame. In other words, in two adjacent frames of the cropped area images, the background object in the latter frame of the cropped area image is smaller than the background object in the former frame of the cropped area image.
[0372] Exemplarily, as shown, in the case of using the Hitchcock forward tracking shooting method, during the process of taking a live photo, the size and position of the foreground object in the video remain unchanged, and the background object in the video becomes smaller frame by frame, and the deformation of the background object is represented by an arrow pointing outwards in the figure.
[0373] In some embodiments of the present application, when the camera movement mode of Hitchcock backward camera movement is adopted, the background objects in the images of multiple cropped regions gradually become larger frame by frame. In other words, in two adjacent frames of the images of the cropped regions, the background objects in the image of the latter cropped region are larger than those in the image of the former cropped region.
[0374] It should be noted that regardless of whether the camera movement mode of Hitchcock backward camera movement or the camera movement mode of Hitchcock forward camera movement is adopted, the position of the foreground object in the video remains unchanged.
[0375] In this way, during the process of taking a dynamic photo, a video with the Hitchcock special effect is displayed in real time on the shooting preview interface, so that the user can see the effect of the finished photo during the shooting process, which is convenient for the user to observe details, so as to adjust the shooting mode when needed, making the final obtained dynamic photo presenting the Hitchcock special effect more in line with the user's needs and improving the user experience.
[0376] In some embodiments of the present application, step 101 can be specifically implemented through the following step 1014, and the dynamic photo shooting method provided by the embodiments of the present application may further include the following step 1015.
[0377] Step 1014: In response to the first input, during the process of taking a dynamic photo, the electronic device identifies the foreground region in each frame of preview image displayed on the shooting preview interface, generates a video with a reference duration based on each frame of preview image, and generates a cover image based on the second image.
[0378] In some embodiments of the present application, the electronic device can identify the foreground region in each frame of preview image through methods such as image feature points, multi-point lasers, foreground recognition, and subject recognition, and the foreground region includes the foreground object.
[0379] In one example, the electronic device can locate the position and size of the foreground object in each frame of preview image through image feature points, and determine the smallest region including the foreground object as the foreground region, and the position and size of the foreground region are the position and size of the foreground object in the preview image.
[0380] In some embodiments of the present application, the above foreground region includes the foreground object.
[0381] In some embodiments of the present application, the electronic device can use each frame of preview image as a video frame, arrange multiple frames of preview images within the reference duration in sequence to obtain a video with the reference duration.
[0382] In some embodiments of the present application, the above second image is the preview image captured by the camera at the input moment of the first input.
[0383] In some embodiments of the present application, the preview image captured by the camera at the input moment of the first input may be referred to as the first-frame preview image. That is to say, the electronic device uses the first-frame preview image as the cover image of the live photo.
[0384] It should be noted that for other processing of the preview image (i.e., video frame) by the electronic device, reference can be made to the relevant description in step 1011 above. To avoid repetition, it will not be elaborated here.
[0385] Step 1015: During the process of taking a live photo, the electronic device displays each frame of the preview image on the shooting preview interface and displays a foreground frame in each frame of the preview image.
[0386] In some embodiments of the present application, the above-mentioned foreground frame can be used to frame the foreground object and guide the live photo taker to place the foreground object in the preview image. In other words, by displaying the foreground frame, the electronic device enables the live photo taker to quickly locate the position of the foreground object, so as to ensure that the foreground object is not moved out of the preview image when the electronic device is moved later.
[0387] Exemplarily, assuming that the foreground frame is at the right edge position of the preview image, after seeing the foreground frame, the live photo taker can determine that if the electronic device is moved to the left, the foreground object may disappear from the preview image. Therefore, when the live photo taker moves the electronic device later, the electronic device can be moved to the left to ensure that the foreground object is always within the shooting range of the camera, that is, the foreground object is always in the preview image.
[0388] Exemplarily, as shown, during the process of taking a live photo, the electronic device sequentially displays each frame of the preview image on the shooting preview interface 20 and displays a foreground frame 213 in the preview image.
[0389] In some embodiments of the present application, when the foreground object moves, the foreground frame moves with the foreground object.
[0390] In some embodiments of the present application, during the process of taking a live photo, the size of the foreground frame changes with the change of the shooting distance. The shooting distance refers to the distance between the foreground object and the camera or the electronic device.
[0391] In some embodiments of the present application, when the dolly-back shooting method of Hitchcock is adopted, the shooting distance becomes larger and the foreground frame becomes smaller frame by frame. In other words, when the dolly-back shooting method of Hitchcock is adopted, the shooting distance becomes larger frame by frame and the foreground frame becomes smaller frame by frame. That is, in two adjacent video frames, the foreground object in the latter video frame is farther from the camera, and the foreground frame in the latter video frame is smaller than the foreground frame in the previous video frame.
[0392] In some embodiments of the present application, in the case of using the Hitchcock forward camera movement method, the shooting distance becomes smaller and the foreground frame becomes larger frame by frame. In other words, in the case of using the Hitchcock backward camera movement method, the shooting distance becomes smaller frame by frame and the foreground frame becomes larger frame by frame. That is, in two adjacent video frames, the foreground object in the latter video frame is closer to the camera, and the foreground frame in the latter video frame is larger than the foreground frame in the previous video frame.
[0393] Exemplarily, as shown, in the case of using the Hitchcock backward camera movement method, during the process of taking a dynamic photo, the foreground object in the preview image displayed on the shooting preview interface 20 becomes smaller frame by frame, and the foreground frame displayed in the preview image also becomes smaller frame by frame along with the foreground object. For example, the foreground frame in the preview image shrinks from 213 to 214 frame by frame.
[0394] In this way, during the process of taking a dynamic photo, the actual preview images are sequentially displayed on the shooting preview interface, and the foreground frame is displayed on the preview image to ensure that the foreground object is always within the shooting range of the camera, and to prevent the foreground object from leaving the frame and affecting the effect of the dynamic photo.
[0395] In some embodiments of the present application, after the above step 102, the dynamic photo shooting method provided by the embodiments of the present application may further include the following step 103.
[0396] Step 103: The electronic device stores the cover image and the video in an associated manner, and stores each video frame in the video and the corresponding video frame acquisition parameters in an associated manner.
[0397] In some embodiments of the present application, the electronic device may store the cover image in an image file, store the video in a video file, and store the address of the image file in the video file to associate the video file and the image file, thereby realizing the associated storage of the cover image and the video.
[0398] In some embodiments of the present application, the electronic device may store each video frame and the corresponding video frame acquisition parameters of each video frame in the video file, and in the video file, store the video frames with the same timestamp and the video frame acquisition parameters in pairs.
[0399] In some embodiments of the present application, the electronic device may store multiple video frames in the order of timestamps in the video file, store multiple video frame acquisition parameters in the order of timestamps, establish an association relationship between the first video frame and the video acquisition parameters corresponding to the first video frame, and then establish association relationships between other video frames and video frame acquisition parameters in sequence.
[0400] In some embodiments of the present application, the above video frame acquisition parameters may include at least one of the following: the acquisition timestamp of the video frame, the motion data of the electronic device when acquiring the video frame, and the lens parameters when acquiring the video frame.
[0401] In some embodiments of the present application, the above motion data may include at least one of the following: gyroscope data, gravity sensor data, acceleration data, and optical image stabilization data.
[0402] Exemplarily, the gyroscope data can be used to measure the angular velocity of the electronic device to determine the attitude of the electronic device.
[0403] Exemplarily, the gravity sensor data is sourced from an accelerometer and can be used to measure the linear acceleration received by the electronic device to determine the tilt angle and dynamic movement of the electronic device.
[0404] Exemplarily, the acceleration data is also sourced from an accelerometer and can be the dynamic acceleration of the electronic device.
[0405] Exemplarily, the optical image stabilization (OIS) data is sourced from a gyroscope or a dedicated jitter sensor, and the optical image stabilization data can compensate for image blurring caused by hand shake through hardware.
[0406] In some embodiments of the present application, the lens parameters may include at least one of the following: the lens focal length change parameter, the lens number, and the aperture size.
[0407] Exemplarily, the lens focal length change parameter can be understood as the specific value of the lens focal length when acquiring a certain video frame.
[0408] Exemplarily, the electronic device may use multiple lenses to take dynamic photos, and the above lens number can be used to indicate the lens used when acquiring a certain video frame. For example, the lens number can be No. 1, No. 2, No. 3, etc.
[0409] It should be noted that the above step 103 can be executed after the above step 1012 or step 1013.
[0410] In this way, if the video in the dynamic image is generated based on the images of multiple cropped regions, when storing the dynamic image, each video frame in the video is associated and stored with the video frame acquisition parameters, and multiple video frames are connected and stored as the video stream of the dynamic photo, and the video is associated and stored with the cover image, thus forming a complete dynamic photo.
[0411] In some embodiments of the present application, after the above step 102, the dynamic photo shooting method provided by the embodiments of the present application may further include the following step 104.
[0412] Step 104: The electronic device stores the cover image and the video in an associated manner, and stores each video frame in the video, the video frame acquisition parameters corresponding to each video frame, and the change parameters corresponding to each video frame in an associated manner.
[0413] In some embodiments of the present application, the electronic device may store the cover image in a first file, store the video in a second file, and store the association relationship between the first file and the second file.
[0414] In some embodiments of the present application, the electronic device may store each video frame, the video frame acquisition parameters corresponding to each video frame, and the change parameters corresponding to each video frame in the first file in an associated manner.
[0415] It should be noted that for the explanation of the video frame acquisition parameters, reference may be made to the relevant description in the above step 103. To avoid repetition, it will not be elaborated here.
[0416] In some embodiments of the present application, the above change parameters are determined based on the position information of the cropped area in each video frame, the size of the cropped area in each video frame, and the size of each video frame.
[0417] In some embodiments of the present application, the above change parameters may include at least one of the following: scaling ratio, motion trajectory vector.
[0418] In some embodiments of the present application, the above change parameters may be used to adjust the size of the image of the cropped area in each video frame.
[0419] In some embodiments of the present application, the electronic device may crop the image of each frame of the cropped area from each video frame according to the change parameters, and adjust the size of the image of each frame of the cropped area to be the same as the size of each video frame.
[0420] In some embodiments of the present application, the electronic device may perform compression processing on the cover image and each video frame. In this way, the image volume can be reduced on the basis of retaining the original image, and the occupation of storage resources can be reduced. Exemplarily, the electronic device may perform compression processing on the cover image and each video frame using an encoding method such as H.265.
[0421] It should be noted that the above step 104 may be executed after the above step 1014 or step 1015.
[0422] Thus, if each video frame in the live photo is a complete preview image, when storing the live photo, each video frame in the video, each video frame acquisition parameter, and each change parameter of each video frame are stored in an associated manner, and multiple video frames are connected and stored as the video stream of the live photo, and the video is stored in association with the cover image, thus forming a live photo with complete original images attached.
[0423] In some embodiments of the present application, after the above step 101, the live photo shooting method provided by the embodiments of the present application may further include the following step 105.
[0424] Step 105: The electronic device displays a shooting progress animation in response to a first input.
[0425] In some embodiments of the present application, the above shooting progress animation may be used to prompt the shooting progress of the live photo.
[0426] In some embodiments of the present application, the electronic device may display the shooting progress animation on the shooting control in the shooting preview interface. At this time, the shooting control is in a non-triggerable state, which can avoid the influence of accidental touch on the process of shooting the live photo.
[0427] Exemplarily, in combination with , after the user clicks the shooting control 212, as shown, during the shooting process, the shooting control 212 may display the shooting progress animation 216 in real time. The shooting progress animation 216 is a transition animation similar to the pattern of the moon gradually changing from a new moon pattern to a full moon pattern. As shown, when shooting for a short period of time at the beginning, the shooting progress animation 216 is a pattern similar to a crescent moon. As shown, when most of the time has been shot, the shooting progress animation 216 is a pattern similar to a half moon. As shown, when the shooting is completed, the shooting progress animation 216 is a pattern similar to a full moon.
[0428] In some embodiments of the present application, the electronic device may also display the shooting progress animation in other areas of the shooting preview interface to prompt the shooting progress of the live photo. Exemplarily, the electronic device may display the shooting progress animation above or below the shooting preview interface.
[0429] Thus, by displaying the shooting progress animation during the process of shooting the live photo, the user can timely know the shooting progress of the live photo, reducing the anxiety of the user waiting.
[0430] It should be noted that the above step 105 may be executed simultaneously with the above step 102.
[0431] In some embodiments of the present application, the method for taking dynamic photos provided by the embodiments of the present application may further include the following steps 106 to 108.
[0432] Step 106: The electronic device displays an editing interface for the video.
[0433] In some embodiments of the present application, the above-mentioned editing interface may include a speed change setting control, which is used to set the playing speed of the video.
[0434] In some embodiments of the present application, the above-mentioned shooting preview interface may include a thumbnail control, which is used to display thumbnails of the latest taken photo or video.
[0435] In some embodiments of the present application, after the electronic device takes a dynamic photo, a thumbnail of the dynamic photo may be displayed in the thumbnail control of the shooting preview interface. When the user clicks on the thumbnail of the dynamic photo, the electronic device may display an image display interface and display the cover image of the dynamic photo in the image display interface. When the user long-presses the cover image, the electronic device may play the video of the dynamic photo in the image display interface.
[0436] In some embodiments of the present application, the above-mentioned image display interface includes an editing control. When playing the video of the dynamic photo in the image display interface, after the user clicks on the editing control, the electronic device may display an editing interface for the video. The editing interface includes a speed change setting control, and the user can set the playing speed of the video by triggering the speed change setting control.
[0437] In some embodiments of the present application, the above-mentioned image display interface includes an editing control. Whether the image display interface displays the cover image of the dynamic photo or a video frame, after the user clicks on the editing control, the electronic device may display an editing interface for the dynamic photo. The editing interface includes a cover image editing control and a video editing control. After the user clicks on the video editing control, the electronic device displays an editing interface for the video.
[0438] In some embodiments of the present application, the above-mentioned image display interface includes an editing control. When the image display interface displays the cover image of the dynamic photo, after the user clicks on the editing control, the electronic device may display an editing interface for the cover image, and the editing interface includes various controls for editing the cover image.
[0439] Step 107: The electronic device receives a fifth input to the speed change setting control.
[0440] In some embodiments of the present application, the above-mentioned speed change setting control includes a slider, and the above-mentioned fifth input is used to move the slider.
[0441] In some embodiments of the present application, different moving directions of the moving slider result in different adjustments to the playback speed. Exemplarily, moving the slider in the first direction means increasing the playback speed of the video, and moving the slider in the opposite direction of the first direction means decreasing the playback speed of the video.
[0442] Step 108: In response to the fifth input, the electronic device plays the video at the playback speed corresponding to the end position of the slider movement.
[0443] In some embodiments of the present application, the end position of the slider corresponds to the playback speed. The electronic device determines the new playback speed of the video based on the end position of the slider and plays the video at this new playback speed.
[0444] In some embodiments of the present application, for the variable-speed adjustment control on the above-mentioned editing interface, after the user clicks on this variable-speed adjustment control, a variable-speed setting control is displayed on the editing interface of the electronic device. By sliding the slider of this variable-speed setting control, the user can increase or decrease the playback speed of the video.
[0445] Exemplarily, as shown, video 51 is displayed on the editing interface 50, and a variable-speed adjustment control 52 is displayed on the editing interface 50. After the user clicks on this variable-speed adjustment control 52, a variable-speed setting control 53 is displayed on the editing interface 50, and there is a slider 531 on this variable-speed setting control 53. If the user slides the slider 531 to the left, the mobile phone determines the first speed based on the end position of the slider and plays the video 51 on the editing interface 50 at the first speed; if the user slides the slider 521 to the right, the mobile phone determines the second speed based on the end position of the slider and plays the video 51 on the editing interface 50 at the second speed.
[0446] In some embodiments of the present application, the electronic device can use the Hitchcock motion parameters associated with each video frame, as well as gyroscope data and timestamp parameters, to perform frame interpolation playback on the video when selecting to slow down. The number of interpolated frames is related to the end position of the slider movement, and when speeding up, it selects to perform frame decimation playback on the video, and the number of decimated frames is also related to the end position of the slider movement.
[0447] In some embodiments of the present application, the above-mentioned step 108 can be specifically implemented through the following step 1081 or step 1082.
[0448] Step 1081: In response to the fifth input, when the fifth input is an input for moving the slider in the first direction, the electronic device plays the video at the first speed.
[0449] In some embodiments of the present application, the above-mentioned first speed is greater than the third speed, and the third speed is the playback speed of the video before receiving the fifth input. In other words, moving the slider in the first direction means increasing the playback speed of the video.
[0450] In some embodiments of the present application, the above-mentioned first direction can be any one of left, right, up, and down.
[0451] Exemplarily, assuming the first direction is left, the user moves the slider to the left, and the electronic device determines the first speed corresponding to the end position where the slider moves to the left, and then plays the video of the dynamic photo at the first speed.
[0452] In some embodiments of the present application, "playing the video at the first speed" in the above step 1081 can be specifically implemented through the following step 10811.
[0453] Step 10811: The electronic device extracts M video frames from the video based on the first speed, the third speed, and the number of video frames of the video, and plays the video after frame extraction.
[0454] In some embodiments of the present application, the number of video frames of the video can be the number of video frames when the video is played at the third speed.
[0455] In some embodiments of the present application, the above-mentioned M is a positive integer, and M is less than the number of video frames of the video.
[0456] In some embodiments of the present application, the electronic device can determine the number of video frames when playing at the first speed based on the first speed, the third speed, and the number of video frames of the video, and then subtract the number of video frames from the number of video frames of the video to obtain the number of video frames M to be extracted. Then, the electronic device extracts M video frames from the video according to the method of uniform frame extraction and plays the video after the M video frames are extracted at 1x speed, so as to achieve the effect of playing the video of the dynamic photo at the first speed.
[0457] Exemplarily, the electronic device can calculate the number of video frames M to be extracted through the following formula (1).
[0458] M = Q - Q×(v3÷v1) (1)
[0459] Wherein, v3 represents the third speed, v1 represents the first speed, and Q represents the number of video frames when the video is played at the third speed.
[0460] For example, assuming the number of video frames Q of the video is 100 frames, the third speed v3 is 1x speed, and the first speed v1 is 2x speed, then substituting the values of Q, v3, and v1 into formula (1), it can be calculated that M = 100 - 100×(1÷2) = 50 frames. Another example, assuming the number of video frames Q of the video is 150 frames, the third speed v3 is 2x speed, and the first speed v1 is 3x speed, then substituting the values of Q, v3, and v1 into formula (1), it can be calculated that M = 150 - 150×(2÷3) = 50 frames.
[0461] Exemplarily, assume that the third speed is 1x speed, the number of video frames of the video is 100 frames, and the first speed is 2x speed. It is calculated that the number of video frames to be extracted is 50 frames. Then the electronic device can extract 50 video frames from 100 video frames and play the remaining 50 video frames, so as to achieve the effect of playing the video of the live photo at 2x speed.
[0462] Another exemplarily, assume that the third speed is 2x speed, the number of video frames of the video is 150 frames, and the first speed is 3x speed. It is calculated that the number of video frames to be extracted is 50 frames. Then the electronic device can extract 50 video frames from 150 video frames and play the remaining 100 video frames, so as to achieve the effect of playing the video of the live photo at 3x speed.
[0463] Step 1082: In response to the fifth input, when the fifth input is an input for moving the slider in the second direction, the electronic device plays the video at the second speed.
[0464] In some embodiments of the present application, the above-mentioned second direction is the opposite direction of the first direction, and the second speed is less than the third speed. In other words, moving the slider in the second direction means slowing down the playback speed of the video.
[0465] Exemplarily, assume that the first direction is to the right. The user moves the slider to the right. The electronic device determines the second speed corresponding to the end position of the slider moving to the right, and then plays the video of the live photo at the second speed.
[0466] In some embodiments of the present application, "playing the video at the first speed" in the above step 1082 can be specifically implemented by the following step 10821.
[0467] Step 10821: The electronic device inserts N video frames into the video based on the second speed, the third speed, and the number of video frames of the video, and plays the video after frame interpolation.
[0468] In some embodiments of the present application, the above-mentioned N is a positive integer.
[0469] In some embodiments of the present application, the number of video frames of the video can be the number of video frames when the video is played at the third speed.
[0470] In some embodiments of the present application, the electronic device may determine the number of video frames when playing at the second speed based on the second speed, the third speed, and the number of video frames of the video. Then, subtract the number of video frames when playing at the second speed from the number of video frames of the video to obtain the number of video frames N to be inserted. Next, the electronic device inserts N video frames into the video according to the method of uniform frame interpolation, and plays the video after inserting N video frames at 1x speed, thus achieving the effect of playing the video of the live photo at the second speed.
[0471] Exemplarily, the electronic device may calculate the number of video frames N to be inserted through the following formula (2).
[0472] M = Q - Q×(v3÷v2) (2)
[0473] Wherein, v3 represents the third speed, v2 represents the second speed, and Q represents the number of video frames when the video is played at the third speed.
[0474] For example, assuming that the number of video frames Q of the video is 100 frames, the third speed v3 is 1x speed, and the second speed v2 is 0.5x speed, then substituting the values of Q, v3, and v2 into formula (2), it can be calculated that N = 100×(1÷0.5) - 100 = 100 frames. Another example, assuming that the number of video frames Q of the video is 150 frames, the third speed v3 is 3x speed, and the second speed v2 is 1x speed, then substituting the values of Q, v3, and v2 into formula (2), it can be calculated that N = 150×(3÷1) - 150 = 300 frames.
[0475] Exemplarily, assuming that the third speed is 1x speed, the number of video frames of the video is 100 frames, and the first speed is 0.5x speed, and the calculated number of video frames to be inserted is 100 frames, then the electronic device may evenly insert 100 video frames into 100 video frames, and then play these 200 video frames to achieve the effect of playing the video of the live photo at 0.5x speed.
[0476] Another exemplarily, assuming that the third speed is 3x speed, the number of video frames of the video is 150 frames, and the first speed is 1x speed, and the calculated number of video frames to be inserted is 300 frames, then the electronic device may insert 300 video frames into 150 video frames, and then play these 450 video frames to achieve the effect of playing the video of the live photo at 1x speed.
[0477] In this way, the playing speed of the video can be set in the video editing interface, making the video play faster or slower, which can enhance or weaken the visual perception of spatio-temporal compression distortion, bringing a new experience to the user.
[0478] The dynamic photo shooting method provided by the embodiments of the present application can be applied to electronic devices such as smart phones, action cameras, and drones, significantly enhancing the artistic expressiveness of dynamic photos and providing a low-cost professional-level tool for film and television creation and social media content at the same time.
[0479] It should be noted that each of the above method embodiments, or various possible implementation manners in each method embodiment, can be executed alone, or any two or more of them can be combined and executed, which can be specifically determined according to actual usage requirements, and the embodiments of the present application do not limit this.
[0480] In the dynamic photo shooting method provided by the embodiments of the present application, the execution subject can be a dynamic photo shooting device. In the embodiments of the present application, taking the dynamic photo shooting device executing the dynamic photo shooting method as an example, the dynamic photo shooting device provided by the embodiments of the present application is described.
[0481] FIG. 10 is a schematic structural diagram of the dynamic photo shooting device provided by the embodiments of the present application. The dynamic photo shooting device includes: a receiving module 601 and a shooting module 602.
[0482] Among them, the receiving module 601 is used to receive a first input to the shooting preview interface.
[0483] Among them, the shooting module 602 is used to shoot a dynamic photo in response to the first input. The dynamic photo includes a video presenting a Hitchcock effect, and the position of the foreground object in the video is fixed.
[0484] In some embodiments of the present application, the above shooting preview interface includes a first control; in combination with , as shown, the above device further includes a processing module 603;
[0485] The above receiving module 601 is further used to receive a second input to the first control before receiving the first input to the shooting preview interface;
[0486] The above processing module 603 is used to start the Hitchcock shooting mode in response to the second input;
[0487] The above shooting module 602 is specifically used to shoot a dynamic photo in the Hitchcock shooting mode in response to the first input.
[0488] In some embodiments of the present application, the above shooting preview interface includes a second control and a third control; in combination with , as shown, the above device further includes a display module 604;
[0489] The above display module 604 is further configured to display a first prompt message and a first prompt box when a third input to the second control is received before receiving a first input to the shooting preview interface. The first prompt message is used to prompt the shooting operation of Hitchcock's backward dolly shot, and the area selected by the first prompt box is the maximum display range of the foreground object;
[0490] Alternatively, the above display module 604 is further configured to display a second prompt message and a second prompt box when a fourth input to the third control is received before receiving a first input to the shooting preview interface. The second prompt message is used to prompt the shooting operation of Hitchcock's forward dolly shot, and the area selected by the second prompt box is the maximum display range of the foreground object.
[0491] In some embodiments of the present application, the above display module 604 is further configured to display a first shooting guide window when a third input to the second control is received. The first shooting guide window includes dolly shot prompt information for Hitchcock's backward dolly shot and a first example file; the first example file is used to demonstrate the dolly shot effect of Hitchcock's backward dolly shot;
[0492] Alternatively, the above display module 604 is further configured to display a second shooting guide window when a fourth input to the third control is received. The second shooting guide window includes dolly shot prompt information for Hitchcock's forward dolly shot and a second example file; the second example file is used to demonstrate the dolly shot effect of Hitchcock's forward dolly shot.
[0493] In some embodiments of the present application, the first shooting guide window includes a fourth control, and the second shooting guide window includes a fifth control.
[0494] The above processing module 603 is further configured to hide the first shooting guide window in response to an input to the fourth control when the first shooting guide window is displayed before receiving a first input to the shooting preview interface;
[0495] Alternatively, the above processing module 603 is further configured to hide the second shooting guide window in response to an input to the fifth control when the second shooting guide window is displayed before receiving a first input to the shooting preview interface.
[0496] In some embodiments of the present application, the dolly shot prompt information includes at least one of the following: description information of the shooting operation steps, title of the prompt message.
[0497] In some embodiments of the present application, the above display module 604 is further configured to, when displaying the first prompt message and the first prompt box and the foreground object is within the first prompt box, update the color of the first prompt box from the first color to the second color, and display a third prompt message, where the third prompt message is used to prompt the moving direction and moving speed of the electronic device and prompt to start shooting;
[0498] Alternatively, the above display module 604 is further configured to, when displaying the second prompt message and the second prompt box and the foreground object is within the second prompt box, update the color of the second prompt box from the first color to the second color, and display a fourth prompt message, where the fourth prompt message is used to prompt the moving direction and moving speed of the electronic device and prompt to start shooting;
[0499] Wherein, the electronic device is a device for shooting dynamic photos.
[0500] In some embodiments of the present application, the above display module 604 is further configured to, after displaying the third prompt message, in response to a first input to the shooting control in the shooting preview interface, display a fifth prompt message, where the fifth prompt message is used to prompt the moving direction and moving speed of the electronic device;
[0501] Alternatively, the above display module 604 is further configured to, after displaying the fourth prompt message, in response to a first input to the shooting control in the shooting preview interface, display a sixth prompt message, where the sixth prompt message is used to prompt the moving direction and moving speed of the electronic device.
[0502] In some embodiments of the present application, the above processing module 603 is further configured to perform shooting scene detection on the shooting preview interface before receiving the first input to the shooting preview interface; and determine a camera movement mode matching the detected shooting scene;
[0503] The above display module 604 is further configured to display a seventh prompt message, where the seventh prompt message is used to prompt the camera movement mode matching the shooting scene.
[0504] In some embodiments of the present application, the dynamic photo further includes a cover image;
[0505] The above shooting module 602 is specifically configured to use the image captured by the camera at the input moment of the first input as the cover image, and start recording a video of a reference duration from the input moment.
[0506] In some embodiments of the present application, the above-mentioned shooting module 602 is specifically configured to, in response to a first input, during the process of shooting a dynamic photo, identify the foreground area in each frame of preview image displayed on the shooting preview interface, crop the image of the cropping area in each frame of preview image, generate a video with a reference duration based on the image of each cropped area, and generate a cover image based on the first image; the first image is the image of the cropped area cropped from the preview image collected by the camera at the input moment of the first input.
[0507] The above-mentioned display module 604 is further configured to, during the process of shooting a dynamic photo, display the image of each cropped area on the shooting preview interface.
[0508] Among them, the cropping area is determined based on the size of the foreground area and a reference ratio, and the foreground area includes a foreground object.
[0509] In some embodiments of the present application, the above-mentioned shooting module 602 is specifically configured to, in response to a first input, during the process of shooting a dynamic photo, identify the foreground area in each frame of preview image displayed on the shooting preview interface, generate a video with a reference duration based on each frame of preview image, and generate a cover image based on the second image, where the second image is the preview image collected by the camera at the input moment of the first input.
[0510] The above-mentioned display module 604 is further configured to, during the process of shooting a dynamic photo, display each frame of preview image on the shooting preview interface and display a foreground frame in each frame of preview image; among them, when the foreground object moves, the foreground frame moves following the foreground object.
[0511] Among them, the foreground area includes a foreground object, and the foreground frame is used to frame the foreground object and guide the dynamic photo shooter to place the foreground object in the preview image; during the process of shooting a dynamic photo, the size of the foreground frame changes with the change of the shooting distance.
[0512] In some embodiments of the present application, in the case of adopting the shooting method of Hitchcock backward dolly, as the shooting distance becomes larger, the foreground frame becomes smaller frame by frame; or, in the case of adopting the shooting method of Hitchcock forward dolly, as the shooting distance becomes smaller, the foreground frame becomes larger frame by frame.
[0513] In some embodiments of the present application, in the case of adopting the shooting method of Hitchcock backward dolly, the background object in the video becomes larger frame by frame; or, in the case of adopting the shooting method of Hitchcock forward dolly, the background object in the video becomes smaller frame by frame.
[0514] In some embodiments of the present application, the above-mentioned processing module 603 is further configured to, after shooting a dynamic photo in response to the first input, store the cover image and the video in an associated manner, and store each video frame in the video and the corresponding video frame acquisition parameters in an associated manner.
[0515] In some embodiments of the present application, the above-mentioned processing module 603 is further configured to, after taking a dynamic photo in response to a first input, store the cover image and the video in an associated manner, and store each video frame in the video, the video frame acquisition parameters corresponding to each video frame, and the change parameters corresponding to each video frame in an associated manner;
[0516] Wherein, the change parameter is determined based on the position information of the cropped area in each video frame, the size of the cropped area in each video frame, and the size of each video frame, and the change parameter is used to adjust the size of the image of the cropped area in each video frame; the change parameter includes at least one of the following: scaling ratio, motion trajectory vector.
[0517] In some embodiments of the present application, the above-mentioned video frame acquisition parameters include at least one of the following: acquisition timestamp of the video frame, motion data of the electronic device when acquiring the video frame, lens parameters when acquiring the video frame;
[0518] The above-mentioned motion data includes at least one of the following: gyroscope data, gravity sensor data, acceleration data, optical image stabilization data;
[0519] The above-mentioned lens parameters include at least one of the following: lens focal length change parameter, lens number, aperture size.
[0520] In some embodiments of the present application, the above-mentioned display module 604 is further configured to, after receiving a first input to the shooting preview interface, display a shooting progress animation in response to the first input, and the shooting progress animation is used to prompt the shooting progress of the dynamic photo.
[0521] In some embodiments of the present application, the above-mentioned display module 604 is further configured to display an editing interface of the video, and the editing interface includes a speed change setting control; the speed change setting control is used to set the playback speed of the video;
[0522] The above-mentioned receiving module 601 is further configured to receive a fifth input to the speed change setting control, the speed change setting control includes a slider, and the fifth input is used to move the slider;
[0523] The above-mentioned processing module 603 is further configured to play the video at the playback speed corresponding to the end position of the slider movement in response to the fifth input.
[0524] In some embodiments of the present application, the above-mentioned processing module 603 is specifically configured to, in response to a fifth input, when the fifth input is an input for moving the slider in a first direction, play the video at a first speed, where the first speed is greater than a third speed; the third speed is the playing speed of the video before receiving the fifth input; or, in response to the fifth input, when the fifth input is an input for moving the slider in a second direction, play the video at a second speed, where the second direction is the opposite direction of the first direction, and the second speed is less than the third speed.
[0525] In some embodiments of the present application, the above-mentioned processing module 603 is specifically configured to extract M video frames from the video based on the first speed, the third speed, and the number of video frames of the video, and play the video after frame extraction, where M is a positive integer and M is less than the number of video frames of the video.
[0526] Alternatively, the above-mentioned processing module 603 is specifically configured to insert N video frames into the video based on the second speed, the third speed, and the number of video frames of the video, and play the video after frame insertion, where N is a positive integer.
[0527] In some embodiments of the present application, the background object in the above-mentioned video gradually deforms and enlarges frame by frame as the shooting distance increases; or, the background object in the above-mentioned video gradually deforms and shrinks frame by frame as the shooting distance increases.
[0528] In some embodiments of the present application, the foreground object in the above-mentioned video gradually deforms frame by frame as the shooting distance changes.
[0529] The dynamic photo shooting device provided by the embodiments of the present application can trigger the dynamic photo shooting device to directly shoot a dynamic photo presenting the Hitchcock effect through an input to the shooting preview interface, without subsequent manual editing operations, simplifying the process of obtaining an image with the Hitchcock effect and improving the efficiency and flexibility of shooting a dynamic photo with the Hitchcock effect.
[0530] The dynamic photo shooting device in the embodiments of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a mobile Internet device, an augmented reality / virtual reality device, a robot, a wearable device, a super mobile personal computer, a netbook, or a personal digital assistant, etc., and can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.
[0531] The dynamic photo shooting device in the embodiments of the present application may be a device with an operating system. The operating system may be the Android operating system, the iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
[0532] The dynamic photo shooting device provided by the embodiments of the present application can implement all the processes implemented by the above-mentioned dynamic photo shooting method. To avoid repetition, details are not described herein again.
[0533] Optionally, as shown, the embodiments of the present application further provide an electronic device 900, including a processor 901 and a memory 902. A program or instruction that can run on the processor 901 is stored on the memory 902. When the program or instruction is executed by the processor 901, all the steps of the above-mentioned dynamic photo shooting method embodiments are implemented, and the same technical effects can be achieved. To avoid repetition, details are not described herein again.
[0534] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0535] A schematic diagram of the hardware structure of an electronic device for implementing the embodiments of the present application.
[0536] The electronic device 1000 includes, but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.
[0537] Those skilled in the art can understand that the electronic device 1000 may further include a power supply (such as a battery) for supplying power to each component. The power supply may be logically connected to the processor 1010 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The structure of the electronic device shown in does not limit the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which are not described herein again.
[0538] Among them, the user input unit 1007 is used to receive a first input to the shooting preview interface.
[0539] Among them, the camera is used to shoot a dynamic photo in response to the first input. The dynamic photo includes a video presenting a Hitchcock effect, and the position of the foreground object in the video is fixed.
[0540] In some embodiments of the present application, the above-mentioned shooting preview interface includes a first control;
[0541] The above-mentioned user input unit 1007 is further configured to receive a second input to the first control before receiving the first input to the shooting preview interface;
[0542] The above-mentioned processor 1010 is configured to start the Hitchcock shooting mode in response to the second input;
[0543] The above-mentioned shooting head is specifically configured to take a dynamic photo in the Hitchcock shooting mode in response to the first input.
[0544] In some embodiments of the present application, the above-mentioned shooting preview interface includes a second control and a third control; the above-mentioned display unit 1006 is further configured to display a first prompt message and a first prompt box before receiving the first input to the shooting preview interface when receiving a third input to the second control, the first prompt message is used to prompt the shooting operation of Hitchcock backward dolly zoom, and the area selected by the first prompt box is the maximum display range of the foreground object;
[0545] Alternatively, the above-mentioned display unit 1006 is further configured to display a second prompt message and a second prompt box before receiving the first input to the shooting preview interface when receiving a fourth input to the third control, the second prompt message is used to prompt the shooting operation of Hitchcock forward dolly zoom, and the area selected by the second prompt box is the maximum display range of the foreground object.
[0546] In some embodiments of the present application, the above-mentioned display unit 1006 is further configured to display a first shooting guidance window when receiving a third input to the second control, the first shooting guidance window includes the dolly zoom prompt message of Hitchcock backward dolly zoom and a first example file; the first example file is used to demonstrate the dolly zoom effect of Hitchcock backward dolly zoom;
[0547] Alternatively, the above-mentioned display unit 1006 is further configured to display a second shooting guidance window when receiving a fourth input to the third control, the second shooting guidance window includes the dolly zoom prompt message of Hitchcock forward dolly zoom and a second example file; the second example file is used to demonstrate the dolly zoom effect of Hitchcock forward dolly zoom.
[0548] In some embodiments of the present application, the first shooting guidance window includes a fourth control, and the second shooting guidance window includes a fifth control.
[0549] The above-mentioned processing unit 1010 is further configured to hide the first shooting guidance window in response to an input to the fourth control when the first shooting guidance window is displayed before receiving the first input to the shooting preview interface;
[0550] Alternatively, before receiving the first input to the shooting preview interface, the above-mentioned processing unit 1010 is further configured to hide the second shooting guidance window in response to the input to the fifth control when the second shooting guidance window is displayed.
[0551] In some embodiments of the present application, the camera movement prompt information includes at least one of the following: description information of the shooting operation steps, and a prompt information title.
[0552] In some embodiments of the present application, the above-mentioned display unit 1006 is further configured to update the color of the first prompt box from the first color to the second color and display the third prompt information when the first prompt information and the first prompt box are displayed and the foreground object is within the first prompt box. The third prompt information is used to prompt the moving direction and moving speed of the electronic device and prompt to start shooting.
[0553] Alternatively, the above-mentioned display unit 1006 is further configured to update the color of the second prompt box from the first color to the second color and display the fourth prompt information when the second prompt information and the second prompt box are displayed and the foreground object is within the second prompt box. The fourth prompt information is used to prompt the moving direction and moving speed of the electronic device and prompt to start shooting.
[0554] Wherein, the electronic device is a device for shooting dynamic photos.
[0555] In some embodiments of the present application, the above-mentioned display unit 1006 is further configured to display the fifth prompt information in response to the first input to the shooting control in the shooting preview interface after displaying the third prompt information. The fifth prompt information is used to prompt the moving direction and moving speed of the electronic device.
[0556] Alternatively, the above-mentioned display unit 1006 is further configured to display the sixth prompt information in response to the first input to the shooting control in the shooting preview interface after displaying the fourth prompt information. The sixth prompt information is used to prompt the moving direction and moving speed of the electronic device.
[0557] In some embodiments of the present application, the above-mentioned processing unit 1010 is further configured to perform shooting scene detection on the shooting preview interface before receiving the first input to the shooting preview interface; and determine a camera movement method matching the detected shooting scene.
[0558] The above-mentioned display unit 1006 is further configured to display the seventh prompt information, and the seventh prompt information is used to prompt the camera movement method matching the shooting scene.
[0559] In some embodiments of the present application, the dynamic photo further includes a cover image.
[0560] The above camera is specifically configured to use the image captured by the camera at the input moment of the first input as the cover image, and start recording a video of a reference duration from the input moment.
[0561] In some embodiments of the present application, the above camera is specifically configured to, in response to a first input, during the process of taking a dynamic photo, identify the foreground area in each frame of preview image displayed on the shooting preview interface, crop the image of the cropping area in each frame of preview image, generate a video of a reference duration based on the image of each cropped area, and generate a cover image based on the first image; the first image is the image of the cropped area cropped from the preview image captured by the camera at the input moment of the first input.
[0562] The above display unit 1006 is further configured to display the image of each cropped area on the shooting preview interface during the process of taking a dynamic photo.
[0563] Wherein, the cropping area is determined based on the size of the foreground area and the reference ratio, and the foreground area includes a foreground object.
[0564] In some embodiments of the present application, the above camera is specifically configured to, in response to a first input, during the process of taking a dynamic photo, identify the foreground area in each frame of preview image displayed on the shooting preview interface, generate a video of a reference duration based on each frame of preview image, and generate a cover image based on the second image, where the second image is the preview image captured by the camera at the input moment of the first input.
[0565] The above display unit 1006 is further configured to display each frame of preview image on the shooting preview interface during the process of taking a dynamic photo, and display a foreground frame in each frame of preview image; wherein, when the foreground object moves, the foreground frame moves following the foreground object.
[0566] Wherein, the foreground area includes a foreground object, and the foreground frame is used to frame the foreground object and guide the dynamic photo taker to place the foreground object in the preview image; during the process of taking a dynamic photo, the size of the foreground frame changes with the change of the shooting distance.
[0567] In some embodiments of the present application, when using the zooming-out camera movement method of Hitchcock, the shooting distance becomes larger and the foreground frame becomes smaller frame by frame; or, when using the zooming-in camera movement method of Hitchcock, the shooting distance becomes smaller and the foreground frame becomes larger frame by frame.
[0568] In some embodiments of the present application, when using the zooming-out camera movement method of Hitchcock, the background object in the video becomes larger frame by frame; or, when using the zooming-in camera movement method of Hitchcock, the background object in the video becomes smaller frame by frame.
[0569] In some embodiments of the present application, the above-mentioned processing unit 1010 is further configured to, after capturing a dynamic photo in response to a first input, associate and store the cover image with the video, and associate and store each video frame in the video with the corresponding video frame acquisition parameters.
[0570] In some embodiments of the present application, the above-mentioned processing unit 1010 is further configured to, after capturing a dynamic photo in response to a first input, associate and store the cover image with the video, and associate and store each video frame in the video, the corresponding video frame acquisition parameters of each video frame, and the change parameters corresponding to each video frame;
[0571] Wherein, the change parameters are determined based on the position information of the cropped area in each video frame, the size of the cropped area in each video frame, and the size of each video frame, and the change parameters are used to adjust the size of the image in the cropped area of each video frame; the change parameters include at least one of the following: scaling ratio, motion trajectory vector.
[0572] In some embodiments of the present application, the above-mentioned video frame acquisition parameters include at least one of the following: acquisition timestamp of the video frame, motion data of the electronic device when acquiring the video frame, lens parameters when acquiring the video frame;
[0573] The above-mentioned motion data includes at least one of the following: gyroscope data, gravity sensor data, acceleration data, optical image stabilization data;
[0574] The above-mentioned lens parameters include at least one of the following: lens focal length change parameter, lens number, aperture size.
[0575] In some embodiments of the present application, the above-mentioned display unit 1006 is further configured to, after receiving a first input to the shooting preview interface, display a shooting progress animation in response to the first input, and the shooting progress animation is used to prompt the shooting progress of the dynamic photo.
[0576] In some embodiments of the present application, the above-mentioned display unit 1006 is further configured to display an editing interface of the video, and the editing interface includes a speed change setting control; the speed change setting control is used to set the playing speed of the video;
[0577] The above-mentioned user input unit 1007 is further configured to receive a fifth input to the speed change setting control, and the speed change setting control includes a slider, and the fifth input is used to move the slider;
[0578] The above-mentioned processing unit 1010 is further configured to play the video at the playing speed corresponding to the end position of the slider movement in response to the fifth input.
[0579] In some embodiments of the present application, the above-mentioned processing unit 1010 is specifically configured to, in response to a fifth input, when the fifth input is an input for moving the slider in a first direction, play the video at a first speed, where the first speed is greater than a third speed; the third speed is the playback speed of the video before receiving the fifth input; or, in response to the fifth input, when the fifth input is an input for moving the slider in a second direction, play the video at a second speed, where the second direction is the opposite direction of the first direction, and the second speed is less than the third speed.
[0580] In some embodiments of the present application, the above-mentioned processing unit 1010 is specifically configured to extract M video frames from the video based on the first speed, the third speed, and the number of video frames of the video, and play the video after frame extraction, where M is a positive integer and M is less than the number of video frames of the video.
[0581] Alternatively, the above-mentioned processing unit 1010 is specifically configured to insert N video frames into the video based on the second speed, the third speed, and the number of video frames of the video, and play the video after frame insertion, where N is a positive integer.
[0582] In some embodiments of the present application, the background object in the above-mentioned video gradually deforms and enlarges frame by frame as the shooting distance increases; or, the background object in the above-mentioned video gradually deforms and shrinks frame by frame as the shooting distance increases.
[0583] In some embodiments of the present application, the foreground object in the above-mentioned video gradually deforms frame by frame as the shooting distance changes.
[0584] The electronic device provided by the embodiments of the present application can trigger the electronic device to directly capture a dynamic photo presenting the Hitchcock effect through the input of the shooting preview interface, without subsequent manual editing operations, simplifying the process of obtaining an image with the Hitchcock effect and improving the efficiency and flexibility of capturing a dynamic photo with the Hitchcock effect.
[0585] It should be understood that in the embodiments of the present application, the input unit 1004 may include a Graphics Processing Unit (GPU) 10041 and a microphone 10042. The graphics processor 10041 processes the image data of static pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes at least one of a touch panel 10071 and other input devices 10072. The touch panel 10071 is also referred to as a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. The other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, and a joystick, which will not be elaborated herein.
[0586] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct rambus random access memory (DRRAM). The memory 109 in the embodiments of the present application includes but is not limited to these and any other suitable types of memories.
[0587] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above modem processor may not be integrated into the processor 1010 either.
[0588] The embodiments of the present application also provide a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements each process of the above embodiments of the dynamic photo shooting method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0589] Among them, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs.
[0590] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above embodiment of the dynamic photo shooting method, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0591] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip.
[0592] The embodiments of the present application provide a computer program product. The program product is stored in a storage medium and is executed by at least one processor to implement each process of the above embodiment of the dynamic photo shooting method, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0593] It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article, or device. Without further limitations, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article, or device including that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, the features described with reference to certain examples may be combined in other examples.
[0594] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0595] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific implementation manners. The above specific implementation manners are merely illustrative rather than restrictive. Those of ordinary skill in the art, under the inspiration of the present application and without departing from the spirit and scope protected by the claims of the present application, can also make many forms, all of which fall within the protection scope of the present application.
Claims
1. A method for taking dynamic photos, characterized in that, The method includes: Receiving a first input to the shooting preview interface; In response to the first input, shooting a dynamic photo, the dynamic photo including a video presenting a Hitchcock effect, wherein the position of the foreground object in the video is fixed.
2. The method according to claim 1, wherein The shooting preview interface includes a first control; Before receiving the first input to the shooting preview interface, the method further includes: Receiving a second input to the first control; In response to the second input, starting the Hitchcock shooting mode; The shooting a dynamic photo in response to the first input includes: In response to the first input, shooting a dynamic photo in the Hitchcock shooting mode.
3. The method according to claim 1, wherein The shooting preview interface includes a second control and a third control; Before receiving the first input to the shooting preview interface, the method further includes: When a third input to the second control is received, displaying a first prompt message and a first prompt box, the first prompt message being used to prompt the shooting operation of the Hitchcock backward dolly shot, and the area selected by the first prompt box being the maximum display range of the foreground object; Or, when a fourth input to the third control is received, displaying a second prompt message and a second prompt box, the second prompt message being used to prompt the shooting operation of the Hitchcock forward dolly shot, and the area selected by the second prompt box being the maximum display range of the foreground object.
4. The method according to claim 3, wherein The method further includes: When a third input to the second control is received, displaying a first shooting guidance window, the first shooting guidance window including the dolly shot prompt information of the Hitchcock backward dolly shot and a first example file; the first example file being used to demonstrate the dolly shot effect of the Hitchcock backward dolly shot; Or, when a fourth input to the third control is received, displaying a second shooting guidance window, the second shooting guidance window including the dolly shot prompt information of the Hitchcock forward dolly shot and a second example file; the second example file being used to demonstrate the dolly shot effect of the Hitchcock forward dolly shot.
5. The method according to claim 4, wherein The first shooting guidance window includes a fourth control, and the second shooting guidance window includes a fifth control; Before receiving the first input to the shooting preview interface, the method further includes: When the first shooting guidance window is displayed, in response to an input to the fourth control, hiding the first shooting guidance window; Or, when the second shooting guidance window is displayed, in response to an input to the fifth control, hiding the second shooting guidance window.
6. The method according to claim 4, characterized in that, The dolly shot prompt information includes at least one of the following: description information of the shooting operation steps, prompt message title.
7. The method according to claim 3, characterized in that, The method further includes: When the first prompt message and the first prompt box are displayed and the foreground object is within the first prompt box, updating the color of the first prompt box from a first color to a second color, and displaying a third prompt message, the third prompt message being used to prompt the moving direction and moving speed of the electronic device and prompt the start of shooting; Alternatively, when the second prompt message and the second prompt box are displayed and the foreground object is within the second prompt box, update the color of the second prompt box from the first color to the second color, and display a fourth prompt message for prompting the moving direction and moving speed of the electronic device and prompting to start shooting. Wherein, the electronic device is the device for shooting the dynamic photo.
8. The method according to claim 7, wherein The method further includes: After the third prompt message is displayed, in response to the first input on the shooting control in the shooting preview interface, display a fifth prompt message for prompting the moving direction and moving speed of the electronic device. Alternatively, after the fourth prompt message is displayed, in response to the first input on the shooting control in the shooting preview interface, display a sixth prompt message for prompting the moving direction and moving speed of the electronic device.
9. The method according to any one of claims 1 to 3, characterized in that Before receiving the first input on the shooting preview interface, the method further includes: Performing a shooting scene detection on the shooting preview interface; Determining a camera movement mode matching the detected shooting scene; Displaying a seventh prompt message for prompting the camera movement mode matching the shooting scene.
10. The method according to claim 1, characterized in that, The dynamic photo further includes a cover image. Shooting the dynamic photo includes: Taking the image captured by the camera at the input moment of the first input as the cover image, and starting from the input moment, recording a video with a reference duration.
11. The method according to claim 10, wherein Responding to the first input and shooting a dynamic photo includes: In response to the first input, during the process of shooting the dynamic photo, identifying the foreground area in each frame of the preview image displayed in the shooting preview interface, cropping the image of the cropping area in each frame of the preview image, generating a video with a reference duration based on the image of each cropped area, and generating a cover image based on the first image; the first image is the image of the cropped area cropped from the preview image captured by the camera at the input moment of the first input. The method further includes: During the process of shooting the dynamic photo, displaying the image of each cropped area in the shooting preview interface. Wherein, the cropping area is determined based on the size and reference ratio of the foreground area, and the foreground area includes the foreground object.
12. The method according to claim 10, wherein Responding to the first input and shooting a dynamic photo includes: In response to the first input, during the process of shooting the dynamic photo, identifying the foreground area in each frame of the preview image displayed in the shooting preview interface, generating a video with a reference duration based on each frame of the preview image, and generating a cover image based on the second image, the second image being the preview image captured by the camera at the input moment of the first input. The method further includes: During the process of shooting the dynamic photo, displaying each frame of the preview image in the shooting preview interface and displaying a foreground frame in each frame of the preview image; wherein, when the foreground object moves, the foreground frame moves following the foreground object. Among them, the foreground area includes the foreground object, and the foreground frame is used to frame the foreground object and guide the dynamic photo taker to place the foreground object in the preview image; during the process of taking a dynamic photo, the size of the foreground frame changes with the change of the shooting distance.
13. The method according to claim 12, characterized in that, In the case of using the Hitchcock backward camera movement method, the shooting distance becomes larger, and the foreground frame becomes smaller frame by frame; In the case of using the Hitchcock forward camera movement method, the shooting distance becomes smaller, and the foreground frame becomes larger frame by frame.
14. The method according to claim 1, characterized in that In the case of using the Hitchcock backward camera movement method, the background object in the video becomes larger frame by frame; In the case of using the Hitchcock forward camera movement method, the background object in the video becomes smaller frame by frame.
15. The method according to claim 11, wherein After the dynamic photo is taken in response to the first input, the method further includes: Associatively storing the cover image with the video, and associatively storing each video frame in the video with the corresponding video frame acquisition parameters.
16. The method according to claim 12, wherein After the dynamic photo is taken in response to the first input, the method further includes: Associatively storing the cover image with the video, and associatively storing each video frame in the video, the video frame acquisition parameters corresponding to each video frame, and the change parameters corresponding to each video frame; Among them, the change parameter is determined based on the position information of the cropping area in each video frame, the size of the cropping area in each video frame, and the size of each video frame, and the change parameter is used to adjust the size of the image of the cropping area in each video frame; the change parameter includes at least one of the following: scaling ratio, motion trajectory vector.
17. The method according to claim 15 or 16, characterized in that The video frame acquisition parameters include at least one of the following: acquisition timestamp of the video frame, motion data of the electronic device when acquiring the video frame, lens parameters when acquiring the video frame; The motion data includes at least one of the following: gyroscope data, gravity sensor data, acceleration data, optical image stabilization data; The lens parameters include at least one of the following: lens focal length change parameter, lens number, aperture size.
18. The method according to claim 1, wherein After receiving the first input to the shooting preview interface, the method further includes: In response to the first input, displaying a shooting progress animation effect, which is used to prompt the shooting progress of the dynamic photo.
19. The method according to claim 1, wherein The method further includes: Displaying an editing interface of the video, the editing interface includes a speed change setting control; the speed change setting control is used to set the playing speed of the video; Receiving a fifth input to the speed change setting control, the speed change setting control includes a slider, and the fifth input is used to move the slider; In response to the fifth input, playing the video at the playing speed corresponding to the end position of the slider movement.
20. The method according to claim 19, wherein The playing the video at the speed corresponding to the end position of the slider movement in response to the fifth input includes: In response to the fifth input, in the case where the fifth input is an input to move the slider in the first direction, playing the video at a first speed, the first speed being greater than a third speed; the third speed is the playing speed of the video before receiving the fifth input; In response to the fifth input, when the fifth input is an input for moving the slider in the second direction, which is the opposite direction of the first direction, play the video at a second speed, where the second speed is less than the third speed.
21. The method according to claim 20, characterized in that, Said playing the video at the first speed includes: Based on the first speed, the third speed, and the number of video frames of the video, extract M video frames from the video and play the video after frame extraction, where M is a positive integer and M is less than the number of video frames of the video; Said playing the video at the second speed includes: Based on the second speed, the third speed, and the number of video frames of the video, insert N video frames into the video and play the video after frame insertion, where N is a positive integer.
22. The method according to claim 1, wherein The background object in the video gradually deforms and enlarges as the shooting distance increases; Alternatively, the background object in the video gradually deforms and shrinks as the shooting distance decreases.
23. The method according to claim 1 or 22, characterized in that, The foreground object in the video gradually deforms as the shooting distance changes.
24. A dynamic photo shooting device, characterized in that, The device includes: A receiving module, configured to receive a first input to a shooting preview interface; A shooting module, configured to, in response to the first input, shoot a dynamic photo, where the dynamic photo includes a video presenting a Hitchcock effect, and the position of the foreground object in the video is fixed.
25. The device according to claim 24, characterized in that, The shooting preview interface includes a first control; the device further includes a processing module; The receiving module, configured to receive a second input to the first control before receiving the first input to the shooting preview interface; The processing module, configured to, in response to the second input, start the Hitchcock shooting mode; The shooting module is specifically configured to, in response to the first input, shoot a dynamic photo in the Hitchcock shooting mode.
26. The device according to claim 24, characterized in that, The shooting preview interface includes a second control and a third control; the device further includes a display module; The display module is configured to, before receiving the first input to the shooting preview interface, when receiving a third input to the second control, display a first prompt message and a first prompt box, where the first prompt message is used to prompt the shooting operation of Hitchcock's backward camera movement, and the area selected by the first prompt box is the maximum display range of the foreground object; Or, The display module is configured to, before receiving the first input to the shooting preview interface, when receiving a fourth input to the third control, display a second prompt message and a second prompt box, where the second prompt message is used to prompt the shooting operation of Hitchcock's forward camera movement, and the area selected by the second prompt box is the maximum display range of the foreground object.
27. The device according to claim 26, wherein The display module is further configured to, when displaying the first prompt message and the first prompt box and the foreground object is located within the first prompt box, update the color of the first prompt box from a first color to a second color and display a third prompt message, where the third prompt message is used to prompt the moving direction and moving speed of the electronic device and prompt the start of shooting; Or, The display module is further configured to, when displaying the second prompt message and the second prompt box and the foreground object is located within the second prompt box, update the color of the second prompt box from a first color to a second color and display a fourth prompt message, where the fourth prompt message is used to prompt the moving direction and moving speed of the electronic device and prompt the start of shooting; Wherein, the electronic device is the device for shooting the dynamic photo.
28. The apparatus according to claim 27, wherein The display module is further configured to, after displaying the third prompt message, in response to the first input to the shooting control in the shooting preview interface, display a fifth prompt message, where the fifth prompt message is used to prompt the moving direction and moving speed of the electronic device; Or The display module is further configured to, after displaying the fourth prompt message, in response to the first input to the shooting control in the shooting preview interface, display a sixth prompt message, where the sixth prompt message is used to prompt the moving direction and moving speed of the electronic device.
29. An electronic device, characterized in that, It includes a processor and a memory, where the memory stores a program or instruction that can run on the processor, and when the program or instruction is executed by the processor, the steps of the dynamic photo shooting method according to any one of claims 1 to 23 are implemented.
30. A readable storage medium, characterized in that, A program or instruction is stored on the readable storage medium, and when the program or instruction is executed by the processor, the steps of the dynamic photo shooting method according to any one of claims 1 to 23 are implemented.
Citation Information
Cited By
Dynamic photo display method and system of pressure-sensitive touch screen
CN122293985A