Video shooting method and electronic device

By automatically generating video clips with different camera movement modes and compositing them into videos on electronic devices, the problem of inconvenient operation on portable devices is solved, realizing a convenient video shooting and processing workflow and improving the user experience.

CN116112786BActive Publication Date: 2025-10-24HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310070630.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-02-03
Filing Date
2020-09-30
Publication Date
2025-10-24
Estimated Expiration
2040-09-30

AI Technical Summary

Technical Problem

Existing portable electronic devices require users to manually move or rotate the device to perform "camera panning" or "camera tilting" operations, which is inconvenient.

Method used

By implementing automated video shooting methods in electronic devices, video clips with different camera movement modes can be generated and composite videos can be automatically produced. Users can select and adjust camera movement mode indicators, video clips, and add audio and images, simplifying the operation process.

Benefits of technology

It improves the ease of panning and tilting shots using portable electronic devices, simplifies the video processing workflow, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116112786B_ABST
    Figure CN116112786B_ABST
Patent Text Reader

Abstract

A video shooting method and an electronic device. The method comprises: starting a camera function; in response to a first operation of a user, determining a first recording template, the first recording template comprising a first example sample, a second example sample and a preset audio, the first example sample corresponding to a first camera movement mode, and the second example sample corresponding to a second camera movement mode; displaying a recording interface comprising a first camera movement mode identifier and a second camera movement mode identifier; in response to a second operation of the user, keeping the position of the electronic device unchanged and starting recording; and automatically generating a synthesized video, the synthesized video comprising a first video segment, a second video segment and the preset audio, the first video segment being a video segment generated according to the first camera movement mode, and the second video segment being a video segment generated according to the second camera movement mode. In this way, multiple video segments obtained through various camera movement modes can be synthesized into a video and configured with audio, and a high-quality video can be obtained through a convenient operation.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the original application with the application number 202011066518.7 and the original filing date of September 30, 2020, the entire contents of which are hereby incorporated by reference into this application.

[0002] This application claims priority to the Chinese patent application No. 201911207579.8 filed on November 29, 2019, entitled “A preview image display method in a video recording scene and an electronic device”, the entire contents of which are hereby incorporated by reference into this application; this application claims priority to the Chinese patent application No. 202010079012.3 filed on February 03, 2020, entitled “A preview image display method in a video recording scene and an electronic device”, the entire contents of which are hereby incorporated by reference into this application. TECHNICAL FIELD

[0003] The present application relates to the field of image shooting, in particular to a video shooting method and an electronic device. BACKGROUND

[0004] In order to improve the quality of shooting works, there are various camera movements in the industry, commonly known as “panning” and “tilting”. Taking a mobile phone as an example, the implementation process of “panning” can be seen in FIGS. 1(a) and 1(b), for example. FIG. 1 In the process of shooting an object, the mobile phone moves in the horizontal direction, i.e. “panning”. Assuming that the mobile phone moves from point A to point B, the preview image displayed on the display screen of the mobile phone changes due to the change of the camera viewfinder range during the movement. Of course, “panning” in the vertical direction can also be included. The upward movement can be referred to as “tilting up”, and the downward movement can be referred to as “tilting down”. The implementation process of “tilting” can be seen in FIGS. 2(a) and 2(b), for example. FIG. 1 In the process of shooting an object, the mobile phone rotates around the center axis. The center axis is, for example, the perpendicular line of the short side of the mobile phone on the plane where the display screen of the mobile phone is located. If the mobile phone rotates to the left around the center axis, i.e. “tilting” to the left, as shown in FIG. 3(b); if the mobile phone rotates to the right around the center axis, i.e. “tilting” to the right, as shown in FIG. 3(c). FIG. 1 FIG. 1

[0005] That is, if a user wants to implement the above-mentioned “panning” or “tilting” and other camera movement shooting methods through a portable electronic device (such as a mobile phone), the user needs to move or rotate the mobile phone, which is not convenient enough to operate. SUMMARY

[0006] The purpose of the present application is to provide a video shooting method and an electronic device, which improves the convenience of implementing “panning” and “tilting” and other camera movement shooting methods through a mobile phone.

[0007] ​​In a first aspect, a video shooting method is provided. The method is applied to an electronic device and includes: starting a camera function; in response to a first operation of a user, determining a first recording template, the first recording template including a first example clip, a second example clip, and a preset audio, the first example clip corresponding to a first camera movement mode, the second example clip corresponding to a second camera movement mode, the first camera movement mode being different from the second camera movement mode; displaying a recording interface, the recording interface including a first camera movement mode identifier and a second camera movement mode identifier; in response to a second operation of the user, keeping a position of the electronic device unchanged and starting recording; and automatically generating a synthesized video, the synthesized video including a first video segment, a second video segment, and the preset audio, the first video segment being a video segment generated by the electronic device according to the first camera movement mode, the second video segment being a video segment generated by the electronic device according to the second camera movement mode.

[0008] Therefore, in this way, each video segment obtained by various camera movement modes can be synthesized into a video, and the synthesized video can be configured with a preset audio, so that a high-quality video can be obtained through a convenient operation. The synthesized video can be directly used for uploading to a social network or sending to a contact, without a complex video processing process, so that the operation is simple and the user experience is good.

[0009] In a possible design, in response to the second operation of the user, keeping the position of the electronic device unchanged and starting recording includes: when the first camera movement mode identifier is selected, in response to an operation of the user indicating shooting, generating the first video segment according to the first camera movement mode, the first video segment having a first preset time length; and when the second camera movement mode identifier is selected, in response to an operation of the user indicating shooting, generating the second video segment according to the second camera movement mode, the second video segment having a second preset time length.

[0010] That is, for each camera movement mode, the user can control starting recording and / or stopping recording. For example, the first recording template includes multiple camera movement modes, and a recording time length corresponding to each camera movement mode can be a preset fixed time length, that is, stopping shooting when the preset time length is reached; or, the recording time length can be a non-preset time length, for example, the user controls the mobile phone to start and stop recording by using a shooting control in a viewfinder interface.

[0011] In a possible design, when the first video segment is generated according to the first camera movement mode, the recording interface further displays a countdown of generating the first video segment according to the first camera movement mode; and when the second video segment is generated according to the second camera movement mode, the recording interface further displays a countdown of generating the second video segment according to the second camera movement mode.

[0012] That is, the electronic device can display a countdown of the recording time to facilitate the user to master the recording progress (such as the remaining recording time), and the interactive experience is good.

[0013] In a possible design, the method further includes: displaying a recording interface, the recording interface including a first camera operation mode identifier and a second camera operation mode identifier; in response to a third operation of the user, deleting the first camera operation mode identifier or the second camera operation mode identifier; in response to a fourth operation of the user, keeping the position of the electronic device unchanged and starting recording; and automatically generating a synthesized video, the synthesized video including video clips generated by the electronic device according to the camera operation mode corresponding to the un-deleted camera operation mode identifier and further including preset audio.

[0014] That is, the user can delete a certain camera operation mode identifier, for example, the user deletes the camera operation mode identifier corresponding to a camera operation mode that the user does not like, and then the corresponding camera operation mode is deleted, and the video clips generated according to the camera operation mode corresponding to the remaining camera operation mode identifiers are synthesized into a video.

[0015] In a possible design, the method further includes: displaying a recording interface, the recording interface including a first camera operation mode identifier and a second camera operation mode identifier; in response to a third operation of the user, adding a third camera operation mode identifier in the recording interface, the third camera operation mode identifier being used to indicate a third camera operation mode; in response to a fourth operation of the user, keeping the position of the electronic device unchanged and starting recording; and automatically generating a synthesized video, the synthesized video including the first video clip, the second video clip, a third video clip, and the preset audio, the third video clip being a video clip generated by the electronic device according to the third camera operation mode.

[0016] That is, assuming that the user likes a certain camera operation mode, the user can add the camera operation mode identifier of the camera operation mode, and then the corresponding camera operation mode is added, and the video clips generated according to the original camera operation mode and the video clips generated according to the added camera operation mode are synthesized into a video.

[0017] In a possible design, the method further includes: displaying a recording interface, the recording interface including a first camera operation mode identifier and a second camera operation mode identifier; in response to a third operation of the user, adjusting the display order of the first camera operation mode identifier and the second camera operation mode identifier to be a first order; in response to a fourth operation of the user, keeping the position of the electronic device unchanged and starting recording; and automatically generating a synthesized video, the first video clip and the second video clip in the synthesized video being played in the first order.

[0018] That is, the user can adjust the display order of the camera operation mode identifier, and then the synthesis order of the video clips is adjusted, and the play order of the two video clips in the synthesized video is also adjusted.

[0019] In a possible design, the first sample and / or the second sample are displayed in the recording interface.

[0020] In the recording interface, the first sample is used to facilitate the user to view the shooting effect of the first camera movement mode, and the second sample is used to facilitate the user to view the shooting effect of the second camera movement mode, so that the interactive experience is better.

[0021] In a possible design, before the automatically generating the synthesized video, the method further includes: displaying a display interface, wherein the display interface includes the first video segment and the second video segment; and automatically generating the synthesized video, including: in response to a video synthesis instruction input by the user, synthesizing the video.

[0022] That is, before the synthesized video is generated, the user can also view the first video segment and the second video segment respectively, and assuming that the user is satisfied with both the video segments, the synthesized video is generated in response to a trigger operation of the user.

[0023] In a possible design, the method further includes: in response to the fourth operation, deleting the first video segment or the second video segment; or adding a local third video segment to the synthesized video; or adjusting the playing order of the first video segment or the second video segment in the synthesized video.

[0024] That is, the user can delete a video segment, for example, delete a segment that the user is not satisfied with, or add a video segment that the user likes from the local, or adjust the playing order between the two video segments in the synthesized video. In summary, the user can flexibly set the synthesized video, and the interactive experience is better.

[0025] In a possible design, the first recording template is a default template or a user-defined template.

[0026] That is, the user can not only use the default template of the electronic device, but also can define a template, for example, set a template that the user likes, so that the interactive experience is better.

[0027] In a possible design, the method further includes: automatically storing the first video segment, the second video segment, and the synthesized video. That is, the electronic device can automatically store each video segment and the video synthesized by each video segment, so that the user can view each individual video segment locally and can also view the synthesized video, and the user experience is better, for example, the user can upload an individual video segment to a social network, and can also upload the synthesized video to the social network.

[0028] In one possible design, the method further includes: in response to a specific operation, changing the audio in the composite video, or adding text and / or images to the composite video. In other words, the user can change the audio in the composite video, or add text, images, etc. to the composite video, providing a better interactive experience.

[0029] In a second aspect, an electronic device is further provided, including:

[0030] one or more processors;

[0031] one or more memories;

[0032] The one or more memories store one or more computer programs, and the one or more computer programs include instructions. When the instructions are executed by the one or more processors, the electronic device performs the following steps:

[0033] Start the camera function;

[0034] In response to a first user operation, determining a first video template, the first video template including a first example clip, a second example clip, and preset audio, the first example clip corresponding to a first camera movement mode, the second example clip corresponding to a second camera movement mode, wherein the first camera movement mode and the second camera movement mode are different;

[0035] Displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier;

[0036] In response to a second user operation, keeping the electronic device stationary and starting video recording;

[0037] Automatically generate a composite video, wherein the composite video includes a first video clip, a second video clip and the preset audio, wherein the first video clip is a video clip generated by the electronic device according to the first camera movement mode, and the second video clip is a video clip generated by the electronic device according to the second camera movement mode.

[0038] In one possible design, when the instruction is executed by the one or more processors, the electronic device specifically performs the following steps:

[0039] When the first camera movement mode identifier is selected, in response to a user instruction to shoot, generating the first video segment according to the first camera movement mode, wherein the duration of the first video segment is a first preset duration;

[0040] When the second camera movement mode identifier is selected, in response to a user's instruction to shoot, the second video segment is generated according to the second camera movement mode, and the duration of the second video segment is a second preset duration.

[0041] In a possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following steps:

[0042] When the first video clip is generated according to the first dolly mode, a countdown for generating the first video clip according to the first dolly mode is further displayed in the recording interface; and when the second video clip is generated according to the second dolly mode, a countdown for generating the second video clip according to the second dolly mode is further displayed in the recording interface.

[0043] In a possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following steps:

[0044] displaying a recording interface, wherein the recording interface includes a first dolly mode identifier and a second dolly mode identifier;

[0045] in response to a third operation of a user, deleting the first dolly mode identifier or the second dolly mode identifier;

[0046] in response to a fourth operation of the user, keeping the position of the electronic device unchanged and starting recording;

[0047] automatically generating a synthetic video, wherein the synthetic video includes a video clip generated by the electronic device according to the undelleted dolly mode and the preset audio.

[0048] In a possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following steps:

[0049] displaying a recording interface, wherein the recording interface includes a first dolly mode identifier and a second dolly mode identifier;

[0050] in response to a third operation of a user, adding a third dolly mode identifier to the recording interface, wherein the third dolly mode identifier is used to indicate a third dolly mode;

[0051] in response to a fourth operation of the user, keeping the position of the electronic device unchanged and starting recording;

[0052] automatically generating a synthetic video, wherein the synthetic video includes the first video clip, the second video clip, a third video clip, and the preset audio, and the third video clip is a video clip generated by the electronic device according to the third dolly mode.

[0053] In a possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following steps:

[0054] display a recording interface, wherein the recording interface comprises a first camera movement mode identifier and a second camera movement mode identifier;

[0055] in response to a third operation of the user, adjusting a display order of the first camera movement mode identifier and the second camera movement mode identifier to a first order;

[0056] in response to a fourth operation of the user, keeping a position of the electronic device unchanged and starting recording;

[0057] automatically generating a synthesized video, wherein a play order of the first video clip and the second video clip in the synthesized video is the first order.

[0058] In a possible design, the recording interface displays the first sample and / or the second sample.

[0059] In a possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following steps:

[0060] displaying a presentation interface, wherein the presentation interface comprises the first video clip and the second video clip;

[0061] automatically generating a synthesized video, comprising: in response to a video synthesis instruction input by the user, synthesizing a video.

[0062] In a possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following steps:

[0063] in response to the fourth operation, deleting the first video clip or the second video clip, or adding a local third video clip to the synthesized video, or adjusting a play order of the first video clip or the second video clip in the synthesized video.

[0064] In a possible design, the first recording template is a default template or a user-defined template.

[0065] In a possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following steps:

[0066] automatically storing the first video clip and the second video clip, and the synthesized video.

[0067] In a possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following steps:

[0068] in response to a specific operation, replacing audio in the synthesized video, or adding text and / or pictures to the synthesized video.

[0069] In a third aspect, the embodiments of the present application further provide an electronic device, which includes modules / units for performing the method of the first aspect or any possible design of the first aspect; these modules / units can be implemented by hardware, or implemented by hardware executing corresponding software.

[0070] In a fourth aspect, the embodiments of the present application further provide a chip, which is coupled with a memory in an electronic device, and used for calling a computer program stored in the memory and executing the technical solutions of the first aspect and any possible design of the first aspect of the embodiments of the present application; in the embodiments of the present application, “coupled” means that two components are directly or indirectly combined with each other.

[0071] In a fifth aspect, a computer readable storage medium is further provided, which includes a computer program, and when the computer program is running on an electronic device, the electronic device is caused to perform the method provided in the first aspect.

[0072] In a sixth aspect, a program product is further provided, which includes instructions, and when the instructions are running on a computer, the computer is caused to perform the method provided in the first aspect.

[0073] In a seventh aspect, a graphical user interface on an electronic device is further provided, the electronic device has a display screen, one or more memories, and one or more processors, the one or more processors are used to execute one or more computer programs stored in the one or more memories, and the graphical user interface includes the graphical user interface displayed when the electronic device executes the method provided in the first aspect.

[0074] The beneficial effects of the second aspect to the seventh aspect are the same as those of the first aspect, and will not be repeated here.

[0075] In an eighth aspect, a method for displaying a preview image in a video recording scenario is provided, which is applied to an electronic device, such as a mobile phone or a tablet computer. The electronic device detects a first operation for opening a camera; in response to the first operation, the camera is activated; a second operation for indicating a first video recording mode is detected; in response to the second operation, a framing interface is displayed on the display screen of the electronic device, wherein the framing interface includes a first preview image, wherein the first preview image is a first image block located in a first area of ​​a first image captured by a first wide-angle camera of the electronic device; the position of the electronic device is kept fixed, and a third operation indicating a direction of image movement is detected; in response to the third operation, a second preview image is displayed on the framing interface, wherein the second preview image is a second image block located in a second area of ​​a second image captured by the first wide-angle camera, or the second preview image is an image block obtained by performing perspective conversion processing on the second image block; wherein the orientation of the second area relative to the first area is related to the direction of image movement.

[0076] For example, when a user is recording a video with their phone, the preview image includes Scene A directly in front of the user, but not Scene B to the right and in front of the user. Keeping the phone still, the user inputs an instruction to move the image right (for example, via the touch screen), and the preview image is updated to include Scene B to the right and in front of the user (for example, excluding Scene A). Therefore, even with the electronic device still in place, shooting methods such as "panning" or "shaking" can be achieved, providing a higher user experience.

[0077] It should be understood that the orientation of the second area relative to the first area is related to the image movement direction, including: the orientation of the second area relative to the first area is the same as or opposite to the image movement direction, which is not limited in this embodiment of the application. For example, the user can set the orientation of the second area relative to the first area to be the same as or opposite to the image movement direction.

[0078] In one possible design, the orientation of the second area relative to the first area is related to the direction of image movement, including: the distance between the second area and the first edge of the second image is a second distance, the distance between the first area and the first edge of the first image is a first distance, and the change in the second distance relative to the first distance is related to the direction of image movement.

[0079] For example, assuming that the first area is at a distance H from the left edge of the first image, and the second area is at a distance H+A from the left edge of the second image, when A is a positive number, it indicates that the second area is to the right relative to the first area; when A is a negative number, it indicates that the second area is to the left relative to the first area.

[0080] As an example, the electronic device determines a third region on a third image, the third region having a second orientation change amount relative to the second region equal to a first orientation change amount of the second region relative to the first region; displays a third preview image in the viewfinder interface, the third preview image being a third image block on the third image within the third region, or being an image block obtained after the third image block is subjected to a perspective conversion process; wherein the second orientation change amount is a third distance change amount relative to a second distance, the first orientation change amount is a second distance change amount relative to a first distance, the third distance is a distance between the third region and a first edge of the third image; the second distance is a distance between the second region and a first edge of the second image; and the first distance is a distance between the first region and a first edge of the first image.

[0081] That is, the change amount of the position of each preview image on the image captured by the first wide-angle camera is the same. Therefore, visually, the preview images in the viewfinder interface move at a constant speed, and the user experience is higher.

[0082] As another example, the second orientation change amount of the third region relative to the second region can also be greater than the first orientation change amount of the second region relative to the first region. Therefore, visually, the preview images in the viewfinder interface move at an accelerated speed, and have a certain rhythm and visual impact.

[0083] Of course, the second orientation change amount of the third region relative to the second region can also be less than the first orientation change amount of the second region relative to the first region. Therefore, visually, the preview images in the viewfinder interface move at a decelerated speed, and the video recording flexibility and interest are higher.

[0084] In a possible design, before the electronic device enters the first video recording mode, the viewfinder interface displays a fourth preview image, the fourth preview image being an image captured by a second wide-angle camera, the field of view of the second wide-angle camera being smaller than the field of view of the first wide-angle camera; and the first preview image being all or part of the image block in the range of the field of view of the first wide-angle camera and the second wide-angle camera. That is, when switching from another mode to the first video recording mode, the first wide-angle camera with a larger field of view is started, and the first image block within the first region on the first image captured by the first wide-angle camera is displayed in the viewfinder interface. The image range captured by the camera with a larger field of view is larger, and more details are included. The movable range of the position of the first region on the image is larger, and the shooting mode of moving the lens or panning the lens can be realized in a larger movable range, and the user experience is higher.

[0085] It should be understood that the magnification of the image captured by the second wide-angle camera is less than or equal to the magnification of the image captured by the first wide-angle camera.

[0086] The third operation includes a sliding operation on the first preview image, or

[0087] an operation on a control in the viewfinder interface for indicating an image rotation direction, or

[0088] an operation of pressing a specific control in the viewfinder interface and dragging.

[0089] It should be understood that the above is only an example of the third operation, and other operations for inputting an image movement direction are also possible, and the embodiments of the present application are not limited.

[0090] It can be understood that when the image stop moving instruction is detected, the viewfinder interface displays a fifth preview image, the fifth preview image is a fifth image block on a fifth image captured by the first wide-angle camera and located in a fifth region, or the fifth preview image is an image block obtained after the fifth image block is processed through a perspective conversion; the orientation of the fifth region relative to the second region is unchanged. That is, when the image stop moving instruction is detected, the orientation of the preview image on the image no longer changes, and the position of the preview image in the viewfinder interface no longer changes visually.

[0091] It can be understood that when the electronic device detects the image stop moving instruction, a video is generated and saved, and the video includes the second preview image. That is, when the electronic device detects the image stop moving instruction, a video is automatically generated and saved, which is convenient for operation and improves user experience.

[0092] The detection of the image stop moving instruction includes:

[0093] When the third operation is a sliding operation on the first preview image, the image stop moving instruction is generated when the sliding operation is detected to be released; or

[0094] When the third operation is a click operation on a control in the viewfinder interface for indicating an image movement direction, the image stop moving instruction is generated when a re-click operation at any position in the viewfinder interface is detected, or

[0095] When the third operation is a long press operation on a control in the viewfinder interface for indicating an image movement direction, the image stop moving instruction is generated when the long press operation is detected to be released, or

[0096] When the third operation is a press-and-drag operation on a specific control in the framing interface, the image stop moving instruction is generated when the drag operation is detected to be released.

[0097] It should be noted that the image stop moving instruction is only an example, and other image stop moving instructions are also feasible, and the embodiments of the present application are not limited.

[0098] For example, the second image is one of M images extracted from N images collected by the first wide-angle camera, N is an integer greater than or equal to 1, and M is an integer less than N. The frame extraction and playing can achieve the effect of fast playing. Therefore, the preview image can be played quickly. Alternatively, the second image is one of M images obtained after inserting multiple images into N images collected by the first wide-angle camera, N is an integer greater than or equal to 1, and M is an integer greater than N. The frame insertion and playing can achieve the effect of slow playing. Therefore, the preview image can be played slowly.

[0099] The image block obtained after the second image block is subjected to the perspective conversion processing satisfies the following formula:

[0100] x' = x*cos(θ) - sin(θ)*y

[0101] y' = x*sin(θ) + cos(θ)*y

[0102] Where (x', y') is a pixel point on the image block obtained after the perspective conversion processing, (x, y) is a pixel point on the second image block, and θ is a rotation angle, which is preset. The electronic device converts the image block through the above formula, so that the preview image is more consistent with the preview image presented when the mobile phone is shaken in the real situation. Therefore, in the case that the position of the electronic device remains unchanged, the user can realize the shooting mode of moving the lens or shaking the lens through the electronic device, and the user experience is higher.

[0103] In a ninth aspect, a display method of a preview image in a video recording scenario is provided. The method is applied to an electronic device. The electronic device detects a first operation for opening a camera. In response to the first operation, the camera is started. A second operation for indicating a first video recording mode is detected. In response to the second operation, a viewfinder interface is displayed on a display screen of the electronic device. The viewfinder interface includes a first preview image. The first preview image is a first image captured by a camera on the electronic device. The position of the electronic device is kept fixed. A third operation for indicating an image rotation direction is detected. In response to the third operation, a second preview image is displayed in the viewfinder interface. The second preview image is an image obtained by rotating a second image captured by the camera in the image rotation direction. That is, during video recording, the preview image in the viewfinder interface can be rotated, achieving the effect of image rotation shooting, and the user experience is high.

[0104] In a possible design, the viewfinder interface displays a third preview image. The third preview image is an image obtained by rotating a third image captured by the camera in the image rotation direction. The rotation angle of the third image relative to the second image is the same as the rotation angle of the second image relative to the first image.

[0105] That is, during video recording, the preview image in the viewfinder interface is rotated by the same angle each time, that is, the image is rotated at a constant speed, achieving the effect of rotation shooting.

[0106] For example, the camera is a first wide-angle camera. The first image is a first image block in a first region of a fourth image captured by the first wide-angle camera. The second image is a second image block in a second region of a fifth image captured by the first wide-angle camera. The position of the first region on the fourth image and the position of the second region on the fifth image are the same or different.

[0107] The third operation includes a circle operation on the first preview image, or

[0108] The operation is performed on a control in the viewfinder interface for indicating the image rotation direction.

[0109] It should be understood that the above is only an example of the third operation, and is not limited thereto. Other operations for inputting the image movement direction are also possible, and the embodiments of the present application are not limited thereto.

[0110] In a possible design, when the electronic device detects an image stop rotation instruction, a video is generated and saved. The video includes the second preview image. That is, when the electronic device detects the image stop rotation instruction, a video is automatically generated and saved, which is convenient and improves the user experience.

[0111] The image rotation stopping instruction detected in the above includes:

[0112] The third operation is that when a circle operation on the first preview image is detected, the image rotation stopping instruction is generated when the circle operation is detected to be popped up; or,

[0113] The third operation is that when a click operation on a control in the viewfinder interface for indicating an image rotation direction is detected, the image rotation stopping instruction is generated when a re-click operation at any position in the viewfinder interface is detected, or,

[0114] The third operation is that when a long press operation on a control in the viewfinder interface for indicating an image rotation direction is detected, the image rotation stopping instruction is generated when the long press operation is detected to be popped up.

[0115] It should be noted that the image rotation stopping instruction described above is only an example and is not limited, and other image rotation stopping instructions are also feasible, and the embodiments of the present application are not limited.

[0116] The second image is one of M images extracted from N images collected by the first camera, N is an integer greater than or equal to 1, and M is an integer less than N. The frame extraction and playback can achieve the effect of fast playback. Therefore, the preview image can be played quickly. Alternatively, the second image is one of M images obtained after inserting multiple images into N images collected by the first camera, N is an integer greater than or equal to 1, and M is an integer greater than N. The frame insertion and playback can achieve the effect of slow playback, so the preview image can be played slowly.

[0117] The tenth aspect further provides an electronic device, comprising: one or more processors; one or more memories; wherein the one or more memories store one or more computer programs, the one or more computer programs comprise instructions, when the instructions are executed by the one or more processors, the electronic device executes the following steps:

[0118] Detecting a first operation for opening a camera;

[0119] In response to the first operation, starting the camera;

[0120] Detecting a second operation for indicating a first video recording mode;

[0121] In response to the second operation, displaying a viewfinder interface on the display screen of the electronic device, the viewfinder interface includes a first preview image, and the first preview image is a first image block in a first region of a first image collected by a first wide-angle camera on the electronic device.

[0122] keeping the position of the electronic device fixed, detecting a third operation indicating an image moving direction;

[0123] in response to the third operation, displaying a second preview image in the viewfinder interface, the second preview image being a second image block in a second region on a second image captured by the first wide-angle camera, or the second preview image being an image block obtained after performing a perspective conversion on the second image block; wherein an orientation of the second region relative to the first region is related to the image moving direction.

[0124] In a possible design, the orientation of the second region relative to the first region is related to the image moving direction, including that the orientation of the second region relative to the first region is the same as or opposite to the image moving direction.

[0125] In a possible design, the orientation of the second region relative to the first region is related to the image moving direction, including that a distance between the second region and a first edge of the second image is a second distance, a distance between the first region and a first edge of the first image is a first distance, and a distance change amount of the second distance relative to the first distance is related to the image moving direction.

[0126] In a possible design, when the instructions are executed by the one or more processors, the electronic device is caused to perform the following steps:

[0127] displaying a third preview image in the viewfinder interface, the third preview image being a third image block in a third region on a third image, or being an image block obtained after performing a perspective conversion on the third image block, and a second orientation change amount of the third region relative to the second region being equal to a first orientation change amount of the second region relative to the first region;

[0128] wherein the second orientation change amount is a distance change amount of a third distance relative to a second distance, the first orientation change amount is a distance change amount of the second distance relative to a first distance, the third distance is a distance between the third region and a first edge of the third image, the second distance is a distance between the second region and a first edge of the second image, and the first distance is a distance between the first region and a first edge of the first image.

[0129] In a possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following step: before detecting the second operation for indicating the first recording mode, displaying a fourth preview image in the viewfinder interface, the fourth preview image being an image captured by a second wide-angle camera, the field of view of the second wide-angle camera being smaller than the field of view of the first wide-angle camera; the first preview image being all or part of an image block in the field of view overlap range of the first wide-angle camera and the second wide-angle camera.

[0130] In a possible design, the magnification of the image captured by the second wide-angle camera is less than or equal to the magnification of the image captured by the first wide-angle camera.

[0131] The third operation described above includes:

[0132] a sliding operation on the first preview image; or

[0133] an operation on a control in the viewfinder interface for indicating an image rotation direction, or

[0134] an operation of pressing a specific control in the viewfinder interface and dragging.

[0135] In a possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following step: when detecting the image stop moving instruction, the viewfinder interface displays a fifth preview image, the fifth preview image being a fifth image block in a fifth region of a fifth image captured by the first wide-angle camera, or the fifth preview image being an image block obtained by performing a perspective conversion on the fifth image block; the orientation of the fifth region relative to the second region being unchanged.

[0136] In a possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following step: when detecting the image stop moving instruction, generating and saving a video, the video including the first preview image and the second preview image.

[0137] In a possible design, when the instructions are executed by the one or more processors, the electronic device specifically performs the following steps:

[0138] when the third operation is a sliding operation on the first preview image, the image stop moving instruction is generated when detecting that the sliding operation is lifted; or

[0139] The third operation is a long press operation on a control in the viewfinder interface for indicating the image moving direction, and the image stop moving instruction is generated when the long press operation is detected to be released, or

[0140] The third operation is a long press operation on a control in the viewfinder interface for indicating the image moving direction, and the image stop moving instruction is generated when the long press operation is detected to be released, or

[0141] The third operation is a press-and-drag operation on a specific control in the viewfinder interface, and the image stop moving instruction is generated when the drag operation is detected to be released.

[0142] The second image is one of M images extracted from N images collected by the first wide-angle camera, N is an integer greater than or equal to 1, and M is an integer less than N; or the second image is one of M images obtained after inserting multiple images into N images collected by the first wide-angle camera, N is an integer greater than or equal to 1, and M is an integer greater than N.

[0143] In a possible design, the image block obtained after the second image block is subjected to the perspective conversion processing satisfies the following formula:

[0144] x' = x*cos(θ) - sin(θ)*y

[0145] y' = x*sin(θ) + cos(θ)*y

[0146] Where (x', y') is a pixel point on the image block obtained after the perspective conversion processing, (x, y) is a pixel point on the second image block, and θ is a rotation angle, which is preset.

[0147] The eleventh aspect further provides an electronic device, including: one or more processors; one or more memories; wherein the one or more memories store one or more computer programs, the one or more computer programs include instructions, when the instructions are executed by the one or more processors, the electronic device performs the following steps:

[0148] detecting a first operation for opening a camera; in response to the first operation, starting the camera; detecting a second operation for indicating a first recording mode; in response to the second operation, displaying a viewfinder interface on a display screen of the electronic device, the viewfinder interface including a first preview image, the first preview image being a first image captured by a camera on the electronic device; keeping the position of the electronic device fixed, detecting a third operation for indicating an image rotation direction; in response to the third operation, displaying a second preview image in the viewfinder interface, the second preview image being an image obtained by rotating a second image captured by the camera according to the image rotation direction.

[0149] In a possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following steps:

[0150] The viewfinder interface displays a third preview image, the third preview image being an image obtained by rotating a third image captured by the camera according to the image rotation direction, the rotation angle of the third image relative to the second image being the same as the rotation angle of the second image relative to the first image.

[0151] In a possible design, the camera is a first wide-angle camera, the first image is a first image block in a first region of a fourth image captured by the first wide-angle camera, and the second image is a second image block in a second region of a fifth image captured by the first wide-angle camera, the position of the first region on the fourth image being the same as or different from the position of the second region on the fifth image.

[0152] The third operation includes:

[0153] a circle-drawing operation on the first preview image; or

[0154] an operation on a control in the viewfinder interface for indicating the image rotation direction.

[0155] In a possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following steps: detecting an image stop-rotation instruction, and generating and saving a video, the video including the first preview image and the second preview image.

[0156] In a possible design, when the instructions are executed by the one or more processors, the electronic device specifically performs the following steps:

[0157] When the third operation is a circle-drawing operation on the first preview image, the image stop-rotation instruction is generated when the circle-drawing operation is popped up; or

[0158] The third operation is a long press operation on the control in the viewfinder interface for indicating the image rotation direction, and the image stop rotation instruction is generated when the long press operation is detected to be released.

[0159] The third operation is a long press operation on the control in the viewfinder interface for indicating the image rotation direction, and the image stop rotation instruction is generated when the long press operation is detected to be released.

[0160] The second image is one of M images extracted from N images collected by the first camera, N is an integer greater than or equal to 1, and M is an integer less than N; or the second image is one of M images obtained by inserting multiple images into N images collected by the first camera, N is an integer greater than or equal to 1, and M is an integer greater than N.

[0161] The twelfth aspect further provides an electronic device, which includes modules / units for performing the method of the eighth aspect or any possible design of the eighth aspect; these modules / units can be implemented by hardware, or by hardware executing corresponding software.

[0162] The thirteenth aspect further provides an electronic device, which includes modules / units for performing the method of the ninth aspect or any possible design of the ninth aspect; these modules / units can be implemented by hardware, or by hardware executing corresponding software.

[0163] The fourteenth aspect further provides a chip, which is coupled with a memory in an electronic device, and performs the technical solutions of the eighth aspect and any possible design of the eighth aspect of the embodiments of the present application; in the embodiments of the present application, "coupled" means that two components are directly or indirectly combined with each other.

[0164] The fifteenth aspect further provides a chip, which is coupled with a memory in an electronic device, and performs the technical solutions of the ninth aspect and any possible design of the ninth aspect of the embodiments of the present application; in the embodiments of the present application, "coupled" means that two components are directly or indirectly combined with each other.

[0165] The sixteenth aspect further provides a computer readable storage medium, which includes a computer program, and when the computer program runs on an electronic device, the electronic device executes the technical solutions of the eighth aspect and any possible design of the eighth aspect.

[0166] The seventeenth aspect further provides a computer readable storage medium, which comprises a computer program, and when the computer program runs on an electronic device, the electronic device is caused to execute the technical solutions of the ninth aspect and any possible design of the ninth aspect.

[0167] The eighteenth aspect further provides a program product, which comprises instructions, and when the instructions run on a computer, the computer is caused to execute the technical solutions of the eighth aspect and any possible design of the eighth aspect.

[0168] The nineteenth aspect further provides a program product, which comprises instructions, and when the instructions run on a computer, the computer is caused to execute the technical solutions of the ninth aspect and any possible design of the ninth aspect.

[0169] The twentieth aspect further provides a graphical user interface on an electronic device, the electronic device having one or more memories and one or more processors for executing one or more computer programs stored in the one or more memories, the graphical user interface comprising a graphical user interface displayed when the electronic device executes the technical solutions of the eighth aspect and any possible design of the eighth aspect.

[0170] The twenty-first aspect further provides a graphical user interface on an electronic device, the electronic device having one or more memories and one or more processors for executing one or more computer programs stored in the one or more memories, the graphical user interface comprising a graphical user interface displayed when the electronic device executes the technical solutions of the ninth aspect and any possible design of the ninth aspect.

[0171] The beneficial effects of the above ninth aspect to the twenty-first aspect can refer to the beneficial effects of the eighth aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0172] FIG. 1 A schematic diagram of realizing a shake and a move of a lens by a mobile phone in the prior art;

[0173] FIG. 2A A schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application;

[0174] FIG. 2B A schematic diagram of a software structure of an electronic device provided by an embodiment of the present application;

[0175] FIG. 3A A schematic diagram of implementation principles of various lens moving modes provided by an embodiment of the present application;

[0176] FIG. 3BA schematic diagram of an example of a moving mode provided by an embodiment of the present application;

[0177] FIG. 4 A schematic diagram of an example of a mobile phone GUI provided by an embodiment of the present application;

[0178] FIG. 5A to FIG. 5B A schematic diagram of a micro movie icon on a mobile phone provided by an embodiment of the present application;

[0179] FIG. 6 A schematic diagram of a homepage of a micro movie mode provided by an embodiment of the present application;

[0180] FIG. 7A to FIG. 7D A schematic diagram of an example of a recording interface of a travel template provided by an embodiment of the present application;

[0181] FIG. 8A to FIG. 8D A schematic diagram of another example of a recording interface of a travel template provided by an embodiment of the present application;

[0182] FIG. 9A to FIG. 9F A schematic diagram of an effect display interface provided by an embodiment of the present application;

[0183] FIG. 10 A schematic diagram of a gallery interface provided by an embodiment of the present application;

[0184] FIG. 11A to FIG. 11B A schematic diagram of another example of a homepage of a micro movie mode provided by an embodiment of the present application;

[0185] FIG. 11C A schematic diagram of an interface of selecting a combination of moving modes to form a shooting template provided by an embodiment of the present application;

[0186] FIG. 12 A schematic diagram of a flow of a video shooting method provided by an embodiment of the present application;

[0187] FIG. 13 to FIG. 17 A schematic diagram of a graphical user interface of an electronic device provided by an embodiment of the present application;

[0188] FIG. 18 、 FIG. 19A to FIG. 19D A schematic diagram of a target region moving on an image captured by an ultra-wide-angle camera provided by an embodiment of the present application;

[0189] FIG. 20 to FIG. 24 A schematic diagram of a graphical user interface of an electronic device provided by an embodiment of the present application;

[0190] FIG. 25 A schematic diagram of a target region rotating on an image captured by an ultra-wide-angle camera provided by an embodiment of the present application;

[0191] FIG. 26 to FIG. 27A schematic diagram of a graphical user interface of an electronic device according to an embodiment of the present application;

[0192] FIG. 28 A schematic diagram of zooming in on a target region in an image captured by an ultra-wide-angle camera according to an embodiment of the present application;

[0193] FIG. 29 A schematic diagram of a graphical user interface of an electronic device according to an embodiment of the present application;

[0194] FIG. 30 to FIG. 31 A schematic diagram of a flow of a preview image display method in a video recording scenario according to an embodiment of the present application. DETAILED DESCRIPTION

[0195] Hereinafter, some terms in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.

[0196] The preview image referred to in the embodiments of the present application refers to an image displayed in a viewfinder interface of an electronic device. For example, when the electronic device is a mobile phone, the mobile phone starts a camera application, turns on a camera, and displays a viewfinder interface, and the viewfinder interface displays a preview image. Continuing with the example of the mobile phone, when the mobile phone starts a video call function (for example, a video communication function in WeChat), the mobile phone turns on the camera and displays the viewfinder interface, and the viewfinder interface displays the preview image.

[0197] The field of view angle referred to in the embodiments of the present application is an important performance parameter of a camera. The field of view angle can also be referred to as a view angle, a field of view range, a field of view, and the like, and the name is not limited herein. The field of view angle is used to indicate the maximum angle range that can be captured by the camera. If an object is within the angle range, the object will be captured by the camera and then presented in the preview image. If the object is outside the angle range, the object will not be captured by the camera, i.e., will not be presented in the preview image.

[0198] Generally, the larger the field of view angle of the camera, the larger the shooting range and the shorter the focal length; and the smaller the field of view angle of the camera, the smaller the shooting range and the longer the focal length. Therefore, cameras can be divided into ordinary cameras, wide-angle cameras, ultra-wide-angle cameras, and the like according to the field of view angle. For example, the focal length of an ordinary camera can be 45 to 40 millimeters, and the view angle can be 40 to 60 degrees; the focal length of a wide-angle camera can be 38 to 24 millimeters, and the view angle can be 60 to 84 degrees; and the focal length of an ultra-wide-angle camera can be 20 to 13 millimeters, and the view angle can be 94 to 118 degrees.

[0199] The video capture method provided in the embodiments of the present application can be applied to an electronic device including a camera. The camera is preferably a wide-angle camera or an ultra-wide-angle camera; of course, a standard camera can also be used. This application does not limit the number of cameras, which can be one or more. If there are multiple cameras, preferably at least one wide-angle camera or an ultra-wide-angle camera can be included.

[0200] The electronic device may be, for example, a mobile phone, a tablet computer, a wearable device (e.g., a watch, a bracelet, a helmet, a headset, a necklace, etc.), an in-vehicle device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), or other electronic device. The embodiments of the present application do not impose any restrictions on the specific type of the electronic device.

[0201] For example, FIG. 2A 1 shows a schematic structural diagram of the electronic device 100. FIG. 2A As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0202] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors. The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions. A memory can also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.

[0203] The USB interface 130 is an interface conforming to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transmit data between the electronic device 100 and a peripheral device. The charging management module 140 is configured to receive charging input from the charger. The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160, etc.

[0204] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc. The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0205] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive an electromagnetic wave by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic wave, and transfer the processed signal to the modem processor to be demodulated. The mobile communication module 150 can also amplify a signal modulated by the modem processor, and radiate the signal as an electromagnetic wave through the antenna 1. In some embodiments, at least part of the function modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the function modules of the mobile communication module 150 can be disposed in the same device as at least part of the modules of the processor 110.

[0206] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrated with at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, performs frequency modulation and filtering on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and radiate the signal as an electromagnetic wave through the antenna 2.

[0207] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), beidu navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).

[0208] The display screen 194 is configured to display a display interface of an application, such as a viewfinder interface of a camera application, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.

[0209] The electronic device 100 can implement a photographing function through an ISP, the camera 193, a video codec, a GPU, the display screen 194, and an application processor, etc.

[0210] The ISP is configured to process data fed back by the camera 193. For example, when taking a photo, a shutter is opened, light is transmitted to a camera photosensitive element through a lens, and the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also perform algorithm optimization on noise, brightness, and skin color of the image. The ISP can also optimize exposure, color temperature, etc. of the shooting scene. In some embodiments, the ISP can be disposed in the camera 193.

[0211] The camera 193 is configured to capture a still image or a video. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, etc. format. In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1.

[0212] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0213] The video codec is used to compress or decompress digital video. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0214] The NPU is a neural-network (NN) calculation processor, which can quickly process input information by drawing on the structure of a biological neural network, such as drawing on the transmission mode between human brain neurons, and can also constantly self-learn. Through the NPU, the electronic device 100 can realize intelligent cognition applications such as image recognition, face recognition, voice recognition, text understanding, etc.

[0215] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various function applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, software codes of at least one application program (such as an iQiyi application, a WeChat application, etc.), etc. The data storage area can store data generated during use of the electronic device 100 (such as photographed images, recorded videos, etc.), etc. In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0216] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to realize the expansion of the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to realize a data storage function. For example, files such as pictures and videos are saved in the external memory card.

[0217] The electronic device 100 can realize audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, etc. For example, music playing, recording, etc.

[0218] The sensor module 180 can include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0219] The pressure sensor 180A is configured to sense a pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. The gyro sensor 180B can be configured to determine a motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B.

[0220] The gyro sensor 180B can be used for anti-shake photography. The air pressure sensor 180C is configured to measure air pressure. In some embodiments, the electronic device 100 can calculate altitude, assist positioning and navigation based on the air pressure value measured by the air pressure sensor 180C. The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of a flip cover by using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Further, based on the detected opening and closing state of the cover or the flip cover, the electronic device 100 can set a feature of automatically unlocking the flip cover, etc. The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in each direction (generally three axes). When the electronic device 100 is stationary, the acceleration sensor 180E can detect the magnitude and direction of gravity. The acceleration sensor 180E can also be used to identify the posture of the electronic device 100 and applied to switching between landscape and portrait modes, a pedometer, etc.

[0221] The distance sensor 180F is configured to measure distance. The electronic device 100 can measure distance by infrared or laser. In some embodiments, the electronic device 100 can utilize the distance sensor 180F to measure distance to achieve fast focus when taking a picture. The proximity light sensor 180G can include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode can be an infrared light-emitting diode. The electronic device 100 emits infrared light outwardly through the light-emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using the photodiode. When sufficient reflected light is detected, the electronic device 100 can determine that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that a user is holding the electronic device 100 close to the ear for a phone call, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used for automatic unlocking and locking of the screen in a holster mode or a pocket mode.

[0222] The ambient light sensor 180L is configured to sense ambient light brightness. The electronic device 100 can adaptively adjust the display screen 194 brightness according to the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust white balance when taking a picture. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touch. The fingerprint sensor 180H is configured to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to implement fingerprint unlocking, access application lock, fingerprint picture taking, fingerprint call answering, and the like.

[0223] The temperature sensor 180J is configured to detect temperature. In some embodiments, the electronic device 100 utilizes the temperature detected by the temperature sensor 180J to implement temperature processing strategies. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold value, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by low temperature. In other embodiments, when the temperature is lower than yet another threshold value, the electronic device 100 performs voltage boosting on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0224] Touch sensor 180K, also referred to as "touch panel". Touch sensor 180K can be disposed on display screen 194, and touch sensor 180K and display screen 194 together form a touch screen, also referred to as "touch panel". Touch sensor 180K is configured to detect a touch operation applied to or near the touch sensor 180K. The touch sensor 180K can transmit the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K can also be disposed on the surface of electronic device 100, which is different from the position where display screen 194 is located.

[0225] Bone conduction sensor 180M can obtain vibration signals. In some embodiments, bone conduction sensor 180M can obtain vibration signals of the human vocal part vibration bone block. Bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulsation signals.

[0226] Keys 190 include power on key, volume key, etc. Keys 190 can be mechanical keys. They can also be touch keys. Electronic device 100 can receive key input and generate key signal input related to user settings and function control of electronic device 100. Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. Touch vibration feedback effects can also be customized. Indicator 192 can be an indicator light, which can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, etc. SIM card interface 195 is used to connect SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to realize contact and separation with the electronic device 100.

[0227] It can be understood that, FIG. 2A It should be understood that the components shown do not constitute a specific limitation on electronic device 100, and the mobile phone can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. In addition, FIG. 2A The combination / connection relationship between the components in the above description can also be adjusted and modified.

[0228] In the embodiments of the present application, the camera 193 in the electronic device 100 can include one camera or multiple cameras, and if multiple cameras are included, for example, camera 1 and camera 2 are included, wherein the field of view angle of the camera 1 is smaller than that of the camera 2. For example, the camera 1 is a telephoto camera, and the camera 2 is a wide-angle camera (which can be a normal wide-angle camera or an ultra-wide-angle camera); or the camera 1 is a normal wide-angle camera, and the camera 2 is an ultra-wide-angle camera, and so on in different combinations. In some embodiments, the camera 1 and the camera 2 can both be rear cameras or both be front cameras. It should be understood that the electronic device 100 can also include more cameras, for example, a telephoto camera.

[0229] The electronic device 100 can provide multiple recording modes, for example, a normal recording mode, a shift mode, a shake mode, and the like. In the normal recording mode, the electronic device 100 starts the camera 1 with a smaller field of view angle, and displays the image collected by the camera 1 in the viewfinder interface. When the electronic device 100 switches from the normal recording mode to the shift mode, the camera 2 with a larger field of view angle is started, and one image block on a frame of image collected by the camera 2 is displayed in the viewfinder interface. In the case that the electronic device 100 remains stationary, if the processor 110 (for example, a GPU or an NPU) determines another image block on a next frame of image collected by the camera 2 according to the image movement direction input by the user (for example, by a sliding operation on the screen), and then displays the another image block in the viewfinder interface, according to the image movement direction input by the user. Wherein, the orientation between the another image block and the previous image block is related to the image movement direction input by the user. That is, the user realizes the shooting mode like "shift lens" by inputting the image movement direction. Therefore, in the embodiments of the present application, the shooting mode like "shift lens" can be realized without moving the position of the mobile phone during the mobile phone recording process, which is convenient to operate and has a high user experience.

[0230] FIG. 2B A software structure block diagram of an electronic device provided by an embodiment of the present application is shown. As shown in the figure, FIG. 2B The software structure of the electronic device can be a layered architecture, for example, the software can be divided into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer (framework, FWK), the Android runtime and the system library, and the kernel layer.

[0231] The application layer can include a series of application packages. As FIG. 2BAs shown, the application layer can include camera, settings, skin module, user interface (UI), third-party application, etc. Among them, the third-party application can include WeChat, QQ, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0232] The application framework layer provides application programming interface (API) and programming framework for the application of the application layer. The application framework layer can include some pre-defined functions. For example, FIG. 2B As shown, the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0233] The window manager is used to manage window program. The window manager can obtain the size of the display screen, judge whether there is a status bar, lock the screen, intercept the screen, etc. The content provider is used to store and obtain data, and make the data accessible by the application. The data can include video, image, audio, dialed and received call, browsing history and bookmark, phone book, etc.

[0234] The view system includes visual control, such as control for displaying text, control for displaying picture, etc. The view system can be used to build application. The display interface can be composed of one or more views. For example, the display interface including short message notification icon can include view for displaying text and view for displaying picture.

[0235] The phone manager is used to provide communication function of the electronic device. For example, management of call state (including call connection, call hang-up, etc.).

[0236] The resource manager provides various resources for the application, such as localized string, icon, picture, layout file, video file, etc.

[0237] The notification manager makes the application can display notification information in the status bar, which can be used to convey the message of the notification type, which can automatically disappear after a short stay, without user interaction. For example, the notification manager is used to inform the completion of download, message reminder, etc. The notification manager can also be the notification in the form of chart or scroll bar text appearing in the top status bar of the system, such as the notification of the application running in the background, and also can be the notification in the form of dialogue window appearing on the screen. For example, prompting text information in the status bar, issuing prompt sound, vibration of the electronic device, flicker of the indicator light, etc.

[0238] The Android runtime includes core library and virtual machine. The Android runtime is responsible for scheduling and management of the Android system.

[0239] The core library includes two parts: one part is the function function called by the java language, and the other part is the core library of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java file of the application layer and the application framework layer into a binary file. The virtual machine is used to execute the functions of object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0240] The system library can include a plurality of function modules. For example: surface manager, media library, three-dimensional graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL) and the like.

[0241] The surface manager is used to manage the display subsystem, and provides a plurality of applications with the fusion of 2D and 3D layers.

[0242] The media library supports a plurality of commonly used audio, video format playback and recording, and static image files and the like. The media library can support a plurality of audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG and the like.

[0243] The three-dimensional graphics processing library is used to realize three-dimensional graphics drawing, image rendering, synthesis, and layer processing and the like.

[0244] The 2D graphics engine is a drawing engine for 2D drawing.

[0245] In addition, the system library can also include an image processing library, which is used to process images to realize the shooting effects of shaking, moving, lifting and lowering.

[0246] The kernel layer is the layer between hardware and software. The kernel layer at least includes display driver, camera driver, audio driver, sensor driver.

[0247] The hardware layer can include various sensors, such as the acceleration sensor, the gyroscope sensor, the touch sensor and the like involved in the embodiments of the present application.

[0248] The working process of the software and hardware of the electronic device will be described below in conjunction with the display method of the preview image in the video recording scene of the embodiments of the present application.

[0249] The touch sensor 180K receives a touch operation, and a corresponding hardware interrupt is sent to the kernel layer. Taking the touch operation as a touch single-click operation, assuming that the control corresponding to the single-click operation is the control of the camera application icon, the camera application is started. Assuming that the camera application is currently in a shift mode, the camera driver in the kernel layer is called to drive the camera with a larger field of view angle (for example, a super wide-angle camera) to capture an image. The super wide-angle camera sends the captured image to the image processing library in the system library.

[0250] The image processing library processes the image captured by the super wide-angle camera, for example, to determine an image block on the image. The display screen displays the image block in the viewfinder interface of the camera application, that is, a preview image. Assuming that the touch sensor 180K receives a sliding operation while the electronic device remains stationary, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the sliding operation into a raw input event and stores it in the kernel layer. Assuming that the camera application obtains the raw input event from the kernel layer and identifies that the input event corresponds to a sliding direction, the image processing library determines another image block on the image captured by the super wide-angle camera, and the orientation between the another image block and the image block is related to the sliding direction. Therefore, during video recording of the electronic device, the "shift lens" effect can also be achieved while the electronic device remains stationary.

[0251] For ease of understanding, the following embodiments of the present application will take a mobile phone as an example to specifically describe the video shooting method provided by the embodiments of the present application in combination with the drawings.

[0252] The video shooting method provided by the present application can achieve "shift lens" or "pan lens" and other lens operation shooting techniques while the mobile phone remains stationary.

[0253] For ease of description, "shift lens" is referred to as "shift mode", "pan lens" is referred to as "pan mode", and "shift mode", "pan mode" and the like are collectively referred to as "lens operation mode". Here, only "shift mode" and "pan mode" are taken as examples, and it can be understood that the lens operation mode can be further refined. For example, the shift mode can include up shift, down shift, left shift, and right shift modes according to the moving direction; and acceleration shift, uniform speed shift, and deceleration shift modes according to the moving speed. For example, see Table 1 below for various lens operation modes.

[0254] Table 1: Various lens operation modes

[0255]

[0256] Table 1 above takes 36 lens operation modes as an example, and it can be understood that more modes can be included, for example, in addition to up, down, left, and right shift modes, other direction movements can also be included, which are not listed here.

[0257] The following describes the implementation principles of the above-mentioned various "panning modes" when the mobile phone remains stationary.

[0258] (1) Right panning mode

[0259] The mobile phone starts a camera, such as a wide-angle camera or an ultra-wide-angle camera. The camera outputs an image stream. Referring to FIG. 3A (a), FIG. 3A The largest box in (a) represents the image output by the camera, which generally includes more photographed objects. For ease of description, FIG. 3A In (a), only the mth frame to the m+3th frame of the image stream is taken as an example for description. Taking the mth frame of the image as an example, the small square mark in the large box is labeled as the mth region. The image block in the mth region can be cropped to display a preview image on the display screen. That is, the preview image displayed on the mobile phone is an image block cropped from the image captured by the camera. The description herein is also applicable to the following panning, pushing, and pulling modes.

[0260] Taking right panning as an example, it is assumed that right panning starts from the mth frame. Referring to FIG. 3A (a), the preview image is the image block in the mth region on the mth frame of the image. The next frame of the preview image is the image block in the m+1th region on the m+1th frame of the image, and the m+1th region is right shifted by a distance A relative to the position of the mth region. The next frame of the preview image is the image block in the m+2th region on the m+2th frame of the image, and the m+2th region is right shifted by a distance B relative to the position of the m+1th region and by a distance A+B relative to the position of the mth region. The mth region, the m+1th region, the m+2th region, and the like are collectively referred to as target regions. That is, the positions of the target regions on the image captured by the camera gradually shift to the right, producing the effect of right panning of the lens, but the mobile phone does not actually move.

[0261] FIG. 3A (a) takes the mth region as the center region on the mth frame of the image as an example. It can be understood that the mth region can also be another region on the mth frame of the image. For example, the left edge of the mth region overlaps the left edge of the mth frame of the image, that is, the target region moves from the leftmost side of the image to the rightmost side of the image.

[0262] FIG. 3A (a) takes right panning as an example for description. It can be understood that it can also include left panning, up panning, down panning, diagonal panning, and panning in various directions, and the principles are the same and will not be described again.

[0263] A specific example is given below. For simplicity, taking 1 frame of the preview image as an example.

[0264] Assume that the image in the image stream output by the camera is 4148*2765, and the target region is 2094*1178. Taking the case where the target region moves from the leftmost side of the image to the rightmost side of the image as an example, and taking the case where the movement is at a constant speed as an example. Referring to FIG. 3B , the right-moving process: the center point of the target region moves from -1027 to +1027 in the X direction, so it takes 3 seconds to complete the translation from the leftmost to the rightmost. Here, the right-moving process is taken as an example, and it can be understood that the left-moving process is the same principle and will not be described again. Moreover, 1s is taken as an example of refreshing 1 frame, and it can be understood that in actual application, 1s can refresh multiple frames.

[0265] Similarly, the upward translation: the center point of the target region moves from -793 to +793 in the Y direction. In 3 seconds (or the time length set by the user), the translation from the lowermost to the uppermost is completed. Here, the upward translation is taken as an example, and it can be understood that the downward translation is the same principle and will not be described again.

[0266] (2) Shake mode

[0267] Unlike the shift mode, in addition to changing the position of the target region on the image captured by the camera, the shake mode also needs to perform perspective conversion processing on the image block in the target region, and the preview image is the image block after perspective conversion. For example, the mobile phone can first perform perspective conversion processing on the image (such as the mth image) captured by the camera, and then determine the image block in the target region of the image after perspective conversion processing as the preview image; or the mobile phone can first determine the image block in the target region of the image captured by the camera, and then perform perspective conversion processing on the image block, and the image block after perspective conversion processing is the preview image.

[0268] Taking right shaking as an example, assume that right shaking starts from the mth frame, referring to FIG. 3A (a), the preview image is the image block obtained by performing perspective conversion processing on the image block in the mth region; the next frame preview image is the image block obtained by performing perspective conversion on the image block in the m+1th region. The next frame preview image is the image block obtained by performing perspective conversion on the image block in the m+2th region, and so on, so as to realize the effect of right shaking of the lens, but the position of the mobile phone is actually unchanged.

[0269] Among them, the perspective conversion can be realized by affine transformation. For example, the process of affine transformation includes: multiplying the pixel points on the image by a linear transformation matrix, and then adding a translation vector to obtain the image after perspective conversion. For example, the image after perspective conversion satisfies the following formula:

[0270]

[0271] From the above, it can be obtained that:

[0272] x' = m11 * x + m12 * y + m13

[0273] y'=m21*x+m22*y+m23

[0274] Among them, (x', y') is the pixel point on the image after visual transformation, (x, y) is the pixel point on the image before visual transformation, and the matrix in the formula is is the matrix used to implement linear transformation and translation. Among them, m11, m12, m21, m22 are linear change parameters, and m13, m23 are translation parameters. m11, m12, m21, m22 are related to the rotation angle. Assuming that the rotation angle of the panning lens is θ, m11 = cos(θ), m12 = -sin(θ), m21 = sin(θ), m22 = cos(θ), m13 = 0, m23 = 0; therefore, the above formula can be transformed as follows:

[0275] x'=x*cos(θ)-sin(θ)*y

[0276] y'=x*sin(θ)+cos(θ)*y

[0277] For example, the rotation angle θ can be determined in a variety of ways. For example, the rotation angle θ can be a preset fixed value. Alternatively, it can be set by the user. Therefore, after the mobile phone determines the rotation angle, it can perform perspective conversion processing based on the above formula.

[0278] (3) Push mode

[0279] Push mode corresponds to the push-lens shooting method, which can be understood as the camera gradually moving closer to the object, that is, the object being photographed in the viewfinder interface is magnified, which helps to focus on the details of the object.

[0280] See also FIG. 3A (b) Taking the mth frame image as an example, the corresponding large box includes the small box, namely the mth area. The mobile phone crops the image block in the mth area and displays it on the screen.

[0281] Assume that push mode is used starting from the mth frame, and continue to refer to FIG. 3A As shown in (b), the preview image is an image block cropped from the mth region on the mth frame image. The next preview image is an image block cropped from the m+1th region, and the area of ​​the m+1th region is smaller than the area of ​​the mth region. The next preview image is an image block cropped from the m+2th region, and the area of ​​the m+2th region is smaller than the area of ​​the m+1th region, and so on. In other words, the area of ​​the image block is getting smaller and smaller, so when the image block is displayed on the display screen, in order to adapt to the size of the display screen, the image block needs to be enlarged and displayed. If the image block becomes smaller and smaller, the magnification factor will also become larger and larger. Therefore, the object captured in the preview image on the mobile phone is gradually enlarged, achieving the shooting effect of the camera gradually approaching the object, but the position of the mobile phone does not change.

[0282] (4) Pull mode

[0283] The pull mode corresponds to the shooting method of pulling the lens, which can be understood as the camera gradually moving away from the object, that is, the object being photographed in the viewfinder interface is reduced, which helps to capture the whole picture of the object.

[0284] Different from the pull mode, assuming that the push mode starts from the mth frame, the preview image is the image block in the mth area on the mth frame image. The preview image of the next frame is the image block in the m+1th area on the m+1th frame image, and the area of ​​the m+1th area is larger than the area of ​​the mth area. The preview image of the next frame is the image block in the m+2th area on the m+2th frame image, and the area of ​​the m+2th area is larger than the area of ​​the m+1th area, and so on. In other words, the area of ​​the image block is getting larger and larger, so when the image block is displayed on the display screen, in order to adapt to the size of the display screen, the image block needs to be reduced in size. If the image block becomes larger and larger, the reduction factor will also become larger and larger. Therefore, the object captured in the preview image on the mobile phone is reduced, achieving the effect of the camera gradually moving away from the captured object, but the position of the mobile phone does not change.

[0285] (5) Rotation mode

[0286] In rotation mode, the phone not only needs to identify the image blocks within the target area but also needs to rotate them. For example, the phone can first rotate the image captured by the camera, then identify the image blocks within the target area on the rotated image as the preview image. Alternatively, the phone can first identify the image blocks within the target area on the image captured by the camera, then rotate the image blocks, and use the rotated image blocks as the preview image.

[0287] Take clockwise rotation as an example, assuming that the rotation starts from the mth frame, see FIG. 3A In (c), the preview image is the image block within the mth region. The next preview image is the image block within the m+1th region rotated clockwise by angle G. The next preview image is the image block within the m+2th region rotated clockwise by angle G+P, and so on. In other words, the target region is gradually rotated in the instantaneous direction. Therefore, the object in the preview image gradually rotates clockwise, creating the effect of a rotating phone shooting, but the phone's position remains unchanged.

[0288] FIG. 3A (c) is described by taking clockwise rotation as an example. It is understandable that counterclockwise rotation may also be included, and the principle is the same, so it will not be described in detail.

[0289] (6) Constant speed mode

[0290] Constant speed mode includes constant speed move, constant speed shake, constant speed push, constant speed pull, constant speed rotation and the like. More specifically, constant speed move can further include constant speed up, constant speed down, constant speed left, constant speed right and the like, and constant speed rotation can further include constant speed clockwise rotation, constant speed counterclockwise rotation and the like, as shown in Table 1 above.

[0291] Taking constant speed move as an example, and taking constant speed right move as an example, please refer to FIG. 3A (a), for example, A = B = C, i.e. the target area (e.g. the mth region, the m+1th region, the m+2th region, etc.) moves the same distance each time, achieving the effect of constant speed right move.

[0292] Taking constant speed push as an example, please refer to FIG. 3A (b), i.e. the target area (e.g. the mth region, the m+1th region, the m+2th region, etc.) decreases the same area each time, achieving the effect of constant speed push.

[0293] Taking constant speed rotation as an example, and taking constant speed instantaneous rotation as an example, please refer to FIG. 3A (c), for example, G = P = W, i.e. the target area (e.g. the mth region, the m+1th region, the m+2th region, etc.) rotates the same angle each time, achieving the effect of constant speed rotation.

[0294] (7) Acceleration mode

[0295] Acceleration mode includes acceleration move, acceleration shake, acceleration push, acceleration pull, acceleration rotation and the like. More specifically, acceleration move can further include acceleration up, acceleration down, acceleration left or acceleration right and the like, and acceleration rotation can further include acceleration clockwise rotation, acceleration counterclockwise rotation and the like, as shown in Table 1 above.

[0296] Taking acceleration move as an example, and taking acceleration right move as an example, please refer to FIG. 3A (a), for example, A < B < C, i.e. the target area (e.g. the mth region, the m+1th region, the m+2th region, etc.) increases the distance moved each time, achieving the effect of acceleration right move.

[0297] Taking acceleration push as an example, please refer to FIG. 3A (b), i.e. the target area (e.g. the mth region, the m+1th region, the m+2th region, etc.) gradually increases the area reduction, for example, the first area difference between the m+1th region and the mth region is smaller than the second area difference between the m+2th region and the m+1th region, achieving the effect of acceleration push.

[0298] Taking acceleration rotation as an example, and taking acceleration clockwise rotation as an example, please refer to FIG. 3A (c), for example, G < P < W, i.e. the target area (e.g. the mth region, the m+1th region, the m+2th region, etc.) increases the angle of rotation each time, achieving the effect of constant speed rotation.

[0299] Continuing with the example of accelerated right shift, in addition to setting the values of A, B, and C to satisfy A < B < C, there are other ways to achieve accelerated right shift. For example, continuing to refer to FIG. 8A, set A = B = C, and then achieve accelerated shift by means of frame extraction. For example, extract the mth frame, the m+1th frame, and the m+3th frame, so the preview image is in turn the image block in the mth region, the image block in the m+1th region, and the image block in the m+3th region, and the m+1th region is right shifted relative to the mth region by A, and the m+3th region is right shifted relative to the m+1th region by B + C, achieving accelerated right shift. FIG. 3A (a), set A = B = C, and then achieve accelerated shift by means of frame extraction. For example, extract the mth frame, the m+1th frame, and the m+3th frame, so the preview image is in turn the image block in the mth region, the image block in the m+1th region, and the image block in the m+3th region, and the m+1th region is right shifted relative to the mth region by A, and the m+3th region is right shifted relative to the m+1th region by B + C, achieving accelerated right shift.

[0300] (8) deceleration mode

[0301] Deceleration mode includes deceleration shift, deceleration pan, deceleration push, deceleration pull, deceleration rotation, and the like. More specifically, deceleration shift can further include deceleration up, deceleration down, deceleration left, or deceleration right shift, and deceleration rotation can further include deceleration clockwise rotation, deceleration counterclockwise rotation, and the like, as shown in Table 1 above.

[0302] Taking deceleration shift as an example, and taking deceleration right shift as an example, refer to FIG. 8A. FIG. 4 (a) as an example, for example, A > B > C, that is, the distance of the target region (such as the mth region, the m+1th region, the m+2th region, and the like) decreases each time, achieving the effect of deceleration right shift.

[0303] Taking deceleration push as an example, refer to FIG. 8B. FIG. 4 (b), that is, the amount of area reduction of the target region (such as the mth region, the m+1th region, the m+2th region, and the like) gradually decreases, for example, the first area difference between the m+1th region and the mth region is greater than the second area difference between the m+2th region and the m+1th region, achieving the effect of deceleration push.

[0304] Taking deceleration rotation as an example, and taking deceleration clockwise rotation as an example, refer to FIG. 8C. FIG. 5A (c), for example, G > P > W, that is, the angle of rotation of the target region (such as the mth region, the m+1th region, the m+2th region, and the like) decreases each time, achieving the effect of deceleration rotation.

[0305] Continuing with the example of deceleration right shift, in addition to setting the values of A, B, and C to satisfy A > B > C, there are other ways to achieve deceleration right shift. For example, continuing to refer to FIG. 8A, set A = B = C, and then achieve deceleration shift by means of frame extraction. For example, extract the mth frame, the m+1th frame, and the m+3th frame, so the preview image is in turn the image block in the mth region, the image block in the m+1th region, and the image block in the m+3th region, and the m+1th region is right shifted relative to the mth region by A, and the m+3th region is right shifted relative to the m+1th region by B + C, achieving deceleration right shift. FIG. 5A(a), set A = B = C, and then realize the decelerated moving by inserting a frame. For example, insert the p-th frame between the m-th frame and the m+1-th frame, the target area on the p-th frame is the p-th area, which moves rightward relative to the m-th area by X, X is less than A, so the preview image is the image block in the m-th area, the image block in the p-th area, the image block in the m+1-th area, and so on, and the p-th area moves rightward relative to the m-th area by X, and the m+1-th area moves rightward relative to the m-th area by A, thus realizing the effect of decelerated moving rightward, but the position of the mobile phone is not changed.

[0306] In the following, the process of applying the above various "dolly modes" to shoot a video while the mobile phone remains stationary is introduced.

[0307] Generally, in order to bring the audience the ultimate viewing effect, a large number of dolly shots, pan shots, and push-pull shots are used in the process of shooting a movie. However, the shooting of a movie requires professional shooting equipment and professional photographers. Therefore, the present application considers using a mobile phone to realize similar movie shooting while the mobile phone remains stationary by using various dolly modes. For example, a micro-movie mode (or can be called a movie mode) can be provided in the mobile phone, in which the user can use the mobile phone to realize similar movie shooting. Specifically, the micro-movie mode includes a plurality of story templates, each of which includes a plurality of different dolly modes. When the mobile phone uses a certain story template to shoot a video, it can use the different dolly modes included in the story template to shoot the video, so as to improve the video shooting quality and make the operation convenient, even non-professional photographers can use various dolly modes to complete the shooting, and the interest of video shooting is improved to a certain extent.

[0308] In the following, the technical solutions of the embodiments of the present application are specifically described in conjunction with the drawings.

[0309] FIG. 5A (a) of FIG. 1 shows a graphical user interface (GUI) of the mobile phone, which is the home screen of the mobile phone. The home screen includes icons of a plurality of applications, such as the icon of the camera application. When the mobile phone detects the operation of the user clicking the icon of the camera application, the camera application is started, and another GUI shown in (b) of FIG. 1 is displayed. FIG. 4 (b) of FIG. 1 shows another GUI, which can be called a viewfinder interface (or a shooting interface). The viewfinder interface can display a preview image in real time.

[0310] After detecting the operation of the user for indicating the micro-movie mode, the mobile phone enters (or starts) the micro-movie mode. In the micro-movie mode, the mobile phone can use various story templates to record a video.

[0311] There are many ways for the user to indicate the micro-movie mode.

[0312] For example, the viewfinder interface includes a button for indicating a micro-movie mode. When the mobile phone detects that the user clicks the button, the mobile phone enters the micro-movie mode.

[0313] For example, the button may be FIG. 5B Alternatively, the button may also be displayed on FIG. 6 Optionally, when entering the video recording mode, the button is displayed in the viewfinder interface, and in the photo taking mode, the button may not be displayed. Alternatively, the button may also be displayed in FIG. 6 The display position of the button may be a default setting of the mobile phone, or may be set by the user, which is not limited.

[0314] Or, FIG. 6 As shown in (b), when the phone detects a click operation on the more button, it displays FIG. 6 The mode selection interface shown includes an icon for the micro-movie mode. When the mobile phone detects that the user clicks on the icon, the mobile phone enters the micro-movie mode.

[0315] Alternatively, the mobile phone enters the micro-movie mode when a preset gesture operation by the user is detected on the viewfinder interface. For example, the preset gesture operation may be a gesture operation of drawing a circle on the viewfinder interface; or a long press operation on the preview image on the viewfinder interface, etc., which is not limited in this embodiment.

[0316] Alternatively, after the mobile phone displays the viewfinder interface, if the mobile phone detects a user voice instruction to enter the micro-movie mode, it enters the micro-movie mode.

[0317] After the mobile phone enters the micro-movie mode, multiple story templates can be displayed, and each story template can include multiple camera modes.

[0318] Optionally, to help users intuitively understand story templates, the phone can also provide sample videos corresponding to each story template. Sample videos can be thought of as finished products recorded using the story template. For example, the story templates include a travel template. The sample videos for the travel template include three video clips, each shot using a different camera movement pattern. This way, users can get a rough idea of ​​how the travel template will look by watching the sample videos.

[0319] For example, the interface after the mobile phone enters the micro-movie mode can be seen in FIG. 6 As shown in (a), for the convenience of description, the interface is referred to as the homepage of the micro-movie mode. The homepage includes multiple story templates, such asFIG. 6 (a) the travel template, the quiet template, and the dynamic template shown in.

[0320] The home page can also include a preview box 601 for displaying a video sample of a story template. For example, when the phone detects a user operation of selecting the travel template (e.g., a tap operation on the travel template), the preview box 601 displays a video sample of the travel template.

[0321] Since the video sample of the travel template is composed of three sample clips, the preview box 601 can directly play the video sample, or can separately play each sample clip. For example, after the first sample clip is played in the preview box 601, the next sample clip is automatically played, or the next sample clip is automatically played after a certain time period. To help the user distinguish which sample clip is currently being played in the preview box 601, the phone can output a certain prompt. For example, as shown in FIG. 6 (a), when the first sample clip is being played in the preview box 601, the first small circle in the marker 602 is in a first color (e.g., black), and the other two small circles are in a second color (e.g., white); when the second sample clip is being played in the preview box 601, the second small circle in the marker 602 is in the first color (e.g., black), and the other two small circles are in the second color (e.g., white).

[0322] Alternatively, when the phone detects a user operation of selecting the first sample clip, the first sample clip is played in the preview box 601. When the phone detects a user operation of selecting the second sample clip, the second sample clip is played in the preview box 601. For example, continuing to refer to FIG. 7A (a), the first sample clip is displayed by default in the preview box 601. When the phone detects a left swipe operation of the user in the preview box 601, the next sample clip is included in the preview box 601; when the phone detects again a left swipe operation of the user in the preview box 601, the next sample clip is included in the preview box 601. At the same time, the marker 602 can also prompt the user about the sample clip that is currently being played in the preview box 601.

[0323] Optionally, the video sample can include music, which can be a default setting, such as a music setting that is matched with the travel template.

[0324] Optionally, in addition to the marker 602, the preview box 601 can also display the number of sample clips, the total recording time of the travel template, the recording time of each video clip, etc.

[0325] Considering that the user can want to know the camera movement mode used by each story template, the phone can give the user a prompt by displaying on the touch screen or by sound to inform the user of the camera movement mode used by the story template. For example, refer toFIG. 7A (a) shows that when the travel template is selected, the preview box 601 can display a "detail" button in addition to displaying the video samples of the travel module. When the phone detects that the user clicks the "detail" button, the interface shown in (b) of FIG. 6A is displayed, which includes the camera movement mode used by each sample segment included in the travel template, for example, the first sample segment uses the right movement mode, the second sample segment uses the push mode, and the third sample segment uses the clockwise rotation mode. For the convenience of description, uniform speed is taken as an example here. FIG. 6

[0326] It should be noted that when the video samples of the travel template are displayed in the preview box 601, the camera movement mode used by the travel template can be viewed through the "detail" button. Therefore, it can be understood that when the video samples of the quiet template are displayed in the preview box 601, the camera movement mode used by the quiet template can be viewed through the "detail" button, which will not be described again.

[0327] Continuing to refer to (a) of FIG. 6A, the home page further includes a control 603 for entering the recording interface of a certain story template. For example, assuming that the phone detects that the user selects the travel template, and then detects that the control 603 is clicked, the recording interface of the travel template is entered. FIG. 7A

[0328] Exemplarily, the recording interface of the travel template is shown in (a) of FIG. 6B. The recording interface includes a prompt 701 for prompting the user that the current is in the travel template. Of course, the prompt 701 can also not be displayed. The recording interface further includes three markers: marker 702 to marker 704, wherein the marker 702 is used to indicate the first camera movement mode of the travel mode, the marker 703 is used to indicate the second camera movement mode, and the marker 704 is used to indicate the third camera movement mode. FIG. 3A

[0329] Optionally, the marker 702 displays a time 1, which is used to indicate the recording time length of using the first camera movement mode. Similarly, the marker 703 displays a time 2, which is used to indicate the recording time length of using the second camera movement mode. The marker 704 displays a time 3, which is used to indicate the recording time length of using the third camera movement mode. The time 1, the time 2, and the time 3 can be default settings, and the three times can be the same or different (for example, all three times are 3s in (a) of FIG. 6B). Alternatively, the time 1, the time 2, and the time 3 can also be set by the user (introduced below). FIG. 7B

[0330] The recording interface further displays a button 706 for closing the recording interface of the travel template. Assuming that the phone detects that the button 706 is clicked, the home page shown in (a) of FIG. 6A is returned. FIG. 7B ​​​​​

[0331] The recording interface also displays a button 705. Optionally, the button 705 can be a recording button for controlling the start and / or stop of recording.

[0332] In Mode 1, the travel template includes three panning modes, and for each panning mode, the start and / or stop of recording can be controlled by the button 705.

[0333] Continuing to refer to FIG. 7B When the phone detects an operation for selecting the mark 702 (e.g., clicking the mark 702), it determines the first panning mode corresponding to the mark 702. When it detects an operation of clicking the button 705, it starts video shooting using the first panning mode. Taking the case where the first panning mode is the right-moving mode as an example, its implementation principle is described in FIG. 7B (a), and its recording effect is shown in FIG. 7B . Specifically, as FIG. 7B (a) shows, the photographed object "Tower" is located at the right side of the image in the preview image, FIG. 7B (b) shows, the "Tower" is located in the middle of the image in the preview image, FIG. 7A (c) shows, the "Tower" in the preview image is located at the left side of the image, which is equivalent to the effect of the phone moving to the right, but in fact the phone does not move.

[0334] During the process of the phone using the first panning mode for video shooting, the time in the mark 702 is automatically reduced. For example, FIG. 3A (a) shows, the time in the mark 702 is 3s, FIG. 7C (b) shows, the time in the mark 702 is reduced to 2s, FIG. 7C (c) shows, the time in the mark 702 is reduced to 1s. When the time is reduced to 0, the recording is stopped. Thus, the recording process using the first panning mode by the phone is ended.

[0335] For another example, refer to FIG. 7B When the phone detects an operation for selecting the mark 703 (e.g., clicking the mark 703), it determines the second panning mode corresponding to the mark 703. When it detects an operation of clicking the button 705, it starts video shooting using the second panning mode. Taking the case where the second panning mode is the push mode as an example, its implementation principle is described in FIG. 7B (b), and its recording effect is shown in FIG. 7A . Specifically, as FIG. 3A (a) shows, the photographed object "Tower" in the preview image is relatively far away from the user, so the "Tower" is small in size, FIG. 7D (b) shows, the "Tower" in the preview image is enlarged, giving the user the feeling of approaching the "Tower", FIG. 7D (c) shows, the "Tower" in the preview image is further enlarged, which is equivalent to the effect of the phone approaching the object, but in fact the phone does not move.

[0336] Similarly, during the recording process using the second dolly mode, the time in the mark 703 is automatically reduced. When the time is reduced to 0, the recording is stopped. Thus, the recording process using the second dolly mode is ended.

[0337] For another example, referring to FIG. 7D When the phone detects an operation (e.g., clicking the mark 704) for selecting the mark 704, the third dolly mode corresponding to the mark 704 is determined. When detecting an operation of clicking the button 705, the phone starts video shooting using the third dolly mode. Taking the third dolly mode as the clockwise rotation mode, its implementation principle is described in FIG. 7D (c). Its recording effect is shown in FIG. 7A . Specifically, as FIG. 7A (a) shows that the shooting object "Tower" is vertical in the preview image, FIG. 7A (b) shows that the "Tower" rotates clockwise in the preview image, FIG. 8A (c) shows that the "Tower" further rotates in the preview image, which is equivalent to the shooting effect of the phone rotating clockwise, and in fact the phone does not move.

[0338] Similarly, during the recording process using the third dolly mode, the time in the mark 704 is automatically reduced. When the time is reduced to 0, the recording is stopped. Thus, the recording process using the third dolly mode is ended.

[0339] Therefore, in the above mode 1, the user selects the dolly mode through the marks 702 to 704, and then controls the phone to start shooting using the selected dolly mode through the button 705.

[0340] Of course, the button 705 can also control the shooting to stop. For example, taking FIG. 8A as an example, the user selects the first dolly mode, and when the phone detects an operation of clicking the button 705, the recording using the first dolly mode is started, and when detecting an operation of clicking the button 705 again, the recording using the first dolly mode is stopped. The same principle applies to the second dolly mode and the third dolly mode, and is not repeated here. That is, for each dolly mode, not only the recording start can be controlled through the button 705, but also the recording stop can be controlled through the button 705. In this case, the recording time of each dolly mode can not be pre-set, for example, the recording time can be determined by the user, and when the user wants to stop recording, the button 705 is clicked.

[0341] Mode 2, in the above mode 1, for each dolly mode, the user needs to click the button 705 once to start recording. Different from mode 1, in mode 2, when the phone detects an operation for the button 705, it automatically uses the three dolly modes in sequence for recording. For example, referring to FIG. 7AWhen the mobile phone detects the operation of clicking the button 705, the mobile phone starts recording in the first mode, and when the recording time reaches the preset time (for example, 3 seconds), the recording is stopped, and then the mobile phone starts recording in the second mode, and then the mobile phone starts recording in the third mode. In this way, the user only needs to click the button 705 once, and the operation is convenient. Of course, in the mode 2, the button 705 can also control the recording to be stopped or paused, and details are not described herein again.

[0342] Similarly, in the mode 2, during the recording in the first mode, the time in the mark 702 can be gradually reduced, and when the time is reduced to 0, the recording in the first mode is stopped. The principle is the same during the recording in the second mode and the third mode, and details are not described herein again.

[0343] Alternatively, the button 705 can also be a video synthesis button, which is used to synthesize the recorded segments into a video.

[0344] For example, the marks 702 to 704 are used as recording buttons. It is continued to refer to FIG. 8A When the operation of clicking the mark 702 is detected, the mobile phone starts recording in the first mode, and when the recording time reaches the preset time (for example, 3 seconds), the recording is stopped, and the recorded segment (for the convenience of distinguishing, referred to as segment 1) is stored. When the operation of clicking the mark 703 is detected, the recording in the second mode is performed to obtain a segment 2. When the operation of clicking the mark 704 is detected, the recording in the third mode is performed to obtain a segment 3. When the operation of clicking the button 705 is detected, the segments 1 to 3 are synthesized into a video.

[0345] Similarly, during the recording in the first mode, the time in the mark 702 can be gradually reduced, and when the time is reduced to 0, the recording in the first mode is stopped. The principle is the same during the recording in the second mode and the third mode, and details are not described herein again.

[0346] Optionally, the recording time (for example, 3 seconds) of each mode can also not be preset. For example, when the operation of clicking the mark 702 is detected, the mobile phone starts recording in the first mode, and when the operation of clicking the mark 702 is detected again, the recording in the first mode is stopped. The principle is the same for the second mode and the third mode. That is, the mark 702 is used to control the start and stop of the recording in the first mode, that is, the recording time of each mode can be determined by the user.

[0347] The recording time of each mode is preset to be 3 seconds, and it can be understood that the recording time of each mode can be adjusted. For example, it is continued to refer to FIG. 8B(a) shows, when the mobile phone detects an operation (e.g., a long-press operation) on the marker 702, a selection box is displayed, which includes a time setting button. When the mobile phone detects an operation on the time setting button, an interface as shown in FIG. 8B (b) is displayed, which includes a "+" button and a "-" button. The "+" button is used to increase the time, such as increasing to 4s; the "-" button is used to decrease the time, such as decreasing to 2s.

[0348] It should be noted that, FIG. 8B The three zoom modes are taken as an example in the travel template. It can be understood that the travel template can include more or less zoom modes. For example, the user can add or delete a zoom mode.

[0349] Taking deleting a zoom mode as an example, for example, referring to FIG. 8C (a), when the mobile phone detects an operation (e.g., a long-press operation) on the marker 702, a selection box is displayed, which includes a delete button. When the mobile phone detects an operation on the delete button, the marker 702 is deleted, and the first zoom mode corresponding to the marker 702 is deleted accordingly.

[0350] Taking adding a zoom mode as an example, for example, referring to FIG. 7A (a), the recording interface of the travel mode further includes a "+" button. When the mobile phone detects an operation (e.g., a click operation) on the "+" button, an interface as shown in FIG. 8D (b) is displayed, which includes a zoom mode list. When the user selects a zoom mode and the mobile phone detects a click operation on the "add" button, an interface as shown in FIG. 8D (c) is displayed, which includes an added zoom mode marker 707.

[0351] Optionally, the order between different zoom modes can be adjusted. For example, referring to FIG. 8D (a) shows, when the mobile phone detects a long-press and drag operation on the marker 704, the marker 704 is in a movable state. When the marker 704 is dragged between the markers 702 and 703, the order of the three zoom modes is adjusted to the first zoom mode, the third zoom mode, and the second zoom mode. Then, the order of the three clips in the synthesized video is: clip 1, clip 3, and clip 2. The clip 1 is obtained by using the first zoom mode, the clip 2 is obtained by using the second zoom mode, and the clip 3 is obtained by using the third zoom mode.

[0352] Considering that the mobile phone enters the recording interface of the travel template (e.g., FIG. 9AAfter the user uses the travel template to record a video, the user can not remember which modes of camera operation are included in the travel template. To facilitate the user to view the modes of camera operation included in the travel template, the user can be prompted to view the modes of camera operation of the travel template in the recording interface of the travel template. For example, referring to FIG. 9A (a), when the mobile phone detects an operation of clicking the button 603, the mobile phone enters the interface shown in FIG. 9A (b), which includes a small window in which a video sample of the travel template can be played; or each sample segment can be played separately in the small window. For example, referring to FIG. 9A (b), when the mobile phone detects an operation on the mark 702, the first sample segment is played in the small window (e.g., the sample segment 1 is played repeatedly or only once). When the mobile phone detects an operation on the mark 703, the second sample segment is played in the small window (e.g., the sample segment 1 is played repeatedly or only once). In this way, the user can view the mode of camera operation used by each sample segment during recording.

[0353] Optionally, after the mobile phone completes video recording using the travel template, the mobile phone can enter an effect display interface to facilitate the user to view the recording effect.

[0354] Taking the above-described mode 2 as an example, referring to FIG. 9A (a), after the mobile phone records for a recording duration (e.g., 3 seconds) using the last mode of camera operation, the mobile phone automatically enters the effect display interface shown in FIG. 9B (b), which includes a preview box 901 for displaying a video composed of three video segments. If the mobile phone detects an operation on the “confirm” button, the mobile phone stores the composed video. For example, the mobile phone returns to the interface shown in FIG. 9A (a), in which the image in the composed video is displayed in the gallery mark in the lower left corner. If the user is not satisfied with the composed video, the user can re-record. For example, when the mobile phone detects an operation on the “back” button, the mobile phone returns to the interface shown in FIG. 9B (a) to re-record. Optionally, the preview box 901 can occupy all or part of the display screen. If all of the display screen is occupied, the “confirm” button and the “back” button can be displayed above the preview box 901.

[0355] It should be noted that FIG. 9B (b) takes the composed video displayed in the preview box 901 as an example. It can be understood that each video segment can also be displayed independently. For example, referring to FIG. 9C(a) shows an example of another effect display interface. The interface includes a mark for each video clip. For example, when the phone detects an operation (e.g., a click operation) on the mark for clip 1, clip 1 is played in the preview box 901. When the phone detects an operation on the mark for clip 2, clip 2 is played in the preview box. Thus, the user can view each of the recorded video clips one by one. When the phone detects an operation on the confirm button, the three clips are synthesized into a video and the synthesized video is stored, and the interface shown in FIG. 9C (a) is returned.

[0356] Optionally, the order of the three video clips can be adjusted. For example, continuing to refer to FIG. 9C (a), the phone detects an operation (e.g., a long press and drag operation) on the mark for clip 2, changes the display position of the mark, for example, drags the mark for clip 3 between the marks for clip 1 and clip 2, as shown in FIG. 9C (b). Thus, the order of clip 3 and clip 2 is adjusted. At this time, if the phone detects an operation on the "confirm" button, the display order of the video clips in the synthesized video is clip 1, clip 3, and clip 2.

[0357] Optionally, considering that there are some cases, for example, the user is not satisfied with a certain video clip among the three video clips, at this time, the video clip can be deleted, and the remaining video clips are synthesized into a video. For example, referring to FIG. 9C (a), the phone detects an operation (e.g., a long press operation) on the mark for clip 2, displays a delete button, and when an operation on the delete button is detected, deletes clip 3, as shown in FIG. 8C (b). At this time, if the phone detects an operation on the "confirm" button, a video is synthesized using clip 1 and clip 2.

[0358] Alternatively, in the case that the user is not satisfied with a certain video clip, the clip can also be re-recorded. For example, continuing to refer to FIG. 9D (a), when the phone detects an operation (e.g., a long press operation) on the mark for clip 3, a re-recording button is displayed. When the phone detects an operation on the re-recording button, an interface for re-recording clip 3 is displayed, as shown in FIG. 9D (c). Thus, only the mark 704 for the third panning mode can be displayed in the interface, and the marks for the first and second panning modes are not displayed. For example, continuing to refer to FIG. 9E (c), when the phone detects an operation on the button 705, recording in the third panning mode is started, and when the recording time (e.g., 3s) is reached, the interface shown in FIG. 9E (a) is returned, where clip 3 is the re-recorded clip.

[0359] Optionally, before combining segments 1 to 3 into a video, the phone can also add a locally recorded video segment. Then, when combining the video, segments 1 to 3 and the added local video are combined. For example, see 9D(a), where a "+" button is displayed in the effect display interface. When the phone detects that the "+" button has been clicked, the following is displayed: FIG. 9E (b) shows the interface of the mobile phone gallery. Assume that the user selects video 913, and when the mobile phone detects the operation of clicking the "Add" button, it will display the following FIG. 9E In the interface shown in (c), segment 4, i.e., video 913, is added. At this time, if the mobile phone detects that the OK button is clicked, the four segments are combined into a video.

[0360] Optionally, the mobile phone can also perform other processing on the recorded video clips, such as cropping, adding text or music, etc.

[0361] For example, see FIG. 9E As shown in (a), four icons are displayed in the preview box 901, namely, a crop icon, a text icon, a music icon, and a mute icon. It can be understood that when the preview box plays segment 1, the four icons act on segment 1, and when the preview box plays segment 2, the four icons act on segment 2.

[0362] Taking the preview box showing fragment 1 as an example, when the hand detects an operation on the crop icon, the following may be displayed: FIG. 9E In the interface shown in (b), a cropping frame 910 is displayed in the preview frame 901. The cropping frame 910 can display all the frames of the segment 1. For example, when the user wants to crop the last few frames, the cropping bar 911 can be moved to FIG. 9E (b) The last few frames are cut off. When the click of the Done button is detected, you can return to FIG. 9E In the interface shown in (a), the preview box 901 displays the cropped segment 1.

[0363] When the phone detects an operation on a text icon, it will display FIG. 9E (c) shows an interface where a text input box is displayed in the preview box 901, and the user can enter text in the text input box. When the Done button is clicked, the system returns to FIG. 9E In the interface shown in (a), the preview box 901 displays the segment 1 after adding text. It should be noted that the description here takes adding text as an example, and it is understandable that emoticons, animated images, etc. can also be added.

[0364] When the phone detects an operation on the music icon, it can display FIG. 9F(d) the interface shown, in which a list of song clips is displayed, and the list includes a mark of a song clip A, a mark of a song clip B, and the like. When the mobile phone detects that the user selects the mark of the song clip A, the mobile phone can set the song clip A as the background music of the clip 1. For example, when detecting that the complete button is clicked, the mobile phone returns to FIG. 9F (a) the interface shown, in which the preview frame 901 plays the clip 1 to which the song clip A is added. Optionally, in addition to the transition mode, the story template can also include default music. For example, the default music of the travel template refers to the music used in the sample video of the travel template. Therefore, if the user does not select the music, the mobile phone sets the default music of the travel template as the background music of the video. Considering that the music has rhythm, the image playing rhythm in the video can be consistent with the beat of the music playing. For example, the music includes drumbeats, when a drumbeat is played, one frame of image is played, when the next drumbeat is played, the next frame of image is played, and the like.

[0365] Optionally, the mobile phone can also eliminate the original sound in a certain video clip of the three recorded video clips. The original sound can be understood as the sound in the recorded video. For example, referring to FIG. 9F (a), when the mobile phone detects the operation on the mute icon, the original sound of the clip 1 is eliminated. Optionally, for a certain video clip, the original sound can be completely eliminated or partially eliminated. For example, when detecting the operation of the mute icon, the mobile phone can display an audio trimming box, such as FIG. 9F (b) the trimming box 910, the user can select a part of the clip 1 to be muted through the audio trimming box, and then the part of the clip 1 that is not muted retains the original sound.

[0366] It should be noted that, FIG. 9F Only four processing modes of trimming, adding text, music, and eliminating the original sound of the video clip are listed. It can be understood that other processing modes can also be included, such as various picture styles for processing the images in the clip, such as black and white style, animation style, ink style, strong exposure style, weak exposure style, and the like. The present application does not list them one by one.

[0367] Optionally, the mobile phone can also select a composite special effect, and the composite special effect is used to synthesize the three video clips in a specific synthesis manner. For example, referring to FIG. 9B (a), when the mobile phone detects the operation of the “dynamic effect” button, a display such as FIG. 3A(b) the interface shown, which includes a plurality of synthesis effects. For example, assuming that the user selects "merge", when the mobile phone detects the operation of clicking the "OK" button, the manner in which segment 1 and segment 2 are synthesized is: the last frame of segment 1 is merged with the first frame of segment 2. The corresponding synthesis effect is: after the mobile phone plays the second-to-last frame of segment 1, it plays the last frame of segment 1, which is the image obtained by merging the last frame of segment 1 with the first frame of segment 2, and then continues to play the second frame of segment 2. In order to facilitate the user to view and the effect, the mobile phone displays, for example, FIG. 10 (c) the interface shown, which is used to show the synthesis effect. When the mobile phone detects the click of the "Save Settings" button, it saves the synthesis effect of "merge", and then returns to FIG. 6 (a) the interface shown, when the mobile phone detects the click of the "OK" button in the interface, it synthesizes segment 1 and segment 3 using the saved synthesis effect.

[0368] For another example, assuming that the user selects "zoom in gradually", the corresponding synthesis effect is: after the mobile phone plays segment 1, it plays the first frame of segment 2 in a zoom-in manner, and then plays the second frame of segment 2. It should be noted that the above examples are used to illustrate "merge" and "zoom in gradually", and other synthesis effects are also possible, and the present application will not be repeated. FIG. 11A (b) For example, assuming that the user selects "zoom in gradually", the corresponding synthesis effect is: after the mobile phone plays segment 1, it plays the first frame of segment 2 in a zoom-in manner, and then plays the second frame of segment 2. It should be noted that the above examples are used to illustrate "merge" and "zoom in gradually", and other synthesis effects are also possible, and the present application will not be repeated.

[0369] Optionally, when the mobile phone stores the video, it can store the original video and the synthesized video together. For example, referring to FIG. 11A (a) For example, when the mobile phone detects the "OK" button, it can store the video synthesized by segment 1 to segment 3; or it can store the original video, which can be understood as a video that is not recorded using the panning mode. In order to facilitate understanding, referring to FIG. 11A (a) For example, the original video is a video composed of the mth frame to the m+3th frame, rather than a video composed of the image blocks in the mth region to the m+1th region. For example, referring to FIG. 11B (a) For example, the original video is a video composed of the mth frame to the m+3th frame, rather than a video composed of the image blocks in the mth region to the m+1th region. For example, referring to

[0370] In the above embodiment, referring to FIG. 11B(a) For example, the homepage of the micro-movie mode provides a plurality of story templates, which are default settings (such as factory settings of the mobile phone), and it can be understood that the user can also customize the story template. For easy distinction, the default setting templates can be collectively referred to as "default templates", and the user-defined templates can be collectively referred to as "custom templates".

[0371] For example, see FIG. 11A (a), the homepage can also display a "+" button, and when the mobile phone detects an operation on the button, an interface as shown in FIG. 11A (b) can be displayed, which is the interface of the gallery in the mobile phone, and the user can select a video clip stored in the gallery. Assuming that the user selects clip 1101, when the mobile phone detects that the user clicks the "add" button, an interface as shown in FIG. 11C (c) is opened, in which a new template is added. The user can set the name of the new template. For example, see FIG. 11A , the mobile phone detects an operation (such as a long press operation) on the new template to display a naming button, and when the mobile phone detects an operation of clicking the naming button, the new template is named.

[0372] After the mobile phone adds a custom template, the camera mode of the template can be parsed. When the user selects the custom module, the video is shot using the camera mode corresponding to the custom module. That is, the user can use the template to shoot a video with similar effects to the template. For example, the user extracts a clip from a movie as a custom template, and then the user uses the template to shoot a video that can be similar to the effect of the movie. Non-professional photographers can also get high-quality shooting works, and the user experience is high.

[0373] It can be understood that templates that the user does not like or does not often use can be deleted. Among them, both the default template and the custom template can be deleted, or only the custom template can be deleted, and the default template cannot be deleted. For example, see FIG. 12 , the mobile phone detects an operation (such as a long press operation) on the new template to display a delete button, and when the mobile phone detects an operation of clicking the delete button, the template is deleted.

[0374] FIG. 4 (b) Taking a custom template that is a local video of the mobile phone as an example, it can be understood that the custom module can also be set in other ways. For example, FIG. 7A (a) For example, when the mobile phone detects an operation on the "+" button, an interface as shown in FIG. 11A is displayed, which includes a list of camera modes, and the user can select a plurality of camera modes from the list of camera modes to combine into a custom story template. Assuming that the user selects the right move mode, the pull mode, and the left shake mode, when the mobile phone detects an operation of clicking the "combine" button, an interface as shown inFIG. 4 (c) shows an interface where the newly added template consists of multiple camera movement modes selected by the user.

[0375] In combination with the above embodiments and related drawings, the present application embodiment provides a video shooting method. FIG. 5A As shown, the method may include the following steps:

[0376] S1201, start the camera function. For example, the mobile phone detects an operation for opening an application and starts the camera application. The operation can be FIG. 6 The operation of clicking the camera icon in (a) can, of course, also be other operations, as long as it can open the camera application. The embodiment of the present application does not limit the operation type.

[0377] S1202. In response to a first user operation, determine a first video recording template, wherein the first video recording template includes a first example sample, a second example sample, and preset audio, wherein the first example sample corresponds to a first camera movement mode, and the second example sample corresponds to a second camera movement mode, wherein the first camera movement mode and the second camera movement mode are different.

[0378] The first video template can be FIG. 7A Of course, the first video template can also be a default template or a user-defined template, such as FIG. 7A shown.

[0379] The first operation can be one or more operations. Assume that the first operation is an operation, for example, after the mobile phone starts the camera application, it displays FIG. 7A (b) shows the framing interface, the first operation can be the operation of clicking the button of the first video template, or the operation of voice instruction of the first video template, etc., which is not limited in the embodiment of the present application. Assume that the first operation includes multiple operations, for example, the first operation includes clicking FIG. 7B Operation of micro film icons and click FIG. 7C The operation of the travel template in (a) and the operation of clicking the control 603.

[0380] For details about the first example sample (or called the first video sample), the second example sample (or called the second video sample) and the preset audio, please refer to the above description.

[0381] S1203, displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier;

[0382] Taking the first video template as a travel template as an example, the video interface can be FIG. 7D The interface shown.

[0383] S1204: In response to a second user operation, the electronic device is kept stationary and video recording is started.

[0384] One way is to respond to clicking the record button (e.g. FIG. 9E The first video clip is recorded automatically according to the second camera movement mode after the first camera movement mode is recorded. Alternatively, when the first camera movement mode indicator is selected, in response to a user-instructed operation to shoot, the first video clip is generated according to the first camera movement mode, and the duration of the first video clip is a first preset duration. When the second camera movement mode indicator is selected, in response to a user-instructed operation to shoot, the second video clip is generated according to the second camera movement mode, and the duration of the second video clip is a second preset duration. In other words, for each camera movement mode, the user can control the start and / or stop of recording.

[0385] S1205, automatically generate a composite video, the composite video including a first video clip, a second video clip and the preset audio, the first video clip is a video clip generated by the electronic device according to the first camera movement mode, and the second video clip is a video clip generated by the electronic device according to the second camera movement mode.

[0386] One way is to respond to clicking the record button (e.g. FIG. 13 The recording can be started by pressing button 705 in the image processing unit (i.e., the second operation). The recording method can be method 1 or method 2 described above. After the second video clip is recorded, the video can be automatically synthesized. Alternatively, before automatically generating the synthesized video, a display interface including the first video clip and the second video clip is displayed; and the video is synthesized in response to a video synthesis instruction input by the user.

[0387] Optionally, when generating the first video clip according to the first camera movement mode, the video recording interface also displays a countdown for generating the first video clip according to the first camera movement mode; when generating the second video clip according to the second camera movement mode, the video recording interface also displays a countdown for generating the second video clip according to the second camera movement mode. FIG. 13 、 FIG. 13 or FIG. 13 .

[0388] Optionally, the user can also delete the camera movement mode identifier. For example, the mobile phone displays a video recording interface, the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier; in response to a third operation of the user, the first camera movement mode identifier or the second camera movement mode identifier is deleted; in response to a fourth operation of the user, the position of the electronic device is kept unchanged and recording is started; a synthetic video is automatically generated, the synthetic video includes a video segment generated by the electronic device according to the non-deleted camera movement mode and the preset audio.

[0389] Optionally, the user can also add a camera movement mode identifier. For example, the electronic device displays a video recording interface, the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier; in response to a third operation of the user, a third camera movement mode identifier is added in the video recording interface, the third camera movement mode identifier is used to indicate a third camera movement mode; in response to a fourth operation of the user, the position of the electronic device is kept unchanged and recording is started; a synthetic video is automatically generated, the synthetic video includes the first video segment, the second video segment, a third video segment and the preset audio, the third video segment is a video segment generated by the electronic device according to the third camera movement mode.

[0390] Optionally, the user can also adjust the order of the camera movement mode identifier. For example, the electronic device displays a video recording interface, the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier; in response to a third operation of the user, the display order of the first camera movement mode identifier and the second camera movement mode identifier is adjusted to a first order; in response to a fourth operation of the user, the position of the electronic device is kept unchanged and recording is started; a synthetic video is automatically generated, the playing order of the first video segment and the second video segment in the synthetic video is the first order.

[0391] Optionally, the first example sample and / or the second example sample are displayed in the video recording interface.

[0392] Optionally, the electronic device can also delete the first video segment or the second video segment in response to the fourth operation; or add a local third video segment in the synthetic video; or adjust the playing order of the first video segment or the second video segment in the synthetic video.

[0393] Optionally, the first video recording template is a default template or a user-defined template.

[0394] Optionally, the electronic device can also automatically store the first video segment and the second video segment, and the synthetic video.

[0395] Optionally, the electronic device can also replace the audio in the synthesized video, or add text and / or pictures in the synthesized video, in response to a specific operation. See the foregoing FIG. 14 .

[0396] Embodiment Two

[0397] In the above embodiment one, the combination use of multiple camera modes is implemented using the micro-movie mode. Different from embodiment one, this embodiment two provides another video shooting mode, i.e. the mobile phone uses a certain camera mode for shooting alone.

[0398] FIG. 14 (a) in FIG. 13 shows a graphical user interface (GUI) of the mobile phone, which is the desktop 1301 of the mobile phone. When the mobile phone detects the operation of the user clicking the icon 1302 of the camera application on the desktop 1301, the camera application can be started, the normal wide-angle camera (e.g. the rear camera) is started, and the GUI shown in FIG. 15 (b) in FIG. 13 is another GUI, which can be called the viewfinder interface 1303. The viewfinder interface 1303 is the viewfinder interface in the video recording mode (normal video recording mode). It should be understood that if the mobile phone detects the operation of the user clicking the icon 1302, the viewfinder interface in the photo mode is displayed by default, and the user can select the video recording mode by inputting the operation such as the sliding operation in the area 1304 (the area in the dashed line box) in FIG. 15 (b) in FIG. 13, and then the mobile phone displays the viewfinder interface in the video recording mode.

[0399] For example, referring to FIG. 16 (b) in FIG. 13, after the mobile phone enters the video recording mode, the viewfinder interface 1303 includes the preview image. The viewfinder interface 1303 can also include the control 1305 for indicating the skin beautifying mode, the control 1306 for indicating the skin beautifying level, and the video recording control 1307. In the video recording mode, when the mobile phone detects the operation of the user clicking the video recording control 1307, the mobile phone starts recording the video.

[0400] It can be understood that the processing flow of the mobile phone for the video stream is different for the "pan" shooting mode and the "move" shooting mode. Therefore, the embodiments of the present application provide multiple recording modes, such as a normal recording mode and two camera movement modes (for example, including a move mode and a shake mode), and the user can instruct the mobile phone to use a certain camera movement mode, and the processing process of the mobile phone is different in different camera movement modes. For example, when the user expects to use the "pan" shooting mode, an instruction can be input to instruct the mobile phone to enter the shake mode. If the user expects to use the "move" shooting mode, another instruction can be input to instruct the mobile phone to enter the move mode. The mobile phone entering the shake mode can be understood as that the mobile phone processes based on the processing flow corresponding to the move mode. The mobile phone entering the move mode can be understood as that the mobile phone processes based on the processing flow corresponding to the shake mode.

[0401] In some embodiments, the mobile phone starts the camera application and enters the normal recording mode by default, and enters the corresponding camera movement mode after the user instructs a certain camera movement mode. Alternatively, the mobile phone starts the camera application and enters a certain camera movement mode by default, for example, the camera movement mode used last time when the camera application is used. Assuming that the mobile phone starts the camera application and enters the move mode by default, the ultra-wide-angle camera can be started. An image block on the image collected by the ultra-wide-angle camera is displayed in the viewfinder interface, for example, the image block at the center position.

[0402] The way in which the user instructs the shake mode and the move mode can be various, including but not limited to the following way 1 and way 2.

[0403] Way 1, referring to FIG. 16 (a) shows that the mobile phone is currently in the normal recording mode. The control 1308 for instructing the camera movement mode is displayed in the viewfinder interface 1303. When the mobile phone detects the operation of the control 1308 for the camera movement mode, the GUI shown in FIG. 17 (b) is displayed. The selection box 1309 is displayed in the GUI. The selection box 1309 includes the options of "shake mode" and "move mode". When the mobile phone detects the operation for "move mode" in the selection box 1309, the "move mode" is entered; and when the mobile phone detects the operation for "shake mode", the "shake mode" is entered.

[0404] For example, after the mobile phone enters the normal recording mode, the control 1308 for instructing the camera movement mode is displayed in the viewfinder interface by default, or after the user sets the shortcut of the camera movement mode, the control 1308 for instructing the camera movement mode is displayed in the viewfinder interface. The user can set the shortcut of the camera movement mode through the setting menu in the camera application and the like.

[0405] It should be noted that the display position of the control 1308 for indicating the dolly mode in the viewfinder interface 1303 is not limited in the embodiments of the present application, or the user can customize the display position of the control 1308, or the display position of the control 1308 can be adaptively adjusted according to the horizontal screen or vertical screen of the mobile phone. In addition, the form of the control 1308 for indicating the dolly mode can adopt a form that does not block the preview image as much as possible, such as a transparent or semi-transparent form.

[0406] It should be understood that in mode 1, the control 1308 of the dolly mode is intuitively presented in the viewfinder interface, which is convenient for user operation and has a high user experience.

[0407] Mode 2, referring to FIG. 17 (a) shows that the mobile phone is currently in the normal video recording mode. The viewfinder interface 1303 further includes a "more" control 1310. When the mobile phone detects an operation for selecting the "more" control 1310, another GUI as shown in FIG. 18 (b) is displayed. The GUI displays icons corresponding to a plurality of shooting modes, including an icon of the "pan mode" and an icon of the "tilt mode". When the mobile phone detects an operation on the icon of the "tilt mode", the "tilt mode" is entered; and when the mobile phone detects an operation on the icon of the "pan mode", the "pan mode" is entered. It should be understood that in mode 2, the viewfinder interface can not display the control 1308 for indicating the dolly mode, which can avoid blocking the preview image in the viewfinder interface.

[0408] It can be understood that the above-mentioned mode 1 and mode 2 are only examples, and other modes capable of indicating the mobile phone to enter the dolly mode (the pan mode or the tilt mode) are also feasible, for example, by voice instruction to indicate the mobile phone to enter the pan mode or the tilt mode, and the like, which are not limited in the embodiments of the present application. Hereinafter, mode 1 is taken as an example for introduction.

[0409] Embodiment 1

[0410] Exemplarily, FIG. 17 A schematic diagram of a GUI when the mobile phone enters the tilt mode is shown. In order to facilitate the user to distinguish which mode is currently in, when the mobile phone enters the tilt mode, the viewfinder interface can display a prompt information 1312 for indicating that the tilt mode is currently in. Of course, when the mobile phone switches from the normal video recording mode to the tilt mode, other reminders can also be output, such as vibration feedback. The prompt information 1312 can be displayed in a semi-transparent or transparent manner that does not block the preview image as much as possible. The viewfinder interface further displays a direction control 1311. The user can input information for indicating the image moving direction through the direction control 1311. It should be understood that the display position of the direction control 1311 in the viewfinder interface is not limited in the embodiments of the present application, for example, it is displayed by default as FIG. 18The position shown, or the user can adjust its display position.

[0411] In some embodiments, the mobile phone uses a first wide-angle camera (e.g. a normal wide-angle camera) in the normal video recording mode. When the mobile phone switches from the normal video recording mode to the shift mode, a second wide-angle camera (e.g. a super wide-angle camera) is activated. The field of view of the first wide-angle camera is smaller than the field of view of the second wide-angle camera. The viewfinder interface in the shift mode displays a first preview image, which is a first image block in the first region of the image captured by the super wide-angle camera. It can be understood that after the mobile phone enters the shift mode, the super wide-angle camera is activated, and the first preview image can be a first image block in the first region of the first frame of image captured by the super wide-angle camera.

[0412] In some embodiments, the first image block can be an image block corresponding to the first preview image on the image captured by the super wide-angle camera, for example, the first image block is all or part of the image captured by the super wide-angle camera and the image captured by the normal wide-angle camera that overlaps in the range of view. FIG. 18 A schematic diagram of the first region on the image captured by the super wide-angle camera is shown. The first region can be all or part of the region where the fields of view of the super wide-angle camera and the normal wide-angle camera overlap. In comparison FIG. 18 And FIG. 18 It can be seen that FIG. 18 In some embodiments, after the mobile phone enters the shift mode, the preview image is FIG. 18 In some embodiments, after the mobile phone enters the shift mode, the preview image is

[0413] In some embodiments, the mobile phone switches from the normal video recording mode to the shift mode, and the preview image does not change. The preview image not changing can be understood as the preview image not being zoomed in or out after switching to the shift mode. For example, the magnification of the preview image in the shift mode is consistent with the magnification of the preview image in the normal video recording mode, for example, both are 1 times. Therefore, after the mobile phone switches from the normal video recording mode to the shift mode, the user will not perceive the preview image being zoomed in or out abruptly.

[0414] In some embodiments, the mobile phone switches from the normal video recording mode to the shift mode, and the preview image does not change. The preview image not changing can be understood as the preview image not being zoomed in or out after switching to the shift mode. For example, the magnification of the preview image in the shift mode is consistent with the magnification of the preview image in the normal video recording mode, for example, both are 1 times. Therefore, after the mobile phone switches from the normal video recording mode to the shift mode, the user will not perceive the preview image being zoomed in or out abruptly.

[0415] The following embodiments introduce the process of realizing image panning by a mobile phone in a panning mode.

[0416] Referring to FIG. 18 As shown in FIG. 1, the ultra-wide-angle camera collects N frames of images. For example, the first frame, the second frame, the m-1th frame, and so on. It can be understood that after the mobile phone enters the panning mode, the ultra-wide-angle camera is started, so the first preview image after entering the panning mode can be a first image block in a first region on a first frame of image collected by the ultra-wide-angle camera. Assuming that the mobile phone has not detected an image panning instruction, the mobile phone determines a second region on a second frame of image, the position of the second region relative to the first region is not changed, and the preview image is refreshed from the image block in the first region to the image block in the second region. By analogy, the position of the m-1th region on the m-1th frame of image relative to the first region is not changed, where m can be an integer greater than or equal to 3. The preview image is refreshed to the image block in the m-1th region. That is, during the first frame of image to the m-1th frame of image, the mobile phone has not detected the image panning instruction, so the position of the preview image on the image is not changed.

[0417] Assuming that the mobile phone detects an image panning right instruction before the preview image is refreshed to the image block in the mth region in the mth frame of image (for example, in the process of displaying the image block in the m-1th region), the mobile phone determines the mth region on the mth frame of image, and the position of the mth region is panned right by a distance A relative to the position of the m-1th region. As shown in FIG. 2, the distance between the m-1th region and the left edge of the image is H, and the distance between the mth region and the left edge of the image is H+A. Therefore, after the mobile phone detects the image panning right instruction, the preview image in the viewfinder interface is refreshed from the image block in the m-1th region to the image block in the mth region, that is, the position of the preview image on the image is panned right by the distance A. FIG. 19A

[0418] Then, the mobile phone determines the m+1th region on the m+1th frame of image, and the position of the m+1th region is panned right by a distance B relative to the position of the mth region. As shown in FIG. 3, the distance between the mth region and the left edge of the image is H+A, and the distance between the m+1th region and the left edge of the image is H+A+B. Therefore, the preview image in the viewfinder interface is refreshed from the image block in the mth region to the image block in the m+1th region, that is, the position of the preview image on the image is panned right by the distance B. FIG. 19A

[0419] The mobile phone determines the m+2th region on the m+2th frame of image, and the position of the m+2th region is panned right by a distance C relative to the position of the m+1th region. As shown in FIG. 4, the distance between the m+1th region and the left edge of the image is H+A+B, and the distance between the m+2th region and the left edge of the image is H+A+B+C. Therefore, the preview image in the viewfinder interface is refreshed from the image block in the m+1th region to the image block in the m+2th region, that is, the position of the preview image on the image is panned right by the distance C. FIG. 19A ​​As shown in the figure, the distance from the left edge of the image to the (m + 1)-th region is H + A + B, and the distance from the left edge of the image to the (m + 2)-th region is H + A + B + C. Therefore, the preview image in the viewfinder interface is refreshed from the image block in the (m + 1)-th region to the image block in the (m + 2)-th region, that is, the position of the preview image on the image moves to the right by a distance C. Therefore, the position of the preview image on the image gradually moves to the right.

[0420] Suppose the mobile phone detects a stop movement instruction, determines the (m + 3)-th region on the (m + 3)-th frame image, and the position of the (m + 3)-th region has not changed relative to the position of the (m + 2)-th region. The preview image is refreshed from the image block in the (m + 2)-th region to the image block in the (m + 3)-th region, that is, the position of the preview image on the image remains unchanged and stops moving to the right. After that, the preview image is refreshed from the image block in the (m + 3)-th region to the image block in the (m + 4)-th region, and the position of the preview image on the image remains unchanged until the image movement instruction is detected again and it moves again.

[0421] Among them, there are many cases for the value relationship among A, B, and C. Several examples are given below.

[0422] Example 1: A = B = C. Suppose A = B = C = L, that is, after the mobile phone detects an image right shift instruction, the position of the target region (such as the m-th region, the (m + 1)-th region, the (m + 2)-th region, etc., in FIG. 18 the figure) on each frame of the image moves to the right by the same distance L relative to the target region on the previous frame of the image, that is, it moves to the right at a constant speed. That is to say, after the mobile phone detects an image right shift instruction, the preview image refreshed each time moves to the right by the same distance L relative to the previous frame of the preview image on the image until a stop movement instruction is detected, achieving the shooting effect of moving to the right at a constant speed.

[0423] Example 2: A < B < C < D. Suppose A = L, B = 2L, C = 3L, that is, after the mobile phone detects an image right shift instruction, the target region on the subsequent frame of the image moves to the right relative to the target region on the previous frame of the image at an accelerating speed. For example, the m-th region moves to the right by a distance L relative to the (m - 1)-th region, the (m + 1)-th region moves to the right by a distance 2L relative to the m-th region, that is, the (m + 1)-th region moves to the right at an accelerating speed; the (m + 2)-th region moves to the right by a distance 3L relative to the (m + 1)-th region, that is, the (m + 2)-th region moves to the right at an accelerating speed relative to the (m + 1)-th region. Therefore, after the mobile phone detects an image right shift instruction, the preview image refreshed each time moves to the right at an accelerating speed relative to the previous frame of the preview image, achieving the shooting effect of the image moving to the right at an accelerating speed.

[0424] Example 3: A > B > C > D. Assuming A = 2L, B = L, C = 0, that is, after the mobile phone detects the image right shift instruction, the target region on the next frame of image is decelerated right shift relative to the target region on the previous frame of image. For example, the mth region is right shifted by a distance of 2L relative to the m-1th region, the m+1th region is right shifted by a distance of L relative to the mth region, that is, the m+1th region is decelerated right shift relative to the mth region; the m+2th region is right shifted by a distance of 0 relative to the m+1th region, that is, the m+2th region is decelerated right shift without moving relative to the m+1th region. Therefore, after the mobile phone detects the image right shift instruction, the preview image refreshed each time is decelerated right shift relative to the previous frame of preview image, or even the speed is reduced to 0, realizing the shooting effect of decelerated right shift of image.

[0425] The above gives three examples of the value relationship among A, B, and C. The value relationship among A, B, and C is not limited in the embodiments of the present application, and a person skilled in the art can flexibly set it to achieve different technical effects.

[0426] In some embodiments, after the mobile phone detects the instruction for indicating the image moving direction, a certain way in the above example 1, example 2 or example 3 is used by default; or, after the mobile phone detects the instruction for indicating the image moving direction, the way in example 1 is used by default, when the instruction for accelerated movement is detected, the way in example 2 is used; when the instruction for decelerated movement is detected, the way in example 3 is used.

[0427] The first way

[0428] The images collected frame by frame by the ultra-wide-angle camera are assumed to be N frames. The image blocks in the target region on each frame of image in the N frames of images are used to refresh the preview image in turn. It can also be understood that the mobile phone does not perform frame extraction or frame insertion processing on the N frames of images collected by the ultra-wide-angle camera, but refreshes the preview image in turn as the image blocks in the target region on each frame of image in the N frames of images, which helps to improve the continuity and smoothness of the preview image. It is assumed that after the mobile phone detects the instruction for indicating the image moving direction, the target region is determined in the way of A = B = C = L, that is, the position of the preview image on the image is uniformly right shifted. FIG. 19A It is assumed that the mobile phone determines the target region in the way of A < B < C < D, and the position of the preview image on the image is accelerated right shifted. It is assumed that the mobile phone determines the target region in the way of A > B > C > D, and the position of the preview image on the image is decelerated right shifted. FIG. 19B It is assumed that the mobile phone determines the target region in the way of A < B < C < D, and the position of the preview image on the image is accelerated right shifted. It is assumed that the mobile phone determines the target region in the way of A > B > C > D, and the position of the preview image on the image is decelerated right shifted.

[0429] The second way

[0430] The super wide-angle camera collects N frames of images, and the mobile phone extracts M frames of images from the N frames of images collected by the super wide-angle camera, where M is an integer less than N. The preview image is refreshed by using the image blocks in the target region on each frame of the M frames of images, so that the effect of fast refreshing (or playing) can be achieved. For example, it is assumed that the image collection frame rate of the super wide-angle camera is 240 fps, that is, 240 frames of images are collected per second. It is assumed that the image playing (or refreshing) frame rate of the mobile phone is 30 fps, that is, 30 frames are refreshed per second, and then the 240 frames of images need to be refreshed for 8 seconds. It is assumed that the mobile phone extracts 120 frames of images from the 240 frames of images, and the 120 frames extracted only need to be refreshed for 4 seconds, that is, the effect of fast refreshing is achieved.

[0431] Example 1, see FIG. 18 As shown in FIG. 1, the super wide-angle camera collects N frames of images, for example, first, second, m-1th, and so on. It is assumed that before the preview image is refreshed to the mth region on the mth image, the mobile phone detects an image right-moving instruction, and the mobile phone determines the target region on the mth image and each subsequent image of the N frames of images. It is assumed that the position of the target region on the subsequent image is right-shifted by the same distance L relative to the position of the target region on the previous image (that is, in the manner of A = B = C = L).

[0432] Then, the mobile phone starts frame extraction. It is assumed that frame extraction starts from the mth frame, and the mth, m+i th, and m+i+j th frames are extracted. The mth region on the mth frame is right-shifted by a distance L relative to the m-1th frame, the m+i th region on the m+i th image is right-shifted by a distance i L relative to the mth frame, and the m+i+j th region on the m+i+j th image is right-shifted by a distance j L relative to the m+i th frame.

[0433] Continuing to refer to FIG. 18 As shown in FIG. 1, it is assumed that during the process of displaying the image blocks in the m+i+j th region of the preview image, the mobile phone detects an image stop-moving instruction. The mobile phone continues to refresh the preview image by using the image blocks in the target region on the m+i+j+1 th, m+i+j+2 th, and so on images. That is, after the mobile phone detects the image stop-moving instruction, the frame extraction refreshing manner is no longer used, and the positions of the target regions on the m+i+j+1 th, m+i+j+2 th, and so on images on the image do not change, that is, stop moving. That is, after the mobile phone detects the instruction for indicating the image moving direction, the frame extraction refreshing manner is used to refresh the preview image, and the position of the preview image on the image gradually moves according to the image moving direction. When the image stop-moving instruction is detected, the frame extraction refreshing manner is no longer used, and the position of the preview image on the image no longer moves.

[0434] Continuing to refer to FIG. 19AFor example, the values of i and j can be understood as the frame extraction intervals, and different values of i and j result in different shooting effects.

[0435] Assume i = j, which can be understood as having the same frame extraction interval. For example, i = j = 2, that is, extracting one frame every other frame, or saying extracting one frame every two frames. That is to say, after the mobile phone detects an image right shift instruction, the preview is refreshed successively with the image blocks in the m-th area, the (m + 2)-th area, the (m + 4)-th area, etc. The m-th area is shifted 2L to the right relative to the (m + 2)-th area, and the (m + 4)-th area is shifted 2L to the right relative to the (m + 2)-th area. That is, the preview image refreshed each time is shifted 2L to the right on the image relative to the previous frame preview image. Comparing FIG. 19C with the case where A = B = C = L in FIG. 19D it can be seen that in the shown embodiment, by means of frame extraction, the position of the preview image on the image can be shifted to the right uniformly at a relatively fast speed (shifting 2L each time). Moreover, frame extraction refreshing can achieve the effect of fast refreshing. That is to say, while the preview image is refreshed at a relatively fast speed, the position of the preview image on the image is shifted to the right uniformly at a relatively fast speed.

[0436] Of course, the frame extraction intervals can also be different, that is, i is not equal to j. Assume i < j. For example, i = 2, j = 3. That is, after the mobile phone detects an image right shift instruction, the preview image is refreshed successively with the image blocks in the m-th area, the (m + 2)-th area, the (m + 5)-th area, etc. Among them, the (m + x)-th area is shifted 2L to the right relative to the m-th area, and the (m + 5)-th area is shifted 3L to the right relative to the (m + 2)-th area. Therefore, after the mobile phone detects an image right shift instruction, the preview image refreshed each time is shifted to the right with an accelerated speed relative to the previous frame preview image on the image. Moreover, frame extraction refreshing can achieve the effect of fast refreshing. That is to say, while the preview image is refreshed at a relatively fast speed, the position of the preview image on the image is shifted to the right with an accelerated speed.

[0437] Assume i > j. For example, i = 3, j = 2. That is, after the mobile phone detects an image right shift instruction, the preview image is refreshed successively with the image blocks in the m-th area, the (m + 3)-th area, the (m + 5)-th area, etc. Among them, the (m + x)-th area is shifted 3L to the right relative to the m-th area, and the (m + 5)-th area is shifted 2L to the right relative to the (m + 3)-th area. Therefore, after the mobile phone detects an image right shift instruction, the preview image refreshed each time is shifted to the right with a decelerated speed relative to the previous frame preview image on the image. Moreover, frame extraction refreshing can achieve the effect of fast refreshing. That is to say, while the preview image is refreshed at a relatively fast speed, the position of the preview image on the image is shifted to the right with a decelerated speed.

[0438] The above gives three examples of the value relationship between i and j. The embodiments of the present application do not limit the value magnitudes between i and j, and those skilled in the art can flexibly set them to achieve different technical effects.

[0439] Example 2: In the above Example 1, the mobile phone first determines the target area on each frame of the image and then extracts frames. In this Example 2, the mobile phone can first extract frames and then determine the target area on the extracted images. Refer to FIG. 19D , before the preview image is refreshed to the m-th frame of the image, the mobile phone detects an image right shift instruction, and the mobile phone starts to extract frames from the m-th frame of the image, assuming M frames of images are extracted. Here, the frame extraction interval of the image is not limited. The mobile phone determines the target area on each of the M frames of images. The method for determining the target area on the M frames of images can be referred to FIG. 18 for the description in, which will not be repeated here. Assume that the mobile phone determines the target area on the M frames of images in the manner of A = B = C = L. Since frame extraction and refreshing can achieve the effect of fast refreshing, that is, while the preview image is refreshed at a relatively fast speed, the position of the preview image on the image moves uniformly to the right. Assume that the mobile phone uses FIG. 18 the method of A < B < C < D in to determine the target area, that is, while the preview image is refreshed at a relatively fast speed, the position of the preview image on the image moves to the right at an accelerated speed. Assume that the mobile phone uses the method of A > B > C > D to determine the current area, that is, while the preview image is refreshed at a relatively fast speed, the position of the preview image on the image moves to the right at a decelerated speed.

[0440] It should be noted that taking FIG. 16 as an example, assume that before the preview image is refreshed to the m-th frame of the image, the mobile phone detects an image right shift and an accelerated right shift instruction, and the preview image is refreshed in the above first method, that is, without using the frame extraction method for refreshing, and is successively refreshed to the image blocks in the m-th area, the m + 1-th area, the m + 2-th area, etc. Assume that before the preview image is refreshed to the m + i + j + 1-th frame of the image, the mobile phone detects a stop movement instruction, then a video is generated, and the video is composed of the image blocks located in the target area on the images extracted from the m-th frame to the m + i + j + 1-th frame. For example, the m-th area, the m + i-th frame, and the m + i + j-th frame are extracted, so the video can be a video composed of the image blocks in the m-th area, the image blocks in the m + i-th area, the image blocks in the m + i + j-th area, etc. That is to say, after the mobile phone detects an image right shift and an accelerated right shift instruction, the preview image does not use the frame extraction method for refreshing. When the instruction to stop the right shift is detected, the generated video can be a video composed of the image blocks in the target area on the extracted images. Not using the frame extraction method during the refreshing process of the preview image can save computational effort and improve efficiency.

[0441] The third method

[0442] The ultra-wide-angle camera collects N frames of images. The mobile phone inserts multiple frames of images in the N frames of images to obtain M frames of images, M being an integer greater than N, and the M frames of images are used to refresh the preview images in sequence. Since the number of images is increased, the effect of slow refresh (or play) can be achieved. For example, assuming that the image collection frame rate of the ultra-wide-angle camera is 240 fps, i.e., 240 frames of images are collected per second. Assuming that the image refresh (or play) frame rate of the mobile phone is 30 fps, i.e., 30 frames are refreshed per second, then the 240 frames of images need to be refreshed for 8 seconds. Assuming that the mobile phone inserts 120 frames of images in the 240 frames of images to obtain 360 frames of images, then it only needs 12 seconds to refresh, i.e., the effect of slow refresh is achieved.

[0443] Example 1, see FIG. 16 As shown in FIG. 1, the ultra-wide-angle camera collects N frames of images, for example, first frame, second frame, m-1 frame, and so on. Assuming that before the preview image is refreshed to the mth frame, the mobile phone detects an image right shift instruction, the mobile phone determines the target region on the mth frame and each frame of image thereafter, and the position of the target region on the next frame of image is right shifted by a certain same distance L relative to the position of the target region on the previous frame of image.

[0444] Then, the mobile phone starts the frame insertion processing, assuming that P frames of images are inserted between the mth frame and the m+1th frame (the inserted images are represented by dashed lines), and Q frames of images are inserted between the m+1th frame and the m+2th frame. Wherein, P and Q can be the same or different.

[0445] Assuming that P=Q=1, i.e., one frame is inserted every other frame. The mobile phone can determine the Pth region on the Pth frame of image (i.e., one frame of image inserted between the mth frame and the m+1th frame), the Pth region is right shifted by a distance X relative to the mth region, the value of X is not limited by the embodiments of the present application, for example, X can be a value within the range of L to 2L, such as 1.5L. The mobile phone determines the Qth region on the Qth frame of image (i.e., one frame of image inserted between the m+1th frame and the m+2th frame), the Qth region is right shifted by a distance Y relative to the m+1th region, the value of Y is not limited by the embodiments of the present application, for example, Y can be a value within the range of 2L to 3L, such as 2.5L.

[0446] Taking X=1.5L as an example, and Y=2.5L as an example, after the mobile phone detects the image right shift instruction, the preview image is refreshed in sequence as the mth region, the Pth region, the m+1th region, the Qth region, and so on. Therefore, the preview image is right shifted by 0.5L each time, i.e., the position of the preview image on the image is right shifted at a uniform speed at a slower speed. Moreover, the frame insertion refresh can achieve the effect of slow refresh of the preview image, that is, while the preview image is refreshed at a slower speed, the position of the preview image on the image can be right shifted at a uniform speed at a lower speed.

[0447] It can be understood that the values of X and Y above are related to the right-moving speed of the image, and embodiments of the present application are not limited. The values of P and Q can be flexibly set by those skilled in the art to achieve different effects.

[0448] It can be understood that, during the process of displaying the image block in the m+2 region of the preview image, if the mobile phone detects a stop image moving instruction, the image block in the m+3 region of the m+3 frame image, the image block in the m+4 region of the m+4 frame image, and so on are determined. That is, after the mobile phone detects the image stop moving instruction, the interpolation method is no longer used for processing, and the position of the preview image on the image no longer moves.

[0449] In Example 2, in the above-mentioned Example 1, the mobile phone first determines the target region on each frame of image, and then performs interpolation processing. In this Example 2, the mobile phone can first perform interpolation, and then determine the target region. Referring to FIG. 16 It is assumed that, before the preview image is refreshed to the mth frame of image, the mobile phone detects a right-moving instruction, and the mobile phone starts interpolation processing from the mth frame of image to obtain the Mth frame of image. Here, the number of image frames inserted between two adjacent frames is not limited. Taking the insertion of 1 frame between two adjacent frames as an example, as shown in FIG. 16 The dashed line image is the inserted image. The way in which the mobile phone determines the target region on the Mth frame of image can refer to the description of FIG. 16 and will not be repeated here. It is assumed that the mobile phone determines the target region on the Mth frame of image in the manner of A=B=C=L, and since interpolation refresh can achieve the effect of slow refresh, that is, the preview image is refreshed at a slower speed, and at the same time, the position of the preview image on the image moves at a constant speed to the right. It is assumed that the mobile phone determines the target region in the manner of A

[0450] In some embodiments, after the mobile phone detects an instruction for indicating the moving direction of the image, the first method above is used by default for processing, and the target region is determined in the manner of A=B=C=L in the first method by default, that is, the position of the preview image on the image moves at a constant speed to the right. After the mobile phone detects an instruction for accelerating movement, the target region can be determined in the manner of A

[0451] It should be noted that the side edges of the current regions can be aligned during the movement of the positions of the current regions on different frames of images. Taking FIG. 16 For example, the side edges of the first region and the second region are aligned, for example, the distance between the bottom edge of the first region and the bottom edge of the first frame of images is the same as the distance between the bottom edge of the second region and the bottom edge of the second frame of images, so as to ensure as much as possible that the preview image is stably displayed. In some embodiments, the user may shake the mobile phone during holding the mobile phone. In order to alleviate the case that the user shaking causes the preview image to be unstable, an implementable manner is that the mobile phone performs anti-shake processing on the image captured by the ultra-wide-angle camera, and determines the target regions such as the first region, the second region and the third region on the image after the anti-shake processing. The anti-shake processing can be anti-shake cropping. Generally, during the user shaking, the image in the edge region of the preview image changes rapidly and is unstable; the image in the central region of the preview image changes relatively small and is relatively stable. Therefore, the mobile phone can crop the edge of each frame of image captured by the ultra-wide-angle camera, and the specific cropping area is not limited in the embodiments of the present application. For example, the mobile phone determines the first region on the image after cropping the first frame of image, determines the second region on the image after cropping the second frame of image, determines the third region on the image after cropping the third frame of image, and the like. Therefore, the preview image is visually more stably displayed.

[0452] Another possible implementation manner is that the mobile phone can determine the first region on the first frame of image, perform anti-shake cropping on the first image block in the first region, for example, crop the edge of the first image block, and display the image after the edge cropping of the first image block on the preview image. Similarly, the mobile phone can determine the second region on the second frame of image, perform anti-shake cropping on the second image block in the second region, and the like. That is, the mobile phone first determines the image block in the target region on each frame of image, and then performs anti-shake cropping processing.

[0453] It is mentioned above that there are various ways for the user to input a manner for indicating the image moving direction, including but not limited to the following examples.

[0454] Example 1, referring to FIG. 19A The viewfinder interface further includes a direction control 1311. The direction control 1311 can include four arrows distributed around the recording control 1307. When the mobile phone detects that the user clicks (such as single-clicks) a certain arrow, the mobile phone starts to move the first region based on the direction indicated by the arrow. For example, the user clicks the right arrow, and the position of the preview image on the image starts to move to the right. The mobile phone stops moving when detecting the user's click operation at any position in the viewfinder interface; or stops moving when detecting again the right arrow; or automatically stops moving after a certain time length.

[0455] Example 2, referring to FIG. 19CWhen the mobile phone detects that the user presses a certain arrow for a preset length of time, the mobile phone starts moving the first area in the direction indicated by the arrow. When the mobile phone detects that the user releases the long-press operation, the mobile phone stops moving.

[0456] Example 3, see FIG. 20 When the mobile phone detects that the user presses the recording control 1307 and drags (or also referred to as slides) in a certain direction, the mobile phone starts moving the first area in the direction indicated by the dragging operation. For example, the user presses the recording control 1307 and drags to the right, and the mobile phone moves the first area to the right. When the mobile phone detects that the user releases the dragging operation, the mobile phone stops moving. In this case, when the mobile phone detects that the user presses the recording control 1307 and releases at the pressed position, the mobile phone determines that the recording starts. When the mobile phone detects that the user presses the recording control 1307 and drags to a position other than the pressed position, the mobile phone determines the direction of the dragging operation, i.e., the image moving direction, and moves the first area in the direction.

[0457] Example 4, see FIG. 20 When the mobile phone detects that the user performs a sliding operation on the screen (e.g., on the preview image), the mobile phone starts moving the first area in the sliding direction of the sliding operation. When the mobile phone detects that the sliding operation stops, the mobile phone stops moving the first area. In this case, the direction control 1311 can not be displayed in the viewfinder interface.

[0458] Example 5, the user inputs the image moving direction through a voice instruction. The user can click any position in the viewfinder interface or indicate the end of the moving through a voice instruction. In this case, the direction control 1311 can not be displayed in the viewfinder interface.

[0459] When the method provided in the embodiments of the present application is applied to a notebook computer or the like, the image moving direction can also be input through a keyboard, a touchpad, or the like.

[0460] The acceleration moving instruction or the deceleration moving instruction mentioned above can be obtained in the following manner.

[0461] Example, see FIG. 20 As shown, the viewfinder interface displays an identifier 1320 for indicating the moving speed. The moving speed here can be understood as the amount of change in the position of the preview image on the image. The identifier 1320 is by default set to 1X. The 1X here can be understood as 1 times the L. That is, when the identifier 1320 is 1X, the mobile phone can process in the manner of A=B=C=L. When the user clicks the identifier 1320, the speed adjustment bar 1321 is displayed. Example, when the user clicks the speed adjustment bar 1321, the identifier 1320 is set to 2X. In this case, the mobile phone can process in the manner of A=2B=2C=L. When the user clicks the speed adjustment bar 1321 again, the identifier 1320 is set to 0.5X. In this case, the mobile phone can process in the manner of A=0.5B=0.5C=L. FIG. 20The middle speed adjustment bar 1321 provides a maximum speed of 3X and a minimum speed of 0.5X, which is not limited in the embodiment of the present application. It can be understood that 1X, 2X, 3X, etc. can be understood as multiples of L, 3X is 3 times of L, and 2X is 2 times of L. The user selects the speed by sliding operation on the speed adjustment bar 1321. Assuming that the user selects the speed of 2X, the identifier 1320 displays the value of 2X. The mobile phone can use FIG. 20 the manner shown (the manner of frame extraction), and processes in the manner of i=j=2, to achieve the effect that the position of the preview image on the image moves by 2L each time. Assuming that the user selects the speed of 0.5L, the mobile phone can use FIG. 21 the manner shown (the manner of frame insertion), and processes in the manner of P=Q=1, to achieve the effect that the position of the preview image on the image moves by 0.5L each time.

[0462] It can be understood that the mobile phone can also set the speed in other manners, for example, by using the volume button to set the speed. For example, the mobile phone detects that the volume increase button is triggered, and then increases the speed, and detects that the volume decrease button is triggered, and then decreases the speed. It should be noted that the embodiment of the present application does not limit the form of the mobile phone to set the speed, for example, it is also feasible to provide three speed levels, i.e. low speed, medium speed and high speed, on the viewfinder interface for the user to select.

[0463] For example, referring to FIG. 21 the mobile phone in the embodiment of the present application in the moving mode. As shown in FIG. 16 (a), the preview image 1 is displayed in the viewfinder interface. The mobile phone remains stationary, and when the mobile phone detects the click operation on the downward arrow, the preview image 1 is refreshed to the preview image 2, as shown in FIG. 22 (b), the scene included in the preview image 2 is located below the scene in the preview image 1, which is equivalent to the mobile phone moving downward to shoot. The mobile phone continues to refresh the preview image 2 to the preview image 3, as shown in FIG. 23 (c), the scene in the preview image 3 is located below the scene in the preview image 2, which is equivalent to the mobile phone continuing to move downward to shoot. Assuming that the mobile phone detects that the user clicks any position on the screen, the movement ends. As shown in FIG. 24 It can be understood that in the process of the mobile phone remaining stationary, the scene in the preview image gradually moves downward, achieving the effect of the lens moving downward.

[0464] Embodiment 2

[0465] For example, FIG. 25A schematic diagram of the GUI for a mobile phone when it enters shake mode is shown. To help users distinguish which mode is currently in, a prompt message 1313 may be displayed in the viewfinder interface when the mobile phone enters shake mode. This prompt message 1313 is used to indicate that the mobile phone is currently in shake mode. Of course, when the mobile phone switches from normal recording mode to shake mode, other reminders, such as vibration feedback, may also be output. The prompt message 1313 may be displayed in a semi-transparent or transparent manner to minimize obstruction of the preview image. The GUI may also include a direction control 1311. The user can use this direction control 1311 to input the direction in which the image is to be moved.

[0466] by FIG. 25 Take the example to introduce the process of recording video using the shake mode on a mobile phone.

[0467] The process of switching from normal recording mode to panning mode on a mobile phone can be found in the section about switching between normal recording mode and panning mode, and will not be repeated here. In panning mode, the mobile phone can achieve a "panning" effect by inputting the image movement direction by the user. The methods for inputting the image movement direction and the method for inputting the stop movement command are described above and will not be repeated here.

[0468] Unlike the pan mode, in the shake mode, after the phone determines the target area on the image, it performs a perspective conversion on the image blocks in the target area, and then refreshes the preview image with the perspective-converted image blocks. FIG. 24 For example, when the phone detects a right-pan command, it determines the mth region on the mth frame and performs a perspective conversion on the image blocks within the mth region. The phone then determines the m+1th region on the m+1th frame and performs a time conversion on the image blocks within the m+1th region, and so on. Therefore, after the phone detects a right-pan command, the preview image is sequentially refreshed to the image blocks within the mth region that have undergone perspective conversion, the image blocks within the m+1th region that have undergone perspective conversion, and so on.

[0469] It should be noted that the various implementation methods in the shift mode, such as frame extraction and frame insertion, are also applicable in the shake mode and will not be repeated here.

[0470] If the view angle transformation process of the image block is as described above, the rotation angle θ can be determined in various ways. For example, the rotation angle θ is preset, such as a preset fixed value. Alternatively, when the user inputs the image movement direction by sliding operation on the screen, the rotation angle is related to the sliding operation. For example, the mobile phone stores the correspondence between the sliding distance W of the sliding operation and the rotation angle θ, detects the sliding operation of the user on the screen, determines the sliding distance W of the sliding operation, and determines the corresponding rotation angle θ based on the distance W and the correspondence. For example, the farther the sliding distance W of the sliding operation, the greater the rotation angle. Alternatively, the rotation angle θ can also be related to the display value of the identifier 1320. Assuming that the identifier 1320 displays 2, the rotation angle θ is 2 times the preset angle, and the value of the preset angle is not limited in the present application.

[0471] Embodiment 3

[0472] In some embodiments, the size of the image captured by the ultra-wide-angle camera is limited, and when the first region is translated to the edge of the image of the ultra-wide-angle camera, the mobile phone outputs a prompt information to prompt the user to move the position of the mobile phone. For example, in the shift mode, refer to FIG. 19A As shown in the figure, the mobile phone detects that the user continuously presses the down arrow, and the position of the preview image on the image gradually moves downward. When it moves to the edge of the image captured by the ultra-wide-angle camera, the mobile phone can output a prompt information 1330 to prompt the user to manually move the mobile phone downward, or output a prompt information for prompting that the user cannot continue to move.

[0473] It should be understood that when the mobile phone detects the operation on the recording control 1307, the video recording is started. After starting the recording, the user can also instruct to enter the shift mode or the shake mode, and then input the image movement direction. The mobile phone translates the position of the target region on the image captured by the ultra-wide-angle camera according to the direction, and constantly updates the preview image based on the image block in the target region. The mobile phone stores the preview image, and when it detects the operation on the stop recording control, synthesizes the stored preview image into a video, and keeps the video.

[0474] In some embodiments, after the mobile phone records a video using the shake mode or the shift mode, two videos can be stored correspondingly, one of which is a complete video, that is, each frame of image in the video is a complete image captured by the ultra-wide-angle camera. The other video is the video recorded using the shift mode or the shake mode, and each frame of image in the video is an image block on the image captured by the ultra-wide-angle camera. For example, refer to FIG. 19C As shown in the figure, two videos are stored in the video folder in the album of the mobile phone, one of which is a complete video, and the other is a video recorded using the shift mode or the shake mode. The identifier 2301 can be displayed on the video recorded using the shift mode or the shake mode to facilitate the user to distinguish.

[0475] Example 4

[0476] In other embodiments, the mobile phone may further provide an image rotation mode, in which the image rotation shooting effect can be achieved without the user manually rotating the mobile phone (for example, the mobile phone remains stationary).

[0477] For example, when the mobile phone is in pan mode or shake mode, if a preset operation (for example, a double-click operation or a long press operation on the preview image) is detected in the preview image, the image rotation mode is entered. FIG. 24 As shown, it is a schematic diagram of the viewfinder interface in image rotation mode. The viewfinder interface includes an indication message 1360 for indicating that it is currently in image rotation mode. Optionally, the prompt message 1360 may not be displayed. The viewfinder interface also includes a preview box 1361, in which the image captured by the ultra-wide-angle camera (for example, the complete image captured by the ultra-wide-angle camera) is displayed. The preview box 1361 displays a target box 1362, and the image block in the target box 1362 is the current preview image. The viewfinder interface also includes an icon 1363 for indicating the rotation progress and an icon 1364 for setting the rotation speed.

[0478] For example, see FIG. 26 As shown, assuming that the preview image is refreshed before the mth frame, a command for rotating the image clockwise is detected. The phone determines the target area on the mth frame, namely the mth region, and rotates the image blocks within the mth region clockwise by an angle of G. The phone then determines the m+1th region on the m+1th frame, whose position relative to the mth region remains unchanged, and rotates the image blocks within the m+1th region clockwise by an angle of 2G, and so on. Therefore, after the phone detects the clockwise rotation command, the preview image is sequentially refreshed to the image blocks within the mth region rotated clockwise by an angle of G, the image blocks within the m+1th region rotated clockwise by an angle of 2G, the image blocks within the m+2th region rotated clockwise by an angle of 3G, and so on. As a result, the preview image gradually rotates clockwise, and the preview image rotates by the same angle each time it is refreshed, i.e., it rotates at a constant speed.

[0479] Assume that a stop rotation command is detected before the preview image is refreshed to the (m+3)th frame. The phone determines the (m+3)th region on the (m+3)th frame, which remains unchanged relative to the (m+2)th region. The phone then rotates the image blocks within the (m+3)th region clockwise by an angle of 3G, meaning that the rotation angle relative to the image blocks within the (m+2)th region remains unchanged, thus stopping the rotation.

[0480] It is understandable that FIG. 27The rotation angle between the two adjacent frames in the illustrated embodiment is G, but the rotation angle between the two adjacent frames can also be different. For example, the image block in the m-th region is rotated by an angle G, and the image block in the m+1-th region is rotated by an angle 3G, that is, the preview image is accelerated rotation. Alternatively, the image block in the m-th region is rotated by an angle G, and the image block in the m+1-th region is rotated by an angle 0.5G, that is, the preview image is decelerated rotation, and so on.

[0481] It should be noted that the frame extraction refresh or frame insertion refresh manner described above can also be applied in this embodiment. For example, the frame extraction manner can realize accelerated rotation, and the frame insertion manner can realize decelerated rotation. For example, see FIG. 28 As shown, assuming that the mobile phone detects an operation on the "+" of the icon 1364, it means that the user expects to increase the rotation angle, and the mobile phone can realize it by the frame extraction manner, similar to FIG. 28 The frame extraction manner in the illustrated embodiment realizes the effect that the rotation angle of the preview image refreshed each time is 2G. Assuming that the mobile phone detects an operation on the "-" under the icon 1364, it means that the user expects to reduce the rotation angle, and the mobile phone can realize it by the frame insertion manner, similar to FIG. 29 The frame insertion manner in the illustrated embodiment realizes the effect that the rotation angle of the preview image refreshed each time is 0.5G.

[0482] The manner in which the mobile phone detects the instruction for indicating the rotation direction of the image mentioned above can be various. For example, see FIG. 29 As shown, when the mobile phone detects an operation on the icon 1363, the default is clockwise or counterclockwise rotation, which can be set by the user. For another example, the icon 1363 displays an arrow pointing to the left and an arrow pointing to the right. When the mobile phone detects that the user clicks the arrow pointing to the left, the counterclockwise rotation is performed, and when the mobile phone detects that the user clicks the arrow pointing to the right, the clockwise rotation is performed.

[0483] For example, after the mobile phone detects an operation of clicking the icon 1363, the rotation is started, and the rotation is automatically stopped after a preset time (for example, 5s). The mobile phone can keep the video composed of the preview images during the rotation starting to ending.

[0484] Alternatively, after the mobile phone detects an operation of clicking the icon 1363, the rotation is started, and the rotation is stopped until the rotation is 360 degrees.

[0485] Alternatively, after the mobile phone detects an operation of clicking the icon 1363, the rotation is started, and the rotation is stopped until the user inputs an instruction to stop the rotation. For example, the mobile phone detects a single-click operation of the user at any position in the preview interface, stops the rotation, or detects an operation of clicking the icon 1363 again, stops the rotation.

[0486] Alternatively, the phone starts rotating when detecting a long-press operation on the icon 1363 (the long-press operation lasts longer than a preset time length), and stops rotating when detecting that the long-press operation is released.

[0487] It can be understood that the image rotation can be performed before starting the video recording (e.g., before clicking a video recording control for instructing to start the video recording) or after starting the video recording (e.g., after clicking the video recording control for instructing to start the video recording).

[0488] Exemplarily, FIG. 28 A schematic diagram of the image rotating counterclockwise is shown. During the preview image rotating counterclockwise, the target frame 1362 in the viewfinder interface can also rotate synchronously to prompt the user about the approximate angle of the current preview image rotation. The current rotation progress can also be displayed on the icon 1363. The rotation direction of the target frame 1362 can be the same as or different from the rotation direction of the preview image, which is not limited in the embodiments of the present application.

[0489] Embodiment 5

[0490] In some other embodiments, the phone can also provide a push-pull mode. In the push-pull mode, the phone can realize the shooting effect of "pushing the lens" or "pulling the lens". The "pushing the lens" can be understood as a shooting mode in which the camera is pushed close to the object, i.e., the object in the viewfinder interface is enlarged, which helps to focus on the details of the object. The "pulling the lens" can be understood as a shooting mode in which the camera is away from the object, i.e., the object in the viewfinder interface is reduced, which helps to shoot the overall appearance of the object.

[0491] Exemplarily, when the phone is in the image rotation mode, the shift mode or the shake mode, if the phone detects a preset operation (e.g., a double-click operation or a long-press operation on the preview image) in the preview image, the phone enters the push-pull mode. The embodiments of the present application provide multiple modes, i.e., the normal video recording mode, the shake mode, the shift mode, the image rotation mode and the push-pull mode. In some embodiments, the phone detects a double-click operation of the user in the preview image to realize the cyclic switching between different modes.

[0492] Referring to FIG. 30 As shown in the figure, a schematic diagram of the viewfinder interface in the push-pull mode is shown. The viewfinder interface includes an instruction information 1370 for indicating that the current mode is the push-pull mode. Optionally, the instruction information 1370 can also not be displayed. The viewfinder interface also includes a preview frame 1371 in which the image captured by the ultra-wide-angle camera is displayed. The preview frame 1371 displays a target frame 1372, and the image block in the target frame 1372 is the current preview image. The viewfinder interface also includes an icon 1373 for indicating the pulling lens, an icon 1374 for indicating the pushing lens, and an icon 1375 for setting the push-pull speed.

[0493] The following embodiment takes zooming in as an example to introduce the process of zooming in while keeping the mobile phone still.

[0494] For example, see FIG. 13 As shown, assuming that the preview image is refreshed before the mth frame, the phone detects a zoom command and determines the target area on the mth frame, namely the mth region, where the area of ​​the mth region is larger than the area of ​​the m-1th region. The phone then determines the m+1th region on the m+1th frame, where the area of ​​the m+1th region is larger than the area of ​​the m+1th region, and so on. Therefore, after the phone detects the zoom command, the preview image is sequentially refreshed to the image blocks within the mth region, the image blocks within the m+1th region, the image blocks within the m+2th region, and so on. As a result, the area occupied by the preview image gradually increases, and the viewing angle of the preview image becomes increasingly wider, achieving the effect of the camera gradually moving away from the object.

[0495] Suppose that before the preview image refreshes to the (m+3)th frame, a stop zoom command is detected. The phone determines that the (m+3)th region on the (m+3)th frame remains unchanged relative to the (m+2)th region, indicating that the zoom has stopped. Therefore, after the phone detects the stop zoom command, the area occupied by the preview image no longer increases, and the camera visually no longer appears to be moving away from the object.

[0496] It is understandable that FIG. 14 In the embodiment shown, the amount of change in the area of ​​the target area between two adjacent frames of image may be the same or different. Assuming that the amount of increase in the area of ​​the target area on two adjacent frames of image is the same, that is, the area of ​​the target area increases at a uniform rate, that is, the shooting effect of the camera moving away from the object at a uniform rate is achieved. Assuming that the area of ​​the m+1th region is S larger than the area of ​​the mth region, and the area of ​​the m+2th region is 2S larger than the area of ​​the m+1th region, that is, the area of ​​the target area increases at an accelerated rate, that is, the shooting effect of the preview image moving away from the object is achieved. Assuming that the area of ​​the m+1th region is S larger than the area of ​​the mth region, and the area of ​​the m+2th region is 0.5S larger than the area of ​​the m+1th region, that is, the area of ​​the target area increases at a decelerated rate, that is, the shooting effect of the preview image moving away from the object is achieved at a decelerated rate.

[0497] It should be noted that the frame extraction refresh or frame insertion refresh method mentioned above can also be applied to this embodiment to achieve different effects, and will not be repeated here.

[0498] There are many ways for a mobile phone to obtain a zoom instruction, including but not limited to the following methods.

[0499] For example, after the mobile phone detects the operation of clicking icon 1373, it starts to enlarge the area of ​​the target area and automatically stops enlarging after a preset time (e.g., 5 seconds). The mobile phone can keep a video composed of the preview images from the beginning of the enlargement to the end of the enlargement.

[0500] Alternatively, after the mobile phone detects the operation of clicking icon 1373, it starts to increase the area of ​​the target area until it is equal to the area of ​​the complete image captured by the ultra-wide-angle camera.

[0501] Alternatively, after the mobile phone detects a click on icon 1373, it begins to enlarge the target area until it detects a user input to stop enlarging. For example, the mobile phone detects a single click anywhere in the preview interface and stops enlarging, or detects a second click on icon 473 and stops enlarging.

[0502] Alternatively, when the mobile phone detects a long press operation of the icon 1373 (the duration of pressing the icon 1373 is greater than a preset duration), it starts to increase the area of ​​the target area, and stops increasing when the mobile phone detects that the long press operation pops up.

[0503] For example, FIG. 14 For example, the phone detects that the user clicks the icon 1373 for instructing zooming in, and starts to increase the area of ​​the target area on the image. Accordingly, the preview image is gradually refreshed to the image block in the target area with a larger area, achieving the effect of the object gradually moving away from the camera. FIG. 17 The area of ​​the target frame 1372 in the viewfinder interface can be increased synchronously to prompt the user the approximate proportion of the current preview image to the complete image.

[0504] It should be noted that the above-mentioned zoom lens is used as an example, and a similar method can be used for a push lens. For example, when the mobile phone detects the instruction of the push lens, it can be similar to FIG. 16 The target area is determined in the manner shown, except that the target area in the next frame is smaller than that in the previous frame, thereby magnifying the preview image. When the phone detects a command to stop zooming, the reduction of the target area stops, and the preview image stops magnifying.

[0505] In some embodiments, after a mobile phone records a video using pan mode, shake mode, or image rotation mode, it can automatically create music for the video. For example, a selected sound can be used to create music for the video. The sound can be a sound that the user has previously selected from a variety of sounds provided by the camera application. The sound can include a song clip, ringtone, or other sound, and the embodiments of the present application are not limited thereto.

[0506] It should be noted that various embodiments of the present application can be combined in any manner to achieve different technical effects. For example, during the clockwise rotation of the preview image, the preview image is gradually reduced or enlarged; or, while the preview image gradually moves to the left on the image, the preview image is gradually enlarged, and the like, which are not limited by the embodiments of the present application.

[0507] In combination with the above embodiments and related drawings, the embodiments of the present application provide a display method of a preview image in a video recording scene, which can be implemented in an electronic device (such as a mobile phone, a tablet computer, etc.) as shown in FIG. 2. As shown, the method can include the following steps: FIG. 18

[0508] 3001, detecting a first operation for opening a camera.

[0509] For example, the first operation is an operation of a user clicking an icon 402. FIG. 18 (a) For example, the first operation is an operation of a user clicking an icon 402.

[0510] 3002, in response to the first operation, starting the camera.

[0511] 3003, detecting a second operation for indicating a first video recording mode.

[0512] In the embodiments of the present application, the electronic device can provide multiple recording modes. For example, a normal video recording mode and a first video recording mode (for example, including a shift mode and a shake mode), the electronic device can enter a certain mode under the indication of a user. For example, FIG. 18 (a) For example, the electronic device displays a viewfinder interface in a normal video recording mode, and after detecting an operation of clicking a lens shift mode control 408, the electronic device displays a selection box 1309, and the second operation can be an operation of clicking a "shake mode" or a "shift mode" option in the selection box 1309. Assuming that the second operation is an operation of clicking the "shift mode" option in the selection box 1309, the electronic device enters the shift mode.

[0513] 3004, in response to the second operation, displaying a viewfinder interface on a display screen of the electronic device, the viewfinder interface including a first preview image, the first preview image being a first image block in a first region of a first image collected by a first wide-angle camera on the electronic device.

[0514] Continuing with FIG. 18 (b) For example, when the electronic device detects the second operation (the operation of clicking the "shift mode" option in the selection box 1309), the electronic device enters the shift mode, and the viewfinder interface displays a first preview image, which is a first image block in the first region of the first image collected by the first wide-angle camera (for example, a super wide-angle camera). For example, FIG. 16 ​In the image shown, the first preview image is an image block within the first area of ​​the first image.

[0515] It is understandable that the electronic device uses the second wide-angle camera in normal recording mode. When the electronic device detects the second operation for indicating the first recording mode (such as shift mode), the first wide-angle camera is started. The field of view of the second wide-angle camera is smaller than the field of view of the first wide-angle camera. The first wide-angle camera is, for example, an ultra-wide-angle camera, and the second wide-angle camera is, for example, an ordinary wide-angle camera. That is to say, after the electronic device switches from normal recording mode to shift mode, and then switches from an ordinary wide-angle camera to an ultra-wide-angle camera, the first preview image is the first image block in the first area on the first image captured by the ultra-wide-angle camera. It is understandable that the above-mentioned first image can be the first frame of image captured by the ultra-wide-angle camera after the electronic device switches from normal recording mode to first recording mode and starts the ultra-wide-angle camera.

[0516] 3005 , the electronic device is kept in a fixed position, and a third operation indicating a direction of image movement is detected.

[0517] The third operation can be implemented in many ways. FIG. 18 For example, the third operation may be an operation in which the user clicks on an arrow (such as a right arrow) in the direction control 1311, and the direction indicated by the arrow is the direction in which the image moves. Alternatively, the third operation may be an operation in which the user presses an arrow, and the pressing duration reaches a preset duration, and the direction indicated by the arrow is the direction in which the image moves. Alternatively, the third operation is an operation in which the user presses the video control 1307 and drags (or slides) in a certain direction, and the dragging direction is the direction in which the image moves. Alternatively, the third operation is an operation in which the user slides on the screen (such as a preview image), and the sliding direction of the sliding operation is the direction in which the image moves. Alternatively, when the method provided in the embodiment of the present application is applicable to devices such as laptop computers, the third operation may also be an operation in which the image movement direction is input through a keyboard, touchpad, or the like.

[0518] 3006. In response to the third operation, a second preview image is displayed in the viewfinder interface, where the second preview image is a second image block located in a second area on the second image captured by the first wide-angle camera, or the second preview image is an image block obtained after perspective conversion processing of the second image block; wherein the orientation of the second area relative to the first area is related to the image movement direction.

[0519] It should be noted that the first image may be the first frame of image captured by the ultra-wide-angle camera after the electronic device switches from the normal video recording mode to the first video recording mode and starts the ultra-wide-angle camera. FIG. 19AFor example, the first preview image is a first image block in the first region on the first frame image. Assuming that during the m-1th frame image to the mth frame image, a third operation indicating a right movement of the image is detected. The second preview image is an mth image block in the mth region (i.e., the second region) on the mth frame image (i.e., the second image). Alternatively, it is an image block obtained by perspective conversion of the mth image block in the mth region on the mth frame image. Wherein, the orientation of the mth region (i.e., the second region) relative to the first region changes.

[0520] Optionally, the orientation of the second region relative to the first region is the same as or opposite to the image movement direction. For example, the image movement direction input by the user is right movement, and the second region is on the right of the first region, i.e., the position of the preview image on the image captured by the ultra-wide-angle camera moves right; or, the user inputs a right movement instruction of the image, and the second region is on the left of the first region, i.e., the position of the preview image on the image moves left. The user can set the image movement direction input by the user to be the same as or opposite to the movement direction of the position of the preview image on the image captured by the ultra-wide-angle camera.

[0521] In the above, the orientation of the second region relative to the first region is related to the image movement direction, which can be understood as: the distance between the second region and the first edge of the second image is a second distance, the distance between the first region and the first edge of the first image is a first distance, and the distance change of the second distance relative to the first distance is related to the image movement direction. Wherein, the first edge can be the upper, lower, left or right edge of the image captured by the ultra-wide-angle camera. For example, if the image movement direction is left or right movement, the first edge can be the left or right edge. If the image movement direction is up or down movement, the first edge can be the upper or lower edge. For example, FIG. 19B For example, assuming that the first edge is the left edge of the image, the second distance between the second region (i.e., the mth region) and the left edge of the second image (i.e., the mth frame image) is H+A, and the first distance between the first region and the left edge of the first image is H. Therefore, the distance change of the second distance relative to the first distance is A. The distance change A has various cases, which is related to the image movement direction. For example, when the image movement direction is right movement, A is greater than 0, i.e., the second region moves right relative to the first region. When the image movement direction is left movement, A is less than 0, i.e., the second region moves left relative to the first region.

[0522] The third preview image after the second preview image can be a third image block in a third region on a third image captured by the ultra-wide-angle camera. Continuing with the above example, FIG. 19CFor example, the second image is the mth image, the third image can be the m+1th image, the third region is the m+1th region of the m+1th image, and the third preview image is the m+1th image block of the m+1th region of the m+1th image. Similarly, the fourth preview image after the third preview image can be the m+2th image block of the m+2th region of the m+2th image, and so on.

[0523] For example, the second orientation change amount of the third region (i.e., the m+1th region of the m+1th image) relative to the second region (i.e., the mth region of the mth image) is the distance change amount of the third distance relative to the second distance, the third distance is the distance between the third region and the first edge (e.g., the left edge of the image) of the third image, that is, H+A+B; the second distance is the distance between the second region and the first edge (e.g., the left edge of the image) of the second image, that is, H+A; and then the second orientation change amount is B. FIG. 19D

[0524] The first orientation change amount of the second region (i.e., the mth region of the mth image) relative to the first region (i.e., the first region of the first image) is the distance change amount of the second distance relative to the first distance, the second distance is the distance between the second region and the first edge (e.g., the left edge of the image) of the second image, that is, H+A; and the first distance is the distance between the first region and the first edge of the first image, that is, H. Therefore, the first orientation change amount is A.

[0525] In some embodiments, the second orientation change amount B is equal to the first orientation change amount A, that is, the orientation change amount of the preview image on the image is the same, that is, the position of the preview image on the image moves at a constant speed. Of course, the second orientation change amount B can be less than or greater than the first orientation change amount A to achieve different effects, which is described above and will not be repeated here.

[0526] As an implementation manner, the third operation is used to indicate the image moving direction. In this implementation manner, the electronic device is in the preview mode after detecting the third operation. In the preview mode, the position of the preview image on the image captured by the ultra-wide-angle camera changes based on the image moving direction. When the electronic device detects an operation on the recording control 1307, the recording is started. After the recording is started, the position of the preview image on the image continues to change. When a stop recording instruction is detected, the recording is stopped.

[0527] As another implementation manner, the third operation can be used to indicate the image moving direction and also can be used to indicate the start of recording. For example, in the preview mode, the third operation is used to indicate the image moving direction, and when the third operation is detected, the recording is started. FIG. 2A ​For example, the electronic device detects a third operation of clicking a certain arrow (e.g., a right arrow) of the direction control 411, displays a second preview image and starts recording. When the electronic device detects a stop image moving instruction, the moving is stopped and the recording is stopped, and the recording is saved. The recording includes the second preview image.

[0528] For example, the electronic device detects a third operation of clicking a certain arrow (e.g., a right arrow) of the direction control 411, displays a second preview image and starts recording. When the electronic device detects a stop image moving instruction, the moving is stopped and the recording is stopped, and the recording is saved. The recording includes the second preview image. FIG. 31 For example, the electronic device detects a third operation of clicking a certain arrow (e.g., a right arrow) of the direction control 411, displays a second preview image and starts recording. When the electronic device detects a stop image moving instruction, the moving is stopped and the recording is stopped, and the recording is saved. The recording includes the second preview image.

[0529] Optionally, the second image is one of M images extracted from N images collected by the first wide-angle camera, N is an integer greater than or equal to 1, and M is an integer less than N. For details of the extraction process, see the description of FIG. 30 or FIG. 16 , which will not be repeated here. Alternatively, the second image is one of M images obtained by inserting multiple images into N images collected by the first wide-angle camera, N is an integer greater than or equal to 1, and M is an integer greater than N. For details of the insertion process, see the description of FIG. 14 or FIG. 14 , which will not be repeated here.

[0530] In combination with the above embodiments and related drawings, the embodiments of the present application provide a method for displaying a preview image in a recording scenario, which can be implemented in an electronic device (such as a mobile phone, a tablet computer, etc.) as shown in FIG. 24 . As shown in FIG. 24 , the method can include the following steps:

[0531] 3101, detecting a first operation for opening a camera.

[0532] 3102, in response to the first operation, starting the camera.

[0533] For details of the steps 3101-3102, see the description of the steps 3001-3002 in FIG. 25 , which will not be repeated here.

[0534] 3103, detecting a second operation for indicating a first recording mode.

[0535] For example, the electronic device can provide multiple recording modes, such as a normal recording mode, an image rotation recording mode, etc. For example, the electronic device detects a third operation of clicking a certain arrow (e.g., a right arrow) of the direction control 411, displays a second preview image and starts recording. When the electronic device detects a stop image moving instruction, the moving is stopped and the recording is stopped, and the recording is saved. The recording includes the second preview image. FIG. 25For example, the electronic device displays a viewfinder interface in the moving mode, and the second operation can be an operation of double-clicking the viewfinder interface, or other operations that can be used to switch to the image rotation video recording mode. In the image rotation video recording mode, the electronic device displays a viewfinder interface as shown in FIG. 13B. The viewfinder interface includes a first preview image 1301, which is a first image block in a first region of a first frame image captured by a first wide-angle camera on the electronic device. FIG. 24 For example, the second operation can be an operation of clicking the “image rotation” option in the selection box 409.

[0536] 3104, in response to the second operation, displaying a viewfinder interface on the display screen of the electronic device, the viewfinder interface including a first preview image, the first preview image being a first image captured by a camera on the electronic device.

[0537] In some embodiments, the camera is a normal camera or a first wide-angle camera. For example, the first wide-angle camera, the first image is a first image block in a first region of a first frame image captured by the first wide-angle camera.

[0538] Continuing with the example of the first wide-angle camera, FIG. 25 For example, when the electronic device detects a second operation (an operation of clicking the “image rotation” option in the selection box 1309), the electronic device enters the image rotation video recording mode. The viewfinder interface in the image rotation video recording mode can be seen in FIG. 13B. FIG. 19A As shown in FIG. 13B, the viewfinder interface displays a first preview image, which is a first image block in a first region of a first frame image captured by a first wide-angle camera (e.g., a super wide-angle camera).

[0539] It can be understood that the electronic device uses a second wide-angle camera in the normal video recording mode. When the electronic device detects a second operation for indicating a first video recording mode (e.g., the image rotation video recording mode), the first wide-angle camera is started. The field of view of the second wide-angle camera is smaller than that of the first wide-angle camera. For example, the first wide-angle camera is a super wide-angle camera, and the second wide-angle camera is a normal wide-angle camera. That is, after the electronic device switches from the normal video recording mode to the image rotation video recording mode, the electronic device switches from the normal wide-angle camera to the super wide-angle camera, and the first preview image is a first image block in a first region of a first frame image captured by the super wide-angle camera.

[0540] 3105, keeping the position of the electronic device fixed, detecting a third operation for indicating an image rotation direction.

[0541] The third operation can have various implementations. For example, FIG. 19BFor example, the third operation can be clicking icon 1363. For example, clicking icon 1363 defaults to clockwise or counterclockwise rotation. Alternatively, the third operation can be drawing a circle within the viewfinder interface, where the direction of the circle is the image rotation direction. Alternatively, the third operation can be clicking the leftward arrow on the left side of icon 1363, which sets the image rotation direction to counterclockwise; or clicking the rightward arrow on the right side of icon 1363, which sets the image rotation direction to clockwise.

[0542] 3106. In response to the third operation, display a second preview image in the viewfinder interface, where the second preview image is an image obtained by rotating the second image captured by the camera according to the image rotation direction.

[0543] Taking the camera as the first wide-angle camera (e.g., an ultra-wide-angle camera) as an example, the first image may be the first frame of image captured by the ultra-wide-angle camera after the electronic device switches from the normal recording mode to the first recording mode (i.e., the image rotation recording mode) and starts the ultra-wide-angle camera. FIG. 19C For example, the first preview image is the first image block within the first region of the first frame. Assume that a third operation indicating a clockwise rotation of the image is detected between the (m-1)th and (m)th frames. The electronic device determines the mth image block within the mth region (i.e., the second region) of the mth frame (i.e., the second image). The second preview image is the image block after the mth image block is rotated by angle G.

[0544] Optionally, the rotation direction of the second image relative to the first image is the same as or opposite to the image rotation direction of the third operation indication, which is not limited in this embodiment of the present application.

[0545] In some embodiments, after the second preview image, the viewfinder interface displays a third preview image, and the third preview image is an image obtained by rotating the third image captured by the camera according to the image rotation direction; wherein the rotation angle of the third image relative to the second image is the same as the rotation angle of the second image relative to the first image. Taking the camera as the first wide-angle camera (ultra-wide-angle camera) as an example, the third preview image after the second preview image can be an image block after the third image block in the third area on the third image captured by the ultra-wide-angle camera is rotated by a certain angle. Continue with FIG. 19DFor example, the second image is the mth image, the second region is the mth region, and the second preview image is the image block after the image block is rotated by an angle G. The third image is the (m+1)th image, the third region is the (m+1)th region, and the third preview image is the image block after the image block in the (m+1)th region is rotated by an angle 2G. Therefore, the rotation angle of the third region relative to the second region is equal to the rotation angle of the second region relative to the first region. That is, the preview image rotates at a constant speed. Of course, the rotation angle of the third region relative to the second region can be different from the rotation angle of the second region relative to the first region. For example, the rotation angle of the third region relative to the second region is greater than the rotation angle of the second region relative to the first region, that is, the rotation is accelerated. The rotation angle of the third region relative to the second region is less than the rotation angle of the second region relative to the first region, that is, the rotation is decelerated.

[0546] As an implementation manner, the third operation is used to indicate the rotation direction of the image. In this implementation manner, the electronic device is in a preview mode after detecting the third operation. In the preview mode, the preview image rotates. When the electronic device detects an operation on the video recording control 1307, video recording is started. After the video recording is started, the preview image continues to rotate. When a stop recording instruction is detected, the video recording is stopped.

[0547] As another implementation manner, the third operation can be used to indicate the rotation direction of the image and to start video recording. For example, when the electronic device detects the third operation, the electronic device displays the second preview image and starts video recording. ​ For example, the electronic device detects a third operation of clicking the left arrow indicating leftward on the icon 1363, displays the second preview image, and starts video recording. When the electronic device detects a stop rotation instruction, the rotation is stopped and the video recording is stopped, and the video recording is saved. The video recording includes the second preview image.

[0548] For example, the electronic device detects a third operation of clicking the left arrow indicating leftward on the icon 1363, displays the second preview image, and starts video recording. When the electronic device detects a stop rotation instruction, the rotation is stopped and the video recording is stopped, and the video recording is saved. The video recording includes the second preview image. ​ For example, the electronic device detects a clockwise rotation instruction of the image, the viewfinder interface displays the image block after the mth image block in the mth region is rotated by an angle G, and video recording is started. Then, the preview image is refreshed to the image block after the image block in the (m+1)th region is rotated by an angle, the image block after the image block in the (m+2)th region is rotated by an angle, and so on, until a stop rotation instruction is detected. The video recording is stopped and saved, and the video recording includes the image block after the mth image block is rotated by an angle G, the image block after the (m+1)th image block is rotated by an angle 2G, and the image block after the (m+2)th image block is rotated by an angle 3G.

[0549] Optionally, the second image can be one of M images extracted from N images collected by the first wide-angle camera, N is an integer greater than or equal to 1, and M is an integer less than N. For details of the extraction process, see ​ or ​The description of the first wide-angle camera is not repeated here. Alternatively, the second image is one of M frames of images obtained by inserting N frames of images into the N frames of images captured by the first wide-angle camera, N is an integer greater than or equal to 1, and M is an integer greater than N. For a specific insertion process, see the description of the first wide-angle camera. ​ or ​ The description of the first wide-angle camera is not repeated here. Alternatively, the second image is one of M frames of images obtained by inserting N frames of images into the N frames of images captured by the first wide-angle camera, N is an integer greater than or equal to 1, and M is an integer greater than N. For a specific insertion process, see the description of the first wide-angle camera.

[0550] The above terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to be limiting on the present application. As used in the specification and the appended claims of the present application, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "one or more," as used in the embodiments of the present application, means one, two, or more than two; and "and / or" describes the association between associated objects, which means that there can be three relationships; for example, A and / or B, which means that A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects.

[0551] In the present specification, the phrase "one embodiment" or "some embodiments" means that a specific feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in additional embodiments," and the like appearing in various places in the specification are not necessarily all referring to the same embodiment, but can refer to one or more but not all embodiments, unless otherwise specifically stated. The terms "comprise," "include," "have," and their conjugates, mean "including but not limited to," unless otherwise specifically stated.

[0552] From the perspective of the electronic device (such as a mobile phone) as the execution subject, the method provided by the embodiments of the present application is introduced. In order to realize the functions in the method provided by the embodiments of the present application, the terminal device can include hardware structures and / or software modules to realize the above functions in the form of hardware structures, software modules, or hardware structures plus software modules. Whether a certain function in the above functions is executed in the form of hardware structure, software module, or hardware structure plus software module depends on the specific application of the technical solution and the design constraint conditions.

[0553] In the above embodiments, the term "when" or "after" can be interpreted to mean "if" or "after" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "upon determining" or "if detecting (a stated condition or event)" can be interpreted to mean "if determining" or "in response to determining" or "upon detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)" depending on the context. In addition, in the above embodiments, relational terms such as first, second and the like can be used solely to distinguish one entity or action from another entity or action without necessarily implying any actual relationship or order between such entities or actions.

[0554] In the above embodiments, the whole or part can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, the whole or part can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed by a computer, the computer instructions produce the processes or functions described in the embodiments of the present application in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, solid state disk (SSD)) and the like.

[0555] It should be noted that a portion of this patent application document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.

Claims

1. A display method of previewing an image in a video recording scene, applied to an electronic device, characterized in that, The method comprises: detecting a first operation for opening a camera; in response to the first operation, starting the camera; detecting a second operation for indicating a first recording mode; in response to the second operation, displaying a viewfinder interface on a display screen of the electronic device, the viewfinder interface comprising a first preview image, the first preview image being a first image block on a first image captured by a first wide-angle camera on the electronic device and located in a first region; keeping the position of the electronic device fixed and detecting a third operation indicating an image movement direction; in response to the third operation, displaying a second preview image in the viewfinder interface, the second preview image being a second image block on a second image captured by the first wide-angle camera and located in a second region, or the second preview image being an image block obtained by performing perspective conversion on the second image block; wherein the orientation of the second region relative to the first region is related to the image movement direction, the distance between the first region and the first edge of the first image is a first distance, the distance between the second region and the first edge of the second image is a second distance, and the first distance and the second distance are different.

2. The method of claim 1, wherein, The orientation of the second region relative to the first region is related to the image movement direction, including that the orientation of the second region relative to the first region is the same as or opposite to the image movement direction.

3. The method of claim 1 or 2, wherein, The orientation of the second region relative to the first region is related to the image movement direction, including that the distance change amount of the second distance relative to the first distance is related to the image movement direction.

4. The method according to any one of claims 1 to 3, characterized in that, Further comprising: displaying a third preview image in the viewfinder interface, the third preview image being a third image block in a third region on a third image; or being an image block obtained by performing perspective conversion on the third image block; the second orientation change amount of the third region relative to the second region is equal to the first orientation change amount of the second region relative to the first region; wherein the second orientation change amount is a distance change amount of a third distance relative to a second distance, the first orientation change amount is a distance change amount of the second distance relative to a first distance, and the third distance is the distance between the third region and the first edge of the third image; the second distance is the distance between the second region and the first edge of the second image; and the first distance is the distance between the first region and the first edge of the first image.

5. The method according to any one of claims 1 to 4, characterized in that, Before detecting the second operation for indicating the first recording mode, a fourth preview image is displayed in the viewfinder interface, the fourth preview image being an image captured by a second wide-angle camera, the field of view angle of the second wide-angle camera being smaller than the field of view angle of the first wide-angle camera; The first preview image is all or part of the image block in the overlapping range of the field of view angles of the first wide-angle camera and the second wide-angle camera.

6. The method of any one of claims 1-5, wherein, The third operation comprises: a sliding operation on the first preview image; or, an operation on a control in the viewfinder interface for indicating an image rotation direction, or, The third operation is a pressing and dragging operation on a specific control in the viewfinder interface.

7. The method of any one of claims 1-6, wherein, The method further comprises: When the image stop moving instruction is detected, a video is generated and saved, and the video comprises the second preview image.

8. The method of claim 7, wherein, The detection of the image stop moving instruction comprises: The third operation is a sliding operation on the first preview image, and the image stop moving instruction is generated when it is detected that the sliding operation is lifted; or, The third operation is a click operation on a control in the viewfinder interface for indicating the image moving direction, and the image stop moving instruction is generated when it is detected that a re-click operation at any position in the viewfinder interface is performed; or, The third operation is a long-press operation on a control in the viewfinder interface for indicating the image moving direction, and the image stop moving instruction is generated when it is detected that the long-press operation is lifted; or, The third operation is a pressing and dragging operation on a specific control in the viewfinder interface.

9. The method of any one of claims 1-8, wherein, The second image is one of M images extracted from N images collected by the first wide-angle camera, N is an integer greater than or equal to 1, and M is an integer less than N; Or, The second image is one of M images obtained after inserting multiple images into N images collected by the first wide-angle camera, N is an integer greater than or equal to 1, and M is an integer greater than N.

10. The method of any one of claims 1-9, wherein, The image block obtained after the second image block is subjected to the perspective conversion processing satisfies the following formula: x' = x*cos(θ) - sin(θ)*y y' = x*sin(θ) + cos(θ)*y Where (x', y') is a pixel point on the image block obtained after the perspective conversion processing, (x, y) is a pixel point on the second image block, and θ is a rotation angle, which is preset.

11. A display method of a preview image in a video recording scene, applied to an electronic device, and the method comprises the steps of: The method comprises: Detecting a first operation for opening a camera; In response to the first operation, starting the camera; Detecting a second operation for indicating a first recording mode; In response to the second operation, displaying a viewfinder interface on the display screen of the electronic device, the viewfinder interface comprising a first preview image, the first preview image being a first image collected by a first wide-angle camera on the electronic device, the first image being a first image block in a first region on a fourth image collected by the first wide-angle camera; Keeping the position of the electronic device fixed and detecting a third operation for indicating an image rotation direction; In response to the third operation, displaying a second preview image in the viewfinder interface, the second preview image being an image obtained after a second image collected by the camera is rotated in the image rotation direction, the second image being a second image block in a second region on a fifth image collected by the first wide-angle camera, the position of the first region on the fourth image being different from the position of the second region on the fifth image.

12. The method of claim 11, wherein, Further comprising: The viewfinder interface displays a third preview image, the third preview image being an image obtained by rotating a third image captured by the camera according to the image rotation direction, and the rotation angle of the third image relative to the second image being the same as the rotation angle of the second image relative to the first image.

13. The method of claim 11 or 12, wherein, The third operation includes: a circle-drawing operation on the first preview image; or an operation on a control in the viewfinder interface for indicating the image rotation direction.

14. The method of claim 11 or 12, wherein, The method further includes: generating and saving a video when the image stop-rotation instruction is detected, the video including the second preview image.

15. The method of claim 14, wherein, The detection of the image stop-rotation instruction includes: when the third operation is a circle-drawing operation on the first preview image, the image stop-rotation instruction being generated when the circle-drawing operation is detected to be released; or when the third operation is a click operation on the control in the viewfinder interface for indicating the image rotation direction, the image stop-rotation instruction being generated when a re-click operation at any position in the viewfinder interface is detected, or when the third operation is a long-press operation on the control in the viewfinder interface for indicating the image rotation direction, the image stop-rotation instruction being generated when the long-press operation is detected to be released.

16. The method of claim 15, wherein, The second image is one of M images extracted from N images captured by the first camera, N being an integer greater than or equal to 1, and M being an integer less than N; or The second image is one of M images obtained by inserting multiple images into N images captured by the first camera, N being an integer greater than or equal to 1, and M being an integer greater than N. The electronic device includes one or more processors, one or more memories, wherein the one or more memories store one or more computer programs, the one or more computer programs include instructions that, when executed by the one or more processors, cause the electronic device to perform the method of any one of claims 1-16.

17. An electronic device, comprising: The computer-readable storage medium includes a computer program that, when executed on an electronic device, causes the electronic device to perform the method of any one of claims 1-16.

18. A computer-readable storage medium, characterized in that, The instructions, when executed on a computer, cause the computer to perform the method of any one of claims 1-16.

19. A program product, characterized by The electronic device has a display screen, one or more memories, and one or more processors for executing one or more computer programs stored in the one or more memories, and the graphical user interface includes a graphical user interface displayed when the electronic device performs the method of any one of claims 1-16.

20. A graphical user interface on an electronic device, the graphical user interface comprising: ​

Citation Information

Patent Citations

  • Panorama camera shooting method and device

    CN104954671A

  • Shooting method and mobile terminal

    CN107948523A

  • Video shooting method and electronic equipment

    CN117241135A