Video shooting method and electronic device
By automatically generating video clips in different mirror modes in electronic devices and synthesizing videos, the inconvenience of convenient devices when implementing lens shifting or panning operations is solved, and the user experience and video generation efficiency are improved.
Patent Information
- Application Number
- CN202011066518.7
- 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-08-29
- Estimated Expiration
- 2040-09-30
AI Technical Summary
When existing convenient electronic devices realize lens moving or panning operations, users need to manually move or rotate the device, which is inconvenient to operate.
By implementing an automated video shooting method in electronic devices, video clips in different mirror modes are generated and synthetic videos are automatically generated. Users can select and adjust mirror mode logos, video clips, and add audio and pictures to simplify the operation process.
It improves the convenience of shooting through mirrors, simplifies the video processing process, and improves the user experience. Users can generate high-quality videos through simple operations.
Smart Images

Figure CN112887584B_ABST
Abstract
Description
[0001] This application claims priority to the Chinese patent application filed with the Intellectual Property Office of the People's Republic of China on November 29, 2019, with application number 201911207579.8, and with the invention name "A preview image display method and electronic device in a video recording scene", and claims priority to the Chinese patent application filed with the Intellectual Property Office of the People's Republic of China on February 3, 2020, with application number 202010079012.3, and with the invention name "A preview image display method and electronic device in a video recording scene", the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of image capture technology, and in particular to a video capture method and electronic device. Background Art
[0003] In order to improve the quality of filmed works, the industry has various camera movement shooting techniques, commonly known as "panning lens", "docking lens", etc. Taking mobile phones as an example, the implementation process of "docking lens" can be seen in Figure 1 As shown in (a), during the process of shooting an object, the mobile phone moves in the horizontal direction, that is, "panning". Suppose the mobile phone moves from point A to point B. During the movement, the preview image displayed on the mobile phone screen changes due to the change in the camera's field of view. Of course, it can also include "panning" in the vertical direction. Among them, moving upward can be called raising the lens, and moving downward can be called lowering the lens. For example, the implementation process of "panning" can be seen in Figure 1 As shown in (a), during the process of photographing an object, the mobile phone rotates around the central axis. The central axis is, for example, the perpendicular bisector of the short side of the mobile phone on the plane where the mobile phone display is located. If the mobile phone rotates left around the central axis, it is "panning" to the left, as shown in FIG. Figure 1 (b) If the phone rotates right around its center axis, it will “pan” to the right. Figure 1 (c).
[0004] That is to say, if the user wants to use a portable electronic device (such as a mobile phone) to achieve the above-mentioned "moving lens" or "shaking lens" and other camera shooting techniques, the user needs to move the phone or rotate the phone, which is not convenient enough. Summary of the Invention
[0005] The purpose of this application is to provide a video shooting method and electronic equipment to improve the convenience of using a mobile phone to achieve camera movement shooting methods such as panning and panning.
[0006] In the first aspect, a video shooting method is also provided, which is applied to an electronic device, including: 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 sample, a second example sample and a preset audio, the first example sample corresponding to a first camera movement mode, the second example sample corresponding to a second camera movement mode, wherein the first camera movement mode and the second camera movement mode are different; 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 the position of the electronic device stationary and starting recording; automatically generating a composite video, the composite video including a first video clip, a second video clip and the preset audio, the first video clip being a video clip generated by the electronic device according to the first camera movement mode, and the second video clip being a video clip generated by the electronic device according to the second camera movement mode.
[0007] This method allows you to combine video clips from various camera modes into a single video and configure preset audio for the resulting video, resulting in high-quality videos with ease. The resulting video can then be uploaded directly to social networks, sent to contacts, and more, without requiring complex video processing. This makes it easy to use and provides a great user experience.
[0008] In one possible design, in response to a second operation by the user, the electronic device is kept in position and recording is started, including: when the first camera movement mode identifier is selected, in response to the user's instruction 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 identifier is selected, in response to the user's instruction 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.
[0009] That is, for each camera movement mode, the user can control the start and / or stop of recording. For example, the first recording template includes multiple camera movement modes, and the recording duration corresponding to each camera movement mode can be a preset fixed duration, that is, shooting stops when the preset duration is reached; or it can be a non-preset duration, such as the user controlling the phone to start and stop recording using the first camera movement mode through the shooting control in the viewfinder interface.
[0010] In one possible design, when the first video clip is generated according to the first camera movement mode, the recording interface also displays a countdown for generating the first video clip according to the first camera movement mode; when the second video clip is generated according to the second camera movement mode, the recording interface also displays a countdown for generating the second video clip according to the second camera movement mode.
[0011] That is to say, the electronic device can display the countdown of the recording time to facilitate the user to grasp the recording progress (such as the remaining recording time), and the interactive experience is better.
[0012] In one possible design, the method also includes: displaying a video recording interface, the video recording interface including a first camera movement mode identifier and a second camera movement mode identifier; in response to a third operation of the user, deleting the first camera movement mode identifier or the second camera movement mode identifier; in response to a fourth operation of the user, keeping the position of the electronic device stationary and starting recording; automatically generating a composite video, in which the composite video is synthesized by the video clips generated by the electronic device according to the undeleted camera movement mode, and the composite video also includes preset audio.
[0013] That is to say, the user can delete a camera movement mode identifier. For example, if the user deletes the camera movement mode identifier corresponding to the camera movement mode that he or she does not like, the corresponding camera movement mode will be deleted, and the video will be synthesized based on the video clips generated by the camera movement modes corresponding to the remaining camera movement mode identifiers.
[0014] In one possible design, the method also includes: displaying a video recording interface, the video recording interface including a first camera movement mode identifier and a second camera movement mode identifier; in response to a third operation of the user, adding a third camera movement mode identifier to the video recording interface, the third camera movement mode identifier being used to indicate a third camera movement mode; in response to a fourth operation of the user, keeping the electronic device in a fixed position and starting recording; automatically generating a composite video, the composite video including the first video clip, the second video clip, the 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 movement mode.
[0015] That is to say, if the user likes a certain camera movement mode, he can add the camera movement mode identifier of the camera movement mode, then the corresponding camera movement mode is added, and the video clips generated by the original camera movement mode and the video clips generated by the added camera movement mode are synthesized into a video.
[0016] In one possible design, the method also includes: displaying a video recording interface, wherein 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, adjusting the display order of the first camera movement mode identifier and the second camera movement mode identifier to a first order; in response to a fourth operation of the user, keeping the position of the electronic device stationary and starting recording; and automatically generating a composite video, wherein the playback order of the first video clip and the second video clip in the composite video is the first order.
[0017] That is to say, the user can adjust the display order of the camera mode identifiers, thereby adjusting the synthesis order of the video clips, and the playback order of the two video clips in the synthesized video is also adjusted.
[0018] In a possible design, the first example sample and / or the second example sample are displayed in the video recording interface.
[0019] In the recording interface, the first example sample is used to facilitate users to view the shooting effect of the first camera movement mode, and the second example sample is used to view the shooting effect of the second camera movement mode, and the interactive experience is better.
[0020] In one possible design, before automatically generating a composite video, it also includes: displaying a presentation interface, wherein the presentation interface includes the first video clip and the second video clip; automatically generating a composite video includes: synthesizing the video in response to a video synthesis instruction input by a user.
[0021] That is to say, before synthesizing the video, the user can also view the first video clip and the second video clip separately. If the user is satisfied with both video clips, the video is synthesized under the user's triggering operation.
[0022] In one possible design, the method also includes: 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 composite video; or; adjusting the playback order of the first video clip or the second video clip in the composite video.
[0023] In other words, users can delete a video clip, such as a clip they are not satisfied with, or add a video clip they like from local storage, or adjust the playback order of two video clips in the composite video. In short, users can flexibly set up the composite video, and the interactive experience is better.
[0024] In a possible design, the first recording template is a default template or a user-defined template.
[0025] In other words, users can not only use the default templates of electronic devices, but also customize templates, such as setting the templates that the user personally likes, which provides a better interactive experience.
[0026] In one possible design, the method further includes automatically storing the first video clip, the second video clip, and the composite video. That is, the electronic device can automatically store the individual video clips and the composite video of the individual video clips. This allows the user to locally view each individual video clip or the composite video, providing a better user experience. For example, the user can upload the individual video clips or the composite video to a social network.
[0027] 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.
[0028] In a second aspect, an electronic device is further provided, including:
[0029] one or more processors;
[0030] one or more memories;
[0031] 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:
[0032] Start the camera function;
[0033] 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;
[0034] Displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier;
[0035] In response to a second user operation, keeping the electronic device stationary and starting video recording;
[0036] 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.
[0037] In one possible design, when the instruction is executed by the one or more processors, the electronic device specifically performs the following steps:
[0038] 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;
[0039] 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.
[0040] In one possible design, when the instruction is executed by the one or more processors, the electronic device specifically performs the following steps:
[0041] When the first video clip is generated according to the first camera movement mode, the recording interface also displays a countdown for generating the first video clip according to the first camera movement mode; when the second video clip is generated according to the second camera movement mode, the recording interface also displays a countdown for generating the second video clip according to the second camera movement mode.
[0042] In one possible design, when the instruction is executed by the one or more processors, the electronic device further performs the following steps:
[0043] Displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier;
[0044] In response to a third user operation, deleting the first camera movement mode identifier or the second camera movement mode identifier;
[0045] In response to a fourth user operation, keeping the electronic device stationary and starting recording;
[0046] A composite video is automatically generated, where the composite video includes the video clip generated by the electronic device according to the undeleted camera movement pattern and the preset audio.
[0047] In one possible design, when the instruction is executed by the one or more processors, the electronic device further performs the following steps:
[0048] Displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier;
[0049] In response to a third user operation, adding a third camera movement mode identifier in the video recording interface, wherein the third camera movement mode identifier is used to indicate a third camera movement mode;
[0050] In response to a fourth user operation, keeping the electronic device stationary and starting recording;
[0051] A composite video is automatically generated, where the composite 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 camera movement mode.
[0052] In one possible design, when the instruction is executed by the one or more processors, the electronic device further performs the following steps:
[0053] Displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier;
[0054] In response to a third user operation, adjusting the display order of the first camera movement mode identifier and the second camera movement mode identifier to a first order;
[0055] In response to a fourth user operation, keeping the electronic device stationary and starting recording;
[0056] A composite video is automatically generated, in which the playback order of the first video segment and the second video segment is the first order.
[0057] In a possible design, the first example sample and / or the second example sample are displayed in the video recording interface.
[0058] In one possible design, when the instruction is executed by the one or more processors, the electronic device further performs the following steps:
[0059] displaying a presentation interface, wherein the presentation interface includes the first video clip and the second video clip;
[0060] Automatically generating a composite video includes: responding to a video composite instruction input by a user and composite video.
[0061] In one possible design, when the instruction is executed by the one or more processors, the electronic device further performs the following steps:
[0062] In response to the fourth operation, the first video segment or the second video segment is deleted; or a local third video segment is added to the composite video; or the playback order of the first video segment or the second video segment in the composite video is adjusted.
[0063] In a possible design, the first recording template is a default template or a user-defined template.
[0064] In one possible design, when the instruction is executed by the one or more processors, the electronic device further performs the following steps:
[0065] The first video clip, the second video clip, and the composite video are automatically stored.
[0066] In one possible design, when the instruction is executed by the one or more processors, the electronic device further performs the following steps:
[0067] In response to a specific operation, the audio in the composite video is replaced, or text and / or pictures are added to the composite video.
[0068] In a third aspect, an embodiment of the present application further provides an electronic device, which includes modules / units for executing the above-mentioned first aspect or any possible design method of the first aspect; these modules / units can be implemented through hardware, or corresponding software implementations can be executed through hardware.
[0069] In a fourth aspect, an embodiment of the present application further provides a chip, which is coupled to a memory in an electronic device, and is used to call a computer program stored in the memory and execute the technical solution of the first aspect of the embodiment of the present application and any possible design of the first aspect thereof. In the embodiment of the present application, "coupling" refers to the direct or indirect combination of two components with each other.
[0070] In a fifth aspect, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a computer program. When the computer program is run on an electronic device, the electronic device executes the method provided in the first aspect above.
[0071] In a sixth aspect, a program product is also provided, comprising instructions, which, when executed on a computer, cause the computer to execute the method provided in the first aspect above.
[0072] In the seventh aspect, a graphical user interface on an electronic device is also provided, wherein the electronic device has a display screen, one or more memories, and one or more processors, wherein 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 a graphical user interface displayed when the electronic device executes the method provided in the first aspect above.
[0073] For the beneficial effects of the second to seventh aspects mentioned above, please refer to the beneficial effects of the first aspect and will not be repeated.
[0074] 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.
[0075] 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.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] As an example, the electronic device determines a third area on a third image, where a second orientation change of the third area relative to the second area is equal to a first orientation change of the second area relative to the first area; and displays a third preview image in the viewfinder interface, where the third preview image is a third image block on the third image located within the third area, or an image block obtained after perspective conversion processing of the third image block; wherein the second orientation change is a distance change of the third distance relative to the second distance, the first orientation change is a distance change of the second distance relative to the first distance, and the third distance is the distance between the third area and the first edge of the third image; the second distance is the distance between the second area and the first edge of the second image; and the first distance is the distance between the first area and the first edge of the first image.
[0080] That is, the position of each preview image on the image captured by the first wide-angle camera changes by the same amount. Therefore, visually, the preview images in the viewfinder interface move at a uniform speed, providing a better user experience.
[0081] As another example, the second position change of the third area relative to the second area may be greater than the first position change of the second area relative to the first area. Therefore, visually, the preview image in the viewfinder interface moves at an accelerated speed, which has a certain sense of rhythm and visual impact.
[0082] Of course, the second position change of the third area relative to the second area can also be smaller than the first position change of the second area relative to the first area. Therefore, visually, the preview image in the viewfinder interface moves at a slower speed, making the recording more flexible and interesting.
[0083] In one possible design, before the electronic device enters the first recording mode, the viewfinder interface displays a fourth preview image. The fourth preview image is an image captured by the second wide-angle camera, and the field of view of the second wide-angle camera is smaller than that of the first wide-angle camera. The first preview image is all or part of the image blocks within the overlapping range of the fields of view of the first wide-angle camera and the second wide-angle camera. That is, when switching from other modes to the first recording mode, the first wide-angle camera with a larger field of view is started, and the viewfinder interface displays the first image block within the first area of the first image captured by the first wide-angle camera. The camera with a larger field of view captures a larger image range and includes more details. The position of the first area on the image has a larger movable range, and the shooting method of shifting or panning the lens can be realized within a larger movable range, which provides a higher user experience.
[0084] 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.
[0085] The third operation mentioned above includes: a sliding operation on the first preview image; or
[0086] Operation of a control in the viewfinder interface for indicating the image rotation direction, or
[0087] The operation of pressing and dragging a specific control in the viewfinder interface.
[0088] It should be understood that the above is only an example of the third operation and is not limiting. Other operations for inputting the image movement direction are also feasible and are not limited in the embodiments of the present application.
[0089] It is understood that when a stop image movement instruction is detected, the viewfinder interface displays a fifth preview image. The fifth preview image is a fifth image block located within a fifth region of the fifth image captured by the first wide-angle camera, or the fifth preview image is an image block obtained by performing perspective conversion processing on the fifth image block. The position of the fifth region relative to the second region remains unchanged. In other words, when a stop image movement instruction is detected, the position of the preview image on the image does not change, and the visual position of the preview image within the viewfinder interface does not change.
[0090] It is understood that when the electronic device detects the image stop moving instruction, it generates and saves a video, and the video includes the second preview image. In other words, when the electronic device detects the image stop moving instruction, it automatically generates and saves the video, which facilitates operation and improves user experience.
[0091] The step of detecting the image stopping movement instruction includes:
[0092] When the third operation is a sliding operation on the first preview image, when a pop-up of the sliding operation is detected, an instruction to stop moving the image is generated; or
[0093] When the third operation is a click operation on a control in the viewfinder interface for indicating the direction of image movement, when a second click operation is detected at any position in the viewfinder interface, an instruction to stop moving the image is generated, or,
[0094] When the third operation is a long press operation on a control in the viewfinder interface for indicating the direction of image movement, when a pop-up of the long press operation is detected, an instruction to stop moving the image is generated, or,
[0095] When the third operation is a pressing and dragging operation on a specific control in the viewfinder interface, when a pop-up of the dragging operation is detected, an instruction to stop moving the image is generated.
[0096] It should be noted that the above-mentioned image stop movement instruction is only an example and not a limitation. Other methods of generating the image stop movement instruction are also feasible and are not limited in the embodiments of the present application.
[0097] For example, the second image is a frame of M frames extracted from 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 less than N; frame extraction playback can achieve a fast playback effect. Therefore, the preview image can be played quickly. Alternatively, the second image is a frame of M frames of images obtained by inserting multiple frames of images from 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. Frame insertion playback can achieve a slow playback effect, so the preview image can be played slowly.
[0098] The image block obtained after the perspective conversion processing of the second image block satisfies the following formula:
[0099] x'=x*cos(θ)-sin(θ)*y
[0100] y'=x*sin(θ)+cos(θ)*y
[0101] Here, (x', y') represents the pixel point on the image block obtained after the perspective conversion process, (x, y) represents the pixel point on the second image block, and θ represents the rotation angle, which is a preset rotation angle. After the electronic device performs the perspective conversion on the image block using the above formula, the preview image more closely matches the preview image presented when the phone is shaken in real life. Therefore, while the electronic device remains stationary, the user can use it to achieve panning or panning shooting methods, providing a high user experience.
[0102] In the ninth aspect, a method for displaying a preview image in a recording scene is also provided, which is applied to an electronic device. The electronic device detects a first operation for turning on a camera; in response to the first operation, the camera is started; a second operation for indicating a first recording mode is detected; in response to the second operation, a viewfinder interface is displayed on the display screen of the electronic device, wherein the viewfinder interface includes a first preview image, and the first preview image is a first image captured by the camera on the electronic device; the position of the electronic device is kept fixed, and a third operation indicating the image rotation direction is detected; in response to the third operation, a second preview image is displayed in the viewfinder interface, and the second preview image is an image obtained by rotating the second image captured by the camera according to the image rotation direction. In other words, during the recording process of the user electronic device, the preview image in the viewfinder interface can be rotated to achieve the effect of image rotation shooting, and the user experience is high.
[0103] In one possible design, the viewfinder interface displays a third preview image, which is an image obtained by rotating the 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 is the same as the rotation angle of the second image relative to the first image.
[0104] That is, during the video recording process of the user's electronic device, the preview image in the viewfinder interface rotates at the same angle each time, that is, the image rotates at a constant speed, thereby achieving a rotating shooting effect.
[0105] Exemplarily, the camera is a first wide-angle camera, the first image is a first image block within a first area on a fourth image captured by the first wide-angle camera; the second image is a second image block within a second area on a fifth image captured by the first wide-angle camera, and the position of the first area on the fourth image is the same as or different from the position of the second area on the fifth image.
[0106] The third operation mentioned above includes: drawing a circle on the first preview image; or
[0107] Operation on a control in the viewfinder interface for indicating the image rotation direction.
[0108] It should be understood that the above is only an example of the third operation and is not limiting. Other operations for inputting the image movement direction are also feasible and are not limited in the embodiments of the present application.
[0109] In one possible design, when the electronic device detects an instruction to stop image rotation, it generates and saves a video, wherein the video includes the second preview image. In other words, when the electronic device detects an instruction to stop image rotation, it automatically generates and saves the video, thereby facilitating operation and improving user experience.
[0110] The above-mentioned detection of the image rotation stop instruction includes:
[0111] When the third operation is a circle operation on the first preview image, when the circle operation is detected to be popped up, an instruction to stop rotating the image is generated; or
[0112] When the third operation is a click operation on a control in the viewfinder interface for indicating the image rotation direction, when a click operation is detected at any position in the viewfinder interface, an instruction to stop rotating the image is generated, or,
[0113] When the third operation is a long press operation on a control in the viewfinder interface for indicating the image rotation direction, when a pop-up of the long press operation is detected, the image rotation stop instruction is generated.
[0114] It should be noted that the above-mentioned image rotation stop instruction is only an example and not a limitation. Other methods of generating the image rotation stop instruction are also feasible and are not limited in the embodiments of the present application.
[0115] The second image is one of the M frames extracted from the N frames captured by the first camera, where N is an integer greater than or equal to 1 and M is an integer less than N. Frame extraction playback can achieve a fast playback effect. Therefore, the preview image can be played quickly. Alternatively, the second image is one of the M frames obtained by inserting multiple frames of the N frames captured by the first camera, where N is an integer greater than or equal to 1 and M is an integer greater than N. Frame insertion playback can achieve a slow playback effect, so the preview image can be played slowly.
[0116] In a tenth aspect, an electronic device is further provided, comprising: one or more processors; and one or more memories; wherein the one or more memories store one or more computer programs, and the one or more computer programs include instructions that, when executed by the one or more processors, cause the electronic device to perform the following steps:
[0117] detecting a first operation for opening a camera;
[0118] In response to the first operation, starting a camera;
[0119] detecting a second operation for indicating a first recording mode;
[0120] In response to the second operation, displaying a framing interface on the display screen of the electronic device, wherein the framing interface includes a first preview image, where 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 on the electronic device;
[0121] Keeping the electronic device in a fixed position, detecting a third operation indicating a direction in which the image moves;
[0122] 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 the 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.
[0123] In a possible design, 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.
[0124] 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.
[0125] In one possible design, when the instruction is executed by the one or more processors, the electronic device performs the following steps:
[0126] A third preview image is displayed in the viewfinder interface, where the third preview image is a third image block within a third region of the third image; or is an image block obtained by performing perspective conversion processing on the third image block; and a second orientation change amount of the third region relative to the second region is equal to a first orientation change amount of the second region relative to the first region.
[0127] Among them, the second orientation change is the distance change of the third distance relative to the second distance, the first orientation change is the distance change of the second distance relative to the first distance, the third distance is the distance between the third area and the first edge of the third image; the second distance is the distance between the second area and the first edge of the second image; the first distance is the distance between the first area and the first edge of the first image.
[0128] In one possible design, when the instruction is executed by the one or more processors, the electronic device further performs the following steps: before detecting the second operation for indicating the first recording mode, displaying a fourth preview image in the viewfinder interface, the fourth preview image is an image captured by the second wide-angle camera, and 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 preview image is all or part of the image block within the overlapping range of the field of view of the first wide-angle camera and the second wide-angle camera.
[0129] 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.
[0130] The third operation mentioned above includes:
[0131] A sliding operation on the first preview image; or
[0132] Operation of a control in the viewfinder interface for indicating the image rotation direction, or
[0133] The operation of pressing and dragging a specific control in the viewfinder interface.
[0134] In one possible design, when the instruction is executed by the one or more processors, the electronic device further performs the following steps: when an instruction to stop moving the image is detected, the viewfinder interface displays a fifth preview image, and the fifth preview image is a fifth image block located in a fifth area on the fifth image captured by the first wide-angle camera, or the fifth preview image is an image block obtained after perspective conversion processing of the fifth image block; the orientation of the fifth area relative to the second area remains unchanged.
[0135] In one possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following steps: when an instruction to stop moving the image is detected, generating and saving a video, the video including the first preview image and the second preview image.
[0136] In one possible design, when the instruction is executed by the one or more processors, the electronic device specifically performs the following steps:
[0137] When the third operation is a sliding operation on the first preview image, when a pop-up of the sliding operation is detected, an instruction to stop moving the image is generated; or
[0138] When the third operation is a click operation on a control in the viewfinder interface for indicating the direction of image movement, when a second click operation is detected at any position in the viewfinder interface, an instruction to stop moving the image is generated, or,
[0139] When the third operation is a long press operation on a control in the viewfinder interface for indicating the direction of image movement, when a pop-up of the long press operation is detected, an instruction to stop moving the image is generated, or,
[0140] When the third operation is a pressing and dragging operation on a specific control in the viewfinder interface, when a pop-up of the dragging operation is detected, an instruction to stop moving the image is generated.
[0141] The second image is one of the M frames extracted from the N frames captured by the first wide-angle camera, where 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 the M frames obtained by inserting multiple frames of the N frames captured by the first wide-angle camera, where N is an integer greater than or equal to 1, and M is an integer greater than N.
[0142] In one possible design, an image block obtained after the perspective conversion processing of the second image block satisfies the following formula:
[0143] x'=x*cos(θ)-sin(θ)*y
[0144] y'=x*sin(θ)+cos(θ)*y
[0145] Wherein, (x', y') is a pixel point on the image block obtained after the perspective conversion process, (x, y) is a pixel point on the second image block, and θ is a rotation angle, which is preset.
[0146] In an eleventh aspect, an electronic device is further provided, comprising: one or more processors; and one or more memories; wherein the one or more memories store one or more computer programs, and the one or more computer programs include instructions that, when executed by the one or more processors, cause the electronic device to perform the following steps:
[0147] A first operation for turning on a camera is detected; in response to the first operation, the camera is started; a second operation for indicating a first recording mode is detected; in response to the second operation, a viewfinder interface is displayed 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 the camera on the electronic device; while the position of the electronic device is kept fixed, a third operation indicating an image rotation direction is detected; in response to the third operation, a second preview image is displayed on the viewfinder interface, the second preview image being an image obtained by rotating the second image captured by the camera according to the image rotation direction.
[0148] In one possible design, when the instruction is executed by the one or more processors, the electronic device further performs the following steps:
[0149] The viewfinder interface displays a third preview image, which is an image obtained by rotating the third image captured by the camera according to 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.
[0150] In which, the camera is a first wide-angle camera, the first image is a first image block in the first area on the fourth image captured by the first wide-angle camera; the second image is a second image block in the second area on the fifth image captured by the first wide-angle camera, and the position of the first area on the fourth image is the same as or different from the position of the second area on the fifth image.
[0151] The third operation mentioned above includes:
[0152] Draw a circle on the first preview image; or
[0153] Operation on a control in the viewfinder interface for indicating the image rotation direction.
[0154] In one possible design, when the instructions are executed by the one or more processors, the electronic device further performs the following steps: when an instruction to stop image rotation is detected, generating and saving a video, the video including the first preview image and the second preview image.
[0155] In one possible design, when the instruction is executed by the one or more processors, the electronic device specifically performs the following steps:
[0156] When the third operation is a circle operation on the first preview image, when the circle operation is detected to be popped up, an instruction to stop rotating the image is generated; or
[0157] When the third operation is a click operation on a control in the viewfinder interface for indicating the image rotation direction, when a click operation is detected at any position in the viewfinder interface, an instruction to stop rotating the image is generated, or,
[0158] When the third operation is a long press operation on a control in the viewfinder interface for indicating the image rotation direction, when a pop-up of the long press operation is detected, the image rotation stop instruction is generated.
[0159] The second image is one of the M frames extracted from the N frames captured by the first camera, where 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 the M frames obtained by inserting multiple frames of images into the N frames captured by the first camera, where N is an integer greater than or equal to 1, and M is an integer greater than N.
[0160] In the twelfth aspect, an electronic device is also provided, which includes modules / units for executing the eighth aspect or any possible design method of the eighth aspect; these modules / units can be implemented through hardware, or corresponding software implementations can be executed through hardware.
[0161] In the thirteenth aspect, an electronic device is also provided, which includes modules / units for executing the ninth aspect or any possible design method of the ninth aspect; these modules / units can be implemented through hardware, or corresponding software implementations can be executed through hardware.
[0162] In the fourteenth aspect, a chip is also provided, which is coupled with a memory in an electronic device to execute the technical solution of the eighth aspect of the embodiment of the present application and any possible design of the eighth aspect thereof; in the embodiment of the present application, "coupling" refers to the direct or indirect combination of two components with each other.
[0163] In the fifteenth aspect, a chip is also provided, which is coupled with a memory in an electronic device to execute the technical solution of the ninth aspect of the embodiment of the present application and any possible design of the ninth aspect thereof; in the embodiment of the present application, "coupling" refers to the direct or indirect combination of two components with each other.
[0164] In the sixteenth aspect, a computer-readable storage medium is also provided, which includes a computer program. When the computer program runs on an electronic device, the electronic device executes the technical solution of the eighth aspect and any possible design of the eighth aspect.
[0165] In the seventeenth aspect, a computer-readable storage medium is also provided, which includes a computer program. When the computer program runs on an electronic device, the electronic device executes the technical solution of the ninth aspect and any possible design of the ninth aspect.
[0166] In the eighteenth aspect, a program product is also provided, comprising instructions, which, when executed on a computer, enable the computer to execute the technical solution of the eighth aspect and any possible design thereof.
[0167] In the nineteenth aspect, a program product is also provided, comprising instructions, which, when executed on a computer, enable the computer to execute the technical solution of the ninth aspect and any possible design thereof.
[0168] In the twentieth aspect, a graphical user interface on an electronic device is also provided, wherein the electronic device has one or more memories and one or more processors, and 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 a graphical user interface displayed when the electronic device executes the eighth aspect and any possible design of the technical solution of the eighth aspect.
[0169] In aspect twenty-first, a graphical user interface on an electronic device is also provided, wherein the electronic device has one or more memories and one or more processors, and 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 a graphical user interface displayed when the electronic device executes aspect nine and any possible design of the technical solution of aspect nine.
[0170] For the beneficial effects of the above-mentioned ninth to twenty-first aspects, please refer to the beneficial effects of the eighth aspect and will not be repeated. BRIEF DESCRIPTION OF THE DRAWINGS
[0171] Figure 1 This is a schematic diagram of implementing panning and panning with a mobile phone in the prior art;
[0172] Figure 2A A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0173] Figure 2B A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0174] Figure 3A A schematic diagram illustrating the implementation principles of various camera movement modes provided in the embodiments of the present application;
[0175] Figure 3BA schematic diagram of an example of a shift mode provided in an embodiment of the present application;
[0176] Figure 4 A schematic diagram of an example of a mobile phone GUI provided in an embodiment of the present application;
[0177] Figures 5A to 5B A schematic diagram of a micro-movie icon on a mobile phone provided in an embodiment of the present application;
[0178] Figure 6 A schematic diagram of a homepage in micro-movie mode provided in an embodiment of the present application;
[0179] 7A to 7D A schematic diagram of an example of a recording interface for a travel template provided in an embodiment of the present application;
[0180] Figures 8A to 8D A schematic diagram of another example of a recording interface for a travel template provided in an embodiment of the present application;
[0181] 9A to 9F A schematic diagram of the effect display interface provided in an embodiment of the present application;
[0182] Figure 10 A schematic diagram of the gallery interface provided in an embodiment of the present application;
[0183] Figures 11A to 11B A schematic diagram of another example of a micro-movie mode homepage provided in an embodiment of the present application;
[0184] Figure 11C A schematic diagram of an interface for selecting camera movement modes and combining them into a shooting template according to an embodiment of the present application;
[0185] Figure 12 A schematic diagram of a flow chart of a video shooting method provided in an embodiment of the present application;
[0186] Figure 13-Figure 17 A schematic diagram of a graphical user interface of an electronic device provided in one embodiment of the present application;
[0187] Figure 18 、 Figures 19A-19D A schematic diagram of the movement of a target area in an image captured by an ultra-wide-angle camera according to an embodiment of the present application;
[0188] Figure 20-24 A schematic diagram of a graphical user interface of an electronic device provided in one embodiment of the present application;
[0189] Figure 25 A schematic diagram of the rotation of a target area in an image captured by an ultra-wide-angle camera according to an embodiment of the present application;
[0190] Figure 26-Figure 27A schematic diagram of a graphical user interface of an electronic device provided in one embodiment of the present application;
[0191] Figure 28 A schematic diagram of a magnified target area in an image captured by an ultra-wide-angle camera according to an embodiment of the present application;
[0192] Figure 29 A schematic diagram of a graphical user interface of an electronic device provided in one embodiment of the present application;
[0193] Figure 30-Figure 31 A flowchart of a method for displaying a preview image in a video recording scenario provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0194] Below, some terms used in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0195] The preview image involved in the embodiments of the present application refers to the image displayed in the viewfinder interface of the electronic device. For example, when the electronic device is a mobile phone, the mobile phone starts the camera application, opens the camera, displays the viewfinder interface, and displays the preview image in the viewfinder interface. Continuing with the mobile phone as an example, when the mobile phone starts the video call function (such as the video communication function in WeChat), the camera is opened, the viewfinder interface is displayed, and the preview image is displayed in the viewfinder interface.
[0196] The field of view involved in the embodiments of the present application is an important performance parameter of the camera. "Field of view" can also be referred to as "angle of view", "field of view range", "field of view range" and other terms, and this document does not limit this term. The field of view is used to indicate the maximum angle range that the camera can capture. If the object is within this angle range, the object will be captured by the camera and then presented in the preview image. If the object is outside this angle range, the object will not be captured by the camera, that is, it will not be presented in the preview image.
[0197] Generally speaking, the larger a camera's field of view (FOV), the wider its capture range and the shorter its focal length. Conversely, the smaller its FOV, the smaller its capture range and the longer its focal length. Therefore, cameras can be categorized as standard, wide-angle, and ultra-wide-angle, depending on their FOV. For example, a standard camera's focal length can be 45 to 40 mm, with a viewing angle of 40 to 60 degrees; a wide-angle camera's focal length can be 38 to 24 mm, with a viewing angle of 60 to 84 degrees; and an ultra-wide-angle camera's focal length can be 20 to 13 mm, with a viewing angle of 94 to 118 degrees.
[0198] 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.
[0199] 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.
[0200] For example, Figure 2A 1 shows a schematic structural diagram of the electronic device 100. Figure 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.
[0201] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The controller may serve as the nerve center and command center of the electronic device 100. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. This memory may store instructions or data that have just been used or are being recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces the processor 110's waiting time, and thus improves system efficiency.
[0202] The USB interface 130 is an interface that complies with USB standards and specifications, and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160.
[0203] The wireless communication functionality of electronic device 100 can be implemented using antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, a modem processor, and a baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0204] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0205] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0206] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may 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. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0207] The display screen 194 is used to display the display interface of the application, such as the viewfinder interface of the camera application. 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0208] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0209] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0210] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the 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 passes the electrical signal to the ISP for conversion 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 or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0211] The digital signal processor is used to process digital signals. In addition to processing 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.
[0212] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0213] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.
[0214] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and software code of at least one application (such as iQiyi application, WeChat application, etc.). The data storage area can store data generated during the use of the electronic device 100 (such as captured images, recorded videos, etc.). In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0215] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as pictures and videos can be stored on the external memory card.
[0216] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0217] Among them, the sensor module 180 can include a pressure sensor 180A, a gyroscope 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.
[0218] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be provided on display screen 194. Gyroscope sensor 180B can be used to determine the motion posture of electronic device 100. In some embodiments, gyroscope sensor 180B can be used to determine the angular velocity of electronic device 100 around three axes (i.e., x, y, and z axes).
[0219] The gyroscope sensor 180B can be used for anti-shake shooting. The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation. The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. 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 according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip, features such as automatic unlocking of the flip can be set. The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device 100, and applied to applications such as horizontal and vertical screen switching and pedometers.
[0220] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing. The proximity light sensor 180G may 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 outward through the light emitting diode. The electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined 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 use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0221] The ambient light sensor 180L is used to sense ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 based on the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking photos. The ambient light sensor 180L can also work with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches. The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0222] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the 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, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.
[0223] The touch sensor 180K is also called a "touch panel." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, in a location different from that of the display screen 194.
[0224] Bone conduction sensor 180M can acquire vibration signals. In some embodiments, bone conduction sensor 180M can acquire vibration signals from vibrating bones in the human body. Bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals.
[0225] The buttons 190 include a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The electronic device 100 can receive button input and generate key signal input related to the user settings and function control of the electronic device 100. The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
[0226] It is understandable that Figure 2A The components shown do not constitute a specific limitation on the electronic device 100. The mobile phone may also include more or fewer components than shown, or combine some components, separate some components, or arrange the components differently. Figure 2A The combination / connection relationship between the components can also be adjusted and modified.
[0227] In an embodiment of the present application, the camera 193 in the electronic device 100 may include one camera or multiple cameras. If multiple cameras are included, such as camera 1 and camera 2, the field of view of camera 1 is smaller than that of camera 2. For example, camera 1 is a telephoto camera and camera 2 is a wide-angle camera (which can be a normal wide-angle camera or an ultra-wide-angle camera); or, camera 1 is a normal wide-angle camera and camera 2 is an ultra-wide-angle camera, and so on. In some embodiments, camera 1 and 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, such as a telephoto camera.
[0228] The electronic device 100 can provide multiple recording modes, such as normal recording mode, panning mode, and shaking mode. In normal recording mode, the electronic device 100 activates camera 1 with a smaller field of view, and the image captured by camera 1 is displayed in the viewfinder interface. When the electronic device 100 switches from normal recording mode to panning mode, camera 2 with a larger field of view is activated, and an image block from a frame of image captured by camera 2 is displayed in the viewfinder interface. When the electronic device 100 remains stationary, if the processor 110 (e.g., GPU or NPU) responds to the image movement direction input by the user (e.g., by sliding the screen to input the image movement direction), it determines another image block from the next frame of image captured by camera 2 based on the image movement direction, and then displays the other image block in the viewfinder interface. The orientation of the other image block relative to the previous image block is related to the image movement direction input by the user. In other words, the user can achieve a "panning" shooting method by inputting the image movement direction. Therefore, in the embodiment of the present application, during mobile phone recording, the "panning" shooting method can be achieved without the user moving the phone, which is convenient to operate and provides a high user experience.
[0229] Figure 2B FIG1 shows a software structure block diagram of an electronic device provided by an embodiment of the present application. Figure 2B As shown, the software structure of the electronic device can be a layered architecture. For example, the software can be divided into several layers, each with 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 (Android runtime) and system library, and the kernel layer.
[0230] The application layer can include a series of application packages. Figure 2BAs shown, the application layer may include camera, settings, skin module, user interface (UI), third-party applications, etc. Among them, third-party applications may include WeChat, QQ, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
[0231] The application framework layer provides application programming interface (API) and programming framework for the application layer. The application framework layer may include some predefined functions. Figure 2B As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0232] The window manager manages windowed applications. It can determine the display size, determine whether a status bar is present, lock the screen, and take screenshots. Content providers store and retrieve data and make it accessible to applications. This data can include video, images, audio, incoming and outgoing calls, browsing history and bookmarks, and phone books.
[0233] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0234] The phone manager is used to provide communication functions for electronic devices, such as call status management (including answering, hanging up, etc.).
[0235] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0236] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0237] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.
[0238] The core library consists of two parts: one containing the Java language's callable functions and the other the Android core library. The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0239] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).
[0240] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0241] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0242] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0243] A 2D graphics engine is a drawing engine for 2D drawings.
[0244] In addition, the system library may also include an image processing library for processing images to achieve shooting effects such as shaking, moving, rising, and falling.
[0245] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0246] The hardware layer may include various sensors, such as the acceleration sensor, gyroscope sensor, touch sensor, etc. involved in the embodiments of the present application.
[0247] The following describes the software and hardware workflow of the electronic device in conjunction with the method for displaying a preview image in a video recording scenario according to an embodiment of the present application.
[0248] The touch sensor 180K receives a touch operation, and the corresponding hardware interrupt is sent to the kernel layer. Taking the touch operation as an example, 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 shift mode, the camera driver in the kernel layer is called to drive a camera with a larger field of view (such as an ultra-wide-angle camera) to capture an image. The ultra-wide-angle camera sends the captured image to the image processing library in the system library.
[0249] The image processing library processes the image captured by the ultra-wide-angle camera, for example, determines an image block on the image. The display screen displays the image block, i.e., the preview image, in the viewfinder interface of the camera application. When the electronic device remains stationary, assuming that the touch sensor 180K receives a sliding operation, the 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 recognizes that the input event corresponds to the sliding direction, the image processing library determines another image block on the image captured by the ultra-wide-angle camera, and the orientation between the other image block and the one image block is related to the sliding direction. Therefore, during the recording process of the electronic device, the "moving lens" effect can also be achieved while remaining stationary.
[0250] For ease of understanding, the following embodiments of this application will take the electronic device being a mobile phone as an example, and will specifically illustrate the video shooting method provided in the embodiments of this application in conjunction with the accompanying drawings.
[0251] In the video shooting method provided in this application, while the mobile phone remains stationary, shooting techniques such as "moving the lens" or "shaking the lens" can be implemented.
[0252] For ease of description, this article will refer to "shifting" as "shifting mode," "panning" as "panning mode," and "shifting mode," "panning mode," and so on, collectively referred to as "camera movement mode." While "shifting mode" and "panning mode" are used as examples here, it is understood that camera movement modes can be further refined. For example, shifting modes can include up, down, left, and right modes based on movement direction; and can include accelerated, uniform, and decelerated modes based on movement speed. For example, see Table 1 below, which lists various camera movement modes.
[0253] Table 1: Various camera movement modes
[0254]
[0255] Table 1 above takes 36 camera movement modes as an example. It is understandable that more modes may be included. For example, taking the shift mode as an example, in addition to up, down, left, and right shifts, other directions of movement may also be included, which are not listed here one by one.
[0256] The following describes how the various "camera movement modes" described above work when the phone remains stationary.
[0257] (1) Shift mode
[0258] The mobile phone starts a camera, such as a wide-angle camera or an ultra-wide-angle camera. The camera outputs an image stream. Figure 3A As shown in (a), Figure 3A The largest box in (a) represents the image output by the camera, which generally includes more captured objects. Figure 3A In (a), only frames m through m+3 of the image stream are captured as an example. Taking the mth frame as an example, the small square within the large box is labeled as the mth region. The image block within the mth region can be cropped and displayed as a preview image on the screen. In other words, the preview image displayed on the phone is a cropped image block from the image captured by the camera. This description also applies to the following pan mode, push mode, and pull mode.
[0259] Take right shift as an example, assuming that the right shift starts from the mth frame, see Figure 3A (a) The preview image is the image block within the mth region on the mth frame. The next preview image is the image block within the m+1th region on the m+1th frame, with the m+1th region shifted to the right by a distance A relative to the mth region. The next preview image is the image block within the m+2th region on the m+2th frame, with the m+2th region shifted to the right by a distance B relative to the m+1th region, and then by a distance A+B relative to the mth region, and so on. The mth region, the m+1th region, the m+2th region, etc. are collectively referred to as the target region. In other words, the position of the target region in the image captured by the camera gradually shifts to the right, creating the effect of the lens shifting to the right, but the phone does not actually move.
[0260] Figure 3A (a) Taking the mth region as the center region of the mth frame image as an example, it is understandable that the mth region can also be other regions of the mth frame image. For example, the left edge of the mth region overlaps with the left edge of the mth frame image, that is, the target region moves from the leftmost side of the image to the rightmost side of the image.
[0261] Figure 3A (a) is explained by taking rightward movement as an example. It is understandable that movement in various directions such as leftward movement, upward movement, downward movement, and diagonal movement can also be included. The principles are the same and will not be described in detail.
[0262] The following is a specific example, in which a preview image is refreshed once every second for simplicity.
[0263] Assume that the image in the image stream output by the camera is 4148*2765 and the target area is 2094*1178. Take the target area moving from the leftmost side of the image to the rightmost side of the image, and moving at a constant speed as an example. Figure 3B During the right shift, the center of the target area moves from -1027 to +1027 in the X direction, so it takes 3 seconds to complete the translation from the far left to the far right. This example uses right shift, but the left shift follows the same principle and will not be further explained. Furthermore, this example uses a single frame refresh per second, but in practice, multiple frames can be refreshed per second.
[0264] Similarly, for upward translation: the center point of the target area moves from -793 to +793 in the Y direction. The translation from the bottom to the top is completed in 3 seconds (or the user-defined duration). This example uses upward translation, but it is understood that the downward translation follows the same principle and will not be repeated here.
[0265] (2) Shake mode
[0266] Unlike shift mode, shake mode not only requires changing the position of the target area within the camera image but also requires performing a perspective conversion on the image blocks within the target area. The preview image is the image blocks that have undergone the perspective conversion. For example, the phone can first perform a perspective conversion on the image captured by the camera (e.g., the mth frame), and then determine the image blocks within the target area within the perspective-converted image as the preview image. Alternatively, the phone can first determine the image blocks within the target area within the camera image, then perform a perspective conversion on the image blocks, and use the perspective-converted image blocks as the preview image.
[0267] Take right shaking as an example, assuming that right shaking starts from the mth frame, see Figure 3A As shown in (a), the preview image is the image block obtained by performing perspective conversion on the image blocks in the mth region. The next preview image is the image block obtained by performing perspective conversion on the image blocks in the m+1th region. The next preview image is the image block obtained by performing perspective conversion on the image blocks in the m+2th region, and so on. This creates the effect of a right-panning camera, but the phone is actually stationary.
[0268] The perspective conversion can be achieved through affine transformation. Exemplarily, the process of affine transformation includes: multiplying the pixel points on the image by the linear transformation matrix, and adding the translation vector to obtain the image after the perspective conversion. Exemplarily, the image after visual conversion satisfies the following formula:
[0269]
[0270] From the above we can get:
[0271] x'=m11*x+m12*y+m13
[0272] y'=m21*x+m22*y+m23
[0273] 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:
[0274] x'=x*cos(θ)-sin(θ)*y
[0275] y'=x*sin(θ)+cos(θ)*y
[0276] 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.
[0277] (3) Push mode
[0278] 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.
[0279] See also Figure 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.
[0280] Assume that push mode is used starting from the mth frame, and continue to refer to Figure 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.
[0281] (4) Pull mode
[0282] 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.
[0283] 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.
[0284] (5) Rotation mode
[0285] 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.
[0286] Take clockwise rotation as an example, assuming that the rotation starts from the mth frame, see Figure 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.
[0287] Figure 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.
[0288] (6) Constant speed mode
[0289] The uniform speed mode includes modes such as uniform movement, uniform panning, uniform pushing, uniform pulling, and uniform rotation. More specifically, uniform movement can further include uniform upward, downward, leftward, and rightward movements, etc., and uniform rotation can further include uniform clockwise rotation, uniform counterclockwise rotation, etc., as shown in Table 1 above.
[0290] Taking uniform movement as an example, and taking uniform rightward movement as an example, please refer to Figure 3A (a). For example, A = B = C, that is, the target area (such as the m-th area, the (m + 1)-th area, the (m + 2)-th area, etc.) moves the same distance each time, achieving the effect of uniform rightward movement.
[0291] Taking uniform pushing as an example, please refer to Figure 3A (b). The target area (such as the m-th area, the (m + 1)-th area, the (m + 2)-th area, etc.) reduces the same area each time, achieving the shooting effect of uniform pushing.
[0292] Taking uniform rotation as an example, and taking uniform instantaneous rotation as an example, please refer to Figure 3A (c). For example, G = P = W, that is, the target area (such as the m-th area, the (m + 1)-th area, the (m + 2)-th area, etc.) rotates the same angle each time, achieving the effect of uniform rotation.
[0293] (7) Acceleration mode
[0294] The acceleration mode includes modes such as acceleration movement, acceleration panning, acceleration pushing, acceleration pulling, and acceleration rotation. More specifically, acceleration movement can further include acceleration upward, downward, leftward or rightward movements, etc., and acceleration rotation can further include acceleration clockwise rotation, acceleration counterclockwise rotation, etc., as shown in Table 1 above.
[0295] Taking acceleration movement as an example, and taking acceleration rightward movement as an example, please refer to Figure 3A (a). For example, A < B < C, that is, the distance that the target area (such as the m-th area, the (m + 1)-th area, the (m + 2)-th area, etc.) moves each time increases, achieving the effect of acceleration rightward movement.
[0296] Taking acceleration pushing as an example, please refer to Figure 3A (b). That is, the amount of reduction in the area of the target area (such as the m-th area, the (m + 1)-th area, the (m + 2)-th area, etc.) gradually increases. For example, the first area difference between the (m + 1)-th area and the m-th area is less than the second area difference between the (m + 2)-th area and the (m + 1)-th area, achieving the effect of acceleration pushing.
[0297] Taking acceleration rotation as an example, and taking acceleration clockwise rotation as an example, please refer to Figure 3A (c). For example, G < P < W, that is, the angle that the target area (such as the m-th area, the (m + 1)-th area, the (m + 2)-th area, etc.) rotates each time increases, achieving the effect of uniform rotation.
[0298] Continuing with the example of accelerating right shift, in addition to setting the values of A, B, and C to satisfy A < B < C, there are other ways to achieve accelerating right shift. For example, continue to refer to Figure 3A (a). Set A = B = C, and then achieve the accelerating shift by way of frame extraction. For example, extract the m-th frame, the (m + 1)-th frame, and the (m + 3)-th frame. So the preview images are the image blocks in the m-th area, the image blocks in the (m + 1)-th area, and the image blocks in the (m + 3)-th area in sequence. And the (m + 1)-th area shifts right by A relative to the m-th area, and the (m + 3)-th area shifts right by B + C relative to the (m + 1)-th area, thus achieving accelerating right shift.
[0299] (8) Deceleration mode
[0300] The deceleration mode includes deceleration shift, deceleration pan, deceleration push, deceleration pull, deceleration rotation and other modes. More specifically, deceleration shift can also include deceleration up, deceleration down, deceleration left or deceleration right shift, etc., and deceleration rotation can also include deceleration clockwise rotation, deceleration counterclockwise rotation, etc., as shown in Table 1 above.
[0301] Taking deceleration shift as an example, and taking deceleration right shift as an example, please refer to Figure 3A (a). For example, A > B > C, that is, the distance that the target area (such as the m-th area, the (m + 1)-th area, the (m + 2)-th area, etc.) moves each time decreases, achieving the effect of deceleration right shift.
[0302] Taking deceleration push as an example, please refer to Figure 3A (b). That is, the amount of reduction in the area of the target area (such as the m-th area, the (m + 1)-th area, the (m + 2)-th area, etc.) gradually decreases. For example, the first area difference between the (m + 1)-th area and the m-th area is greater than the second area difference between the (m + 2)-th area and the (m + 1)-th area, achieving the effect of deceleration push.
[0303] Taking deceleration rotation as an example, and taking deceleration clockwise rotation as an example, please refer to Figure 3A (c). For example, G > P > W, that is, the angle by which the target area (such as the m-th area, the (m + 1)-th area, the (m + 2)-th area, etc.) rotates each time decreases, achieving the effect of deceleration rotation.
[0304] 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, continue to refer to Figure 3A(a) Set A=B=C, and then implement decelerated right movement by interpolating frames. For example, insert the pth frame between the mth frame and the m+1th frame. The target area on the pth frame is the pth area, which is shifted right by X relative to the mth area. X is less than A, so the preview image is the image block in the mth area, the image block in the pth area, the image block in the m+1th area, and so on. The pth area is shifted right by X relative to the mth area, and the m+1th area is shifted right by A relative to the mth area, achieving the effect of decelerated right movement, but the position of the phone does not change.
[0305] The following describes the process of shooting videos using the various "camera movement modes" mentioned above while keeping the phone still.
[0306] Generally speaking, in order to bring the ultimate viewing experience to the audience, a large number of camera movement shooting techniques such as panning, panning, and pushing and pulling shots are used during the filming process of a movie. However, filming a movie requires professional filming equipment and professional photographers. Therefore, the present application considers using a mobile phone, and when the mobile phone remains stationary, to achieve film-like shooting using various camera movement modes. For example, a micro-movie mode (or movie mode) can be provided in a mobile phone. In the micro-movie mode, the user can use the mobile phone to achieve film-like shooting. Specifically, the micro-movie mode includes a variety of story templates, and each story template includes a variety of different camera movement modes. When a mobile phone uses a certain story template to shoot a video, the different camera movement modes included in the story template can be used to shoot the video to improve the quality of the video shooting. In addition, the operation is convenient. Even non-professional cameramen can use various camera movement modes to complete the shooting, thereby improving the fun of video shooting to a certain extent.
[0307] The technical solutions of the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0308] Figure 4 (a) in the figure shows a graphical user interface (GUI) of a mobile phone, which is the home screen of the mobile phone. The home screen includes icons of multiple applications, for example, an icon of a camera application. When the mobile phone detects that the user clicks the icon of the camera application, the camera application is started and the following image is displayed: Figure 4 Another GUI shown in (b) in FIG. 1 may be referred to as a viewfinder interface (or a shooting interface). A preview image may be displayed in real time on the viewfinder interface.
[0309] After detecting the user's operation 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 record videos using various story templates.
[0310] There are many ways for the user to indicate the micro-movie mode.
[0311] 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.
[0312] For example, the button may be Figure 5A Alternatively, the button may also be displayed on Figure 5A 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 Figure 5A 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.
[0313] Or, Figure 4 As shown in (b), when the phone detects a click operation on the more button, it displays Figure 5B 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.
[0314] 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.
[0315] 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.
[0316] After the mobile phone enters the micro-movie mode, multiple story templates can be displayed, and each story template can include multiple camera modes.
[0317] 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.
[0318] For example, the interface after the mobile phone enters the micro-movie mode can be seen in Figure 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 as Figure 6 (a) shows the travel template, quiet template, and dynamic template.
[0319] The homepage may also include a preview box 601 for displaying a video sample of the story template. For example, when the mobile phone detects that the user has selected a travel template (such as clicking on the travel template), the preview box 601 displays a video sample of the travel template.
[0320] Considering that the video sample of the travel template is composed of three sample clips, the preview box 601 can directly play the video sample; or, each sample clip can be played separately. 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 period of time. In order to facilitate the user to distinguish which sample clip is currently playing in the preview box 601, the mobile phone can output certain prompts. For example, Figure 6 (a) When the first sample clip is being played in the preview box 601, the first small circle in the mark 602 is in the first color (e.g., black), and the other two small circles are in the second color (e.g., white); when the second sample clip is being played in the preview box 601, the second small circle in the mark 602 is in the first color (e.g., black), and the other two small circles are in the second color (e.g., white).
[0321] Alternatively, when the mobile phone detects that the user has selected the first sample clip, the first sample clip is played in the preview box 601. When the mobile phone detects that the user has selected the second sample clip, the second sample clip is played in the preview box 601. For example, continue to refer to Figure 6 (a) The first sample clip is displayed by default in preview box 601. When the phone detects a left swipe in preview box 601, the next sample clip is displayed in preview box 601. When the phone detects a left swipe in preview box 601 again, the next sample clip is displayed in preview box 601. Meanwhile, a marker 602 can also indicate to the user which sample clip is currently playing in preview box 601.
[0322] Optionally, the video sample may include music, which may be a default setting, such as a setting that is provided with the travel template.
[0323] Optionally, in addition to the mark 602 , the preview box 601 may also display the number of sample clips, the total recording time of the travel template, the recording time of each video clip, and the like.
[0324] Considering that users may want to know the camera mode used by each story template, the mobile phone can give users a prompt on the touch screen or through sound to inform the user of the camera mode used by the story template. For example, see Figure 6 As shown in (a), when the travel template is selected, in addition to displaying the video sample of the travel module, the preview box 601 can also display a "Details" button. When the mobile phone detects that the user clicks the "Details" button, the following is displayed: Figure 6 The interface shown in (b) of the travel template includes the camera movement mode used by each sample clip in the travel template. For example, the first sample clip uses right shift mode, the second sample clip uses push mode, and the third sample clip uses clockwise rotation. For ease of description, the constant speed is used as an example.
[0325] It should be noted that when a video sample of the Travel template is displayed in preview frame 601, the camera movement mode used by the Travel template can be viewed by pressing the "Details" button. Therefore, it is understood that when a video sample of the Quiet template is displayed in preview frame 601, the camera movement mode used by the Quiet module can be viewed by pressing the "Details" button, and this will not be further explained.
[0326] Continue to see Figure 6 (a) The homepage also includes a control 603, which is used to enter a recording interface of a certain story template. For example, if the mobile phone detects that the user has selected a travel template and then detects that the control 603 is clicked, the recording interface of the travel template is entered.
[0327] For example, the recording interface of the travel template is as follows: Figure 7A As shown. The recording interface includes a prompt 701, which is used to remind the user that the user is currently in the travel mode. Of course, prompt 701 can also be omitted. The recording interface also includes three marks: marks 702 to 704, where mark 702 is used to indicate the first camera movement mode of the travel mode, mark 703 is used to indicate the second camera movement mode, and mark 704 is used to indicate the third camera movement mode.
[0328] Optionally, time 1 is displayed in mark 702, and time 1 is used to indicate the recording duration of the first camera movement mode. Similarly, time 2 is displayed in mark 703, and time 2 is used to indicate the recording duration of the second camera movement mode. Time 3 is displayed in mark 704, and time 3 is used to indicate the recording duration of the third camera movement mode. Time 1, time 2, and time 3 can be set by default, and the three times can be the same or different ( Figure 7A (In the example, all three times are 3 seconds.) Alternatively, time 1, time 2, and time 3 can also be set by the user (described below).
[0329] The recording interface also displays a button 706 for closing the recording interface of the travel template. Assuming that the mobile phone detects the operation of clicking the button 706, it returns to the following example: Figure 6 (a) shows the homepage.
[0330] The recording interface also displays a button 705. Optionally, the button 705 may be a recording button for controlling the start and / or stop of recording.
[0331] Mode 1: The travel template includes three camera movement modes. For each camera movement mode, the start and / or stop of recording can be controlled by button 705.
[0332] Continue to see Figure 7A When the mobile phone detects an operation for selecting mark 702 (e.g., clicking mark 702), the first camera movement mode corresponding to mark 702 is determined. When the operation of clicking button 705 is detected, the mobile phone starts to use the first camera movement mode for video shooting. Taking the first camera movement module as the right shift mode as an example, its implementation principle is shown in FIG. Figure 3A (a) for an introduction. For recording effects, see Figure 7B Specifically, Figure 7B In the preview image (a), the object "tower" is on the right side of the image. Figure 7B In the preview image (b), the “tower” is in the middle of the image. Figure 7B In (c), the “tower” in the preview image is located on the left side of the image, which is equivalent to the effect of the phone moving to the right, but in fact the phone has not moved.
[0333] When the mobile phone uses the first camera mode to shoot a video, the time in the mark 702 is automatically reduced. For example, Figure 7B The time in mark 702 in (a) is 3s, Figure 7B The time in mark 702 in (b) is reduced to 2s, Figure 7B The time in mark 702 in (c) is reduced to 1 second. When the time is reduced to 0, the recording stops. At this point, the recording process of the mobile phone using the first camera movement mode is completed.
[0334] For example, see Figure 7A When the mobile phone detects an operation for selecting mark 703 (e.g., clicking mark 703), the second camera movement mode corresponding to mark 703 is determined. When the operation of clicking button 705 is detected, the mobile phone starts to use the second camera movement mode for video shooting. Taking the second camera movement module as an example, the implementation principle is as follows: Figure 3A (b) for an introduction. For recording effects, see Figure 7C Specifically, Figure 7C In the preview image (a), the object "tower" is visually far away, so the tower is small. Figure 7B In the preview image (b), the “tower” is enlarged, giving the user the feeling of being close to the “tower”. Figure 7B The “tower” in the preview image in (c) is further magnified, which is equivalent to the effect of the phone moving closer to the object, but the phone does not actually move.
[0335] Similarly, during the recording process using the second camera movement mode, the time in mark 703 is automatically reduced. When the time is reduced to 0, the recording stops. At this point, the recording process using the second camera movement mode of the mobile phone ends.
[0336] For example, see Figure 7A When the mobile phone detects an operation for selecting mark 704 (e.g., clicking mark 704), the third camera movement mode corresponding to mark 704 is determined. When the operation of clicking button 705 is detected, the mobile phone starts to use the third camera movement mode for video shooting. Taking the third camera movement module as an example, the clockwise rotation mode is used for its implementation principle. Figure 3A (c) Introduction, its recording effect can be seen in Figure 7D Specifically, Figure 7D In the preview image (a), the object "tower" is vertical. Figure 7D In the preview image (b), the “tower” rotates clockwise. Figure 7D The “tower” in the preview image in (c) is further rotated, which is equivalent to the shooting effect of rotating the phone clockwise, but the phone does not actually move.
[0337] Similarly, when the phone is recording in camera mode 3, the time in marker 704 automatically decreases. When the time reaches 0, the recording stops. At this point, the phone's recording process using the third camera mode ends.
[0338] Therefore, in the above method 1, the user selects a camera movement mode through marks 702 to 704, and then controls the mobile phone to start shooting using the selected camera movement mode through button 705.
[0339] Of course, button 705 can also control the shooting to stop. Figure 7A For example, the user selects the first camera movement mode. When the mobile phone detects the operation of clicking button 705, it starts recording in the first camera movement mode. When it detects the operation of clicking button 705 again, it stops recording in the first camera movement mode. The second and third camera movement modes are based on the same principle and will not be repeated. That is to say, for each camera movement mode, not only can the start of recording be controlled by button 705, but also the stop of recording can be controlled by button 705. In this case, the recording duration of each camera movement mode does not need to be pre-set. For example, the recording duration can be determined by the user. When the user wants to stop recording, he or she can click button 705.
[0340] Method 2: In the above method 1, for each camera movement mode, the user needs to click button 705 once to start recording. Different from method 1, in method 2, when the mobile phone detects the operation of button 705, it automatically uses the three camera movement modes in sequence to record. For example, see Figure 7AWhen the phone detects a click on button 705, it starts recording in the first camera mode. When the recording duration reaches a preset support value (e.g., 3 seconds), the phone automatically starts recording in the second camera mode, and then in the third camera mode. This method only requires the user to click button 705 once, making it convenient to operate. Of course, in method 2, button 705 can also be used to stop or pause recording, which will not be explained in detail here.
[0341] Similarly, in method 2, while the mobile phone is recording using the first camera movement mode, the time in mark 702 can be gradually reduced. When the time is reduced to 0, recording using the first camera movement mode is stopped. When recording using the second and third camera movement modes, the principles are the same and will not be repeated here.
[0342] Alternatively, button 705 may also be a video synthesis button for synthesizing recorded clips into a video.
[0343] For example, mark 702 to mark 704 are used as recording buttons. Figure 7A When the phone detects a click on mark 702, it starts recording in the first camera mode, stops recording when the recording duration (e.g., 3 seconds), and stores the recorded segment (referred to as segment 1 for easy distinction). When the phone detects a click on mark 703, it uses the second camera mode to record segment 2. When the phone detects a click on mark 704, it uses the third camera mode to record segment 3. When the phone detects a click on button 705, segments 1 to 3 are combined into a single video.
[0344] Similarly, when the mobile phone uses the first camera movement mode to record, the time in mark 702 can be gradually reduced. When the time is reduced to 0, the first camera movement mode is stopped. When the second and third camera movement modes are used for recording, the principles are the same and will not be repeated here.
[0345] Optionally, the recording duration (e.g., 3 seconds) for each camera movement mode may not be pre-set. For example, when a click operation on mark 702 is detected, the phone starts recording in the first camera movement mode. When a click operation on mark 702 is detected again, recording in the first camera movement mode is stopped. The same principle applies to the second and third camera movement modes. In other words, the start and stop of recording in the first camera movement mode is controlled by mark 702, that is, the recording duration of each camera movement mode can be determined by the user.
[0346] In the above example, the recording time of each camera movement mode is preset to 3 seconds. It is understandable that the recording time of each camera movement mode can be adjusted. For example, see Figure 8AAs shown in (a), when the mobile phone detects an operation on the mark 702 (such as a long press operation), a selection box can be displayed, which includes a time setting button. Figure 8A (b) shows the interface, which displays a "+" button and a "-" button. The "+" button is used to increase the time, for example, to 4 seconds; the "-" button is used to decrease the time, for example, to 2 seconds.
[0347] It should be noted that Figure 7A Taking the travel template including three camera movement modes as an example, it is understandable that the travel template can also include more or fewer camera movement modes; for example, the user can add or delete camera movement modes.
[0348] Take deleting the camera mode as an example, for example, see Figure 8A (a) When the phone detects an operation (e.g., a long press) on marker 702, a selection box is displayed, including a delete button. When the phone detects the delete button operation, marker 702 is deleted, and accordingly, the first camera movement mode corresponding to marker 702 is deleted.
[0349] Take adding camera mode as an example, for example, see Figure 8B (a) The recording interface of the travel mode also includes a "+" button. When the phone detects an operation on the "+" button (such as a click operation), it displays the following Figure 8B (b) shows the interface, which includes a list of camera modes. After the user selects a camera mode, if the phone detects that the "Add" button has been clicked, the following will be displayed: Figure 8B (c) shows an interface in which a mark 707 is added to indicate that the user has selected an added camera movement mode.
[0350] Optionally, the order of different camera modes can be adjusted. For example, see Figure 8C As shown, when the mobile phone detects the operation of long pressing and dragging marker 704, marker 704 is in a movable state. When it is detected that marker 704 is dragged between markers 702 and 703, the order of the three camera movement modes is adjusted to the first camera movement mode, the third camera movement mode, and the second camera movement mode. Then, the order of the three clips in the synthesized video is: Clip 1, Clip 3, Clip 2. Among them, Clip 1 is shot using the first camera movement mode, Clip 2 is shot using the second camera movement mode, and Clip 3 is shot using the third camera movement mode.
[0351] Considering that the mobile phone enters the recording interface of the travel template (such as Figure 7AAfter recording, the user may not remember which camera modes are included in the travel template. In order to facilitate the user to view the camera modes included in the travel template, the camera modes of the travel mode can be prompted to the user in the recording interface of the travel mode. For example, see Figure 8D As shown in (a), when the mobile phone detects the operation of clicking button 603, it enters the Figure 8D (b) shows an interface that includes a small window in which a video sample of a travel template can be played; or each sample clip can be played separately in the small window. Figure 8D As shown in (b), when the phone detects an operation on mark 702, the first sample clip is played in the small window (for example, sample clip 1 is played in a loop or only played once). When the phone detects an operation on mark 703, the second sample clip is played in the small window (for example, sample clip 1 is played in a loop or only played once). In this way, during the recording process, the user can view the camera movement mode used for each sample clip.
[0352] Optionally, after the mobile phone completes video shooting using the travel template, it can enter the effect display interface to facilitate the user to view the shooting effect.
[0353] Take the above method 2 as an example, see Figure 9A (a), after the phone records in the last camera mode for a certain length of time (e.g. 3s), it will automatically enter the following Figure 9A (b) shows the effect display interface, in which the preview box 901 is used to display the video composed of three video clips. If the mobile phone detects the operation of the "OK" button, the mobile phone stores the synthesized video. For example, return to Figure 9A (a) shows the interface where the image in the synthesized video is displayed in the gallery icon in the lower left corner. If the user is not satisfied with the synthesized video, he or she can re-record it. For example, when the phone detects an operation on the "Back" button, it returns to Figure 9A (a) to re-record. Optionally, the preview frame 901 can occupy all or part of the display screen. If the entire display screen is occupied, the "OK" button and the "Return" button can be displayed on the upper layer of the preview frame 901.
[0354] It should be noted that Figure 9A (b) Taking the composite video displayed in the preview frame 901 as an example, it is understandable that each video segment can also be displayed independently. Figure 9B(a) shows an example of another effect display interface. The interface includes a mark for each video clip. For example, when the mobile phone detects an operation for marking clip 1 (such as a single click), clip 1 is played in the preview box 901. When the mobile phone detects an operation for marking clip 2, clip 2 is played in the preview box. Therefore, the user can view each recorded video clip one by one. When the mobile phone detects the operation of clicking the confirmation button, the three clips are synthesized into a video and the synthesized video is stored, and the video is returned as shown. Figure 9A The interface shown.
[0355] Optionally, the order of the three video clips can be adjusted. For example, continue to see Figure 9B As shown in (a), the mobile phone detects an operation on the marker of fragment 2 (e.g., a long press and drag operation) and changes the display position of the marker, such as dragging the marker of fragment 3 between the markers of fragment 1 and fragment 2, as shown in FIG. Figure 9B (b) As shown in FIG. Therefore, the order of segments 3 and 2 is adjusted. At this time, if the mobile phone detects an operation on the "OK" button, the order of displaying the video segments in the synthesized video is segment 1, segment 3, and segment 2.
[0356] Optionally, considering some situations, for example, the user is not satisfied with a certain video segment among the three video segments, in this case, the video segment can be deleted and the remaining video segments can be combined into a video. Figure 9C (a) The phone detects an operation on the mark of fragment 2 (e.g., a long press operation) and displays a delete button. When an operation on the delete button is detected, fragment 3 is deleted. Figure 9C (b) At this point, if the phone detects an operation on the "OK" button, it uses segments 1 and 2 to synthesize the video.
[0357] Alternatively, if the user is not satisfied with a video clip, he or she can re-record the clip. Figure 9C (a) When the phone detects an operation (e.g., long press) on the mark of clip 3, the re-record button is displayed. Figure 9C (c) shows an interface for re-recording segment 3. Therefore, only the mark 704 of the third camera movement mode may be displayed in the interface, and the marks of the first and second camera movement modes may not be displayed. Figure 9C (c) When the mobile phone detects the operation of clicking button 705, it starts recording in the third camera movement mode. When the recording time (for example, 3 seconds) is reached, it automatically returns to the third camera movement mode. Figure 8C The interface shown, where segment 3 is the re-recorded segment.
[0358] 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: Figure 9D (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 Figure 9D 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.
[0359] Optionally, the mobile phone can also perform other processing on the recorded video clips, such as cropping, adding text or music, etc.
[0360] For example, see Figure 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.
[0361] 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: Figure 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 Figure 9E (b) The last few frames are cut off. When the click of the Done button is detected, you can return to Figure 9E In the interface shown in (a), the preview box 901 displays the cropped segment 1.
[0362] When the phone detects an operation on a text icon, it will display Figure 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 Figure 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.
[0363] When the phone detects an operation on the music icon, it can display Figure 9E(d) shows an interface that displays a list of song segments, which includes multiple tags for song segments, such as a tag for song segment A, a tag for song segment B, etc. When the phone detects that the user selects the tag for song segment A, the phone can use song segment A as the background music for segment 1. For example, when the Done button is clicked, the phone returns to Figure 9E In the interface shown in (a), the preview box 901 plays Clip 1 with the song clip A added. Optionally, in addition to the camera movement mode, the story template can also include default music. Taking the travel template as an 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 music, the phone will use the default music of the travel template as the background music of the video. Considering the rhythmic nature of music, the playback rhythm of the images in the video can be consistent with the beat of the music. For example, if the music includes drum beats, when one drum beat plays, one frame of the image is played, and when the next drum beat plays, the next frame of the image is played, and so on.
[0364] Optionally, the mobile phone can also eliminate the original sound in one of the three recorded video clips. The original sound can be understood as the sound in the recorded video. For example, see Figure 9E (a), when the phone detects an operation on the mute icon, the original sound of clip 1 is eliminated. Optionally, for a certain video clip, the original sound can be eliminated completely or partially. Taking clip 1 as an example, when the mute icon operation is detected, the phone can display an audio cropping frame, such as Figure 9E (b) The above-mentioned cropping box 910 allows the user to select a portion of segment 1 to be muted through the audio cropping box, and the remaining portion of segment 1 that is not muted retains its original sound.
[0365] It should be noted that Figure 9E Only four processing methods are listed for video clips: cropping, adding text, adding music, and removing the original image. It is understood that other processing methods can also be included. For example, various picture styles can be provided for processing the images in the clips, such as black and white style, cartoon style, ink style, strong exposure style, weak exposure style, etc. This application does not list them one by one.
[0366] Optionally, the mobile phone can also select a synthesis effect, which is used to synthesize three video clips in a specific synthesis method. Figure 9F (a) When the phone detects the operation of the "Motion Effect" button, it will display the following Figure 9F(b) shows the interface, which includes a variety of synthesis effects. For example, assuming the user selects "fusion", when the phone detects that the user clicks the "OK" button, the synthesis method of fragments 1 and 2 is: the last frame of fragment 1 is merged with the first frame of fragment 2. The corresponding synthesis effect is: after the phone plays the second to last frame of fragment 1, it plays the last frame of fragment 1, which is the image fused with the first frame of fragment 2, and then continues to play the second frame of fragment 2. In order to facilitate user viewing and effects, the phone displays the following Figure 9F (c) shows the interface for displaying the synthesis effect. When the phone detects that the "Save Settings" button is clicked, it saves the synthesis effect "Fusion" and then returns to the default state. Figure 9F In the interface shown in (a), when the mobile phone detects that the "OK" button is clicked on the interface, the fragments 1 and 3 are synthesized with the saved synthesis effects.
[0367] For example, Figure 9F Taking (b) as an example, assuming the user selects gradual zoom, the corresponding synthesis effect is: after the mobile phone plays segment 1, it plays the first frame of segment 2 in a gradually zoomed-in manner, and then plays the second frame of segment 2. It should be noted that "fusion" and "gradual zoom" are used as examples for explanation here, and other synthesis effects are also possible, and this application will not give examples one by one.
[0368] Optionally, when the mobile phone stores a video, it can store both the original video and the synthesized video. Figure 9B For example, when the phone detects the "OK" button, it can store the video composed of segments 1 to 3; it can also store the original video, which can be understood as the video recorded without using the camera mode. Figure 3A Taking the right shift shown in (a) as an example, the original video is composed of the images from the mth frame to the m+3th frame, rather than the image blocks from the mth region to the m+1th region. Figure 10 The figure shows the interface of the gallery application on a mobile phone. This interface stores two videos: one shot using the camera mode and the other not. To facilitate user differentiation, a marker 1001 is displayed on the video shot using the camera mode. Optionally, upon detecting the "OK" button, the phone can also store each of the clips 1 to 3 separately.
[0369] In the above embodiment, Figure 6For example, the homepage of the micro-movie mode provides multiple story templates. These templates are pre-set by default (e.g., those pre-set when the phone leaves the factory). It is understood that users can also customize story templates. For ease of distinction, the default templates are collectively referred to as "default templates," and the user-defined templates are collectively referred to as "custom templates."
[0370] For example, see Figure 11A (a), the home page can also display a "+" button. When the phone detects an operation on the button, it can display the following Figure 11A (b) shows the interface of the gallery in the mobile phone. The user can select the video clips stored in the gallery. Assuming that the user selects clip 1101, when the mobile phone detects that the user clicks the "Add" button, it opens the Figure 11A (c) shows an interface where a new template is added. The user can set the name of the new template. For example, see Figure 11B When the phone detects an operation for a new template (for example, a long press operation), a naming button is displayed. When the phone detects that the naming button is clicked, the new template is named.
[0371] After adding a custom template to your phone, you can analyze the template's camera movement pattern. When a user selects a custom template, the corresponding camera movement pattern is used to shoot a video. This allows users to use the template to create a video with similar effects to the template. For example, if a user uses a clip from a movie as a custom template, the video they shoot using that template can resemble the film's effects. This allows even non-professional photographers to achieve high-quality footage, providing a superior user experience.
[0372] It is understandable that templates that users do not like or use infrequently can be deleted. Both the default template and the custom template can be deleted, or only the custom template can be deleted while the default template cannot be deleted. For example, see Figure 11B , the mobile phone detects an operation on the new template (for example, a long press operation) and displays a delete button. When the mobile phone detects that the delete button is clicked, the template is deleted.
[0373] Figure 11A (b) Taking the example of a local video on a mobile phone as an example, it is understandable that the custom template can also be set in other ways. Figure 11A Take (a) as an example, when the phone detects an operation on the "+" button, it displays the following Figure 11C The interface shown in the figure includes a list of camera modes. Users can select multiple camera modes from the list to combine into a customized story template. Assuming that the user selects right shift mode, pull mode, and left shake mode, when the phone detects that the "combine" button has been clicked, the following screen will be displayed: Figure 11A (c) shows an interface where the newly added template consists of multiple camera movement modes selected by the user.
[0374] In combination with the above embodiments and related drawings, the present application embodiment provides a video shooting method. Figure 12 As shown, the method may include the following steps:
[0375] 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 Figure 4 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.
[0376] 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.
[0377] The first video template can be Figure 7A Of course, the first video template can also be a default template or a user-defined template, such as Figure 11A shown.
[0378] 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 Figure 4 (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 Figure 5A Operation of micro film icons and click Figure 6 The operation of the travel template in (a) and the operation of clicking the control 603.
[0379] 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.
[0380] 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;
[0381] Taking the first video template as a travel template as an example, the video interface can be Figure 7A The interface shown.
[0382] S1204: In response to a second user operation, the electronic device is kept stationary and video recording is started.
[0383] One way is to respond to clicking the record button (e.g. Figure 7A 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.
[0384] 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.
[0385] One way is to respond to clicking the record button (e.g. Figure 7A 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.
[0386] 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. Figure 7B 、 Figure 7C or Figure 7D .
[0387] Optionally, the user can also delete the camera mode identifier. For example, the mobile phone displays a recording interface including a first camera mode identifier and a second camera mode identifier; in response to a third user operation, the first camera mode identifier or the second camera mode identifier is deleted; in response to a fourth user operation, the electronic device remains stationary and recording begins; and a composite video is automatically generated, including the video clips generated by the electronic device based on the camera mode that has not been deleted and the preset audio.
[0388] Optionally, the user can also add a camera mode identifier. For example, the electronic device displays a video recording interface, which includes a first camera mode identifier and a second camera mode identifier; in response to a third user operation, a third camera mode identifier is added to the video recording interface, where the third camera mode identifier is used to indicate a third camera mode; in response to a fourth user operation, the electronic device is kept stationary and recording is started; and a composite video is automatically generated, where the composite video includes the first video clip, the second video clip, the third video clip, and the preset audio, where the third video clip is a video clip generated by the electronic device according to the third camera mode.
[0389] Optionally, the user can also adjust the order of the camera movement mode identifiers. For example, the electronic device displays a video recording interface including a first camera movement mode identifier and a second camera movement mode identifier; in response to a third user operation, 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 user operation, the electronic device is kept stationary and recording is started; and a composite video is automatically generated, in which the first video segment and the second video segment are played in the first order.
[0390] Optionally, the first example sample and / or the second example sample are displayed in the video recording interface.
[0391] Optionally, the electronic device may also delete the first video segment or the second video segment in response to the fourth operation; or add a local third video segment to the composite video; or adjust the playback order of the first video segment or the second video segment in the composite video.
[0392] Optionally, the first recording template is a default template or a user-defined template.
[0393] Optionally, the electronic device may also automatically store the first video clip, the second video clip, and the composite video.
[0394] Optionally, the electronic device may also change the audio in the composite video or add text and / or pictures to the composite video in response to a specific operation. Figure 9E Introduction.
[0395] Example 2
[0396] In the above embodiment 1, the micro-movie mode is used to realize the combined use of multiple camera movement modes. Different from the embodiment 1, the present embodiment 2 provides another video shooting method, that is, the mobile phone uses a certain camera movement mode to shoot.
[0397] Figure 13 (a) shows a graphical user interface (GUI) of a mobile phone, which is the mobile phone desktop 401. When the mobile phone detects that the user clicks the camera application icon 402 on the desktop 401, the camera application can be started, and a normal wide-angle camera (such as a rear camera) can be started, and the following image is displayed: Figure 13 Another GUI shown in (b) of FIG. 130 is called a viewfinder interface 1303. The viewfinder interface 1303 is a viewfinder interface in the video recording mode (normal video recording mode). It should be understood that if the mobile phone detects that the user clicks the icon 1302, the viewfinder interface of the photo shooting mode is displayed by default. The user can input an operation such as Figure 13 Slide in area 1304 (the area in the dotted box) in (b) to select the video mode, and then the phone displays the video mode viewfinder interface.
[0398] For example, see Figure 13 In (b), after the phone enters video recording mode, a preview image is displayed in viewfinder interface 1303. Viewfinder interface 1303 may also include a control 1305 for indicating skin beautification mode, a control 1306 for indicating skin beautification level, and a video recording control 1307. In video recording mode, when the phone detects a user clicking on video recording control 1307, it begins recording.
[0399] It is understandable that the processing flow of the mobile phone for the video stream is different for the "shake" shooting mode and the "move" shooting mode. Therefore, the embodiment of the present application provides a variety of recording modes, such as a normal video recording mode and two camera movement modes (for example, including a move mode and a shake mode). 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 "shake" 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. Among them, the mobile phone entering the shake mode can be understood as the mobile phone performing processing based on the processing flow corresponding to the move mode. The mobile phone entering the move mode can be understood as the mobile phone performing processing based on the processing flow corresponding to the shake mode.
[0400] In some embodiments, when a mobile phone launches a camera application, it defaults to normal recording mode. After the user indicates a certain camera movement mode, it enters the corresponding camera movement mode. Alternatively, after the mobile phone launches the camera application, it defaults to a certain camera movement mode, for example, the camera movement mode used when the camera application was last used. Assuming that after the mobile phone launches the camera application, it defaults to panning mode, the ultra-wide-angle camera can be activated. An image block from the image captured by the ultra-wide-angle camera is displayed in the viewfinder interface, for example, the image block at the center position.
[0401] There are many ways for the user to indicate the shake mode and the shift mode, including but not limited to the following method 1 and method 2.
[0402] Method 1, reference Figure 14 As shown in (a), the mobile phone is currently in normal video recording mode. The viewfinder interface 1303 displays a control 1308 for indicating the camera mode. When the mobile phone detects the operation of the control 1308 for the camera mode, the following is displayed: Figure 14 (b) shows a GUI, which displays a selection box 1309. Selection box 1309 includes options for "shake mode" and "shift mode." When the mobile phone detects an operation for "shift mode" in selection box 1309, it enters "shift mode." When the mobile phone detects an operation for "shake mode," it enters "shake mode."
[0403] For example, after the mobile phone enters the normal video recording mode, the viewfinder interface displays a control 1308 for indicating the camera mode by default. Alternatively, after the user sets a shortcut for the camera mode, the viewfinder interface displays a control 1308 for indicating the camera mode. The user can set the shortcut for the camera mode through a settings menu within the camera application, etc.
[0404] It should be noted that the display position of the control 1308 for indicating the camera mode in the viewfinder interface 1303 is not limited in this embodiment of the present application. Alternatively, the user may customize the display position of the control 1308, or the display position of the control 1308 may be adaptively adjusted according to whether the mobile phone is in landscape or portrait mode. In addition, the form of the control 1308 for indicating the camera mode may be such that it does not obstruct the preview image as much as possible, such as being transparent or semi-transparent.
[0405] It should be understood that in method 1, the control 1308 of the camera movement mode is intuitively presented in the viewfinder interface, which is convenient for user operation and provides a high user experience.
[0406] Method 2, reference Figure 15 As shown in (a), the mobile phone is currently in normal video recording mode. The viewfinder interface 1303 also includes a "more" control 1310. When the mobile phone detects an operation for selecting the "more" control 1310, the following is displayed: Figure 15 (b) shows another GUI that displays icons corresponding to various shooting modes, including icons for "shake mode" and "shift mode." When the phone detects an operation on the "shift mode" icon, it enters "shift mode." When the phone detects an operation on the "shake mode" icon, it enters "shake mode." It should be understood that in approach 2, the viewfinder interface can omit control 1308 for indicating the camera movement mode, thereby avoiding obstruction of the preview image within the viewfinder interface.
[0407] It is understood that the above-mentioned methods 1 and 2 are merely examples, and other methods for instructing a mobile phone to enter a camera movement mode (shake mode or pan mode) are also feasible, for example, instructing a mobile phone to enter a shake mode or pan mode through a voice command, etc., and the present embodiment is not limited thereto. The following description will take the above-mentioned method 1 as an example.
[0408] Example 1
[0409] For example, Figure 16 A schematic diagram of the GUI when the mobile phone enters the pan mode is shown. In order to facilitate users to distinguish which mode is currently in, when the mobile phone enters the pan mode, a prompt message 1312 can be displayed in the viewfinder interface, and the prompt message 1312 is used to indicate that it is currently in the pan mode. Of course, when the mobile phone switches from the normal recording mode to the pan mode, other reminders, such as vibration feedback, can also be output. Among them, the prompt message 1312 can be displayed in a semi-transparent or transparent manner so as not to block the preview image as much as possible. A direction control 1311 is also displayed in the viewfinder interface. The user can input information for indicating the direction of image movement 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 embodiment of the present application. For example, it is displayed by default in the following example. Figure 16The position shown, or the user can adjust its display position.
[0410] In some embodiments, the mobile phone uses a first wide-angle camera (e.g., a normal wide-angle camera) in normal video recording mode. When the mobile phone switches from normal video recording mode to pan mode, the second wide-angle camera (e.g., an ultra-wide-angle camera) is activated. The viewing angle of the first wide-angle camera is smaller than that of the second wide-angle camera. In pan mode, the viewfinder interface displays a first preview image, which is the first image block in the first area of the image captured by the ultra-wide-angle camera. It is understandable that after the mobile phone enters pan mode, the ultra-wide-angle camera is activated, and the first preview image can be the first image block in the first area of the first frame image captured by the ultra-wide-angle camera.
[0411] Among them, the first image block can be an image block corresponding to the first preview image on the image captured by the ultra-wide-angle camera. For example, the first image block is all or part of the image whose viewing angle range overlaps with the image captured by the ultra-wide-angle camera and the image captured by the ordinary wide-angle camera. Figure 17 A schematic diagram of the first area on the image captured by the ultra-wide-angle camera is shown. The first area can be the entire or partial area where the viewing angles of the ultra-wide-angle camera and the ordinary wide-angle camera overlap. Figure 17 and Figure 18 It can be seen that Figure 17 After the phone enters mobile mode, the preview image is Figure 18 After the mobile phone switches from the normal video recording mode to the panning mode, the normal wide-angle camera can be turned off or on.
[0412] In some embodiments, when a mobile phone switches from normal recording mode to panning mode, the preview image remains unchanged. This unchanged preview image can be understood as the preview image not being scaled down or enlarged after switching to panning mode. For example, the magnification of the preview image in panning mode is the same as the magnification of the preview image in normal recording mode, for example, both are 1x. Therefore, after the mobile phone switches from normal recording mode to panning mode, the user will not perceive the preview image being abruptly enlarged or reduced.
[0413] In other embodiments, the preview image can change between normal recording mode and panning mode. The change in the preview image can be understood as the preview image being reduced or enlarged after switching to panning mode. For example, the magnification of the preview image in normal recording mode is 1x, and the magnification of the preview image in panning mode is 5x, that is, when switching from normal recording mode to panning mode, the preview image is enlarged. It is understandable that when the image magnification increases after switching to panning mode, the position movement range of the first area on the image captured by the ultra-wide-angle camera increases, which can achieve the shooting effect of panning the lens over a wider range.
[0414] The following embodiment describes the process of image translation by a mobile phone in the pan mode.
[0415] See also Figure 18 As shown, the ultra-wide-angle camera captures N frames of images. For example, the first frame, the second frame, the (m-1)th frame, and so on. It is understood that after the phone enters pan mode, the ultra-wide-angle camera is activated. Therefore, after entering pan mode, the first preview image can be the first image block in the first area of the first frame captured by the ultra-wide-angle camera. Assuming that the phone has not yet detected the image movement instruction, the phone determines the second area in the second frame, and the second area is positioned unchanged relative to the first area. The preview image is refreshed from the image block in the first area to the image block in the second area. Similarly, the (m-1)th area in the (m-1)th frame remains unchanged relative to the first area, where m can be an integer greater than or equal to 3. The preview image is refreshed to the image block in the (m-1)th area. In other words, from the first frame to the (m-1)th frame, the phone does not detect the image movement instruction, so the preview image remains unchanged on the image.
[0416] Assume that before the preview image is refreshed to the image block in the mth region of the mth frame (for example, during the preview image displaying the image block in the m-1th region), the mobile phone detects an image right shift instruction. The mobile phone determines the mth region on the mth frame, and the position of the mth region is shifted to the right by a distance A relative to the position of the m-1th region. Figure 18 As shown in the figure, 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 phone detects the image right shift 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 shifted to the right by a distance A.
[0417] Then, the mobile phone determines the m+1th region on the m+1th frame image, and the position of the m+1th region is shifted to the right by a distance B relative to the position of the mth region. Figure 18 As shown, 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 blocks in the mth region to the image blocks in the m+1th region, that is, the position of the preview image on the image is shifted to the right by a distance B.
[0418] The mobile phone determines the m+2th region on the m+2th frame image, and the position of the m+2th region is shifted to the right by a distance C relative to the position of the m+1th region. Figure 18As 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 within the viewfinder interface is refreshed from the image block within the (m + 1)-th region to the image block within the (m + 2)-th region, that is, the position of the preview image on the image moves rightward by a distance C. Therefore, the position of the preview image on the image gradually moves rightward.
[0419] 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 within the (m + 2)-th region to the image block within the (m + 3)-th region, that is, the position of the preview image on the image remains unchanged and stops moving rightward. After that, the preview image is refreshed from the image block within the (m + 3)-th region to the image block within the (m + 4)-th region, and the position of the preview image on the image remains unchanged until an image movement instruction is detected again and it moves again.
[0420] Among them, there are multiple cases for the value relationship between A, B, and C. Several examples are given below.
[0421] Example 1: A = B = C. Suppose A = B = C = L, that is, after the mobile phone detects an image rightward movement 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 Figure 18 ) on each frame image moves rightward by the same distance L relative to the target region on the previous frame image, that is, it moves rightward at a constant speed. That is to say, after the mobile phone detects an image rightward movement instruction, each refreshed preview image moves rightward by the same distance L relative to the previous frame preview image on the image until a stop movement instruction is detected, achieving the shooting effect of moving rightward at a constant speed.
[0422] Example 2: A < B < C < D. Suppose A = L, B = 2L, C = 3L, that is, after the mobile phone detects an image rightward movement instruction, the target region on the subsequent frame image moves rightward relative to the target region on the previous frame image with an increasing speed. For example, the m-th region moves rightward by a distance L relative to the (m - 1)-th region, the (m + 1)-th region moves rightward by a distance 2L relative to the m-th region, that is, the (m + 1)-th region moves rightward with an increasing speed; the (m + 2)-th region moves rightward by a distance 3L relative to the (m + 1)-th region, that is, the (m + 2)-th region moves rightward with an increasing speed relative to the (m + 1)-th region. Therefore, after the mobile phone detects an image rightward movement instruction, each refreshed preview image moves rightward with an increasing speed relative to the previous frame preview image, achieving the shooting effect of the image moving rightward with an increasing speed.
[0423] Example 3: A > B > C > D. Assume A = 2L, B = L, C = 0. That is, after the mobile phone detects an image right-shift instruction, the target area on the subsequent frame image moves rightward relative to the target area on the previous frame image at a decelerated speed. For example, the m-th area moves rightward by a distance of 2L relative to the (m - 1)-th area, and the (m + 1)-th area moves rightward by a distance of L relative to the m-th area, that is, the (m + 1)-th area moves rightward relative to the m-th area at a decelerated speed; the (m + 2)-th area moves rightward by a distance of 0 relative to the (m + 1)-th area, that is, the (m + 2)-th area does not move relative to the (m + 1)-th area at a decelerated speed. Therefore, after the mobile phone detects an image right-shift instruction, the preview image refreshed each time moves rightward relative to the previous frame preview image at a decelerated speed or even the speed drops to 0, achieving the shooting effect of image decelerated right-shift.
[0424] The above gives three examples of the value relationship between A, B, and C. The embodiments of the present application do not limit the value magnitudes of A, B, and C. Those skilled in the art can flexibly set them to achieve different technical effects.
[0425] In some embodiments, after the mobile phone detects an instruction for indicating the image movement direction, it defaults to using a certain way in Example 1, Example 2, or Example 3 above; or, after the mobile phone detects an instruction for indicating the image movement direction, it defaults to using the way in Example 1, and when detecting an accelerated movement instruction, it uses the way in Example 2 above; when the mobile phone detects a decelerated movement instruction, it uses the way in Example 3 above.
[0426] The first way
[0427] For the images collected frame by frame by the ultra-wide-angle camera, assume N frames are collected, and the image blocks within the target area on each frame of the N-frame images are used to refresh the preview image in sequence. It can also be understood that the mobile phone does not perform frame extraction or frame interpolation on the N-frame images collected by the ultra-wide-angle camera, but refreshes the preview image to the image blocks within the target area on each frame of the N-frame images in sequence, which helps to improve the coherence and fluency of the preview image. Assume that after the mobile phone detects an instruction for indicating the image movement direction, it determines the target area in the way where Figure 18 A = B = C = L, that is, the position of the preview image on the image moves rightward at a uniform speed. Assume that the mobile phone determines the target area in the way where Figure 18 A < B < C < D, the position of the preview image on the image moves rightward at an accelerated speed. Assume that the mobile phone determines the current area in the way of A > B > C > D, the position of the preview image on the image moves rightward at a decelerated speed.
[0428] The second way
[0429] The ultra-wide-angle camera captures N frames of images, and the mobile phone extracts M frames of images from the N frames of images captured by the ultra-wide-angle camera, where M is an integer less than N. The preview image is refreshed by the image blocks in the target area on each frame of the M frames, so that a fast refresh (or playback) effect can be achieved. For example, assuming that the image acquisition frame rate of the ultra-wide-angle camera is 240fps, that is, 240 frames of images are collected per second. Assuming that the image playback (or refresh) frame rate of the mobile phone is 30fps, that is, 30 frames are refreshed per second, then the 240 frames of images take 8 seconds to refresh. Assuming that the mobile phone extracts 120 frames of images from the 240 frames of images, the extracted 120 frames only take 4 seconds to refresh, thus achieving a fast refresh effect.
[0430] Example 1, see Figure 19A As shown, the ultra-wide-angle camera captures N frames of images, for example, sequentially capturing the first frame, the second frame, the m-1th frame, and so on. Assume that before the preview image is refreshed to the mth region on the mth frame, the phone detects an image right shift instruction, and the phone determines the target region on the mth frame and each subsequent frame in the N frames. Assume that the position of the target region on the subsequent frame is shifted to the right by the same distance L relative to the position of the target region on the previous frame (i.e., the above-mentioned A=B=C=L method).
[0431] Then, the phone starts extracting frames. Assuming it starts extracting frames from the mth frame, it extracts the mth, m+i, and m+i+j frames. Region m on the mth frame is shifted right by a distance L relative to the m-1th frame, region m+i on the m+i frame is shifted right by a distance iL relative to the previous mth frame, and region m+i+j on the m+i+j frame is shifted right by a distance jL relative to the previous m+i frame.
[0432] Continue to see Figure 19A As shown, assume that while the preview image is being displayed as an image block within the m+i+jth region, the mobile phone detects an instruction to stop image movement. The mobile phone continues to refresh the preview image using image blocks within the target region on the m+i+j+1th frame, the m+i+j+2th frame, and so on. That is, after the mobile phone detects the instruction to stop image movement, it no longer uses the frame-stripping refresh method, and the position of the target region on the m+i+j+1th frame, the m+i+j+2th frame, and so on remains unchanged, i.e., it stops moving. In other words, after the mobile phone detects an instruction indicating the direction of image movement, it uses the frame-stripping method to refresh the preview image, and the position of the preview image on the image gradually moves in the direction of image movement. When the instruction to stop image movement is detected, the frame-stripping method is no longer used, and the position of the preview image on the image no longer moves.
[0433] Continue with Figure 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.
[0434] 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 position of the preview image in the image is shifted 2L to the right relative to the previous frame preview image each time it is refreshed. Comparing Figure 18 with the case where A = B = C = L in Figure 19A it can be seen that in the shown embodiment, by means of frame extraction, the position of the preview image in the image can be shifted uniformly to the right at a relatively fast speed (2L to the right 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 in the image is shifted uniformly to the right at a relatively fast speed.
[0435] 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 + 2)-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 position of the preview image in the image is shifted to the right with acceleration relative to the previous frame preview image each time it is refreshed. 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 in the image is shifted to the right with acceleration.
[0436] 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 + 3)-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 position of the preview image in the image is shifted to the right with deceleration relative to the previous frame preview image each time it is refreshed. 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 in the image is shifted to the right with deceleration.
[0437] The above gives three examples of the value relationship between i and j. The embodiments of the present application do not limit the magnitude relationship between i and j, and those skilled in the art can set them flexibly to achieve different technical effects.
[0438] 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 Figure 19B , 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 extracting frames from the m-th frame of the image, assuming M frames of images are extracted. The frame extraction interval of the image is not limited here. 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 Figure 18 for the description, 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 rightward at a uniform speed. Assume that the mobile phone determines the target area in the manner of Figure 18 A < B < C < D, that is, while the preview image is refreshed at a relatively fast speed, the position of the preview image on the image moves rightward with an accelerating speed. Assume that the mobile phone determines the current area in the manner of A > B > C > D, that is, while the preview image is refreshed at a relatively fast speed, the position of the preview image on the image moves rightward with a decelerating speed.
[0439] It should be noted that taking Figure 19A 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 instruction for accelerating right shift. The preview image is refreshed in the above first way, that is, without using the frame extraction method for refreshing, and is sequentially 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 this 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. Therefore, the said 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 instruction for accelerating right shift, the preview image does not use the frame extraction method for refreshing. When detecting an instruction for stopping right shift, 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 the calculation amount and improve the efficiency.
[0440] The third method
[0441] The ultra-wide-angle camera captures N frames of images. The mobile phone inserts multiple frames of images into the N frames of images to obtain M frames of images, where M is an integer greater than N. The preview images are refreshed in sequence through the M frames of images. As the number of images increases, a slow refresh (or playback) effect can be achieved. For example, assuming that the image acquisition frame rate of the ultra-wide-angle camera is 240fps, that is, 240 frames of images are collected per second. Assuming that the image refresh (or playback) frame rate of the mobile phone is 30fps, that is, 30 frames are refreshed per second, then the 240 frames of images take 8 seconds to refresh. Assuming that the mobile phone inserts 120 frames of images into the 240 frames of images to obtain 360 frames of images, it only takes 12 seconds to refresh, that is, the slow refresh effect is achieved.
[0442] Example 1, see Figure 19C As shown, the ultra-wide-angle camera captures N frames of images, for example, the first frame, the second frame, the m-1th frame, and so on. Assume that before the preview image is refreshed to the mth frame, the phone detects an image right shift instruction. The phone determines the target area on the mth frame and each subsequent frame. The position of the target area on the next frame is shifted to the right by the same distance L relative to the position of the target area on the previous frame.
[0443] Then, the mobile phone starts the frame insertion process. For example, a P frame image is inserted between the mth frame and the m+1th frame (the inserted image is indicated by a dotted line), and a Q frame image is inserted between the m+1th frame and the m+2th frame. P and Q can be the same or different.
[0444] Assume that P=Q=1, that is, one frame is inserted every other frame. The mobile phone can determine the Pth area on the Pth frame image (that is, a frame image inserted between the mth frame and the m+1th frame), and the Pth area is moved to the right by a distance X relative to the mth area. The value of X is not limited in this embodiment of the application. For example, X can be a value in the range of L to 2L, such as 1.5L. The mobile phone determines the Qth area on the Qth frame image (that is, a frame image inserted between the m+1th frame and the m+2th frame), and the Qth area is moved to the right by a distance Y relative to the m+1th area. The value of Y is not limited in this embodiment of the application. For example, Y can be a value in the range of 2L to 3L, such as 2.5L.
[0445] For example, if X = 1.5L and Y = 2.5L, after the phone detects the image right shift instruction, the preview image is refreshed sequentially to the mth region, the Pth region, the m+1th region, the Qth region, and so on. Therefore, each refresh of the preview image shifts right by 0.5L, meaning that the position of the preview image on the image shifts right at a slower and uniform speed. Furthermore, interpolated refresh can achieve a slow refresh effect for the preview image, meaning that while the preview image is refreshed at a slower speed, its position on the image can shift right at a slower and uniform speed.
[0446] It can be understood that the above values of X and Y are related to the image right-shift speed, which is not limited in the embodiments of the present application. The relationship between the values of P and Q can be flexibly set by those skilled in the art to achieve different effects.
[0447] It can be understood that, assuming that during the process of the preview image displaying the image block in the (m + 2)-th region, the mobile phone detects an instruction to stop the image movement, then it determines the image block in the (m + 3)-th region on the (m + 3)-th frame image, the image block in the (m + 4)-th region on the (m + 4)-th frame image, and so on. That is to say, after the mobile phone detects the image stop movement instruction, it no longer uses the frame interpolation method for processing, and the position of the preview image on the image no longer moves.
[0448] Example 2: In the above Example 1, the mobile phone first determines the target region on each frame image and then performs frame interpolation processing. In this Example 2, the mobile phone can first perform frame interpolation and then determine the target region. Refer to Figure 19D As shown, assuming that before the preview image is refreshed to the m-th frame image, the mobile phone detects an image right-shift instruction, and the mobile phone starts frame interpolation processing from the m-th frame image to obtain M frame images. Here, the number of interpolated images between two adjacent frames is not limited. Taking the example of inserting 1 frame between two adjacent frames, as Figure 19D shown, the dashed-line images are the interpolated images. The way for the mobile phone to determine the target region on the M frame images can be referred to Figure 18 the description, which will not be repeated here. Assuming that the mobile phone determines the target region on the M frame images in the way of A = B = C = L, since frame interpolation refreshing can achieve the effect of slow refreshing, that is, while the preview image is refreshed at a slower speed, the position of the preview image on the image moves rightward at a uniform speed. Assuming that the mobile phone determines the target region in the way of A < B < C < D, that is, while the preview image is refreshed at a slower speed, the position of the preview image on the image moves rightward at an accelerated speed. Assuming that the mobile phone determines the current region in the way of A > B > C > D, that is, while the preview image is refreshed at a slower speed, the position of the preview image on the image moves rightward at a decelerated speed.
[0449] In some embodiments, after the mobile phone detects an instruction indicating the image movement direction, it defaults to using the above first method for processing, and defaults to using the method of A = B = C = L in the first method to determine the target region, that is, the position of the preview image on the image moves rightward at a uniform speed. When the mobile phone detects an accelerated movement instruction, it can use the method of A < B < C < D in the above first method to determine the target region, or use the frame extraction method in Example 1 of the above second method for processing to achieve accelerated movement. When the mobile phone detects a decelerated movement instruction, it can use the method of A > B > C > D in the above first method to determine the current region, or use the frame interpolation method in Example 1 of the above third method for processing to achieve decelerated movement.
[0450] It should be noted that the sides can be aligned when the position of the current area on different frames moves. Figure 18 For example, the sides of the first and second regions are aligned. For example, the distance between the bottom edge of the first region and the bottom edge of the first frame image is the same as the distance between the bottom edge of the second region and the bottom edge of the second frame image, to ensure the preview image is displayed stably as much as possible. In some embodiments, users may experience jitter while holding the phone. To mitigate preview image instability caused by user jitter, one possible implementation is for the phone to perform anti-shake processing on the image captured by the ultra-wide-angle camera and then determine target areas, such as the first, second, and third regions, within the image after the anti-shake processing. The anti-shake processing may include anti-shake cropping. Typically, during user jitter, the edge areas of the preview image experience rapid and unstable image changes, while the image within the center area of the preview image experiences less change and is relatively stable. Therefore, the phone can crop the edges of each image frame captured by the ultra-wide-angle camera. The specific cropping area is not limited in this embodiment of the application. For example, the phone determines the first region in the image remaining after cropping the first frame image, the second region in the image remaining after cropping the second frame image, the third region in the image remaining after cropping the third frame image, and so on. As a result, the preview image is displayed visually more stably.
[0451] Another possible implementation is that the phone can determine a first area on the first frame image and perform anti-shake cropping on the first image block within the first area. For example, the edges of the first image block are cropped, and the preview image shows the remaining image of the first image block after the edges are cropped. Similarly, the phone can determine a second area on the second frame image and perform anti-shake cropping on the second image block within the second area, and so on. In other words, the phone first determines the image blocks within the target area on each frame image, and then performs anti-shake cropping.
[0452] As mentioned above, there are many ways for the user input to indicate the direction of image movement, including but not limited to the following examples.
[0453] Example 1, see Figure 16 The viewfinder interface also includes a direction control 1311. The direction control 1311 may include four arrows distributed around the video control 1307. When the mobile phone detects that the user clicks (such as single-clicking) on an arrow, the mobile phone starts to move the first area based on the direction indicated by the arrow. For example, when the user clicks the right arrow, the position of the preview image on the image starts to move to the right. When the mobile phone detects a user click operation anywhere in the viewfinder interface, it stops moving; or, when the right arrow is detected again, it stops moving; or, after a certain period of time, it automatically stops moving.
[0454] Example 2, see Figure 16When the mobile phone detects that the user has pressed an arrow for a preset time, it starts to move the first area in the direction indicated by the arrow. When the user detects that the long press operation is released, the movement stops.
[0455] Example 3, see Figure 16 When the mobile phone detects that the user presses the record control 1307 and drags it in a certain direction (or can also be called a slide), the mobile phone starts to move the first area according to the drag direction indicated by the drag operation. For example, if the user presses the record control 1307 and drags it to the right, the mobile phone moves the first area to the right. When the mobile phone detects that the drag operation is released, it stops moving. Specifically, when the mobile phone detects that a finger presses the record control 1307 and pops up at the pressed position, it determines to start recording. When the mobile phone detects that a finger presses the record control 1307 and drags it to a non-pressed position, it determines the direction of the drag operation, that is, the image movement direction, and moves the first area based on this direction.
[0456] Example 4, see Figure 16 When the phone detects a user sliding operation on the screen (e.g., on a preview image), it starts to move the first area according to the sliding direction of the sliding operation. When the phone detects that the sliding operation stops, it stops moving the first area. The cessation of the sliding operation can be understood as the user's finger sliding from point A to point B and staying at point B, or the user's finger sliding from point A to point B and then bouncing off. It should be understood that in this case, the direction control 1311 may not be displayed in the viewfinder interface.
[0457] Example 5: The user inputs the image movement direction through voice commands. The user can click anywhere on the viewfinder interface or use voice commands to indicate the end of the movement. It should be understood that in this case, the direction control 1311 may not be displayed in the viewfinder interface.
[0458] When the method provided in the embodiment of the present application is applicable to devices such as laptop computers, the image movement direction can also be input through a keyboard, touchpad, etc.
[0459] The acceleration movement instruction or deceleration movement instruction mentioned above can be obtained in the following way.
[0460] For example, see Figure 16 As shown, the viewfinder interface displays an indicator 1320 for indicating the speed of movement. The moving speed here can be understood as the amount of change in the position of the preview image on the image. The default value of the indicator 1320 is 1X. The 1X here can be understood as 1 times the above L. That is to say, when the indicator 1320 is 1X, the mobile phone can use the above A=B=C=L method to process. When the user clicks the indicator 1320, the speed adjustment bar 1321 is displayed. For example, Figure 16The maximum speed provided by the speed adjustment bar 1321 is 3X, and the minimum speed is 0.5X. This embodiment of the present application does not limit this. It is understandable that 1X, 2X, 3X, etc. can be understood as multiples of the above-mentioned L, 3X is 3 times of L, and 2X is 2 times of L. The user selects the speed by sliding on the speed adjustment bar 1321. If the user selects the speed 2X, the mark 1320 displays the value 2X. The mobile phone can use Figure 19A The method shown (frame extraction method) takes i=j=2 to process, so that the preview image moves 2L each time. Assuming that the user selects a speed of 0.5L, the mobile phone can use Figure 19C In the method shown (frame insertion method), P=Q=1 is used to achieve the effect of moving the preview image on the image by 0.5L each time.
[0461] It is understood that the mobile phone can also set the speed in other ways, such as by using the volume buttons. For example, if the mobile phone detects that the volume up button is triggered, it increases the speed; if it detects that the volume down button is triggered, it decreases the speed. It should be noted that the embodiments of the present application do not limit the method of setting the mobile phone's speed. For example, it is also feasible to provide three speed level options of low speed, medium speed, and high speed on the viewfinder interface for the user to choose.
[0462] For example, see Figure 20 As shown in FIG, it is a schematic diagram of the effect of the viewfinder interface when the mobile phone provided in the embodiment of the present application is in the mobile mode. Figure 20 As shown in (a), the preview image 1 is displayed in the viewfinder interface. The phone remains stationary. When the phone detects a click operation on the downward arrow, the preview image 1 is refreshed to the preview image 2. Figure 20 As shown in (b), the scene included in preview image 2 is located below the scene in preview image 1, which is equivalent to the mobile phone moving down to shoot. The mobile phone continues to refresh preview image 2 to preview image 3, see Figure 20 As shown in (c), the scene in preview image 3 is below the scene in preview image 2, which is equivalent to the phone continuing to move down to shoot. Assume that the phone detects that the user clicks anywhere on the screen, and the movement ends. Figure 20 It can be seen that while the phone remains stationary, the scene in the preview image gradually moves downward, achieving a shooting effect of the lens moving downward.
[0463] Example 2
[0464] For example, Figure 21A 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.
[0465] by Figure 21 Take the example to introduce the process of recording video using the shake mode on a mobile phone.
[0466] 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.
[0467] 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. Figure 16 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.
[0468] 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.
[0469] For the process of perspective transformation of the image block, please refer to the previous description. If the perspective change process described above is used, the rotation angle θ can be determined in a variety of ways. For example, the rotation angle θ is preset, such as a preset fixed value. Alternatively, if the user inputs the image movement direction by sliding 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 θ. The mobile phone detects the user's sliding operation 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 corresponding relationship. Exemplarily, the longer the sliding distance W of the sliding operation, the larger the rotation angle. Alternatively, the rotation angle θ can also be related to the display value of the mark 1320. Assuming that the mark 1320 displays 2, the rotation angle θ is 2 times the preset angle. The value of the preset angle is not limited in this application.
[0470] Example 3
[0471] In some embodiments, the size of the image captured by the ultra-wide-angle camera is limited. When the first area is translated to the edge of the image of the ultra-wide-angle camera, the mobile phone outputs a prompt message to prompt the user to move the phone. For example, taking the shift mode as an example, see Figure 22 As shown, the mobile phone detects that the user continues to press the down arrow, and the preview image gradually moves downward on the image. When it moves to the edge of the image captured by the ultra-wide-angle camera, the mobile phone can output a prompt message 1330 to prompt the user to manually move the phone downward, or output a prompt message to inform the user that further movement is impossible.
[0472] It should be understood that when the phone detects an operation on the recording control 1307, it begins recording the video. After starting recording, the user can also indicate entering pan or pan mode and then enter the image movement direction. The phone will then pan the target area in the image captured by the ultra-wide-angle camera according to this direction and continuously update the preview image based on the image blocks within the target area. The phone stores the preview image and, when an operation on the stop recording control is detected, it combines the stored preview images into a video and maintains the video.
[0473] In some embodiments, after a mobile phone uses the pan mode or pan mode to record a video, two videos can be stored accordingly, one of which is a complete video, that is, each frame image in the video is a complete image captured by the ultra-wide-angle camera. The other video is a video recorded using the pan mode or pan mode, and each frame image in the video is an image block on the image captured by the ultra-wide-angle camera. For example, see Figure 23 As shown, 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 a shift mode or a shaking mode. Wherein, a logo 2301 can be displayed on the video recorded using the shift mode or the shaking mode to distinguish for the convenience of the user.
[0474] Example 4
[0475] 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).
[0476] 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. Figure 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.
[0477] For example, see Figure 25 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.
[0478] 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.
[0479] It is understandable that Figure 25In the illustrated embodiment, the rotation angle between two adjacent image frames is the same, both being angle G. However, the rotation angles between two adjacent frames can also vary. For example, if the image blocks within the mth region are rotated by angle G, and the image blocks within the m+1th region are rotated by angle 3G, the preview image will rotate faster. Alternatively, if the image blocks within the mth region are rotated by angle G, and the image blocks within the m+1th region are rotated by angle 0.5G, the preview image will rotate slower, and so on.
[0480] It should be noted that the frame extraction or frame insertion refresh methods mentioned above can also be applied to this embodiment. For example, the frame extraction method can achieve accelerated rotation, and the frame insertion method can achieve decelerated rotation. For example, see Figure 24 As shown, assuming that the mobile phone detects the operation of "+" on the icon 1364, it means that the user wants to increase the rotation angle. The mobile phone can achieve this by extracting frames, similar to Figure 19A In the embodiment shown, the preview image is rotated by 2G at each refresh by extracting one frame every other frame. If the mobile phone detects the "-" operation under the icon 1364, it means that the user wants to reduce the rotation angle. The mobile phone can achieve this by inserting frames, similar to Figure 19C In the embodiment shown, a frame is inserted every other frame, so that the preview image is rotated by 0.5G each time it is refreshed.
[0481] There are many ways for the mobile phone to detect the instruction for indicating the direction of image rotation mentioned above. For example, see Figure 24 As shown, when the phone detects an operation on icon 1363, the default rotation is clockwise or counterclockwise, which can be set by the user. For another example, an arrow pointing left and an arrow pointing right are displayed at icon 1363. When the phone detects that the user clicks the left arrow, the rotation is counterclockwise, and when the phone detects that the user clicks the right arrow, the rotation is clockwise.
[0482] For example, after the mobile phone detects the operation of clicking icon 1363, it starts to rotate and automatically stops rotating after a preset rotation time (for example, 5 seconds). The mobile phone can keep a video composed of preview images from the start to the end of the rotation.
[0483] Alternatively, after the mobile phone detects the operation of clicking the icon 1363, it starts to rotate and continues to rotate until it rotates 360 degrees and then stops.
[0484] Alternatively, the mobile phone detects a click on icon 1363 and starts rotating, and continues rotating until the user inputs a stop instruction. For example, the mobile phone detects a single click anywhere on the preview interface and stops rotating, or detects a second click on icon 1363 and stops rotating.
[0485] Alternatively, when the mobile phone detects a long press operation of the icon 1363 (the duration of pressing the icon 1363 is greater than a preset duration), the rotation begins, and when the mobile phone detects that the long press operation is released, the rotation stops.
[0486] It is understandable that the image rotation can be performed before starting the video recording (for example, before clicking the video control for indicating the start of the video recording) or after starting the video recording (for example, after clicking the video control for indicating the start of the video recording).
[0487] For example, Figure 26 A schematic diagram of an image rotating counterclockwise is shown. During the counterclockwise rotation of the preview image, target frame 1362 in the viewfinder interface may also rotate synchronously to indicate the approximate angle of rotation of the current preview image. Icon 1363 may also display the current rotation progress. The rotation direction of target frame 1362 may be the same as or different from the rotation direction of the preview image, and this is not limited in this embodiment of the application.
[0488] Example 5
[0489] In other embodiments, the mobile phone may also provide a push-pull mode. In push-pull mode, the mobile phone can achieve a "push-in" or "pull-out" shooting effect. "Push-in" can be understood as a shooting method in which the camera moves closer to the object, i.e., the object in the viewfinder is magnified, helping to focus on the object's details; "pull-out" can be understood as a shooting method in which the camera moves away from the object, i.e., the object in the viewfinder is reduced, helping to capture the object's entirety.
[0490] For example, when the phone is in image rotation mode, pan mode, or shake mode, if the phone detects a preset operation within the preview image (for example, a double-click or long press on the preview image), it enters push-pull mode. Embodiments of the present application provide multiple modes: normal recording mode, shake mode, pan mode, image rotation mode, and push-pull mode. In some embodiments, the phone can cycle between different modes when it detects a double-click operation within the preview image.
[0491] See also Figure 27 The figure shows a schematic diagram of the framing interface in push-pull mode. The framing interface includes an indication message 1370 for indicating that the camera is currently in push-pull mode. Optionally, the prompt message 1370 may not be displayed. The framing interface also includes a preview box 1371, in which the image captured by the ultra-wide-angle camera is displayed. The preview box 1371 displays a target box 1372, and the image block in the target box 1372 is the current preview image. The framing interface also includes an icon 1373 for indicating a pull shot, an icon 1374 for indicating a push shot, and an icon 1375 for setting the push-pull speed.
[0492] The following embodiment takes zooming in as an example to introduce the process of zooming in while keeping the mobile phone still.
[0493] For example, see Figure 28 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.
[0494] 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.
[0495] It is understandable that Figure 28 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.
[0496] 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.
[0497] There are many ways for a mobile phone to obtain a zoom instruction, including but not limited to the following methods.
[0498] 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.
[0499] 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.
[0500] Alternatively, after the mobile phone detects the click operation of icon 1373, it starts to enlarge the area of the target area until it detects the user inputs an instruction to stop enlarging. For example, the mobile phone detects the user clicks anywhere in the preview interface and stops enlarging, or detects the user clicks icon 473 again and stops enlarging.
[0501] 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.
[0502] For example, Figure 29 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 within the target area with a larger area, achieving the effect of the object gradually moving away from the camera. Figure 29 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.
[0503] 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 Figure 28 The target area is determined in the manner shown, but 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, it stops reducing the target area, and the preview image stops magnifying.
[0504] 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.
[0505] It should be noted that the various embodiments of this application can be arbitrarily combined to achieve different technical effects. For example, the preview image may be gradually reduced or enlarged as it rotates clockwise; or the preview image may be gradually enlarged while its position on the image gradually shifts to the left, etc., and this embodiment of the application is not limited thereto.
[0506] In combination with the above embodiments and related drawings, the present application embodiment provides a method for displaying a preview image in a video recording scene, which can be implemented in an electronic device (such as a mobile phone, tablet computer, etc.) as shown in FIG2 . Figure 30 As shown, the method may include the following steps:
[0507] 3001: A first operation for opening a camera is detected.
[0508] For example, Figure 13 Taking (a) as an example, the first operation is, for example, the user clicking the icon 402 .
[0509] 3002. In response to the first operation, start the camera.
[0510] 3003: A second operation for indicating the first recording mode is detected.
[0511] In the embodiment of the present application, the electronic device can provide multiple recording modes. For example, the normal recording mode and the first recording mode (for example, including the shift mode and the shake mode), and the electronic device can enter a certain mode under the user's instruction. Figure 14 Taking (a) as an example, the electronic device displays the framing interface in normal video recording mode. After detecting a click on the camera mode control 408, the electronic device displays a selection box 1309. The second operation may be clicking on the "shake mode" or "shift mode" option in the selection box 1309. Assuming that the second operation is clicking on the "shift mode" option in the selection box 1309, the electronic device enters the shift mode.
[0512] 3004. 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, and 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 on the electronic device.
[0513] Continue with Figure 14 For example, when the electronic device detects the second operation (clicking the "shift mode" option in the selection box 1309), it enters the shift mode and displays a first preview image in the viewfinder interface. The first preview image is the first image block in the first area of the first image captured by the first wide-angle camera (for example, an ultra-wide-angle camera). Figure 17In the image shown, the first preview image is an image block within the first area of the first image.
[0514] 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.
[0515] 3005 , the electronic device is kept in a fixed position, and a third operation indicating a direction of image movement is detected.
[0516] The third operation can be implemented in many ways. Figure 16 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.
[0517] 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.
[0518] 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. Figure 18For example, the first preview image is the first image block in the first region of the first frame image. Assume that a third operation for instructing a right shift of the image is detected between the m-1th frame image and the mth frame image. The second preview image is the mth image block in the mth region (i.e., the second region) of the mth frame image (i.e., the second image). Alternatively, it is the image block obtained by converting the perspective of the mth image block in the mth region of the mth frame image. The orientation of the mth region (i.e., the second region) relative to the first region changes.
[0519] Optionally, the second area's orientation relative to the first area is the same as or opposite to the image movement direction. For example, if the user inputs a rightward image movement direction, the second area is to the right of the first area, meaning the preview image's position on the image captured by the ultra-wide-angle camera shifts to the right. Alternatively, if the user inputs a rightward image movement instruction, the second area is to the left of the first area, meaning the preview image's position on the image shifts to the left. The user can arbitrarily set the user-input image movement direction to be the same as or opposite to the preview image's position on the image captured by the ultra-wide-angle camera.
[0520] In the above, the orientation of the second area relative to the first area is related to the direction of image movement, which can be understood as follows: the distance between the second area and the first edge of the second image is the second distance, the distance between the first area and the first edge of the first image is the first distance, and the change in the second distance relative to the first distance is related to the direction of image movement. Among them, 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, the first edge can be the left edge or the right edge. If the image movement direction is up or down, the first edge can be the upper edge or the lower edge. Figure 18 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 multiple cases and is related to the direction of image movement. For example, when the image movement direction is rightward, A is greater than 0, that is, the second region moves to the right relative to the first region. When the image movement direction is leftward, A is less than 0, that is, the second region moves to the left relative to the first region.
[0521] The third preview image after the second preview image may be a third image block in a third area of a third image captured by the ultra-wide-angle camera. Figure 18For example, if the second image is the mth frame image, the third image can be the m+1th frame image, and the third region is the m+1th region on the m+1th frame image. Then, the third preview image is the m+1th image block in the m+1th region on the m+1th frame image. Similarly, the fourth preview image after the third preview image can be the m+2th image block in the m+2th region on the m+2th frame image, and so on.
[0522] Continue with Figure 18 For example, the second orientation change of the third area (i.e., the m+1th area on the m+1th frame image) relative to the second area (i.e., the mth area on the mth frame image) is the distance change of the third distance relative to the second distance, and the third distance is the distance between the third area and the first edge of the third image (e.g., the left edge of the image), i.e., H+A+B; the second distance is the distance between the second area and the first edge of the second image (e.g., the left edge of the image), i.e., H+A; then, the second orientation change is B.
[0523] The first position change of the second area (i.e., the mth area in the mth frame image) relative to the first area (i.e., the first area in the first frame image) is the distance change of the second distance relative to the first distance. The second distance is the distance between the second area and the first edge of the second image (e.g., the left edge of the image), that is, H+A; the first distance is the distance between the first area and the first edge of the first image, that is, H. Therefore, the first position change is A.
[0524] In some embodiments, the second position change amount B is equal to the first position change amount A. That is, the position of the preview image on the image changes by the same amount, i.e., the preview image moves at a constant speed on the image. Of course, the second position change amount B can be smaller or larger than the first position change amount A to achieve different effects. For details, please refer to the previous section and will not be repeated here.
[0525] As an implementation method, the third operation is used to indicate the direction of image movement. In this implementation method, after the electronic device detects the third operation, it enters preview mode. In preview mode, the position of the preview image on the image captured by the ultra-wide-angle camera changes based on the direction of image movement. When the electronic device detects an operation on the recording control 1307, it starts recording. After recording starts, the position of the preview image on the image continues to change. When a stop recording instruction is detected, recording stops.
[0526] As another possible implementation, the third operation can be used to indicate the direction of image movement and also to indicate the start of video recording. Figure 16For example, the electronic device detects a third operation of the user clicking an arrow (e.g., a right arrow) in the direction control 411, displays the second preview image, and starts recording. When the electronic device detects a command to stop image movement, it stops the movement and stops recording, and saves the recording. The recording includes the second preview image.
[0527] by Figure 18 For example, the electronic device detects an instruction to move the image right, the viewfinder interface displays the mth image block in the mth area on the mth frame image, and starts recording. After that, the preview image is refreshed to the image blocks in the m+1th area and the m+2th area in sequence until a stop movement instruction is detected, the recording is stopped and saved, and the recording includes the mth image block, the m+1th image block and the m+2th image block.
[0528] Optionally, the second image is one of the M frames extracted from the N frames captured by the first wide-angle camera, where N is an integer greater than or equal to 1 and M is an integer less than N. For a specific frame extraction process, see Figure 19A or Figure 19B Alternatively, the second image is one of the M frames obtained by inserting N frames of images captured by the first wide-angle camera into multiple frames of images, where N is an integer greater than or equal to 1 and M is an integer greater than N. For the specific insertion process, see Figure 19C or Figure 19D The description is not repeated here.
[0529] In combination with the above embodiments and related drawings, the embodiment of the present application provides a method for displaying a preview image in a video recording scene, which can be used in Figure 2A The electronic device shown in FIG. (eg, a mobile phone, a tablet computer, etc.) is implemented. Figure 31 As shown, the method may include the following steps:
[0530] 3101, a first operation for opening a camera is detected.
[0531] 3102. In response to the first operation, start the camera.
[0532] For a description of steps 3101-3102 above, see Figure 30 The description of steps 3001-3002 will not be repeated here.
[0533] 3103: A second operation for indicating the first recording mode is detected.
[0534] For example, the electronic device can provide multiple recording modes, such as normal recording mode, image rotation recording mode, etc. Figure 16For example, the electronic device displays a viewfinder interface in a pan mode, and the second operation may be a double-click operation on the viewfinder interface, or other operations that can be used to switch to an image rotation recording mode. Figure 14 Taking (b) as an example, the second operation may be an operation of clicking the “image rotation” option in the selection box 409 .
[0535] 3104. In response to the second operation, display a viewfinder interface on the display screen of the electronic device, where the viewfinder interface includes a first preview image, and the first preview image is a first image captured by a camera on the electronic device.
[0536] In some embodiments, the camera is a common camera or a first wide-angle camera. Taking the first wide-angle camera as an example, the first image is a first image block in a first area of a first frame of image captured by the first wide-angle camera.
[0537] Continue with Figure 14 (b) as an example, when the electronic device detects the second operation (clicking the "image rotation" option in the selection box 1309), it enters the image rotation recording mode. The viewfinder interface in the image rotation recording mode can be seen in Figure 24 As shown, a first preview image is displayed in the viewfinder interface. The first preview image is a first image block in a first area on a first frame image captured by a first wide-angle camera (eg, an ultra-wide-angle camera).
[0538] 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 (for example, image rotation recording 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 image rotation recording mode, it switches from the ordinary wide-angle camera to the ultra-wide-angle camera, and the first preview image is the first image block in the first area on the first frame image captured by the ultra-wide-angle camera.
[0539] 3105 , keeping the position of the electronic device fixed, and detecting a third operation indicating a rotation direction of the image.
[0540] The third operation can be implemented in many ways. Figure 24For 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.
[0541] 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.
[0542] 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. Figure 25 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.
[0543] 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.
[0544] 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 Figure 25For example, the second image is the mth frame image, the second region is the mth region, and the second preview image is the image block within the mth region after the image block is rotated by angle G. The third image is the m+1th frame image, the third region is the m+1th region, and the third preview image is the image block within the m+1th region after the image block is rotated by 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. In other words, 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, indicating accelerated rotation. 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, indicating decelerated rotation.
[0545] As one possible implementation, the third operation is used to indicate the direction of image rotation. In this implementation, after the electronic device detects the third operation, it enters preview mode. In preview mode, the preview image rotates. When the electronic device detects an operation on the recording control 1307, it starts recording. After recording begins, the preview image continues to rotate. When a stop recording instruction is detected, recording stops.
[0546] As another possible implementation, the third operation can be used to indicate the image rotation direction and also to indicate the start of recording. Figure 24 For example, the electronic device detects a third operation in which the user clicks the leftward-pointing arrow on the left side of icon 1363, displays the second preview image, and starts recording. When the electronic device detects a stop rotation instruction, it stops rotating and recording, and saves the recording. The recording includes the second preview image.
[0547] by Figure 25 For example, when the electronic device detects an instruction to rotate the image clockwise, the viewfinder interface displays the image block after the mth image block is rotated by an angle G in the mth area, and starts recording. After that, the preview image is sequentially refreshed to the image blocks after they are rotated by a certain angle in the m+1th area and the m+2th area, until a stop rotation instruction is detected, the recording is stopped and the recording is saved. The recording includes the image block after the mth image block is rotated by an angle G, the image block after the m+1th image block is rotated by an angle 2G, and the image block after the m+2th image block is rotated by an angle 3G.
[0548] Optionally, the second image may be a frame of M frames extracted from N frames of images captured by the first wide-angle camera, where N is an integer greater than or equal to 1 and M is an integer less than N. For a specific frame extraction process, see Figure 19A or Figure 19BAlternatively, the second image is one of the M frames obtained by inserting N frames of images captured by the first wide-angle camera into multiple frames of images, where N is an integer greater than or equal to 1 and M is an integer greater than N. For the specific insertion process, see Figure 19C or Figure 19D The description is not repeated here.
[0549] The terms used in the above embodiments are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification of the present application and the appended claims, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more; "and / or" describes the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship.
[0550] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0551] In the embodiments provided in the present application above, the method provided in the embodiments of the present application is introduced from the perspective of an electronic device (such as a mobile phone) as the execution subject. In order to implement the various functions in the methods provided in the embodiments of the present application above, the terminal device may include a hardware structure and / or a software module to implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether a function of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
[0552] As used in the above embodiments, the terms “when…” or “after…” may be interpreted to mean “if…” or “after…” or “in response to determining…” or “in response to detecting…”, depending on the context. Similarly, the phrases “upon determining…” or “if (the stated condition or event) is detected” may be interpreted to mean “if determining…” or “in response to determining…” or “upon detecting (the stated condition or event)” or “in response to detecting (the stated condition or event)”, depending on the context. In addition, in the above embodiments, relational terms such as first and second are used to distinguish one entity from another, without limiting any actual relationship or order between these entities.
[0553] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. 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 or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0554] Note: A portion of this patent application contains material which is subject to copyright protection. The copyright owner reserves all rights reserved except for copies of the materials in the patent file or patent record in the Patent Office.
Claims
1. A video shooting method, applied to an electronic device, characterized in that: include: Start the camera function; In response to a first user operation, a first video recording template is determined, wherein the first video recording template includes a first example sample, a second example sample, and a 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 module includes at least one of a shift mode, a shake mode, a push mode, a pull mode, and a rotation mode, and the second camera movement module includes at least one of a shift mode, a shake mode, a push mode, a pull mode, and a rotation mode, and the first camera movement mode and the second camera movement mode are different; Displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier; In response to a second user operation, keeping the electronic device stationary and starting video recording; 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.
2. The method according to claim 1, wherein In response to a second user operation, the electronic device is kept stationary and video recording is started, including: 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; 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.
3. The method according to claim 2, wherein When the first video clip is generated according to the first camera movement mode, the recording interface also displays a countdown for generating the first video clip according to the first camera movement mode; when the second video clip is generated according to the second camera movement mode, the recording interface also displays a countdown for generating the second video clip according to the second camera movement mode.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier; In response to a third user operation, deleting the first camera movement mode identifier or the second camera movement mode identifier; In response to a fourth user operation, keeping the electronic device stationary and starting recording; A composite video is automatically generated, where the composite video includes the video clip generated by the electronic device according to the undeleted camera movement pattern and the preset audio.
5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier; In response to a third user operation, adding a third camera movement mode identifier in the video recording interface, wherein the third camera movement mode identifier is used to indicate a third camera movement mode; In response to a fourth user operation, keeping the electronic device stationary and starting recording; A composite video is automatically generated, where the composite 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 camera movement mode.
6. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier; In response to a third user operation, adjusting the display order of the first camera movement mode identifier and the second camera movement mode identifier to a first order; In response to a fourth user operation, keeping the electronic device stationary and starting recording; A composite video is automatically generated, in which the playback order of the first video segment and the second video segment is the first order.
7. The method according to any one of claims 1 to 3, characterized in that: The first example sample and / or the second example sample are displayed in the video recording interface.
8. The method according to any one of claims 1 to 3, characterized in that: Before automatically generating a synthetic video, it also includes: displaying a presentation interface, wherein the presentation interface includes the first video clip and the second video clip; Automatically generating a composite video includes: responding to a video composite instruction input by a user and composite video.
9. The method according to claim 8, wherein The method further comprises: In response to the fourth operation, the first video segment or the second video segment is deleted; or a local third video segment is added to the composite video; or the playback order of the first video segment or the second video segment in the composite video is adjusted.
10. The method according to any one of claims 1 to 3, characterized in that: The first recording template is a default template or a user-defined template.
11. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: The first video clip, the second video clip, and the composite video are automatically stored.
12. The method according to any one of claims 1 to 3, wherein: The method further comprises: In response to a specific operation, the audio in the composite video is replaced, or text and / or pictures are added to the composite video.
13. An electronic device, characterized in that: include: one or more processors; one or more memories; 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: Start the camera function; In response to a first user operation, a first video recording template is determined, wherein the first video recording template includes a first example sample, a second example sample, and a 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 module includes at least one of a shift mode, a shake mode, a push mode, a pull mode, and a rotation mode, and the second camera movement module includes at least one of a shift mode, a shake mode, a push mode, a pull mode, and a rotation mode, and the first camera movement mode and the second camera movement mode are different; Displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier; In response to a second user operation, keeping the electronic device stationary and starting video recording; 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.
14. The electronic device according to claim 13, wherein: When the instructions are executed by the one or more processors, the electronic device specifically performs the following steps: 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; 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.
15. The electronic device according to claim 14, wherein: When the instructions are executed by the one or more processors, the electronic device specifically performs the following steps: When the first video clip is generated according to the first camera movement mode, the recording interface also displays a countdown for generating the first video clip according to the first camera movement mode; when the second video clip is generated according to the second camera movement mode, the recording interface also displays a countdown for generating the second video clip according to the second camera movement mode.
16. The electronic device according to any one of claims 13 to 15, wherein: When the instructions are executed by the one or more processors, the electronic device further performs the following steps: Displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier; In response to a third user operation, deleting the first camera movement mode identifier or the second camera movement mode identifier; In response to a fourth user operation, keeping the electronic device stationary and starting recording; A composite video is automatically generated, where the composite video includes the video clip generated by the electronic device according to the undeleted camera movement pattern and the preset audio.
17. The electronic device according to any one of claims 13 to 15, wherein: When the instructions are executed by the one or more processors, the electronic device further performs the following steps: Displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier; In response to a third user operation, adding a third camera movement mode identifier in the video recording interface, wherein the third camera movement mode identifier is used to indicate a third camera movement mode; In response to a fourth user operation, keeping the electronic device stationary and starting recording; A composite video is automatically generated, where the composite 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 camera movement mode.
18. The electronic device according to any one of claims 13 to 15, wherein: When the instructions are executed by the one or more processors, the electronic device further performs the following steps: Displaying a video recording interface, wherein the video recording interface includes a first camera movement mode identifier and a second camera movement mode identifier; In response to a third user operation, adjusting the display order of the first camera movement mode identifier and the second camera movement mode identifier to a first order; In response to a fourth user operation, keeping the electronic device stationary and starting recording; A composite video is automatically generated, in which the playback order of the first video segment and the second video segment is the first order.
19. The electronic device according to any one of claims 13 to 15, wherein: The first example sample and / or the second example sample are displayed in the video recording interface.
20. The electronic device according to any one of claims 13 to 15, characterized in that: When the instructions are executed by the one or more processors, the electronic device further performs the following steps: displaying a presentation interface, wherein the presentation interface includes the first video clip and the second video clip; Automatically generating a composite video includes: responding to a video composite instruction input by a user and composite video.
21. The electronic device according to any one of claims 13 to 15, wherein: When the instructions are executed by the one or more processors, the electronic device further performs the following steps: In response to the fourth operation, the first video segment or the second video segment is deleted; or a local third video segment is added to the composite video; or the playback order of the first video segment or the second video segment in the composite video is adjusted.
22. The electronic device according to any one of claims 13 to 15, wherein: The first recording template is a default template or a user-defined template.
23. The electronic device according to any one of claims 13 to 15, wherein: When the instructions are executed by the one or more processors, the electronic device further performs the following steps: The first video clip, the second video clip, and the composite video are automatically stored.
24. The electronic device according to any one of claims 13 to 15, wherein: When the instructions are executed by the one or more processors, the electronic device further performs the following steps: In response to a specific operation, the audio in the composite video is replaced, or text and / or pictures are added to the composite video.
25. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a computer program, and when the computer program is run on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 12.
26. A program product, characterized in that The method comprises instructions, which, when executed on a computer, cause the computer to perform the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Video processing method and device, terminal equipment and storage medium
CN108900771A