Shooting method and related equipment
By using multi-window shooting methods and encoder on electronic devices, the problems of automatic focus and different viewing range requirements in video shooting are solved, and the original video and close-up video are generated simultaneously, improving the user experience.
Patent Information
- Application Number
- CN202411178638.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-05-30
- Filing Date
- 2022-08-10
- Publication Date
- 2024-11-22
AI Technical Summary
The prior art is difficult to achieve automatic focus pursuit and meet the video needs of different viewing ranges at the same time in video shooting, resulting in problems with virtual focus or focus transfer.
By implementing the multi-window shooting method on an electronic device, using the first encoder and the second encoder to record images of preview large windows and preview small windows respectively, and generate original videos and close-up videos. Users can obtain different viewing ranges within the same time video.
It realizes the acquisition of close-up videos at the same time under normal shooting, meeting users' personalized needs for different scenes, and improving user experience and recording efficiency.
Smart Images

Figure CN119012009A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a shooting method and related equipment. Background Art
[0002] With the development of terminal technology, video shooting has more possibilities. For example, people can use mobile phones and other terminal devices to achieve automatic focus tracking on subjects such as faces, people, and pets, so as to solve the problems of out-of-focus or focus shift caused by the inability to automatically focus on the subject when the subject moves. Summary of the invention
[0003] The present application provides a shooting method and related equipment. The shooting method can be applied to an electronic device provided with a camera and a display screen. According to the shooting method, in a shooting scene where multiple shooting objects are in the same frame, the electronic device can focus on one of the shooting objects, and create two encoders to encode based on the image displayed in the large preview window and the image displayed in the small preview window, respectively, to obtain two or more videos. It can be understood that the electronic device can shoot an original video and at least one close-up video. This shooting method allows users to obtain close-up videos at the same time during normal shooting, and can meet the user's needs for videos with different framing ranges in the same time, thereby improving the user experience.
[0004] In a first aspect, the present application provides a shooting method. The shooting method can be applied to an electronic device having a camera, a display screen, a first encoder, and a second encoder. The method may include: displaying a first interface, the first interface including a first window, displaying an image captured by a camera in the first window, the image displayed in the first window including one or more first objects; selecting a second object from the one or more first objects; displaying the first window on the display screen while also displaying a second window, the image displayed in the second window including the second object; recording the image in the first window to generate a first video, and recording the image in the second window to generate a second video, through the first encoder and the second encoder.
[0005] In the solution provided in the present application, a user can trigger an electronic device to enter a focus tracking mode. In the focus tracking mode, the electronic device can display a first window and a second window at the same time, and record the picture in the first window to generate a first video, and record the image in the second window to generate a second video through a first encoder and a second encoder. That is, after the recording is finished, the user can get at least two videos: an original video generated based on the image in the first window, and a close-up video generated based on the image in the second window. In this way, the user can obtain close-up videos at the same time under normal shooting conditions. In other words, through the above method, the user can obtain videos with different framing ranges within the same shooting time, which meets the personalized needs of the user in different scenes at different times and improves the user experience.
[0006] It is understandable that the first window may refer to the "large preview window" mentioned later, or the "large window" mentioned later. The second window may refer to the "small preview window" mentioned later, or the "small window" mentioned later. Exemplarily, the first window may be the preview window 201, and the second window may be the small preview window 501.
[0007] It is understandable that the first video may be an original video, and the second video may be a close-up video of the second object. The original video is obtained based on the original image captured by the camera. The content of the image constituting the original video is consistent with the framing range of the camera when shooting. The close-up video is obtained by identifying the protagonist in the image based on the original image and then cropping the protagonist image. The close-up video is centered on the protagonist. During the video recording process, the electronic device can display the original video and the close-up video at the same time for the user to preview.
[0008] In combination with the first aspect, in a possible implementation, after the electronic device displays the second window, it may also receive an operation to start recording, and start the first encoder and the second encoder.
[0009] In the solution provided by the present application, when the electronic device displays the first window and the second window on the display screen, the user can trigger the electronic device to start recording. Accordingly, the electronic device can receive an operation to start recording. In response to the operation, the electronic device can start the first encoder and start the second encoder. In the above manner, the user can start the first encoder and the second encoder to record the picture in the first window and the picture in the second window, so that the user can record the pictures of different framing ranges at the same time, while satisfying the user's needs for videos of different framing ranges.
[0010] In this application, “recording the screen in the first window”, “recording the image in the first window” and “recording based on the image in the first window” have the same meaning. Similarly, “recording the screen in the second window”, “recording the image in the second window” and “recording based on the image in the second window” have the same meaning.
[0011] In some embodiments of the present application, “receiving an operation to start recording” has the same meaning as “receiving a request to start large window recording and small window recording at the same time” (such as step S600).
[0012] In conjunction with the first aspect, in a possible implementation, the electronic device may receive an operation to start recording and start the first encoder before selecting the second object from one or more first objects. Furthermore, after selecting the second object from one or more first objects, the electronic device may start the second encoder.
[0013] In the solution provided in the present application, when a first window is displayed, the electronic device can start the first encoder to record the screen in the first window. After selecting the second object, the electronic device can display the second window on the display screen and start the second encoder to record the screen in the second window. It can be understood that the start time for the user to record the screen in the second window using the electronic device is optional. The user can choose to record the screen in the first window and the second window at the same time, or choose to record the screen in the first window first, and then record the screen in the second window. The above method can meet the recording needs of users in different scenes at different times, and improve the user experience.
[0014] In conjunction with the first aspect, in a possible implementation, the first interface may further include a first control, and the first control may be used to start the focus tracking mode. After the electronic device displays the first interface, it may also receive an operation on the first control, and create a first encoder and a second encoder.
[0015] In the solution provided by the present application, the user can trigger the electronic device to enter the focus tracking mode through the first control on the first interface. Accordingly, the electronic device can enter the focus tracking mode and create a first encoder and a second encoder so that the images in the first window and the second window can be recorded later, that is, so as to realize the recording of two videos at the same time.
[0016] In some embodiments of the present application, the first control may be a focus mode control, for example, focus mode control 301 .
[0017] In some embodiments of the present application, “receiving an operation acting on the first control” has the same meaning as “receiving a request to turn on the focus tracking mode” (such as step S505).
[0018] It can be understood that the relevant contents of creating the first encoder and creating the second encoder can refer to Figure 5 The relevant description is not elaborated here.
[0019] For example, Figure 2C As shown, the user interface 300 may include a focus mode control 301. The user may click the focus mode control 301, and accordingly, the electronic device may receive an operation on the focus mode control 301, and in response to the operation, the electronic device may create a first encoder and a second encoder.
[0020] In combination with the first aspect, in a possible implementation method, the electronic device records the image in the first window to generate a first video, and records the image in the second window to generate a second video through a first encoder and a second encoder. Specifically, it may include: after starting the first encoder, the electronic device may record the image in the first window through the first encoder to generate the first video, and after starting the second encoder, record the image in the second window through the second encoder to generate the second video.
[0021] In the solution provided in the present application, after the electronic device starts the first encoder, the electronic device can record the image in the first window through the first encoder, and after the electronic device starts the second encoder, the electronic device can record the image in the second window through the second encoder. That is to say, the electronic device can associate the first encoder with the first window, so that the first encoder is used to record the image in the first window, and associate the second encoder with the second window, so that the second encoder is used to record the image in the second window. Through the above method, the first encoder and the second encoder each perform their duties and record the pictures in different windows respectively. The electronic device does not need to wait for recording to allocate the windows corresponding to the two encoders, which improves the recording efficiency to a certain extent.
[0022] In combination with the first aspect, in a possible implementation, after the electronic device records the image in the first window to generate a first video and the image in the second window to generate a second video through the first encoder and the second encoder, the method may further include: the electronic device may receive an operation to end recording, may stop encoding by the first encoder and encoding by the second encoder, and generate the first video and the second video. The end recording time of the first video is the same as the end recording time of the second video.
[0023] In the solution provided by the present application, when a user records images in the first window and the second window through an electronic device, the user can freely determine the end time of recording the first window and the second window. For example, the recording of the first window and the second window can be ended at the same time. The above method can meet the recording needs of users in different scenes at different times and improve the user experience.
[0024] In some embodiments of the present application, “receiving an operation to end recording” has the same meaning as “receiving a request to end both large window recording and small window recording” (such as step S800 ).
[0025] In some embodiments of the present application, when the electronic device displays the first window and the second window at the same time, it starts recording the first window and the second window at the same time, and the electronic device ends recording the first window and the second window at the same time, then the duration of the first video and the duration of the second video generated by the electronic device are the same. Figure 2N The video 14011 shown in a in the figure, the second video can be Figure 2N Video 14012 shown in a in FIG. Video 14011 and video 14012 are both 3 seconds long.
[0026] In some embodiments of the present application, when the electronic device displays the first window at the same time, it first starts recording the first window, then starts recording the second window, and the electronic device ends recording the first window and the second window at the same time, then the duration of the first video generated by the electronic device is longer than the duration of the second video. Figure 2N The video 14021 shown in b in the figure, the second video can be Figure 2N Video 14022 shown in b in FIG. The duration of video 14021 is 8 seconds, and the duration of video 14022 is 3 seconds.
[0027] It is understood that the end recording time refers to the time when the video recording is ended. The end recording time of the first video refers to the time when the recording of the screen displayed in the first window is ended. The end recording time of the second video refers to the time when the recording of the screen displayed in the second window is ended.
[0028] In combination with the first aspect, in one possible implementation, after the electronic device records the image in the second window through a second encoder to generate a second video, the method may also include: the electronic device may receive an end recording operation acting on the second window, close the second window, stop encoding by the second encoder, and generate a second video.
[0029] In the solution provided by the present application, when a user records images in the first window and the second window through an electronic device, the user can freely determine the end time of recording the first window and the second window. For example, the recording of the second window is ended first. The above method can meet the recording needs of users in different scenes at different times and improve the user experience.
[0030] In some embodiments of the present application, “receiving an end recording operation acting on the second window” has the same meaning as “receiving a request to end recording in the small window” (such as step S700).
[0031] It is understandable that the electronic device may end the recording of the second window first. In this case, the duration of the first video generated by the electronic device is longer than the duration of the second video. Figure 2N The video 14021 shown in b in the figure, the second video can be Figure 2N Video 14022 shown in b in FIG. The duration of video 14021 is 8 seconds, and the duration of video 14022 is 3 seconds.
[0032] In combination with the first aspect, in a possible implementation, after the electronic device generates the second video, the method may further include: the electronic device may receive an operation of ending recording on the first window, may stop encoding by the first encoder, and generate the first video. The end recording time of the first video is later than the end recording time of the second video.
[0033] In the solution provided by the present application, the electronic device can directly end the recording of the first window when the recording of the second window is ended. In this way, the electronic device can generate two videos - the second video and the first video. Among them, the end recording time of the first video is later than the end recording time of the second video, and the duration of the first video is longer than the duration of the second video.
[0034] In some embodiments of the present application, “receiving an operation to end recording on the first window” has the same meaning as “receiving a request to end recording in the large window” (such as step S900 ).
[0035] In combination with the first aspect, in a possible implementation, after the electronic device generates the second video, the method may further include: the electronic device may select a third object from one or more first objects; while displaying the first window on the display screen, the electronic device may redisplay the second window; the electronic device may start a third encoder and record the image in the second window through the third encoder to generate a third video. The third object may be the same as or different from the second object.
[0036] In the solution provided in the present application, after the electronic device first ends the recording of the second window, the electronic device can also reselect the second object in response to the user's operation of selecting the second object again. In this case, the electronic device can re-display the second window on the display screen, and start the encoder to record the picture in the second window to generate a third video. In this way, the electronic device can generate at least three videos-the first video, the second video and the third video. Among them, the recording end time of the second video is earlier than the recording end time of the first video, and the recording end times of the second video and the first video are both earlier than the recording start time of the third video. The above method can meet the recording needs of users in different scenes at different times, and improve the user experience.
[0037] For example, the electronic device may receive a signal that acts on Figure 2J The user interface 1000 shown in FIG. 1000 includes an operation on the video recording end control 1003. In response to the operation, the electronic device may display a Figure 2P User interface 1600 shown. User interface 1600 may include human body frame 402, human body frame 403 and human body frame 404. Among them, human body frame 402, human body frame 403 and human body frame 404 are used to select person R1, person R2 and person R3 respectively. At this time, the electronic device has ended the recording of the close-up video with person R2 as the focus target, but is still recording the original video. The electronic device may receive a user operation acting on the human body frame 404 included in user interface 1600. In response to the operation, the electronic device may re-determine the person (i.e., person R3) framed by human body frame 404 as the focus target, and record a close-up video of person R3. It can be understood that person R3 in this example is the second object reselected by the electronic device. Person R1, person R2 and person R3 are the first object.
[0038] It is understandable that the second video and the third video may be close-up videos of the same focus target or close-up videos of different focus targets. In other words, the second object reselected by the electronic device may be the same as the second object selected previously or may be different.
[0039] In combination with the first aspect, in a possible implementation, after the electronic device records the image in the second window through the third encoder to generate the third video, the method may further include: the electronic device may receive an operation to end recording, may stop encoding by the first encoder and encoding by the third encoder, and generate the first video and the third video. The start recording time of the first video is earlier than the start recording time of the third video, and the end recording time of the first video is the same as the end recording time of the third video.
[0040] In the solution provided by the present application, after the electronic device restarts recording of the second window, the recording of the first window and the second window can be ended at the same time. In other words, the end recording time of the first video is the same as the end recording time of the third video. The above method can meet the recording needs of users in different scenes at different times and improve the user experience.
[0041] In some embodiments of the present application, the electronic device can end the recording of the second window again, and continue to record the image in the first window. In this case, the end recording time of the third video is earlier than the end recording time of the first video. It is understandable that the electronic device can choose to start recording the second window again. In this case, the electronic device can eventually generate more than three videos, including one original video and at least three close-up videos.
[0042] In some embodiments of the present application, “receiving an operation to end recording” has the same meaning as “receiving a request to end both large window recording and small window recording” (such as step S800 ).
[0043] In conjunction with the first aspect, in a possible implementation, a selection box is displayed on one or more first objects. The electronic device selects the second object from the one or more first objects, which may specifically include: the electronic device may receive an operation acting on the first selection box, and determine the first object corresponding to the first selection box as the second object.
[0044] In the solution provided by the present application, after the electronic device recognizes the objects included in the image in the first window, it can display selection boxes corresponding to the respective objects on the display screen. In this way, the user can determine the respective objects recognized by the electronic device through the selection box, and select any one of the respective objects through the selection box and use it as the focus tracking object.
[0045] In some embodiments of the present application, the selection frame may be the human frame mentioned below, for example, human frame 402 , human frame 403 , and human frame 404 .
[0046] It can be understood that the first selection box is one of the selection boxes displayed on the one or more first objects.
[0047] In some embodiments of the present application, after displaying the selection box on one or more first objects, the method may further include: if no user operation acting on the screen is detected within a first time period, the selection box disappears.
[0048] It is understandable that the electronic device can detect interactive events on the display screen after displaying the selection box. If no interactive events acting on the display screen are detected within a preset time, such as a first time period, the electronic device can hide the selection box. This can reduce the occlusion of the image displayed on the display screen by the selection box, and can also reduce the computational cost required to draw the image, saving power consumption.
[0049] It is understandable that the preset time (eg, the first duration) can be set according to actual needs, and this application does not limit this. For example, the preset time can be 3s.
[0050] In combination with the first aspect, in a possible implementation manner, the image displayed in the second window includes the second object, which may specifically include: a close-up object of the second object is displayed in the second window.
[0051] In combination with the first aspect, in a possible implementation, during the recording process, the method may further include: the electronic device may select a fourth object from the one or more first objects. The fourth object is different from the second object. A close-up image of the fourth object may be displayed in the second window.
[0052] In the solution provided by the present application, the user can switch the focus target (i.e., change the second object) at any time during the recording process. After switching the focus target, the electronic device can focus on the reselected focus target and display a close-up image of the reselected focus target in the second window. In the above manner, during one recording process, the user can obtain close-up images of different focus targets, and can also obtain close-up images of the same focus target at different time periods.
[0053] In combination with the first aspect, in a possible implementation, the electronic device may include a camera HAL. The electronic device records the image in the first window to generate a first video, and records the image in the second window to generate a second video through a first encoder and a second encoder, which may specifically include: the camera HAL may process the original image data based on the image effect matching the first data stream to obtain the first image data, and process the original image data based on the image effect matching the second data stream to obtain the second image data; the camera HAL may send the first image data to the first encoder, and may also send the second image data to the second encoder; the first encoder may encode the first image data to obtain the first encoded image data, and may also write the first encoded image data into the first video file; the second encoder may encode the second image data to obtain the second encoded image data, and may also write the second encoded image data into the second video file. Among them, the first data stream is the data stream corresponding to the first window; the second data stream is the data stream corresponding to the second window. The first video file is used to store the first video. The second video file is used to store the second video.
[0054] In the solution provided by the present application, in the process of recording the images displayed in the first window and the second window, the electronic device can perform different processing on the original image data through the camera HAL, and send the processed images to the first encoder and the second encoder for encoding respectively, and then write the encoded images into different video files. In other words, the electronic device can generate two data streams at the same time and encode the image data in the two data streams. The encoding of the two data streams and the final writing process of the corresponding video files are independent of each other and do not affect each other. Therefore, the electronic device can generate two videos at the same time, which can meet the user's recording needs in different scenes at different times within a certain period of time, thereby improving the user experience.
[0055] It can be understood that the original image data refers to the original image captured by the camera.
[0056] In some embodiments of the present application, the first data stream may be the large window data stream mentioned below, and the second data stream may be the small window data stream mentioned below.
[0057] In some embodiments of the present application, the first image data may be the large window image data mentioned below, and the second image data may be the small window image data mentioned below. The first encoded image data may be the encoded large window image data mentioned below. The second encoded image data may be the encoded small window image data mentioned below.
[0058] In some embodiments of the present application, the first video file may be a large-window video file mentioned below, and the second video file may be a small-window video file mentioned below.
[0059] In combination with the first aspect, in a possible implementation, the electronic device may include a camera mode module, an encoding control module, and a storage module. After the electronic device receives the end recording operation acting on the second window, the method may also include: the camera mode module may send a first prompt message to the encoding control module. The first prompt message is used to prompt that the recording of the second window is finished. The electronic device stops encoding of the second encoder and generates a second video, which may specifically include: the encoding control module may send a stop request to the second encoder; the second encoder may stop encoding the image data in the second data stream; the encoding control module may send a first end message to the storage module; the storage module may save the second video in the second video file and generate a third video file based on the current system time. Among them, the first end message is used to prompt that the recording of the second window is finished. The third video file is used to store the video obtained after encoding the image data in the second data stream.
[0060] In the solution provided by the present application, when a user records images in the first window and the second window through an electronic device, the user can freely determine the end time of recording the first window and the second window. For example, the recording of the second window is ended first. The above method can meet the recording needs of users in different scenes at different times and improve the user experience.
[0061] In some embodiments of the present application, the first prompt information may be the prompt information for ending the small window recording mentioned later.
[0062] In some embodiments of the present application, the stop request sent by the encoding control module to the second encoder may be the request for stopping the second encoder mentioned below.
[0063] In some embodiments of the present application, the first end information may be the small window recording end information mentioned later.
[0064] In some embodiments of the present application, the third video file may be a recreated small-window video file (such as step S705).
[0065] In combination with the first aspect, in a possible implementation, the electronic device may include a camera mode module, an encoding control module, and a camera HAL. After the electronic device reselects the third object from one or more first objects, the method may further include: the camera mode module may send a second prompt message to the encoding control module. The second prompt message is used to prompt the second window to restart recording. The electronic device starts the third encoder, which may specifically include: the encoding control module may send a start request to the third encoder; the third encoder may start. The electronic device records the image in the second window through the third encoder to generate a third video, which may specifically include: the camera HAL may process the original image data based on the image effect matching the second data stream to obtain the second image data, and may also send the second image data to the second encoder; the third encoder may encode the second image data to obtain the second encoded image data, and may also write the second encoded image data into the third video file. The third video file is used to store the third video. The generation time of the third video file is later than the generation time of the file used to store the second video.
[0066] In the solution provided in the present application, after the electronic device first ends the recording of the second window, the electronic device can also reselect the second object in response to the user's operation of selecting the second object again. In this case, the electronic device can re-display the second window on the display screen, and start the encoder to record the picture in the second window to generate a third video. In this way, the electronic device can generate at least three videos-the first video, the second video and the third video. Among them, the recording end time of the second video is earlier than the recording end time of the first video, and the recording end times of the second video and the first video are both earlier than the recording start time of the third video. The above method can meet the recording needs of users in different scenes at different times, and improve the user experience.
[0067] In combination with the first aspect, in a possible implementation, the electronic device may include a camera mode module, an encoding control module, and a storage module. After the electronic device receives an operation to end recording, the method may further include: the camera mode module may send a third prompt message to the encoding control module. The third prompt message is used to prompt that the recording of the first window and the second window is finished. The electronic device stops the encoding of the first encoder and the encoding of the second encoder, and generates the first video and the second video, which may specifically include: the encoding control module may send a stop request to the first encoder and send a stop request to the second encoder; the first encoder may stop encoding the image data in the first data stream; the second encoder stops encoding the image data in the second data stream; the encoding control module sends a second end message to the storage module; the storage module may save the first video in the first video file and the second video in the second video file, and generate a fourth video file and a third video file based on the current system time. Among them, the second end message is used to prompt that the recording of the first window and the second window is finished. The fourth video file is used to store the video obtained by encoding the image data in the first data stream. The third video file is used to store the video obtained by encoding the image data in the second data stream.
[0068] In the solution provided by the present application, when a user records images in the first window and the second window through an electronic device, the user can freely determine the end time of recording the first window and the second window. For example, the recording of the first window and the second window can be ended at the same time. The above method can meet the recording needs of users in different scenes at different times and improve the user experience.
[0069] In some embodiments of the present application, the third prompt information may be the prompt information for ending the large window recording and the small window recording mentioned later.
[0070] In some embodiments of the present application, the stop request sent by the encoding control module to the first encoder may be the request to stop the first encoder mentioned below. The stop request sent by the encoding control module to the second encoder may be the request to stop the second encoder mentioned below.
[0071] In some embodiments of the present application, the second end information may be the large and small window recording end information mentioned later.
[0072] In some embodiments of the present application, the third video file may be a recreated small-window video file. The fourth video file may be a recreated large-window video file (as shown in step S807).
[0073] In combination with the first aspect, in a possible implementation manner, before the storage module in the electronic device saves the second video in the second video file, the method may further include: the storage module may update the timestamp of the second video file to the current system time.
[0074] In the solution provided in the present application, the electronic device can update the timestamp of the second video file to the current system time, so that the timestamp corresponding to the second video is later than the timestamp corresponding to the first video. This means that when the electronic device displays the thumbnail of the first video and the thumbnail of the second video in the gallery, the position of the thumbnail of the first video is closer to the front than the position of the thumbnail of the second video, which means that the generation time of the first video is later than the generation time of the second video. The electronic device can directly display the thumbnail of the first video and the thumbnail of the second video according to the above method, without having to determine how to display them because the generation time of the two videos is the same.
[0075] In combination with the first aspect, in a possible implementation, the electronic device includes a stream management module, a storage module, an encoding control module and a camera HAL. After the electronic device receives an operation acting on the first control, the method may also include: the stream management module may configure the first data stream and the second data stream, and send the stream allocation information to the encoding control module; the storage module may generate the first video file and the second video file respectively based on the current system time, and send the file information to the encoding control module; the stream management module may send the stream allocation information to the camera HAL; the camera HAL may determine the image effect matching the first data stream and the image effect matching the second data stream based on the stream allocation information. Wherein, the file information includes the file identifier of the first video file and the file identifier of the second video file.
[0076] In combination with the first aspect, in a possible implementation, the electronic device may include an encoding control module and an encoder. The electronic device creates a first encoder and creates a second encoder, which may specifically include: the encoding control module may determine the first encoding parameter and the second encoding parameter based on the distribution information and the file information; the encoding control module may send the first encoding parameter and the second encoding parameter to the encoder; the encoder may create the first encoder based on the first encoding parameter, and create the second encoder based on the second encoding parameter. Among them, the first encoding parameter is an encoder parameter corresponding to the first encoder. The first encoder is associated with the first data stream and the first video file. The second encoding parameter is an encoder parameter corresponding to the second encoder. The second encoder is associated with the second data stream and the second video file.
[0077] In the solution provided by the present application, the electronic device can configure the first data stream and the second data stream corresponding to the first window and the second window respectively, and associate the two data streams with different video files and encoders respectively, and match different image effects, so as to realize the recording of the picture displayed in the first window and the recording of the picture displayed in the second window. Through the above method, the user can obtain videos with different framing ranges within the same shooting time, which meets the personalized needs of the user in different scenes at different times and improves the user experience.
[0078] In some embodiments of the present application, the flow distribution information may include large window flow distribution information and small window flow distribution information (such as step S511).
[0079] In some embodiments of the present application, the file identifier of the first video file may be the file name of the first video file. The file identifier of the second video file may be the file name of the second video file. Of course, the file identifier may also be other content related to the video file (e.g., the timestamp of the video file), which is not limited by the present application.
[0080] In a second aspect, the present application provides an electronic device, comprising one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method described in the first aspect and any possible implementation method of the first aspect.
[0081] In a third aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device, and the chip system includes one or more processors, which are used to call computer instructions so that the electronic device executes the method described in the first aspect and any possible implementation method of the first aspect.
[0082] In a fourth aspect, the present application provides a computer-readable storage medium comprising instructions, which, when executed on an electronic device, causes the electronic device to execute the method described in the first aspect and any possible implementation of the first aspect.
[0083] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible implementation of the first aspect.
[0084] It can be understood that the electronic device provided in the second aspect, the chip system provided in the third aspect, the computer storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to execute the method provided in the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] Figure 1 A schematic diagram of a shooting scene provided in an embodiment of the present application;
[0086] Figure 2A-Figure 2X A set of user interface schematic diagrams provided for embodiments of the present application;
[0087] Figure 3 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0088] Figure 4 A schematic diagram of module interaction provided in an embodiment of the present application;
[0089] Figure 5-Figure 9 A set of timing diagrams of a shooting method provided in an embodiment of the present application;
[0090] Fig.10 A flowchart of a shooting method provided in an embodiment of the present application;
[0091] Fig.11 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0092] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0093] It should be understood that the terms "first", "second", etc. in the specification, claims and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0094] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0095] The present application provides a shooting method. The shooting method can be applied to an electronic device provided with a camera. According to the shooting method, in a shooting scene where multiple shooting objects are in the same frame, the electronic device can focus on one of the shooting objects and perform targeted close-up recording of the shooting object, and generate an original video and a focus-tracked video respectively. In some embodiments of the present application, the electronic device can shoot an original video and multiple focus-tracked videos.
[0096] See also Figure 1 , Figure 1 A schematic diagram of a shooting scene provided in an embodiment of the present application.
[0097] like Figure 1 As shown, there are multiple characters in the shooting environment - character R1, character R2 and character R3. The user can determine that the subject of the shooting is character R2, and use the electronic device to shoot. Since the subject of the shooting is in motion, out-of-focus problems may occur. In addition, there are interferences from other characters (for example, characters R1 and R3) in the shooting environment, and there may also be problems with focus shift. That is, the focus is transferred from character R2 to other characters. In this case, the user can turn on the focus tracking mode and select character R2 as the focus tracking target. After the user selects character R2 as the focus tracking target, he can click the record start control on the electronic device to record. As shown Figure 1As shown, during the recording process, the large preview window of the electronic device displays the original image (including images of person R1, person R2, and person R3) captured by the camera based on the entire viewing range. A small preview window can also be displayed on the large preview window. The small preview window displays a close-up image of the focus target (i.e., person R2). It can be understood that after the recording is finished, the electronic device can generate two videos-the original video and the close-up video. The original video is a video composed of the original image displayed in the large preview window. The close-up video is a video composed of the close-up image of the focus target displayed in the small preview window.
[0098] It is understood that the photographing subject mentioned in this application refers to the main photographing object when the user uses the electronic device to take pictures. The viewing range is related to the camera parameters of the electronic device (for example, field of view angle, focal length, etc.).
[0099] It can be understood that the electronic device can specifically be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted 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 a dedicated camera (for example, a SLR camera, a card camera) and other devices. The embodiments of the present application do not impose any restrictions on the specific type of the electronic device.
[0100] The following is a detailed introduction to the shooting scenes provided by this application in conjunction with a set of user interface schematic diagrams.
[0101] It is understood that the terms "interface" and "user interface" in the specification, claims and drawings of this application are media interfaces for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The commonly used form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be an interface element such as an icon, window, control, etc. displayed on the display screen of an electronic device, where the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, and other visual interface elements.
[0102] 1. Enter the focus tracking mode ( Figure 2A to Figure 2D )
[0103] like Figure 2AAs shown, the user interface 100 displays a page with application icons, which may include multiple application icons (e.g., weather application icon, calendar application icon, photo album application icon, note application icon, email application icon, application store application icon, setting application icon, etc.). A page indicator may also be displayed below the multiple application icons to indicate the positional relationship between the currently displayed page and other pages. There are multiple application icons (e.g., camera application icon 101, browser application icon, information application icon, dial application icon) below the page indicator. These application icons remain displayed when the page is switched.
[0104] It can be understood that the camera application icon 101 is an icon of a camera application (ie, a camera application). The camera application icon 101 can be used to trigger the launch of the camera application.
[0105] The electronic device may detect a user operation on the camera application icon 101, and in response to the operation, the electronic device may display a Figure 2B The user interface 200 shown is a shooting interface of the default shooting mode of the camera application, and the user can preview the image and complete the shooting on this interface.
[0106] It is understandable that the user operations mentioned in this application may include but are not limited to touch (for example, click, etc.), voice control, gestures and other operations, and this application does not limit this.
[0107] like Figure 2B As shown, the user interface 200 may include a preview window 201, a camera mode option 202, an album shortcut control 203, a shutter control, and a camera flip control.
[0108] The preview window 201 can be used to display a preview image. The preview image displayed in the preview window 201 is an original image captured by the camera of the electronic device based on the viewing range.
[0109] One or more shooting mode options may be displayed in the camera mode option 202. The one or more shooting mode options may include: a night scene mode option, a smart portrait mode option, a photo mode option, a video mode option 2021, and more options. It is understandable that the camera mode option 202 may also include more or fewer shooting mode options.
[0110] The album quick control 203 can be used to open the album application. After the user triggers the electronic device to open the album application through the album quick control 203, the captured images and videos can be viewed. In addition, the album quick control 203 can also display thumbnails of the captured images or videos.
[0111] The electronic device may detect a user operation on the video recording mode option 2021. In response to the user operation, the electronic device may display a Figure 2C The user interface 300 is shown. The user interface 300 is a video preview interface of the camera application.
[0112] The controls included in the user interface 300 are substantially the same as those included in the user interface 200, except that the user interface 300 may further include a focus mode control 301 and a video start control 302. The focus mode control 301 may be used to trigger the electronic device to enter the focus mode. The video start control 302 is used to trigger the electronic device to start video recording.
[0113] The electronic device may detect a user operation on the focus mode control 301. In response to the user operation, the electronic device may display a Figure 2D The user interface 400 is shown. The user interface 400 is a video preview interface after entering the focus tracking mode but before starting the focus tracking.
[0114] The user interface 400 may include a display area 401, a preview window 201, a human frame 402, a human frame 403, and a human frame 404. The display area 401 may include prompt information for turning on the focus tracking mode and operation prompt information for recording a close-up video. Figure 2D As shown, the display area 401 displays “Click on the human body frame to generate an additional close-up video” and “Focus tracking mode has started”. Figure 2D As shown, the preview window 201 can display an image including the person R1, the person R2, and the person R3. The person frame 402 can be used to select the person R1. The person frame 403 can be used to select the person R2. The person frame 404 can be used to select the person R3.
[0115] In some embodiments of the present application, the electronic device may detect a user operation on more options in the camera mode options 202. In response to the user operation, the electronic device may display more shooting mode options. These shooting mode options may include a focus tracking mode option. The electronic device may detect a user operation on the focus tracking mode option. In response to the user operation, the electronic device may display a Figure 2D User interface 400 is shown.
[0116] It is understandable that the electronic device can also enter the focus tracking mode in other ways, and this application does not limit this.
[0117] 2. Select the focus target during preview ( Figure 2E to Figure 2F )
[0118] The electronic device can detect the user operation acting on the human body frame 403. In response to the user operation, the electronic device can display Figure 2E The user interface 500 is shown. The user interface 500 is a video preview interface displayed when the electronic device is in the focus tracking mode and the focus tracking is successful.
[0119] It is understandable that after the electronic device detects the user operation acting on the human body frame 403, it can determine that the focus tracking target is the person R2. After the focus tracking is successful, the electronic device can lock the focus on the person R2.
[0120] The user interface 500 may include a preview window 201, a small preview window 501, a focus body frame 502, and a video start control 302. It is understandable that the preview window 201 may be the large preview window mentioned above. The small preview window 501 may be the small preview window mentioned above.
[0121] Preview window 501 is used to display a close-up image of the focus target. That is, compared with the image displayed in preview window 201, the image displayed in preview window 501 is mainly based on the focus target. Preview window 501 may include control 5011 and control 5012. Control 5011 is used to exit the current focus. Control 5012 is used to adjust the size of preview window 501. Specifically, control 5012 can be used to adjust the aspect ratio of preview window 501.
[0122] The focus tracking human body frame 502 can be used to frame and select the focus tracking target. Figure 2E As shown, the focus tracking body frame is used to select the person R2.
[0123] It is understandable that the preview window 501 can be displayed suspended on the preview window 201. In some embodiments of the present application, the user can drag the preview window 501 so that the preview window 501 can be suspended in any area on the preview window 201.
[0124] The electronic device can detect the user operation acting on the control 5012. In response to the user operation, the electronic device can display the following Figure 2F The user interface 600 shown. The controls included in the user interface 600 are substantially the same as those included in the user interface 500, except that the sizes of the preview window 501 in the user interface 600 and the user interface 500 are changed.
[0125] In some embodiments of the present application, the aspect ratios of the preview window 501 in the user interface 600 and the user interface 500 are reciprocal of each other.
[0126] It should be noted that the default size of the preview window 501 can be set according to actual needs, and this application does not impose any restrictions on this.
[0127] It is understandable that after starting and successfully tracking focus, the electronic device can display the following by default: Figure 2E The preview window 501 shown may also display the following by default: Figure 2F A preview window 501 is shown.
[0128] Of course, the user interface 500 may also include a human frame for selecting a person who is not selected as a focus target.
[0129] In some embodiments of the present application, after the user selects a focus target and clicks on a corresponding human body frame, if the user does not switch the focus target within a period of time, the electronic device can hide other unselected human body frames.
[0130] 3. Losing the focus target, exiting the focus tracking, and regaining the focus target during preview ( Figure 2G to Figure 2I )
[0131] In some embodiments of the present application, when the electronic device is in the video preview state in the focus tracking mode, the electronic device may lose the focus tracking target, that is, fail to detect the focus tracking target, because the focus tracking target is far away from the electronic device or exceeds the viewfinder range of the electronic device. It is understandable that the viewfinder range of the electronic device is related to the field of view angle and focal length.
[0132] like Figure 2G As shown, the electronic device can display a user interface 700. The user interface 700 may include a display area 701, a preview window 501, and a preview window 201. According to the image displayed in the preview window 201, the character R2 is about to completely exceed the framing range of the electronic device. At this time, the electronic device cannot detect the focus target and is in a state of being out of focus (i.e., losing the focus target). In this case, the preview window 501 can continue to display the original image for a period of time (e.g., 5s). That is, within a preset time length (e.g., 5s) after losing focus, the preview window 501 can display the same image as the preview window 201. Once the continuous out-of-focus exceeds the preset time length, the preview window 501 will be closed. That is, the electronic device exits this focus tracking.
[0133] In some embodiments of the present application, after the electronic device loses the focus target, the preview window 501 can continue to display the last frame image displayed in the preview window 501 before losing focus for a period of time (for example, 5 seconds).
[0134] The display area 701 may display prompt information about loss of focus and exit of focus tracking. Figure 2G As shown, the display area 701 may display “focus target lost, exit focus after 5 seconds”. It should be noted that the exit focus mentioned here refers to closing the display window of the close-up image of the focus target (ie, the preview window 501), rather than exiting the focus mode.
[0135] It is understandable that the electronic device will automatically exit the focus tracking after the focus target is lost for 5 seconds. Figure 2H As shown, the electronic device may display a user interface 800. The user interface 800 is an interface displayed after the electronic device exits the focus tracking. The user interface 800 may include a human body frame 402 and a human body frame 404. In this case, the user may select the focus tracking target again and click on the corresponding human body frame, or wait for the original focus tracking target to re-enter the viewfinder range of the electronic device.
[0136] It is understandable that the time interval from the electronic device losing focus to exiting the focus tracking can also be other values, for example, 2s, 3s, 6s, etc. This time interval can be set according to actual needs, and this application does not limit this.
[0137] In some embodiments of the present application, after the electronic device loses the focus target, the user does not switch the focus target. In this case, within a preset time after the focus is lost, the electronic device can regain the focus target and re-display the close-up image of the focus target in the preview window.
[0138] like Figure 2G As shown, the electronic device loses the focus target, and the preview window 501 displays the last frame of the preview window 501 before the focus is lost. In addition, the display area 701 may display "Focus target lost, exit focus after 5 seconds". In this case, if the electronic device regains the focus target within 5 seconds, the electronic device may re-display the preview window 501. Fig.2I As shown, the electronic device can display a user interface 900. According to the image displayed in the preview window 201, the person R2 reappears in the framing range of the electronic device. At this time, the electronic device can detect the focus target again and display the preview window 501 and the focus person frame 502.
[0139] 4. Record, pause, save and view the video when the focus tracking is successful ( Figure 2J to Figure 2N )
[0140] (1) Enable large window recording and small window recording at the same time
[0141] Electronic devices can detect the effects of Figure 2E The user interface 500 shown includes a user operation on the video recording start control 302. In response to the user operation, the electronic device can start recording a video.
[0142] like Figure 2J As shown, the electronic device may display a user interface 1000. The user interface 1000 may include a display area 1001, a preview window 501, a recording end control 1004, and a recording pause control 1005.
[0143] Display area 1001 is used to display the video recording time corresponding to preview window 201, that is, the recording time of the original video. Fig.2I As shown, the video recording time corresponding to the preview window 201 is "00:03", that is, the recording time of the original video is 3 seconds.
[0144] It is understandable that after the electronic device starts recording a video in the focus tracking mode, the preview window 501 can hide the controls 5011 and 5012. Figure 2J As shown, the preview window 501 may include a display area 1002 and a recording end control 1003 .
[0145] Display area 1002 is used to display the video recording time corresponding to the preview window 501, that is, the recording time of the close-up video. Consistent with the video recording time displayed in display area 1001, the video recording time displayed in display area 1002 is also "00:03", that is, the recording time of the original video is 3 seconds, and the recording time of the close-up video is also 3 seconds.
[0146] It should be noted that the relevant meanings of the original video and the close-up video can be found in the above text and will not be repeated here.
[0147] The recording end control 1003 is used to end the recording of the video (ie, the close-up video) corresponding to the preview window 501. The recording end control 1004 is used to end the recording of the video (ie, the original video) corresponding to the preview window 201. The recording pause control 1005 is used to pause the recording of the original video.
[0148] In some embodiments of the present application, once the electronic device pauses recording the original video, the recording of the close-up video will also be paused. Accordingly, once the electronic device continues recording the original video, the close-up video will also continue recording.
[0149] For example, the electronic device may detect a user operation on the video pause control 1005. In response to the user operation, the electronic device may display a Figure 2K The user interface 1100 shown in FIG. 1 is substantially the same as the controls included in the user interface 1000, except that the user interface 1100 may include a continue recording control 1101. The continue recording control 1101 is used to continue recording the original video. Figure 2K As shown, the video recording time displayed in the display area 1001 and the display area 1002 included in the user interface 1100 both stays at "00:03". This means that both the original video and the close-up video are paused.
[0150] In some embodiments of the present application, if the electronic device pauses recording the close-up video, the recording of the original video will not be paused.
[0151] In some embodiments of the present application, the preview window 501 may also include a video pause control. The video pause control may be used to pause recording of the close-up video. In this case, once the electronic device detects a user operation acting on the video pause control included in the preview window 501, the electronic device may pause recording of the close-up video in response to the user operation. The electronic device may continue recording the original video.
[0152] In some embodiments of the present application, once the electronic device finishes recording the original video, the recording of the close-up video will also end.
[0153] The electronic device may detect a user operation on the video recording end control 1004 included in the user interface 1000. In response to the user operation, the electronic device may display a Figure 2L The user interface 1200 shown. The controls included in the user interface 1200 are substantially the same as the controls included in the user interface 400. The album quick control 203 included in the user interface 1200 can display a thumbnail of the first frame image in the original video stored in the electronic device.
[0154] The electronic device may detect a user operation on the album shortcut control 203 included in the user interface 1200. In response to the user operation, the electronic device may display a Figure 2M The user interface 1301 shown in (a) of FIG. 1301 may include a display area 13011. The display area 13011 may include a control 130111. The electronic device may detect a user operation acting on the control 130111. In response to the user operation, the electronic device may play the original video, and accordingly, the display area 13011 may also display an image in the original video.
[0155] The electronic device may detect a left sliding operation on the user interface 1301. In response to the user operation, the electronic device may display the following Figure 2M (b) shows a user interface 1302. Similar to the user interface 1301, the user interface 1302 may include a display area 13011, and the display area 13011 may include a control 130111. The electronic device may detect a user operation on the control 130111. In response to the user operation, the electronic device may play a close-up video, and accordingly, the display area 13011 may also display an image in the close-up video.
[0156] It is understandable that the user can view the two videos saved after the recording in the above-mentioned end user interface 1000 in the gallery application. Figure 2NAs shown in (a), the electronic device can display a user interface 1401. The user interface 1401 can include a video 14011 and a video 14012. The duration of the video 14011 and the duration of the video 14012 are both 3 seconds. It can be understood that the video 14011 is the original video, and the video 14012 is a close-up video. That is, the duration of the original video and the duration of the close-up video are the same.
[0157] In some embodiments of the present application, if the electronic device ends recording the original video, the recording of the close-up video will not end. In this case, once the electronic device detects the user operation acting on the video recording end control 1003, in response to the user operation, the electronic device can end recording the close-up video.
[0158] (2) Open small window recording after large window recording
[0159] Electronic devices can detect the effects of Figure 2D The user interface 400 shown includes a user operation on the video recording start control 302. In response to the user operation, the electronic device can start recording a video.
[0160] like Figure 2P As shown, the electronic device may display a user interface 1600. The user interface 1600 may include a preview window 201, a recording end control 1004, and a recording pause control 1005. The video recording time corresponding to the preview window 201 is "00:03", that is, the recording time of the original video is 3s.
[0161] Electronic devices can detect the effects of Figure 2P The user interface 1600 includes a user operation on the human frame 404. In response to the user operation, the electronic device can determine that the person (ie, person R3) selected by the human frame 404 is the focus target. The electronic device can record a close-up video of person R3.
[0162] like Figure 2Q As shown, the electronic device may display a user interface 1700. The user interface 1700 may include a preview window 201, a small preview window 501, a recording end control, and a recording pause control. The video recording time displayed in the display area 1001 included in the user interface 1700 is "00:08", while the video recording time displayed in the display area 1002 in the small preview window 501 is "00:05". That is, the recording time of the original video has been recorded to the 8th second, while the close-up video of the character R3 has only been recorded to the 5th second.
[0163] The electronic device may detect a user operation on the video recording end control included in the user interface 1700. In response to the user operation, the electronic device may save the video recorded in the preview window 201 and the video recorded in the preview window 501. It is understandable that the user can view the two videos saved in the gallery application. Figure 2N As shown in (b), the electronic device may display a user interface 1402. The user interface 1402 may include a video 14021 and a video 14022. The duration of the video 14021 is 8 seconds, and the duration of the video 14022 is 5 seconds. It can be understood that the video 14021 is the original video, and the video 14022 is the close-up video. That is, the duration of the original video is longer than that of the close-up video.
[0164] 5. Switch the focus target during recording ( Figure 2O to Figure 2Q )
[0165] (1) When recording the original video and close-up video at the same time, switch the focus target ( Fig.2O )
[0166] Electronic devices can detect the effects of Figure 2J The user operation on the human body frame 404 included in the user interface 1000 shown in FIG. In response to the user operation, the electronic device may display the following Fig.2O The user interface 1500 shown in FIG. 1 is substantially the same as the user interface 1000 in terms of controls, except that the user interface 1500 may further include a focus-tracking body frame 1501, and the preview window 501 in the user interface 1500 displays a close-up image of the person R3. The focus-tracking body frame 1501 may be used to select a focus target. Fig.2O As shown, the focus tracking frame 1501 is used to select the person R3. That is, the focus tracking target has been switched from the person R2 to the person R3, and the electronic device has also successfully tracked the focus.
[0167] It is understandable that after switching the focus target, the user can also end or pause the video recording of the corresponding preview window by clicking the video end control 1003, the video end control 1004 and the video pause control 1005. For details, please refer to the above and will not be repeated here.
[0168] (2) When the close-up video ends but the original video is being recorded, switch the focus target ( Figure 2P to Figure 2Q )
[0169] Electronic devices can detect the effects of Figure 2J The user operation on the video recording end control 1003 included in the user interface 1000 shown in FIG. In response to the user operation, the electronic device may display a Figure 2PUser interface 1600 is shown. User interface 1600 may include human frame 402, human frame 403, and human frame 404. It can be understood that at this time, the electronic device has finished recording the close-up video with person R2 as the focus target, but is still recording the original video.
[0170] Electronic devices can detect the effects of Figure 2P The user interface 1600 includes a user operation on the human frame 404. In response to the user operation, the electronic device can re-determine the person (ie, person R3) selected by the human frame 404 as the focus target. The electronic device can record a close-up video of person R3.
[0171] like Figure 2Q As shown, the electronic device may display a user interface 1700. The controls included in the user interface 1700 are substantially the same as those included in the user interface 1500. The video recording time displayed in the display area 1001 included in the user interface 1700 is "00:08", while the video recording time displayed in the display area 1002 in the preview window 501 is "00:05". That is, the recording time of the original video has been recorded to the 8th second, while the close-up video of the character R3 has only been recorded to the 5th second.
[0172] 6. Losing the focus target during recording and regaining the focus target ( Figure 2R to Figure 2X )
[0173] Similar to the loss of the focus target during preview, in some embodiments of the present application, when the electronic device is in the recording state of the focus mode, the electronic device may lose the focus target because the focus target is far away from the electronic device or exceeds the viewfinder range of the electronic device, that is, the focus target cannot be detected. In this case, the electronic device can continue to record the original video and perform corresponding processing on the recording of the close-up video.
[0174] (1) Method 1 Figure 2R to Figure 2V )
[0175] In some embodiments of the present application, the electronic device continues to record the original video and the close-up video for a period of time after the focus is lost. During this period of time, the image in the close-up video recorded by the electronic device is the same as the image in the original video. If the focus target is not found after this period of time and the user does not switch the focus target, the electronic device can continue to record the original video and pause the recording of the close-up video.
[0176] like Figure 2J As shown, the electronic device can record the original video and the close-up video of the person R2. During the recording process, the electronic device can display the following Figure 2RUser interface 1800 is shown. According to the image displayed in preview window 201, character R2 is about to completely exceed the framing range of the electronic device. At this time, the electronic device cannot detect the focus target and is in a defocused state. In this case, preview window 501 can continue to display the original image for a period of time (e.g., 5 seconds). That is, within a period of time (e.g., 5 seconds) after the defocusing, preview window 501 can display the same image as preview window 201.
[0177] like Figure 2S As shown, the electronic device may display a user interface 1900. The video recording time displayed in the display area 1001 included in the user interface 1900 is "00:11", and the video recording time displayed in the display area 1002 is "00:11". That is, the electronic device continues to record the original video and the close-up video.
[0178] It is understandable that if the focus target (i.e., person R2) is not found after being out of focus for more than 5 seconds and the user does not switch the focus target, the electronic device can continue to record the original video and pause recording the close-up video. In this case, the preview window 501 continues to display the last frame image displayed before pausing recording.
[0179] like Figure 2T As shown, the electronic device can display the user interface 2000. The video recording time displayed in the display area 1001 included in the user interface 2000 is "00:16", and the video recording time displayed in the display area 1002 is "00:15". That is, after the focus is out of focus for more than 5 seconds, the electronic device continues to record the original video and pauses the recording of the close-up video. The preview window 501 displays the last frame of the image displayed before the recording was paused.
[0180] It is understandable that if the focus target is found within 5 seconds after the focus is lost, the electronic device continues to record the original video and the close-up video. After the focus target is found, the image in the close-up video recorded by the electronic device is the close-up image of the focus target. In other words, after the focus target is found, the preview window 501 displays the close-up image of the focus target.
[0181] like Figure 2R and Figure 2S As shown, the electronic device cannot detect the focus target (i.e., person R2), and the image displayed in the preview window 501 is the same as the image displayed in the preview window 201. In this case, if the focus target is found within 5 seconds after the focus is lost, the electronic device can continue to record the original video and the close-up video. Figure 2UAs shown, the electronic device can display a user interface 2100. The video recording time displayed in the display area 1001 included in the user interface 2100 is "00:13", and the video recording time displayed in the display area 1002 is "00:13". It can be understood that the electronic device is out of focus within 5 seconds. Figure 2U In the image displayed in the preview window 201, the person R2 reappears in the viewfinder of the electronic device. At this time, the electronic device can detect the focus target again and display the focus person frame 502. Figure 2U As shown, in this case, the preview window 501 no longer displays the original image, but displays a close-up image of the focus target (ie, person R2).
[0182] It is understandable that if the focus target is found 5 seconds after the focus is lost, the electronic device continues to record the original video and does not pause the close-up video. After the focus target is found, the image in the close-up video recorded by the electronic device is the close-up image of the focus target. In other words, after the focus target is found, the preview window 501 displays the close-up image of the focus target.
[0183] like Figure 2V As shown, the electronic device can display user interface 2200. The video recording time displayed in display area 1001 included in user interface 2200 is "00:19", and the video recording time displayed in display area 1002 is "00:16". It can be understood that the electronic device is out of focus for more than 5 seconds. According to the above, after the focus is out of focus for more than 5 seconds, the electronic device continues to record the original video and pauses recording the close-up video. Figure 2V In the image displayed in the preview window 201 in the video, the person R2 reappears in the viewfinder of the electronic device. At this time, the electronic device can detect the focus target again and display the focus person frame 502. Figure 2V As shown, in this case, the preview window 501 no longer displays the original image, but displays a close-up image of the focus target (ie, person R2).
[0184] It is understandable that the time interval from when the electronic device starts to lose focus to when it starts to pause recording the close-up video can also be other values, for example, 2s, 3s, 6s, etc. This time interval can be set according to actual needs, and this application does not limit this.
[0185] (2) Method 2 Figure 2W to Figure 2X )
[0186] In some embodiments of the present application, the electronic device continues to record the original video and the close-up video for a period of time after the focus is lost. During this period of time, the images in the close-up video recorded by the electronic device are all the last frame images in the close-up video. If the focus target is not found after this period of time and the user does not switch the focus target, the electronic device can continue to record the original video and pause the recording of the close-up video.
[0187] like Figure 2J As shown, the electronic device can record the original video and the close-up video of the person R2. During the recording process, the electronic device can display the following Figure 2W User interface 2300 shown. According to the image displayed in the preview window 201, the character R2 has completely exceeded the framing range of the electronic device. At this time, the electronic device cannot detect the focus target and is in a defocused state. In this case, the electronic device can continue to record the close-up video for a period of time (for example, 5s). Moreover, the preview window 501 can continue to display the last frame image displayed in the preview window 501 before the defocusing during this period of time. That is, the last frame image of the close-up video recorded by the electronic device before the defocusing.
[0188] It is understandable that if the focus target (i.e., person R2) is not found after being out of focus for more than 5 seconds and the user does not switch the focus target, the electronic device can continue to record the original video and pause recording the close-up video. In this case, the preview window 501 continues to display the last frame image displayed before pausing recording.
[0189] In some embodiments of the present application, after the focus is lost for more than 5 seconds, the electronic device may add a mask to the preview window 501. In layman's terms, the image displayed in the preview window 501 will appear gray.
[0190] like Figure 2X As shown, the electronic device can display the user interface 2400. The video recording time displayed in the display area 1001 included in the user interface 2400 is "00:18", and the video recording time displayed in the display area 1002 is "00:15". That is, after the focus is out of focus for more than 5 seconds, the electronic device continues to record the original video and pauses the recording of the close-up video. The preview window 501 displays the last frame displayed before the recording is paused, and displays a mask.
[0191] Similar to the first method, if the focus target is found within 5 seconds after the focus is lost, the electronic device continues to record the original video and the close-up video. After the focus target is found, the preview window 501 no longer displays the last frame image displayed before the focus target is lost, but displays the close-up image of the focus target acquired in real time. Figure 2U And related descriptions will not be repeated here.
[0192] Similar to the first method, if the focus target is found after 5 seconds after the focus is lost, the electronic device continues to record the original video and does not pause the close-up video. It can be understood that after the focus target is found, the preview window 501 no longer displays the mask. Figure 2V And related descriptions will not be repeated here.
[0193] In some embodiments of the present application, after the electronic device loses focus, a prompt message about losing focus and exiting focus tracking can be displayed. For details, please refer to Figure 2G The display area 701 shown is not described in detail here.
[0194] In some embodiments of the present application, after the electronic device loses focus for more than a period of time (e.g., 5 seconds), the preview window 501 can be closed and the close-up video can be automatically saved. In this case, the electronic device can continue to record the original video. If the electronic device detects the focus target again after losing focus for more than a period of time, the preview window 501 can be restarted to record a close-up video of the focus target.
[0195] It is understandable that electronic devices can also perform focus tracking preview and focus tracking recording in the horizontal screen state, and the focus tracking target may be lost or switched. For details, please refer to the interface diagram in the vertical screen state (such as Figure 2A-Figure 2X ), which will not be elaborated here.
[0196] It should be noted that the above user interfaces are merely some examples provided for this application and should not be regarded as limitations of this application.
[0197] Combine the following Figure 3 The software structure of an electronic device provided in an embodiment of the present application is introduced.
[0198] like Figure 3 As shown, the software framework of the electronic device involved in the present application may include an application layer, an application framework layer (framework, FWK), a system library, an Android runtime, a hardware abstraction layer (HAL) and a kernel layer (kernel).
[0199] The application layer may include a series of application packages, such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications (also referred to as applications). Among them, the camera application can be used to obtain images and videos.
[0200] like Figure 3As shown, the camera application may include a camera mode module, a stream management module, an encoding control module, a storage module and a display module. The camera mode module may be used to monitor user operations and determine the camera mode. The camera modes may include, but are not limited to: photo mode, video preview mode, video recording mode, time-lapse photography mode, continuous shooting mode, etc. Among them, the video preview mode may include a video preview mode in a focus tracking mode. The video recording mode may include a video recording mode in a focus tracking mode. The stream management module is used to manage data streams. For example, the data stream configuration information (which may be referred to as the distribution stream information) is sent down. The stream management module may include a data stream cache area. For example, a large window image cache area and a small window image cache area. The large window image cache area and the small window image cache area can store two channels of image data returned by the camera HAL. Specifically, the large window image cache area is used to cache the data stream corresponding to the preview large window, and the small window image cache area is used to cache the data stream corresponding to the preview small window image. The encoding control module may include a mixer, a video encoder and an audio manager. The video encoder in the encoding control module is used to control the encoder to encode the image captured by the camera. The audio manager is used to encode the audio captured by a device such as a microphone. The mixer is used to merge the encoded image and the encoded audio into a video file. The storage module is used to store the original video and the close-up video. The display module is used to control the display of the preview large window and the preview small window.
[0201] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0202] like Figure 3 As shown, the application framework layer may include a camera FWK and a media FMK. The camera FWK may provide an API interface for applications (e.g., camera applications) to call, and then receive requests from the applications, while maintaining the business logic of the internal flow of requests, and finally send the request to the camera service (CameraService) for processing by calling the camera AIDL cross-process interface, and then wait for the return of the camera service (Camera Service) result, and then send the final result to the camera application. Among them, the full name of AIDL in English is Android Interface Definition Language, and its Chinese meaning is Android Interface Definition Language. Similarly, the media FWK may provide an API interface for the corresponding application (e.g., camera application) to call, and then receive requests from the application (e.g., camera application), and pass the application's request downward, and then return it to the application.
[0203] It is understandable that the application framework layer may also include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc. The specific meanings thereof may be referred to in relevant technical documents and will not be described in detail here.
[0204] The runtime is responsible for the scheduling and management of the system. The runtime includes the core library and the virtual machine. The core library contains two parts: one part is the function that the programming language (for example, Java language) needs to call, and the other part is the core library of the system.
[0205] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the programming files (e.g., java files) of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0206] The system library may include multiple functional modules, such as: Surface Manager, Media Libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0207] The surface manager is used to manage the display subsystem and provides the fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications.
[0208] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0209] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0210] A 2D graphics engine is a drawing engine for 2D drawings.
[0211] The Hardware Abstraction Layer (HAL) is an interface layer between the operating system kernel and the upper-level software, and its purpose is to abstract the hardware. The hardware abstraction layer is an abstract interface driven by the device kernel, which is used to implement the application programming interface that provides access to the underlying device to the higher-level Java API framework. HAL contains multiple library modules, such as camera HAL, Vendor warehouse, display, Bluetooth, audio, etc. Each of these library modules implements an interface for a specific type of hardware component. It can be understood that the camera HAL can provide an interface for the camera FWK to access hardware components such as the camera. The Vendor warehouse can provide an interface for the media FWK to access hardware components such as the encoder. When the system framework layer API requires access to the hardware of the portable device, the Android operating system will load the library module for the hardware component.
[0212] The kernel layer is the foundation of the Android operating system. The final functions of the Android operating system are completed through the kernel layer. The kernel layer at least includes display driver, camera driver, audio driver, sensor driver, and virtual card driver.
[0213] It should be noted that the application provides Figure 3 The software structure diagram of the electronic device shown is only an example and does not limit the specific module division in different layers of the Android operating system. For details, please refer to the introduction of the Android operating system software structure in conventional technology. In addition, the shooting method provided by this application can also be implemented based on other operating systems, and this application will not give examples one by one.
[0214] based on Figure 3 The software structure of the electronic device shown, combined with Figure 4 A shooting method provided in an embodiment of the present application is introduced.
[0215] like Figure 4 As shown, except Figure 3 The software modules shown, the electronic device may include hardware modules such as a camera, a memory and an encoder. Among them, the camera can be used to collect original image data. The memory can be used to store the video recorded in the preview large window and the video recorded in the preview small window. The encoder can be used to encode the image data in the data stream corresponding to the preview large window and the data stream corresponding to the preview small window. The electronic device may include a first encoder and a second encoder. Among them, the first encoder can be used to encode the image data in the data stream corresponding to the preview large window. The second encoder can be used to encode the image data in the data stream corresponding to the preview small window.
[0216] The camera mode module can monitor the user operation on the focus mode control, thereby determining that the current camera mode has changed to the video preview mode under the focus mode, and notifying the stream management module. Accordingly, the stream management module can send the distribution information of two data streams to the camera FWK. The two data streams are the data stream corresponding to the preview large window and the data stream corresponding to the preview small window. After receiving the distribution information, the camera FWK can send the distribution information to the camera HAL. The camera HAL can process the image data collected by the camera to obtain two channels of image data with different effects. The camera HAL can return the two channels of image data with different effects to the camera FWK. Accordingly, the camera FWK can continue to return the two channels of image data with different effects to the camera application, and store them in the large window image buffer and the small window image buffer of the camera application respectively. It can be understood that the two channels of image data with different effects can be used to preview the image display in the large preview window and the small preview window, and to generate corresponding videos.
[0217] The camera mode module can monitor the user operation on the recording start control, thereby determining that the current camera mode has changed to a recording mode in the focus tracking mode, and notifying the encoding control module. The encoding control module controls the encoder to encode the two-way image data in the large window image buffer and the small window image buffer, thereby obtaining the original video and the close-up video. It can be understood that the encoding control module controls the encoder to encode the image data in the small window image buffer, and one or more close-up videos can be obtained. In some embodiments of the present application, after the encoding control module controls the encoder to encode the two-way image data in the large window image buffer and the small window image buffer, an original video and multiple close-up videos can be generated, and the generated videos are saved in the memory.
[0218] It can be understood that the large window mentioned in this application has the same meaning as the preview large window, and the small window has the same meaning as the preview small window.
[0219] Combine the following Figure 5-Figure 9 The specific implementation of the above embodiment is described.
[0220] S500: The camera mode module receives a request to start a camera application.
[0221] It is understandable that the user can trigger the electronic device to start the camera application. Accordingly, the camera mode module in the electronic device can receive the request to start the camera application.
[0222] For example, Figure 2A As shown, the user can click the camera application icon 101, and accordingly, the electronic device can receive a request to start the camera application. In response to the request to start the camera application, the electronic device can start the camera application and display Figure 2BUser interface 200 is shown. It is understandable that the user can also start the camera application by voice, gesture, etc., and the present application does not limit the specific method in which the user triggers the electronic device to start the camera application.
[0223] S501: The camera mode module sends a request to start the camera to the camera.
[0224] It is understandable that the camera can receive a request to start the camera sent by the camera mode module.
[0225] S502: The camera starts and collects raw image data.
[0226] It is understandable that after the camera receives the request to start the camera sent by the camera mode module, it can be started. Moreover, after the camera is started, it can continue to collect raw image data.
[0227] S503: The camera sends raw image data to the camera HAL.
[0228] It can be understood that the camera can send the collected raw image data to the camera HAL.
[0229] S504: The camera HAL processes the raw image data and sends the processed image to the display screen for display.
[0230] It is understood that when the camera application is in preview mode, the camera HAL can process the raw image data and send the processed image to the display screen for display. It is understood that the preview mode mentioned here can include a photo preview mode, a video preview mode, etc.
[0231] 1. Configure data flow (such as Figure 5 (as shown in steps S505 to S516 in FIG.
[0232] S505: The camera mode module receives a request to start the focus tracking mode.
[0233] It is understandable that the user can trigger the camera to enter the focus tracking mode. It is understandable that the camera mode module can monitor the corresponding triggering operation of the user. Accordingly, the camera mode module can receive a request to turn on the focus tracking mode.
[0234] For example, after the electronic device starts the camera application, it can display the following Figure 2C The user interface 300 shown in FIG. 300 may include a focus mode control 301. The user may click the focus mode control 301, and accordingly, the camera mode module in the electronic device may receive a request to enter the focus mode. In response to the request to enter the focus mode, the electronic device may display a Figure 2DUser interface 400 is shown. It is understandable that the user can also trigger the electronic device to enter the focus tracking mode through voice, gestures, etc.
[0235] In some embodiments of the present application, a user can trigger an electronic device to quickly enter a focus tracking mode through desktop shortcut controls, voice, gestures, etc.
[0236] S506: The camera mode module sends a prompt message for entering the focus tracking mode to the storage module.
[0237] It is understood that after the camera mode module receives the request to turn on the focus tracking mode, it can send a prompt message to the storage module that the camera application enters the focus tracking mode. The prompt message can be understood as the mode change information of the camera application changing from the default video preview mode to the focus tracking mode. It is understood that the default video preview mode refers to the video preview mode of the electronic device in the default video state (such as Figure 2C shown).
[0238] In some embodiments of the present application, the prompt information may include the current mode of the camera application (i.e., the focus tracking mode). The prompt information may also include the original mode of the camera application. It is understandable that the original mode of the camera application refers to the mode before entering the focus tracking mode. For example, the default video preview mode.
[0239] S507: The storage module generates a large-window video file and a small-window video file respectively based on the current system time.
[0240] It can be understood that the initial states of the large-window video file and the small-window video file respectively generated by the storage module based on the current system time are empty (ie, have no data).
[0241] In some embodiments of the present application, the timestamps of the large window video file and the small window video file are respectively a first moment and a second moment, wherein the second moment is not earlier than the first moment.
[0242] S508: The storage module sends the file name of the large-window video file and the file name of the small-window video file to the encoding control module.
[0243] It is understandable that after the storage module generates the large window video file and the small window video file respectively based on the current system time, the file name of the large window video file and the file name of the small window video file can be sent to the encoding control module. The file name of the large window video file and the file name of the small window video file can be in the form of text, numbers, strings, etc., and this application does not limit this.
[0244] In some embodiments of the present application, the storage module may also send the timestamps (i.e., the first moment and the second moment) of the large window video file and the small window video file to the encoding control module. The storage module may also send the corresponding relationship between the file name and the timestamp to the encoding control module.
[0245] It is understandable that the file identifier of the small-window video file and the file identifier of the large-window video file sent by the storage module to the encoding control module can also be expressed in other forms and contents, not limited to the above-mentioned file name and timestamp, and this application does not impose any restrictions on this.
[0246] Exemplarily, the storage module may send video-1-time-1-video-2-time-2 to the encoding control module. As shown in Table 1, video-1 corresponds to time-1. Video-1 is the file name of the large window video file. Time-1 is the timestamp of the large window video file (i.e., the first moment). Video-2 corresponds to time-2. Video-2 is the file name of the small window video file. Time-2 is the timestamp of the small window video file (i.e., the second moment).
[0247] Table 1
[0248]
[0249] Exemplarily, the storage module may send 10987662098767 to the encoding control module. The first bit of the string represents the file name of the large window video file. The eighth bit of the string represents the file name of the small window video file. The second to seventh bits of the string represent the timestamp of the large window video file. The ninth to fourteenth bits of the string represent the timestamp of the small window video file.
[0250] In some embodiments of the present application, the large-window video file and the small-window video file may be named according to their timestamps, respectively.
[0251] Correspondingly, the encoding control module can receive the file name of the large-window video file and the file name of the small-window video file sent by the storage module.
[0252] S509: The camera mode module sends a prompt message for entering the focus tracking mode to the stream management module.
[0253] It is understandable that after receiving the request to start the focus tracking mode, the camera mode module can send a prompt message to the stream management module that the camera application enters the focus tracking mode. The relevant description of the prompt message can refer to step S506, which will not be repeated here.
[0254] It is understandable that the present application does not limit the order in which the electronic device executes step S506 and step S509. The electronic device may execute step S506 first, may execute step S509 first, or may execute step S506 and step S509 simultaneously.
[0255] S510: The flow management module configures a large window data flow and a small window data flow.
[0256] It can be understood that the flow management module can determine the flow allocation information of the large window data flow and the small window data flow, and use this to configure the large window data flow and the small window data flow. The large window data flow refers to the data flow corresponding to the preview large window, that is, the data flow corresponding to the image displayed in the preview large window. The small window data flow refers to the data flow corresponding to the preview small window, that is, the data flow corresponding to the image displayed in the preview small window.
[0257] It is understandable that the flow distribution information of the large window data stream and the small window data stream may include format and resolution, etc. In some embodiments of the present application, the flow distribution information of the large window data stream and the small window data stream is the same. Exemplarily, the format may be YUV. The resolution may be 1920px*1080px. It is understandable that the full name of px is "Pixel", which means "pixel" in Chinese and is the smallest unit representing a picture or graphic. It should be noted that the specific content of the configuration information may be set according to industry regulations and actual needs, and the present application does not limit this. In some embodiments of the present application, the flow distribution information of the large window data stream and the small window data stream may also include a flow identifier of the large window data stream and a flow identifier of the small window data stream. The flow identifier of the large window data stream and the flow identifier of the small window data stream may be used to distinguish between the large window data stream and the small window data stream. It is understandable that the flow management module may store the flow identifier of the large window data stream and the flow identifier of the small window data stream.
[0258] S511: The stream management module sends large window stream allocation information and small window stream allocation information to the encoding control module.
[0259] It can be understood that the large window flow allocation information refers to the flow allocation information of the large window data stream, and the small window flow allocation information refers to the flow allocation information of the small window data stream. According to the above, the flow allocation information may include format, resolution, etc., and this application does not limit this.
[0260] Correspondingly, the encoding control module can receive the stream allocation information sent by the stream management module.
[0261] S512: The encoding control module determines the encoder parameters corresponding to the first encoder associated with the large window data stream and the large window video file based on the large window streaming information and the file name of the large window video file, and determines the encoder parameters corresponding to the second encoder associated with the small window data stream and the small window video file based on the small window streaming information and the file name of the small window video file.
[0262] It is understandable that after the encoding control module receives the large window allocation information and the small window allocation information, it can parse them and determine that there are 2 data streams configured by the stream management module. Similarly, after the encoding control module receives the file name of the large window video file and the file name of the small window video file, it can be determined that there are 2 video files. Correspondingly, the encoding control module determines that the number of encoders to be created is 2. It is understandable that these two encoders (i.e., the first encoder and the second encoder) can be associated with 2 data streams (i.e., the large window data stream and the small window data stream), respectively, and with 2 video files (i.e., the large window video file and the small window video file). In other words, the encoding control module can determine that the first encoder is used to encode the image data in the large window data stream, and the first encoder can write the encoded data into the large window video file. Similarly, the encoding control module can determine that the second encoder is used to encode the image data in the small window data stream, and the second encoder can write the encoded data into the small window video file.
[0263] S513: The encoding control module sends encoder parameters corresponding to the first encoder and encoder parameters corresponding to the second encoder to the encoder.
[0264] It is understood that the encoder parameters of the encoder may include format and resolution. Exemplarily, the format may be H.264. The resolution may be 1920px*1080px. It should be noted that the specific content of the encoder parameters of the encoder may be set according to industry regulations and actual needs, and this application does not limit this.
[0265] In some embodiments of the present application, the encoder parameters of the first encoder and the encoder parameters of the second encoder may be the same or different, and the specific parameters may be set according to actual needs and relevant technical documents.
[0266] Correspondingly, the encoder may receive encoder parameters corresponding to the first encoder and encoder parameters corresponding to the second encoder sent by the encoding control module.
[0267] S514: The encoder creates a first encoder and a second encoder based on encoder parameters corresponding to the first encoder and encoder parameters corresponding to the second encoder.
[0268] It can be understood that after the encoder receives the encoder parameters corresponding to the first encoder and the encoder parameters corresponding to the second encoder sent by the encoding control module, the first encoder can be created based on the encoder parameters corresponding to the first encoder, and the second encoder can be created based on the encoder parameters corresponding to the second encoder.
[0269] It should be noted that the creation of an encoder mentioned in this application refers to calling hardware resources to implement the corresponding encoding function. In layman's terms, after the encoder creates the first encoder and the second encoder, the encoding control module can call hardware resources to respectively implement the encoding of the image data in the large window data stream and the encoding of the image data in the small window data stream.
[0270] S515: The stream management module sends large window stream allocation information and small window stream allocation information to the camera HAL.
[0271] Specifically, the stream management module can send the large window stream allocation information and the small window stream allocation information to the camera FWK, and then the camera FWK sends the large window stream allocation information and the small window stream allocation information to the camera HAL. The relevant description of the large window stream allocation information and the small window stream allocation information can be referred to above and will not be repeated here.
[0272] Correspondingly, the camera HAL can receive the stream allocation information sent by the stream management module.
[0273] It is understandable that the present application does not limit the order in which the electronic device executes step S511 and step S515.
[0274] S516: The camera HAL determines an image effect that matches the large window data stream based on the large window stream allocation information, and determines an image effect that matches the small window data stream based on the small window stream allocation information.
[0275] It can be understood that after the camera HAL receives the stream allocation information sent by the stream management module, it can determine the image effect that matches the large window data stream and the image effect that matches the small window data stream.
[0276] It is understandable that the image effect may include cropping, resizing, beautification, filters, etc., and the present application does not limit this. In some embodiments of the present application, the image effect matching the large window data stream does not include cropping the original image data, while the image effect matching the small window data stream includes cropping the original image data.
[0277] 2. Start recording when the focus tracking is successful (such as Fig. 6A and Figure 6B (shown)
[0278] It should be noted that after the camera is started (such as step S502), the original image data can be continuously collected and sent to the camera HAL (such as step S503).
[0279] (1) Enable both large window recording and small window recording at the same time (such as Fig. 6A (shown)
[0280] S600: The camera mode module receives a request to simultaneously start large window recording and small window recording.
[0281] When the focus tracking is successful and the preview large window and the preview small window are displayed, the user can trigger the large window and the small window to record simultaneously. Correspondingly, the camera mode module can receive a request to start the large window recording and the small window recording simultaneously.
[0282] For example, the electronic device may display Figure 2E The user interface 500 shown. The user interface 500 includes a preview window 201 and a small preview window 501. That is, the electronic device successfully tracks the focus and displays the large preview window and the small preview window at the same time. It is understandable that the user can click the recording start control 302 included in the user interface 500, and accordingly, the camera mode module in the electronic device can receive a request to start recording in the large window and the small window at the same time. In response to the request to start recording in the large window and the small window at the same time, the electronic device can start recording the video. After the electronic device starts recording the video, it can display the following Figure 2J User interface 1000 is shown. It is understandable that the user can also trigger the electronic device to perform large window recording and small window recording simultaneously through voice, gesture, etc.
[0283] S601: The camera mode module sends a prompt message to the encoding control module to start recording with large and small windows.
[0284] It is understandable that after the camera mode module receives a request to start both large and small window recording, it can send a prompt message to the encoding control module that the camera application starts recording in large and small windows. The prompt message can also be understood as a mode change message that the camera application changes from large and small window preview mode to large and small window recording mode. It is understandable that large and small window preview means that both the preview large window and the preview small window are in the preview state, and large and small window recording means that both the preview large window and the preview small window are in the recording state.
[0285] Correspondingly, the encoding control module may receive prompt information sent by the camera mode module for the camera application to start recording in large and small windows.
[0286] S602: The encoding control module sends a request to start the first encoder to the first encoder.
[0287] It is understandable that after the encoding control module receives the prompt information for starting the large and small window recording sent by the camera mode module, it can send a request to start the first encoder to the first encoder. Specifically, the encoding control module can send the request to start the first encoder to the media FWK, and then the media FWK sends the request to start the first encoder to the first encoder via the Vendor warehouse.
[0288] Exemplarily, the request to start the first encoder may include: codec-1.start.
[0289] Correspondingly, the first encoder may receive a request for starting the first encoder sent by the encoding control module.
[0290] S603: The first encoder is started.
[0291] It can be understood that after the first encoder receives the request for starting the first encoder sent by the encoding control module, the first encoder can be started.
[0292] S604: The encoding control module sends a request to start the second encoder to the second encoder.
[0293] It is understandable that after the encoding control module receives the prompt information for starting the large and small window recording sent by the camera mode module, it can send a request to start the second encoder to the second encoder. Specifically, the encoding control module can send the request to start the second encoder to the media FWK, and then the media FWK sends the request to start the second encoder to the second encoder via the Vendor warehouse.
[0294] Exemplarily, the request to start the second encoder may include: codec-2.start.
[0295] It is understandable that the present application does not limit the order in which the electronic device executes step S602 and step S604.
[0296] Correspondingly, the second encoder may receive a request for starting the second encoder sent by the encoding control module.
[0297] S605: The second encoder is started.
[0298] It can be understood that after the second encoder receives the request for starting the second encoder sent by the encoding control module, the second encoder can be started.
[0299] S606: The camera mode module sends a prompt message to the stream management module to start recording with large and small windows.
[0300] It is understood that after the camera mode module receives the request to start large window recording and small window recording at the same time, it can send a prompt message to the stream management module for the camera application to start large and small window recording. It is understood that the relevant description of step S606 can refer to step S601, which will not be repeated here.
[0301] It is understandable that the present application does not limit the order of step S601 and step S606.
[0302] Correspondingly, the stream management module may receive prompt information for starting large and small window recording sent by the camera mode module.
[0303] S607: The stream management module sends a request to generate a large window data stream and a small window data stream to the camera HAL.
[0304] It can be understood that the stream management module can send a request to generate a large window data stream and a small window data stream to the camera FWK, and then the camera FWK can send the request to the camera HAL.
[0305] It should be noted that, when the camera mode does not change (the mode of the camera application is the large and small window recording mode), the stream management module can continue to send the request to generate the large window data stream and the small window data stream to the camera HAL. In some embodiments of the present application, the stream management module sends the request to the camera HAL at a certain frequency (or time interval). For example, the stream management module sends the request to the camera HAL every 33 milliseconds.
[0306] Correspondingly, the camera HAL may receive a request sent by the stream management module to generate a large window data stream and a small window data stream.
[0307] S608: The camera HAL processes the original image data based on the image effect matching the large window data stream and the image effect matching the small window data stream, respectively, to obtain large window image data and small window image data.
[0308] According to the foregoing, after the camera is started, it can continuously collect raw image data and send the collected raw image data to the camera HAL. It can be understood that after the camera HAL receives the request for generating a large window data stream and a small window data stream sent by the stream management module, it can process the raw image data based on the image effect matching the large window data stream to obtain the large window image data, and can also process the raw image data based on the image effect matching the small window data stream to obtain the small window image data.
[0309] S609: The camera HAL sends the large window image data to the first encoder.
[0310] It can be understood that after the camera HAL processes the original image data and obtains the large-window image data, the large-window image data can be sent to the first encoder.
[0311] Correspondingly, the first encoder can receive the large window image data sent by the camera HAL.
[0312] S610: The camera HAL sends the small window image data to the second encoder.
[0313] It can be understood that after the camera HAL processes the original image data and obtains the small window image data, the small window image data can be sent to the second encoder.
[0314] Correspondingly, the second encoder can receive the small window image data sent by the camera HAL.
[0315] It is understandable that the present application does not limit the order in which the electronic device executes step S609 and step S610.
[0316] S611: The first encoder encodes the large window image data to obtain encoded large window image data, and writes the encoded large window image data into the large window video file.
[0317] It is understandable that the first encoder can receive the large window image data sent by the camera HAL. After the first encoder is started, the large window image data can be encoded. According to the above, the first encoder is associated with the large window data stream and the large window video file. Therefore, the first encoder can write the encoded large window image data into the large window video file.
[0318] It is understandable that the large window image data encoded by the first encoder can constitute the original video. Exemplarily, the frequency at which the first encoder writes the encoded large window image data to the large window video file can be 30 times per second. Correspondingly, the frame rate of the original video can be 30fps. The full name of fps in English is Frames per Second, which means the number of frames displayed per second. Of course, the frequency at which the first encoder writes the encoded large window image data to the large window video file can also be other values, and this application does not limit this.
[0319] S612: The second encoder encodes the small window image data to obtain encoded small window image data, and writes the encoded small window image data into the small window video file.
[0320] It is understandable that the second encoder can receive the small window image data sent by the camera HAL. After the second encoder is started, the small window image data can be encoded. According to the above, the second encoder is associated with the small window data stream and the small window video file. Therefore, the second encoder can write the encoded small window image data into the small window video file.
[0321] It is understandable that the small window image data encoded by the second encoder can constitute a close-up video. Similar to the first encoder, illustratively, the frequency at which the second encoder writes the encoded small window image data into the small window video file can also be 30 times per second. Correspondingly, the frame rate of the close-up video can be 30fps. Of course, the frequency at which the second encoder writes the encoded small window image data into the small window video file can also be other values, and this application does not limit this.
[0322] It is understandable that the present application does not limit the order of step S611 and step S612.
[0323] (2) First open the large window recording, then open the small window recording (such as Figure 6B (shown)
[0324] S613: The camera mode module receives a request to start large window recording.
[0325] After the electronic device enters the focus tracking mode, the user can trigger large window recording. Correspondingly, the camera mode module can receive a request to start large window recording.
[0326] For example, after the electronic device enters the focus tracking mode, it can display the following Figure 2D The user interface 400 shown. The user can click the recording start control 302 included in the user interface 400, and accordingly, the camera mode module in the electronic device can receive a request to start large window recording. In response to the request to start large window recording, the electronic device can start large window recording. It is understandable that the user can also trigger the electronic device to perform large window recording by voice, gesture, etc.
[0327] S614: The camera mode module sends a prompt message to start large-window recording to the encoding control module.
[0328] It is understandable that after the camera mode module receives the request to start large window recording, it can send a prompt message to the encoding control module to start large window recording. The prompt message can also be understood as the mode change information of the camera application changing from the large window preview mode in the focus tracking mode to the large window recording mode in the focus tracking mode. Large window preview means that the preview large window is in the preview state. Large window recording means that the preview large window is in the recording state.
[0329] Correspondingly, the encoding control module can receive the prompt information for starting large window recording sent by the camera mode module.
[0330] S615: The encoding control module sends a request to start the first encoder to the first encoder.
[0331] It is understandable that the specific implementation of step S615 can refer to step S602 and will not be repeated here.
[0332] S616: The first encoder starts.
[0333] It can be understood that after the first encoder receives the request for starting the first encoder sent by the encoding control module, the first encoder can be started.
[0334] S617: The camera mode module sends a prompt message to start large window recording to the stream management module.
[0335] It is understandable that after receiving the request to start large window recording, the camera mode module can send a prompt message to the stream management module to start large window recording of the camera application.
[0336] It is understandable that the present application does not limit the order of step S614 and step S617.
[0337] Correspondingly, the stream management module may receive a prompt message for starting large window recording sent by the camera mode module.
[0338] S618: The stream management module sends a request to generate a large window data stream to the camera HAL.
[0339] It can be understood that the stream management module can send a request to generate a large window data stream to the camera FWK, and then the camera FWK can send the request to the camera HAL.
[0340] It should be noted that when the camera mode does not change (i.e., the mode of the camera application is the large window recording mode in the focus tracking mode), the stream management module can continue to send the request to generate the large window data stream to the camera HAL. In some embodiments of the present application, the stream management module sends the request to the camera HAL at a certain frequency (or time interval). For example, the stream management module sends the request to the camera HAL every 33 milliseconds.
[0341] Correspondingly, the camera HAL may receive a request for generating a large window data stream sent by the stream management module.
[0342] S619: The camera HAL processes the original image data based on the image effect matching the large window data stream to obtain large window image data.
[0343] According to the foregoing, after the camera is started, it can continuously collect raw image data and send the collected raw image data to the camera HAL. It can be understood that after the camera HAL receives the request to generate a large window data stream sent by the stream management module, it can process the raw image data based on the image effect matching the large window data stream to obtain the large window image data.
[0344] S620: The camera HAL sends the large window image data to the first encoder.
[0345] It can be understood that after the camera HAL processes the original image data and obtains the large-window image data, the large-window image data can be sent to the first encoder.
[0346] Correspondingly, the first encoder can receive the large window image data sent by the camera HAL.
[0347] S621: The first encoder encodes the large window image data to obtain encoded large window image data, and writes the encoded large window image data into the large window video file.
[0348] It is understandable that the specific implementation method of step S621 can refer to step S611 and will not be repeated here.
[0349] S622: The camera mode module receives a request to display a small window.
[0350] When recording with a large window in the focus tracking mode, the user can trigger the focus tracking of the subject displayed in the large window, thereby triggering the display of the small window and starting the small window recording. Correspondingly, the camera mode module can receive a request to display the small window.
[0351] For example, when the electronic device performs large window recording in the focus tracking mode, the following display may be displayed: Figure 2P The user can click on the human frame 404 included in the user interface 1600, and accordingly, the camera mode module in the electronic device can receive a request to display a small window. In response to receiving the request to display a small window, the electronic device can determine that the person framed by the human frame 404 (i.e., person R3) is the focus target, and perform small window recording based on the large window recording. In the subsequent recording process, the electronic device can display the following Figure 2Q User interface 1700 is shown.
[0352] S623: The camera mode module sends a request to display a small window to the display module.
[0353] It is understandable that after receiving the request to display the small window, the camera mode module can send a request to display the small window to the display module.
[0354] Correspondingly, the display module may receive a request for displaying a small window sent by the camera mode module.
[0355] S624: The display module displays a small window.
[0356] After the display module receives the request to display the small window sent by the camera mode module, it can display the preview small window (i.e., small window). It can be understood that the image displayed in the small window is a preview image obtained by the camera HAL processing the original image data based on the image effect matching the small window data stream. The generation method of the preview image is not described in detail in this application.
[0357] S625: The camera mode module sends a prompt message to start small window recording to the encoding control module.
[0358] It is understandable that the electronic device is in the focus tracking mode and has turned on the large window recording. In this case, after the camera mode module receives the request to display the small window, it can send a prompt message to the encoding control module to start the small window recording. The prompt message can also be understood as the mode change information of the camera application changing from the large window recording mode in the focus tracking mode to the large and small window recording mode.
[0359] Correspondingly, the encoding control module can receive the prompt information sent by the camera mode module for the camera application to start small window recording.
[0360] S626: The encoding control module sends a request to start the second encoder to the second encoder.
[0361] It is understandable that the specific implementation of step S626 can refer to step S604 and will not be repeated here.
[0362] S627: The second encoder is started.
[0363] It can be understood that after the second encoder receives the request for starting the second encoder sent by the encoding control module, the second encoder can be started.
[0364] S628: The camera mode module sends a prompt message to start small window recording to the stream management module.
[0365] It is understandable that after receiving the request to display the small window, the camera mode module can send a prompt message to the stream management module to start recording the small window. It is understandable that the relevant description of step S628 can refer to step S625, which will not be repeated here.
[0366] It is understandable that the present application does not limit the order of step S625 and step S628.
[0367] S629: The stream management module sends a request to generate a large window data stream and a small window data stream to the camera HAL.
[0368] It is understandable that the relevant description of step S629 can refer to step S607 and will not be repeated here.
[0369] Correspondingly, the camera HAL may receive a request sent by the stream management module to generate a large window data stream and a small window data stream.
[0370] S630: The camera HAL processes the original image data based on the image effect matching the large window data stream and the image effect matching the small window data stream, respectively, to obtain the large window image data and the small window image data.
[0371] It is understandable that the relevant description of step S630 can refer to step S608 and will not be repeated here.
[0372] S631: The camera HAL sends the large window image data to the first encoder.
[0373] S632: The camera HAL sends the small window image data to the second encoder.
[0374] S633: The first encoder encodes the large window image data to obtain encoded large window image data, and writes the encoded large window image data into the large window video file.
[0375] S634: The second encoder encodes the small window image data to obtain encoded small window image data, and writes the encoded small window image data into the small window video file.
[0376] It is understandable that the relevant description of steps S631 to S634 can refer to steps S609 to S612, and will not be repeated here.
[0377] 3. End recording in the small preview window and continue recording in the large preview window (such as Figure 7 (shown)
[0378] It should be noted that after the camera is started (such as step S502), the original image data can be continuously collected and sent to the camera HAL (such as step S503).
[0379] S700: The camera mode module receives a request to end small window recording.
[0380] When both the small preview window and the large preview window are recording normally, the user can trigger the end of the small window video recording by clicking the recording end control on the small preview window. Accordingly, the camera mode module can receive a request to end the small window recording.
[0381] For example, the electronic device may display Figure 2J User interface 1000 is shown. The preview window 501 in the user interface 1000 includes a video recording end control 1003. The user can click the video recording end control 1003 included in the user interface 1000, and accordingly, the camera mode module in the electronic device can receive a request to end the small window recording. In response to the request to end the small window recording, the electronic device can end the recording of the preview window 501, that is, end the recording of the close-up video. The recording in the preview window 201 is not affected. It is understandable that the user can also trigger the end of the small window video recording by voice, gesture, etc.
[0382] S701: The camera mode module sends a prompt message to end the small window recording to the encoding control module.
[0383] After the camera mode module receives the request to end the small window recording, it can send a prompt message to the encoding control module to end the small window recording. The prompt message can also be understood as the mode change information of the camera application changing from the large and small window recording mode to the large window recording mode. For the relevant description of the large and small window recording, please refer to the previous text and will not be repeated here. The large window recording mode refers to the preview large window in the recording state.
[0384] Correspondingly, the encoding control module can receive the prompt information of ending the small window recording sent by the camera mode module.
[0385] S702: The encoding control module sends a request to stop the second encoder to the second encoder.
[0386] It is understandable that after the encoding control module receives the prompt information of ending the small window recording sent by the camera mode module, it can send a request to stop the second encoder to the second encoder. Specifically, the encoding control module can send the request to stop the second encoder to the media FWK, and then the media FWK sends the request to stop the second encoder to the second encoder via the Vendor warehouse.
[0387] Exemplarily, the request to stop the second encoder may include: codec-2.stop.
[0388] Correspondingly, the second encoder may receive a request to stop the second encoder sent by the encoding control module.
[0389] S703: The second encoder stops.
[0390] It is understandable that the second encoder may stop after receiving the request to stop the second encoder sent by the encoding control module.
[0391] S704: The encoding control module sends small window recording end information to the storage module.
[0392] In some embodiments of the present application, the small window recording end information may include the file name of the small window video file.
[0393] In some embodiments of the present application, the small window recording end information may also include the timestamp of the small window video file.
[0394] In some embodiments of the present application, the small window recording end information may be an end symbol. Of course, the small window recording end information may also be in other forms, such as text, characters, numbers, etc., which is not limited by the present application.
[0395] Correspondingly, the storage module can receive the small window recording end information sent by the encoding control module.
[0396] S705: The storage module saves the video in the small window video file and recreates the small window video file based on the current system time.
[0397] It is understandable that after the storage module receives the small window recording end information sent by the encoding control module, the video in the small window video file can be saved in the memory, and the small window video file can be recreated based on the current system time. Among them, the timestamp of the recreated small window video file is the third moment. It should be noted that the initial state of the small window video file recreated based on the current system time is empty (i.e., there is no data).
[0398] In some embodiments of the present application, the recreated small window video file may be video-3. The third moment is time-3.
[0399] It should be noted that, in this case, the encoding control module can determine the encoder parameters of the third encoder associated with the small window data stream and the recreated small window video file. The encoding control module can also send the encoder parameters of the third encoder to the encoder. The encoder can create a third encoder based on the encoder parameters of the third encoder. The relevant description of this part can refer to step S508, step S512-step S514, which will not be repeated here.
[0400] Exemplarily, the third encoder may be codec-3.
[0401] It is understandable that the electronic device can first end the small window recording and save the recorded video, and then end the large window recording and save the recorded video. The user can view multiple recorded videos in the gallery application. For example, the electronic device can display the following Figure 2N The user interface 1402 shown in (b) of FIG. 1402 may include a video 14021 and a video 14022. It is understood that the video 14021 is a video recorded in a large window (i.e., the original video), and the video 14022 is a video recorded in a small window (i.e., a close-up video). The duration of the video 14021 is 8 seconds, and the duration of the video 14022 is 5 seconds. That is, the duration of the video 14021 is longer than that of the video 14022.
[0402] S706: The camera mode module may send a prompt message to end the small window recording to the stream management module.
[0403] After receiving the request to end the small window recording, the camera mode module can send a prompt message to end the small window recording to the stream management module. It can be understood that the relevant description of step S706 can refer to step S701, which will not be repeated here.
[0404] It is understandable that the present application does not limit the order in which the electronic device executes step S701 and step S706.
[0405] S707: The stream management module generates a request for a large window data stream to the camera HAL.
[0406] It can be understood that the stream management module can send a request to generate a large window data stream to the camera FWK, and then the camera FWK can send the request to the camera HAL.
[0407] It should be noted that, when the camera mode does not change (the mode of the camera application is the large window recording mode), the stream management module can continue to send the request to generate the large window data stream to the camera HAL. In some embodiments of the present application, the stream management module sends the request to the camera HAL at a certain frequency (or time interval). For example, the stream management module sends the request to the camera HAL every 33 milliseconds.
[0408] Correspondingly, the camera HAL may receive a request for generating a large window data stream sent by the stream management module.
[0409] S708: The camera HAL processes the original image data based on the image effect matching the large window data stream to obtain large window image data.
[0410] According to the foregoing, after the camera is started, it can continuously collect raw image data and send the collected raw image data to the camera HAL. It can be understood that after the camera HAL receives the request to generate a large window data stream sent by the stream management module, it can process the raw image data based on the image effect matching the large window data stream to obtain the large window image data.
[0411] S709: The camera HAL sends the large window image data to the first encoder.
[0412] It can be understood that after the camera HAL processes the original image data and obtains the large-window image data, the large-window image data can be sent to the first encoder.
[0413] Correspondingly, the first encoder can receive the large window image data sent by the camera HAL.
[0414] S710: The first encoder encodes the large window image data to obtain encoded large window image data, and writes the encoded large window image data into a large window video file.
[0415] It is understandable that the relevant description of step S710 can refer to step S611 and will not be repeated here.
[0416] 4. Both the small preview window and the large preview window end recording (such as Figure 8 and Fig. 9 (shown)
[0417] (I) When both the small preview window and the large preview window are recording normally, end the large window recording. Figure 8 (shown)
[0418] like Fig. 6A and Figure 6B As shown in the flowchart, the electronic device can simultaneously record the small preview window and the large preview window. In this case, the user can trigger the end of the recording of the small preview window and the large preview window.
[0419] S800: The camera mode module receives a request to end both the large window recording and the small window recording.
[0420] When both the small preview window and the large preview window are recording normally, the user can trigger the end of the small window video recording and the large window video recording by clicking the video ending control corresponding to the large preview window. Accordingly, the camera mode module can receive a request to end the large window recording and the small window recording at the same time.
[0421] For example, the electronic device may display Figure 2J The user interface 1000 shown in FIG. 1 includes a recording end control 1004. The user can click the recording end control 1004, and accordingly, the camera mode module in the electronic device can receive a request to end the large window recording and the small window recording at the same time. In response to the request to end the large window recording and the small window recording at the same time, the electronic device can end the recording of the preview small window 501 and the preview window 201, that is, end the recording of the original video and the close-up video.
[0422] S801: The camera mode module sends a prompt message to the encoding control module to end the large window recording and the small window recording.
[0423] After the camera mode module receives a request to end both the large window recording and the small window recording, it can send a prompt message to the encoding control module to end both the large window recording and the small window recording. The prompt message can also be understood as a mode change message that the camera application changes from the large and small window recording mode to the preview mode. For the relevant description of the large and small window recording, please refer to the previous text and will not be repeated here. The preview mode may refer to the large preview window being in the video preview state, and the small preview window is not displayed.
[0424] Correspondingly, the encoding control module can receive the prompt information of ending the large window recording and the small window recording sent by the camera mode module.
[0425] S802: The encoding control module sends a request to stop the first encoder to the first encoder.
[0426] It is understandable that after the encoding control module receives the prompt information of ending the large window recording and the small window recording sent by the camera mode module, it can send a request to stop the first encoder to the first encoder. Specifically, the encoding control module can send the request to stop the first encoder to the media FWK, and then the media FWK sends the request to stop the first encoder to the first encoder via the Vendor warehouse.
[0427] Exemplarily, the request to stop the second encoder may include: codec-1.stop.
[0428] Correspondingly, the first encoder may receive a request to stop the first encoder sent by the encoding control module.
[0429] S803: The first encoder stops.
[0430] It can be understood that the first encoder can stop after receiving the request to stop the first encoder sent by the encoding control module.
[0431] S804: The encoding control module sends a request to stop the second encoder to the second encoder.
[0432] It is understood that the relevant description of step S804 can refer to step S702, and will not be repeated here. It is understood that the present application does not limit the order in which the electronic device executes step S802 and step S804.
[0433] S805: The second encoder stops.
[0434] It is understandable that the second encoder may stop after receiving the request to stop the second encoder sent by the encoding control module.
[0435] S806: The encoding control module sends large and small window recording end information to the storage module.
[0436] In some embodiments of the present application, the large and small window recording end information may include the file name of the large window video file and the file name of the small window video file.
[0437] In some embodiments of the present application, the large and small window recording end information may also include the timestamp of the large window video file and the timestamp of the small window video file.
[0438] In some embodiments of the present application, the large and small window recording end information may be an end symbol. Of course, the large and small window recording end information may also be in other forms, such as text, characters, numbers, etc., which is not limited by the present application.
[0439] Correspondingly, the storage module can receive the large and small window recording end information sent by the encoding control module.
[0440] S807: The storage module saves the videos in the large-window video file and the small-window video file respectively, and recreates the large-window video file and the small-window video file based on the current system time.
[0441] It is understandable that after the storage module receives the large and small window recording end information sent by the encoding control module, the video in the large window video file and the small window video file can be saved to the memory, and the large window video file and the small window video file can be recreated based on the current system time. The timestamp of the recreated small window video file is the third moment.
[0442] In some embodiments of the present application, when the storage module saves the video in the large window video file, the timestamp of the large window video file can be updated to the fourth moment. In some embodiments of the present application, the timestamp of the large window video file is the same as the timestamp of the video in the large window video file. The fourth moment is the current system time.
[0443] It is understandable that the fourth moment is later than the third moment.
[0444] In some embodiments of the present application, the fourth time is time-4.
[0445] For example, in the large and small window recording mode, the user can trigger the end of the small window recording and then trigger the start of the small window recording. Once the recording of the large window and the small window is completed, the storage module can save the large window video file and the recreated small window video file. The corresponding relationship between the file name and the timestamp is shown in Table 2:
[0446] Table 2
[0447] file name Timestamp video-1 time-4 video-3 time-3
[0448] For example, in the large and small window recording mode, there is no situation where the large window recording is triggered to end separately. Once the recording of the small window and the large window is ended, the storage module can save the large window video file and the small window video file. The correspondence between the file name and the timestamp can be referred to in Table 3, which will not be repeated here.
[0449] Table 3
[0450] file name Timestamp video-1 time-4 video-2 time-2
[0451] It is understandable that the electronic device can end the large window recording and the small window recording at the same time, and save the recorded videos. The user can view the multiple recorded videos in the gallery application. For example, the electronic device can display the following Figure 2N The user interface 1401 shown in (a) of FIG. 1401 may include a video 14011 and a video 14012. It can be understood that the video 14011 is a video recorded in a large window (i.e., the original video), and the video 14012 is a video recorded in a small window (i.e., a close-up video). The duration of the video 14011 and the duration of the video 14012 are both 3 seconds. That is, the duration of the video 14011 is the same as the duration of the video 14012.
[0452] (ii) When the small preview window ends recording and the large preview window is recording normally, end the large window recording. Fig. 9 (shown)
[0453] like Figure 7As shown in the flowchart, after the electronic device finishes recording the preview small window, it can continue recording the preview large window. In this case, the user can trigger the end of recording the preview large window.
[0454] S900: The camera mode module receives a request to end large window recording.
[0455] When the small preview window ends recording and the large preview window is recording normally, the user can trigger the end of the large window video recording by clicking the video end control corresponding to the large preview window. Accordingly, the camera mode module can receive a request to end the large window recording.
[0456] For example, the electronic device may display Figure 2J The user interface 1000 shown in FIG. 1000 includes a preview window 501 including a recording end control 1003. The electronic device can detect a user operation on the recording end control 1003. In response to the user operation, the electronic device can end the recording of the preview window 501 and display the video as shown in FIG. Figure 2P The user interface 1600 shown. The user interface 1600 may include a recording end control 1004. The user may click the recording end control 1004, and the camera mode module in the electronic device may receive a request to end the large window recording. In response to the request to end the large window recording, the electronic device may end the recording of the preview window 201.
[0457] S901: The camera mode module sends a prompt message to end the large window recording to the encoding control module.
[0458] After receiving the request to end the large window recording, the camera mode module can send a prompt message to end the large window recording to the encoding control module. The prompt message can also be understood as the mode change information of the camera application changing from the large window recording mode to the preview mode.
[0459] Correspondingly, the encoding control module can receive the prompt information of ending the large window recording sent by the camera mode module.
[0460] S902: The encoding control module sends a request to stop the first encoder to the first encoder.
[0461] It is understandable that the relevant description of step S902 can refer to step S802 and will not be repeated here.
[0462] S903: The first encoder stops.
[0463] It is understandable that the relevant description of step S903 can refer to step S803, which will not be repeated here.
[0464] S904: The encoding control module sends large window recording end information to the storage module.
[0465] In some embodiments of the present application, the large window recording end information may include the file name of the large window video file.
[0466] In some embodiments of the present application, the large window recording end information may also include the timestamp of the large window video file.
[0467] In some embodiments of the present application, the large window recording end information may be an end symbol. Of course, the large window recording end information may also be in other forms, such as text, characters, numbers, etc., which is not limited in the present application.
[0468] Correspondingly, the storage module can receive the large window recording end information sent by the encoding control module.
[0469] S905: The storage module saves the video in the large window video file and recreates the large window video file based on the current system time.
[0470] It is understandable that after the storage module receives the large window recording end information sent by the encoding control module, the video in the large window video file can be saved in the memory, and the large window video file can be recreated based on the current system time.
[0471] In some embodiments of the present application, when the storage module saves the video in the large-window video file, the timestamp of the large-window video file can be updated to the current system time.
[0472] It is understandable that the electronic device can first end the small window recording and save the recorded video, and then end the large window recording and save the recorded video. The user can view multiple recorded videos in the gallery application. For example, the electronic device can display the following Figure 2N The user interface 1402 shown in (b) of FIG. 1402 may include a video 14021 and a video 14022. It is understood that the video 14021 is a video recorded in a large window (i.e., the original video), and the video 14022 is a video recorded in a small window (i.e., a close-up video). The duration of the video 14021 is 8 seconds, and the duration of the video 14022 is 5 seconds. That is, the duration of the video 14021 is longer than that of the video 14022.
[0473] A shooting method provided by an embodiment of the present application is introduced below.
[0474] See also Fig.10 , Fig.10 A flowchart of a shooting method provided in an embodiment of the present application. The shooting method can be applied to an electronic device having a camera and a display screen. The shooting method may include but is not limited to the following steps:
[0475] S1001: The electronic device displays a first interface, wherein the first interface includes a first window, the first window displays an image captured by a camera, and the image displayed in the first window includes one or more first objects.
[0476] The electronic device may display a first interface on a display screen. The first interface may include a first window. The first window may display an image captured by a camera. The image displayed in the first window may include one or more first objects.
[0477] It is understandable that the first interface may be an interface displayed before the electronic device enters the focus tracking mode, or may be an interface displayed after the electronic device enters the focus tracking mode. Figure 2C The user interface 300 shown. Exemplarily, the first interface can be Figure 2D User interface 400 is shown.
[0478] In a possible implementation, the first object may be a person. For example, Figure 2D As shown, the one or more first objects included in the image displayed in the first window may be the characters R1, R2 and R3 displayed in the preview window 201. In another possible implementation, the first object may also be an animal, a plant, etc., and the present application does not limit the specific type of the first object.
[0479] It is understandable that the electronic device can identify the first object included in the image displayed in the first window by using a detection algorithm (eg, a human body detection algorithm). The relevant description of the detection algorithm can be referred to in relevant technical documents, which will not be elaborated here.
[0480] It is understandable that the first window may be the preview large window / large window in the above embodiment. Exemplarily, the first window may be the preview window 201 .
[0481] S1002: The electronic device selects a second object from one or more first objects.
[0482] The user can trigger the electronic device to select the second object by clicking, voice, gesture, etc. Specifically, the electronic device can receive a request to select the second object, and in response to the request, the electronic device can select the second object from one or more first objects included in the image displayed in the first window. The electronic device can use the selected second object as the focus tracking object.
[0483] For example, Figure 2DAs shown, the user can click on the human body frame 403, and accordingly, the electronic device can receive a request to select the person R2. In response to the request, the electronic device can select the person R2 from the persons R1, R2 and R3 included in the image displayed in the preview window 201, and use it as the focus object.
[0484] S1003: while displaying the first window on the display screen, the electronic device also displays a second window, and the image displayed in the second window includes a second object.
[0485] It is understandable that the electronic device can display a second window on the display screen while displaying the first window on the display screen, wherein the image displayed in the second window can include the second object.
[0486] In a possible implementation, the first window and the second window may be displayed in split screen.
[0487] In another possible implementation, the second window may be displayed on top of the first window but does not completely cover the first window. Figure 2E As shown, the small preview window 501 is displayed on the preview window 201 , but the small preview window 501 does not completely cover the preview window 201 .
[0488] It should be noted that the second window may be a small preview window / small window. Exemplarily, the second window may be a small preview window 501.
[0489] S1004: The electronic device records the image in the first window to generate a first video, and records the image in the second window to generate a second video, through the first encoder and the second encoder.
[0490] It is understandable that the electronic device can record the images in the first window and the second window through the first encoder and the second encoder. The electronic device can record the image in the first window through the first encoder to generate the first video, and record the image in the second window through the second encoder to generate the second video.
[0491] It is understandable that the first video may be an original video, and the second video may be a close-up video of the second object. Figure 2N The video 14011 shown in a in the figure, the second video can be Figure 2N 14012 shown in a of FIG. 14012. For example, the first video may be Figure 2N The video 14021 shown in b in the figure, the second video can be Figure 2N Video 14022 shown in b.
[0492] Fig.11 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application.
[0493] The electronic device may include a processor 110 , an external memory interface 120 , an internal memory 121 , an audio module 130 , a speaker 130A, a receiver 130B, a microphone 130C, an earphone interface 130D, a display screen 140 , a camera 150 , and a touch sensor 160 .
[0494] The structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. The interface connection relationship between the modules illustrated in the embodiments of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device.
[0495] 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 processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. A memory may also be provided in the processor 110 for storing instructions and data.
[0496] The electronic device implements the display function through the GPU, the display screen 140, and the application processor.
[0497] The GPU is a microprocessor for image processing, which is connected to the display screen 140 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information. The display screen 140 is used to display images, videos, etc. In some embodiments, the electronic device may include 1 or N display screens 140, where N is a positive integer greater than 1.
[0498] In the embodiment of the present application, the electronic device displays the original image captured by the camera, the close-up image of the protagonist determined by focus tracking, and Figure 2A-Figure 2X The capabilities of the user interface shown rely on the display functions provided by the GPU, display screen 140, and application processor described above.
[0499] The electronic device can realize the shooting function through the ISP, the camera 150, the video codec, the GPU, the display screen 140 and the application processor.
[0500] The camera 150 is used to capture still images or videos. The ISP is used to process the data fed back by the camera 150. Light is transmitted to the camera photosensitive element through the lens, and the light signal is converted into an electrical signal. The camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The electronic device may include 1 or N cameras 150, where N is a positive integer greater than 1. The video codec is used to compress or decompress digital video. The electronic device may support one or more video codecs. In this way, the electronic device can play or record videos in multiple encoding formats, such as: Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0501] In the embodiment of the present application, the electronic device implements the shooting method provided in the embodiment of the present application, which first relies on the ISP and the image captured by the camera 150, and secondly relies on the video codec and the image calculation and processing capabilities provided by the GPU.
[0502] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data. The non-volatile memory can also store executable programs and store user and application data, etc., and can be loaded into the random access memory in advance for direct reading and writing by the processor 110.
[0503] In the embodiment of the present application, the code for implementing the shooting method described in the embodiment of the present application may be stored in a non-volatile memory. When running the camera application, the electronic device may load the executable code stored in the non-volatile memory into the random access memory.
[0504] The external memory interface 120 may be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device.
[0505] The electronic device can implement audio functions through the audio module 130, the speaker 130A, the receiver 130B, the microphone 130C, the headphone interface 130D, and the application processor.
[0506] The audio module 130 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The speaker 130A, also called "speaker", is used to convert audio electrical signals into sound signals. The receiver 130B, also called "earpiece", is used to convert audio electrical signals into sound signals. The microphone 130C, also called "microphone", "microphone", is used to convert sound signals into electrical signals. The headphone interface 130D is used to connect wired headphones.
[0507] In the embodiment of the present application, when the electronic device enables the camera to collect images, it can also enable the microphone 130C to collect sound signals, and convert the sound signals into electrical signals and store them. In this way, the user can obtain a video with sound.
[0508] The touch sensor 160 is also called a "touch control device". The touch sensor 160 can be arranged on the display screen 140. The touch sensor 160 and the display screen 140 form a touch screen, also called a "touch control screen". The touch sensor 160 is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 140. In other embodiments, the touch sensor 160 can also be arranged on the surface of the electronic device, which is different from the position of the display screen 140.
[0509] In the embodiment of the present application, the electronic device can use the touch sensor 160 to detect the user's click, slide and other operations on the display screen 140 to achieve Figure 2A-Figure 2X The shooting method shown.
[0510] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A shooting method, applied to an electronic device, wherein the electronic device has a camera, a display screen, a first encoder and a second encoder, characterized in that: The method comprises: Displaying a first interface, the first interface including a first window, the first window displaying an image captured by the camera, the image displayed in the first window including one or more first objects; selecting a second object among the one or more first objects; While displaying the first window on the display screen, a second window is also displayed, wherein the image displayed in the second window includes the second object; The first encoder and the second encoder are used to record images in the first window to generate a first video, and to record images in the second window to generate a second video.
2. The method according to claim 1, characterized in that After displaying the second window, the method further includes: Upon receiving an operation of starting recording, the first encoder is started, and the second encoder is started.
3. The method according to claim 1, characterized in that Before selecting the second object from the one or more first objects, the method further includes: receiving an operation to start recording, starting the first encoder; After selecting the second object from the one or more first objects, the method further includes: starting the second encoder.
4. The method according to any one of claims 1 to 3, characterized in that: The first interface further includes a first control, and the first control is used to start the focus tracking mode; after displaying the first interface, the method further includes: An operation acting on the first control is received, the first encoder is created, and the second encoder is created.
5. The method according to any one of claims 1 to 4, characterized in that: The step of recording the image in the first window to generate a first video and recording the image in the second window to generate a second video by using the first encoder and the second encoder specifically includes: After starting the first encoder, the image in the first window is recorded by the first encoder to generate the first video, and after starting the second encoder, the image in the second window is recorded by the second encoder to generate the second video.
6. The method according to any one of claims 1 to 5, characterized in that: After recording the image in the first window to generate the first video and recording the image in the second window to generate the second video by the first encoder and the second encoder, the method further includes: When an operation to end recording is received, encoding of the first encoder and encoding of the second encoder are stopped, and the first video and the second video are generated; the time when recording of the first video ends is the same as the time when recording of the second video ends.
7. The method according to claim 5, characterized in that After starting the second encoder, and recording the image in the second window by the second encoder to generate the second video, the method further includes: An end recording operation acting on the second window is received, the second window is closed, encoding of the second encoder is stopped, and the second video is generated.
8. The method according to claim 7, characterized in that After generating the second video, the method further includes: An operation of ending recording on the first window is received, encoding of the first encoder is stopped, and the first video is generated; the end recording time of the first video is later than the end recording time of the second video.
9. The method according to claim 7, characterized in that After generating the second video, the method further includes: Selecting a third object from the one or more first objects and creating a third encoder, the third object being the same as or different from the second object; While displaying the first window on the display screen, redisplaying the second window; The third encoder is started, and the image in the second window is recorded by the third encoder to generate a third video.
10. The method according to claim 9, characterized in that After recording the image in the second window by the third encoder to generate a third video, the method further includes: When an operation to end recording is received, encoding of the first encoder and encoding of the third encoder are stopped, and the first video and the third video are generated; the start recording time of the first video is earlier than the start recording time of the third video, and the end recording time of the first video is the same as the end recording time of the third video.
11. The method according to any one of claims 1 to 10, characterized in that: A selection box is displayed on the one or more first objects, and selecting the second object from the one or more first objects specifically includes: receiving an operation on the first selection box, and determining the first object corresponding to the first selection box as the second object.
12. The method according to any one of claims 1 to 11, characterized in that: The image displayed in the second window includes the second object, and specifically includes: a close-up object of the second object is displayed in the second window.
13. The method according to any one of claims 1 to 12, characterized in that: During the recording process, the method further includes: selecting a fourth object among the one or more first objects, the fourth object being different from the second object; The close-up image of the fourth object is displayed in the second window.
14. The method according to any one of claims 1 to 13, characterized in that: The electronic device includes a camera HAL; and the step of recording the image in the first window to generate a first video and recording the image in the second window to generate a second video by using the first encoder and the second encoder specifically includes: The camera HAL processes the original image data based on an image effect matching the first data stream to obtain first image data, and processes the original image data based on an image effect matching the second data stream to obtain second image data; the first data stream is a data stream corresponding to the first window; the second data stream is a data stream corresponding to the second window; The camera HAL sends the first image data to the first encoder, and sends the second image data to the second encoder; The first encoder encodes the first image data to obtain first encoded image data, and writes the first encoded image data into a first video file; the first video file is used to store the first video; The second encoder encodes the second image data to obtain second encoded image data, and writes the second encoded image data into a second video file; the second video file is used to store the second video.
15. The method according to any one of claims 7 to 10, characterized in that: The electronic device includes a camera mode module, an encoding control module and a storage module; after receiving the end recording operation acting on the second window, the method further includes: the camera mode module sends a first prompt message to the encoding control module; the first prompt message is used to prompt the end of recording of the second window; The stopping the encoding of the second encoder and generating the second video specifically includes: The encoding control module sends a stop request to the second encoder; The second encoder stops encoding the image data in the second data stream; The encoding control module sends a first end message to the storage module; the first end message is used to prompt the end of recording of the second window; The storage module saves the second video in the second video file and generates a third video file based on the current system time; the third video file is used to store the video obtained by encoding the image data in the second data stream.
16. The method according to claim 8, characterized in that The electronic device includes an encoding control module and a storage module; the step of stopping encoding of the first encoder and generating the first video specifically includes: The encoding control module sends a stop request to the first encoder; The first encoder stops encoding the image data in the first data stream; The storage module saves the first video in the first video file and generates a fourth video file based on the current system time; the fourth video file is used to store the video obtained by encoding the image data in the first data stream.
17. The method according to claim 9 or 10, characterized in that The electronic device comprises a camera mode module, an encoding control module and a camera HAL; After selecting a third object from the one or more first objects and creating a third encoder, the method further includes: The camera mode module sends a second prompt message to the encoding control module; the second prompt message is used to prompt the second window to restart recording; The starting of the third encoder specifically includes: the encoding control module sending a start request to the third encoder; the third encoder starts; The step of recording the image in the second window by the third encoder to generate a third video specifically includes: The camera HAL processes the original image data based on an image effect matching the second data stream to obtain second image data, and sends the second image data to the third encoder; The third encoder encodes the second image data to obtain second encoded image data, and writes the second encoded image data into a third video file; the third video file is used to store the third video; the generation time of the third video file is later than the generation time of the file used to store the second video.
18. The method according to claim 10, characterized in that The electronic device comprises a camera mode module, an encoding control module and a storage module; after receiving the operation of ending recording, the method further comprises: the camera mode module sends a third prompt message to the encoding control module; the third prompt message is used to prompt the first window and the second window to end recording; The stopping the encoding of the first encoder and the encoding of the third encoder, and generating the first video and the third video specifically includes: The encoding control module sends a stop request to the first encoder and sends a stop request to the third encoder; The first encoder stops encoding the image data in the first data stream; The third encoder stops encoding the image data in the second data stream; The encoding control module sends a second end message to the storage module; the second end message is used to prompt the first window and the second window to end recording; The storage module saves the first video in the first video file and the third video in the third video file, and generates a fourth video file and a fifth video file based on the current system time; the fourth video file is used to store the video obtained by encoding the image data in the first data stream; the fifth video file is used to store the video obtained by encoding the image data in the second data stream.
19. The method according to claim 6, characterized in that The electronic device comprises a camera mode module, an encoding control module and a storage module; after receiving the operation of ending recording, the method further comprises: the camera mode module sends a third prompt message to the encoding control module; the third prompt message is used to prompt the first window and the second window to end recording; The stopping the encoding of the first encoder and the encoding of the second encoder, and generating the first video and the second video specifically includes: The encoding control module sends a stop request to the first encoder and sends a stop request to the second encoder; The first encoder stops encoding the image data in the first data stream; The second encoder stops encoding the image data in the second data stream; The encoding control module sends a second end message to the storage module; the second end message is used to prompt the first window and the second window to end recording; The storage module saves the first video in the first video file and the second video in the second video file, and generates a fourth video file and a third video file based on the current system time; the fourth video file is used to store the video obtained by encoding the image data in the first data stream; the third video file is used to store the video obtained by encoding the image data in the second data stream.
20. The method of claim 15, wherein: Before saving the second video in the second video file, the method further includes: the storage module updating the timestamp of the second video file to the current system time.
21. The method of claim 4, wherein: The electronic device includes an encoding control module and an encoder; the creating the first encoder and the creating the second encoder specifically include: The encoding control module determines a first encoding parameter and a second encoding parameter based on the stream allocation information and the file information; the first encoding parameter is an encoder parameter corresponding to the first encoder; the first encoder is associated with the first data stream and the first video file; the second encoding parameter is an encoder parameter corresponding to the second encoder; the second encoder is associated with the second data stream and the second video file; The encoding control module sends the first encoding parameter and the second encoding parameter to the encoder; The encoder creates the first encoder based on the first encoding parameters, and creates the second encoder based on the second encoding parameters.
22. The method according to claim 4 or 21, characterized in that The electronic device includes a stream management module, a storage module, an encoding control module and a camera HAL; after receiving the operation acting on the first control, the method further includes: The stream management module configures the first data stream and the second data stream, and sends the stream allocation information to the encoding control module; the storage module generates the first video file and the second video file respectively based on the current system time, and sends the file information to the encoding control module; the file information includes the file identifier of the first video file and the file identifier of the second video file; The stream management module sends the stream allocation information to the camera HAL; The camera HAL determines an image effect matching the first data stream and an image effect matching the second data stream based on the stream allocation information.
23. An electronic device comprising a camera, a display screen, a memory, and one or more processors, characterized in that: The memory is used to store a computer program; the processor is used to call the computer program so that the electronic device executes the method described in any one of claims 1-22.
24. A computer storage medium, characterized in that include: Computer instructions; when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 22.
