Image generation method and device, electronic equipment and readable storage medium
By dynamically adjusting the frame rate of image acquisition and determining the second frame rate based on the degree of change in the image, the problem of high computational resource consumption in the generation of blurred images in existing technologies is solved, thereby reducing power consumption and saving resources.
Patent Information
- Application Number
- CN202510736605.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2045-06-03
AI Technical Summary
Existing technologies consume a lot of computational resources and have high power consumption when generating blurred images, which leads to a decrease in system performance.
By dynamically adjusting the frame rate of image acquisition and determining the second frame rate based on the degree of change in the image, the frame rate of the second image sequence is reduced, thereby reducing the computational resource consumption of the blurring process.
While maintaining the desired blurring effect, overall power consumption was reduced, thus minimizing the consumption of computing resources.
Smart Images

Figure CN120602770B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image acquisition technology, and more specifically, to an image generation method, apparatus, electronic device, and readable storage medium. Background Technology
[0002] Currently, with the development of electronic information technology, electronic devices can preview and display images with blurred backgrounds when taking photos. However, generating and displaying blurred images using algorithms currently requires significant computing resources and consumes a lot of power. Summary of the Invention
[0003] This application discloses an image generation method, apparatus, electronic device, and readable storage medium.
[0004] In a first aspect, embodiments of this application provide an image generation method, comprising: acquiring a first image sequence and a second image sequence at a first frame rate, wherein the first image sequence and the second image sequence have corresponding shooting parameters; determining a second frame rate based on the degree of image change in the first image sequence and the first frame rate, wherein the second frame rate is positively correlated with the degree of image change, and wherein the second frame rate is less than or equal to the first frame rate; determining a third image sequence from the second image sequence based on the second frame rate; and performing a blurring process on the first image sequence using the third image sequence to obtain a target image sequence for preview display.
[0005] Secondly, embodiments of this application also provide an image generation apparatus, including: an acquisition unit, a first determination unit, a second determination unit, and a preview unit. The acquisition unit is used to acquire a first image sequence and a second image sequence at a first frame rate, wherein the first image sequence and the second image sequence have corresponding shooting parameters; the first determination unit is used to determine a second frame rate based on the degree of image change in the first image sequence and the first frame rate, wherein the second frame rate is positively correlated with the degree of image change, and wherein the second frame rate is less than or equal to the first frame rate; the second determination unit is used to determine a third image sequence from the second image sequence based on the second frame rate; and the preview unit is used to blur the first image sequence using the third image sequence to obtain a previewed target image sequence.
[0006] Thirdly, embodiments of this application also provide an electronic device, including: one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more application programs are configured to perform the method described in the first aspect.
[0007] Fourthly, embodiments of this application also provide a computer-readable storage medium storing program code that can be invoked by a processor to execute the method described in the first aspect above.
[0008] The image generation method, apparatus, electronic device, and readable storage medium provided in this application first acquire a first image sequence and a second image sequence at a first frame rate, wherein the first image sequence and the second image sequence have corresponding shooting parameters; then, a second frame rate is determined based on the degree of image change in the first image sequence and the first frame rate, wherein the second frame rate is positively correlated with the degree of image change, and wherein the second frame rate is less than or equal to the first frame rate; then, a third image sequence is determined from the second image sequence based on the second frame rate; thereby, the first image sequence is blurred using the third image sequence to obtain a target image sequence for preview display. In the image generation method provided in this application, the third image sequence used for blurring the first image can be dynamically adjusted according to the degree of image change. Specifically, the third image sequence can be determined by the second frame rate, which is positively correlated with the degree of image change. Therefore, when the degree of image change is high, a higher second frame rate can be determined to ensure the effect and quality of subsequent blurring processing, while when the degree of image change is low, a lower second frame rate can be determined to reduce resource consumption during blurring processing and reduce overall power consumption.
[0009] Other features and advantages of the embodiments of this application will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the embodiments of this application. The objects and other advantages of the embodiments of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 The following diagram illustrates an application scenario of the image generation method provided in this application embodiment; Figure 2 A flowchart of the image generation method provided in an embodiment of this application is shown; Figure 3 A schematic diagram of metastable events provided in an embodiment of this application is shown; Figure 4A flowchart of an image generation method according to another embodiment of this application is shown; Figure 5 A schematic diagram of a frame image provided in an embodiment of this application is shown; Figure 6 A schematic diagram of a frame image provided in another embodiment of this application is shown; Figure 7 A structural block diagram of the electronic device provided in an embodiment of this application is shown; Figure 8 A structural block diagram of an electronic device provided in another embodiment of this application is shown; Figure 9 A structural block diagram of the image generation apparatus provided in an embodiment of this application is shown; Figure 10 This paper shows a structural block diagram of yet another electronic device provided in an embodiment of this application; Figure 11 A structural block diagram of a computer-readable storage medium provided in an embodiment of this application is shown. Detailed Implementation
[0012] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of them. The components of the embodiments of the present application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without inventive effort are within the scope of protection of the present application.
[0013] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0014] Currently, with the development of electronic information technology, electronic devices can preview and display blurred images when taking photos. However, generating blurred images for previewing using algorithms currently consumes a lot of computing resources and consumes a lot of power. How to reduce the required computing resources and power consumption is an urgent problem to be solved.
[0015] Currently, images can be acquired using image acquisition components configured in electronic devices, and then blurred using algorithms for preview display. Specifically, image blurring can be achieved by having dual image sensors work in parallel and in conjunction with the processing pipeline in an image signal processor (ISP).
[0016] However, the inventors discovered in their research that current bokeh processing methods require dual image sensors to acquire images at the same frame rate, and each frame needs to be processed subsequently, which consumes a lot of computing resources and leads to a significant increase in system power consumption.
[0017] Therefore, in order to solve or partially solve the above problems, this application provides an image generation method, apparatus, electronic device, and readable storage medium.
[0018] Please see Figure 1 , Figure 1 This illustration shows an application scenario diagram of the image generation method provided in this application, namely image generation scenario 100. Image generation scenario 100 may include an electronic device 110 and a user 120. Figure 1 The electronic device 110 shown is a smartphone. The user 120 holds the electronic device 110 and acquires an image sequence through the image acquisition component configured in the electronic device 110. The image sequence is then blurred to preview and display the blurred image sequence in the electronic device 110. For a detailed description, please refer to the following method embodiments.
[0019] For example, the user 120 can take a selfie using the front-facing camera of the electronic device 110 to blur the captured image sequence and preview it; the user 120 can also take pictures of other objects using the rear-facing camera of the electronic device 110, such as specific objects, surrounding scenery, people, etc., which are not specifically limited in this application embodiment.
[0020] Please see Figure 2 , Figure 2 A flowchart illustrating an image generation method provided in an embodiment of this application is shown. This image generation method can be applied to... Figure 1 The electronic device in the illustrated image generation scenario can specifically use its processor as the execution entity for the image generation method. The image generation method may include steps S110 to S140.
[0021] Step S110: Acquire a first image sequence and a second image sequence at a first frame rate, wherein the first image sequence and the second image sequence are captured with corresponding shooting parameters.
[0022] It is understood that electronic devices can be configured with image acquisition components, which can acquire image sequences. In the embodiments provided in this application, a first image sequence and a second image sequence can be acquired by the image acquisition component. Both the first and second image sequences are acquired at a first frame rate.
[0023] For example, if the first frame rate is 24, then the frame rate of both the first image sequence and the second image sequence is 24 frames.
[0024] Optionally, the image acquisition component may include two sub-components. For example, a first sub-component may acquire a first image sequence at a first frame rate, and a second sub-component may acquire a second image sequence at a second frame rate. Specifically, for example, the first sub-component may include a camera as a main camera, and the second sub-component may include a camera as a secondary camera. Each sub-component may include one or more cameras, which can be flexibly adjusted as needed, and this application embodiment does not impose specific limitations.
[0025] Optionally, the image acquisition component may also include only one set of cameras, which can acquire multiple frames of images, and thus the first image sequence and the second image sequence can be acquired through the image acquisition component.
[0026] It should be noted that in the embodiments of this application, the first image sequence can be regarded as the main image sequence, and the second image sequence can be regarded as the sub-image sequence.
[0027] Furthermore, the acquired first image sequence corresponds to the shooting parameters of the second image sequence. These shooting parameters may include timestamps, Auto Exploration Control (AEC), Auto White Balance (AWB), and Auto Focus (AF).
[0028] Among them, the corresponding shooting parameters can include shooting parameters that are the same or similar.
[0029] Furthermore, it can be understood that both the first and second image sequences can include multiple frames of images. Specifically, the first image sequence can include multiple second-frame images, and the second image sequence can include multiple third-frame images. Therefore, it can be seen that each second-frame image in the first image sequence corresponds to each third-frame image in the second image sequence in terms of timestamps.
[0030] For example, a first image sequence corresponds to a first timestamp, and a second image sequence corresponds to a second timestamp. The first timestamp can indicate the time information of each second frame image in the first image sequence; while the second timestamp can indicate the time information of each third frame image in the second image sequence. By using the correspondence between the first and second timestamps, it can be determined that each second frame image in the first image sequence and each third frame image in the second image sequence have a timestamp correspondence. This correspondence may include the first and second timestamps having the same start time and the same end time.
[0031] Step S120: Determine a second frame rate based on the degree of image change in the first image sequence and the first frame rate, wherein the second frame rate is positively correlated with the degree of image change, and the second frame rate is less than or equal to the first frame rate.
[0032] Furthermore, to reduce the computational resources required for subsequent bokeh processing, the frame rate of the second image sequence can be reduced. However, it is understandable that if the frame rate of the second image sequence is too low, it may lead to a deterioration in the effect of subsequent bokeh processing, such as phase deviation and ghosting artifacts, affecting the quality of the image after bokeh processing.
[0033] Therefore, in some implementations, the second frame rate can be determined based on the degree of change in the first image sequence. Specifically, the second frame rate can be determined based on the degree of change in the first image sequence and the first frame rate, wherein the second frame rate is positively correlated with the degree of change in the image sequence, and the second frame rate is less than or equal to the first frame rate.
[0034] In other words, the first frame rate can be dynamically adjusted according to the degree of change in the image to obtain the second frame rate, and the second frame rate can be less than or equal to the first frame rate.
[0035] Understandably, when the degree of change in the image is large, it indicates that the content of the first image sequence changes to a large degree and at a fast speed. In this case, a second frame rate of as large as possible can be determined to ensure the quality of the image obtained after the subsequent blurring operation. On the other hand, when the degree of change in the image is small, it indicates that the content of the first image sequence changes to a small degree and at a slow speed. In this case, a second frame rate of as small as possible can be determined to minimize the computational resources required for the blurring operation without affecting the quality of the image obtained after the blurring operation.
[0036] The degree of change in the image can be characterized by the degree of change of the target object in the first image sequence. For example, the target object can be a physical object. If the target object is stationary in the first image sequence, the degree of change of the target object in the first image sequence can be determined to be low, thus indicating a low degree of change in the image. Conversely, if the target object is in motion in the first image sequence, the degree of change of the target object in the first image sequence can be determined to be high, thus indicating a high degree of change in the image. Alternatively, the degree of change in the image can also be determined based on the overall degree of change of the image content in the first image sequence. For example, the electronic device can be equipped with an image content analysis model to analyze the degree of change in the first image sequence and thus determine the degree of change in the image.
[0037] Optionally, if a metastable event is detected, it can be directly determined that the degree of image change is large, thus allowing for a higher second frame rate. Metastable events can be pre-defined events with a high probability of significant image change, based on experience. Examples of metastable events include camera application startup, switching between shooting magnification ranges, shooting algorithm fallback, shooting aspect ratio adjustment, and shooting mode switching.
[0038] For example, please refer to Figure 3 , Figure 3 A schematic diagram of metastable events provided in an embodiment of this application is shown. Figure 3 The diagram shows that metastable event 300 may include camera application startup 301, shooting magnification range switching 302, shooting algorithm downgrade 303, shooting frame adjustment 304, and shooting mode switching 305.
[0039] Optionally, in some implementations, if a metastable event is detected, the second frame rate can be directly set to the first frame rate, that is, the second frame rate can be set to the maximum value that can be achieved, so as to ensure the quality of subsequent bokeh processing to the greatest extent.
[0040] Alternatively, a blurring algorithm can be run to perform subsequent blurring processing on the first image sequence. In the early stages of the blurring algorithm, the image may not be stable, so the degree of image change is more likely to be high in the early stages of the blurring algorithm. At this time, a higher second frame rate can be directly determined. After the blurring algorithm enters the stable period, the image may be in a stable state. Therefore, the degree of image change is more likely to be low in the stable period of the blurring algorithm. At this time, a lower second frame rate can be directly determined.
[0041] In some implementations, the electronic device can run a camera application, which can monitor metastable events, monitor whether it is in the early or stable phase of bokeh processing, and analyze the degree of image change in the first image sequence, thereby determining the second frame rate.
[0042] Step S130: Determine a third image sequence from the second image sequence based on the second frame rate.
[0043] After determining the second frame rate, a third image sequence can be determined from the second image sequence. For example, a portion of the third frame images can be extracted from the second image sequence to form the third image sequence.
[0044] Specifically, the ratio of the first frame rate to the second frame rate can be used to determine how to extract a portion of the third frame image from the second image sequence, thereby obtaining the third image sequence. For a detailed description, please refer to the following embodiments.
[0045] Step S140: Blur the first image sequence using the third image sequence to obtain the target image sequence for preview display.
[0046] Therefore, after obtaining the third image sequence, the first image sequence can be blurred using the frame images in the third image sequence to obtain the target image sequence for preview display. The third image sequence may include multiple first frame images.
[0047] It is understood that the first frame image in the third image sequence may not correspond one-to-one with the second frame image in the first image sequence. Therefore, during the blurring process, at least one second frame image can be blurred using a first frame image to save computational resources. A detailed explanation can be found in subsequent embodiments. Furthermore, after blurring each second frame image using the first frame image, the blurred first image sequence can be used as the target image sequence.
[0048] The target image sequence can be used for preview display. For example, an electronic device may include a display screen on which the target image sequence can be previewed after the camera application is run. The user can then perform a confirmation shot operation on the previewed target image sequence, thereby storing the currently previewed target image sequence to obtain the captured target image sequence; therefore, the target image sequence is referred to as the preview display.
[0049] The image generation method provided in this application first acquires a first image sequence and a second image sequence at a first frame rate, wherein the shooting parameters of the first image sequence and the second image sequence correspond; then, a second frame rate is determined based on the degree of image change in the first image sequence and the first frame rate, wherein the second frame rate is positively correlated with the degree of image change, and wherein the second frame rate is less than or equal to the first frame rate; then, a third image sequence is determined from the second image sequence based on the second frame rate; thereby, the first image sequence is blurred using the third image sequence to obtain a target image sequence for preview display. In the image generation method provided in this application, the third image sequence used for blurring the first image can be dynamically adjusted according to the degree of image change. Specifically, the third image sequence can be determined by the second frame rate, which is positively correlated with the degree of image change. Therefore, when the degree of image change is high, a higher second frame rate can be determined to ensure the effect and quality of subsequent blurring processing, while when the degree of image change is low, a lower second frame rate can be determined to reduce resource consumption during blurring processing and reduce overall power consumption.
[0050] Please see Figure 4 , Figure 4 A flowchart illustrating an image generation method provided in an embodiment of this application is shown. This image generation method can be applied to... Figure 1 The electronic device in the illustrated image generation scenario can specifically use its processor as the execution entity for performing the image generation method. The image generation method may include steps S210 to S280.
[0051] Step S210: Acquire a first image sequence and a second image sequence at a first frame rate, wherein the first image sequence and the second image sequence have corresponding shooting parameters.
[0052] Step S210 has been described in detail in the foregoing embodiments and will not be repeated here.
[0053] Step S220: Determine the degree of image change in the first image sequence.
[0054] Step S230: Determine the frame rate adjustment parameter based on the degree of change in the image, wherein the frame rate adjustment parameter is inversely correlated with the degree of change in the image.
[0055] Step S240: The ratio of the first frame rate to the frame rate adjustment parameter is used as the second frame rate.
[0056] Among these methods, an application running on an electronic device can be used to directly analyze the first image sequence to determine the degree of change in the image.
[0057] Optionally, metastable events can also be monitored using electronic devices. If a metastable event is detected, it can be directly determined that the degree of image change is significant. Metastable events can be pre-defined events with a high probability of significant image change based on experience. Specific metastable events can be found in the description of the foregoing embodiments, and will not be repeated here.
[0058] Optionally, if the electronic device detects a metastable event, it can directly set the second frame rate to be equal to the first frame rate for a specified time period, thereby ensuring the quality of subsequent bokeh operations as much as possible. After the specified time period has elapsed, if no metastable event is detected, the frame rate adjustment parameters can be determined based on the degree of image change, thus determining the second frame rate. In some implementations, this scheme is also referred to as frame skipping shutdown logic.
[0059] Optionally, the application running on the electronic device can control the execution of a blurring algorithm, thereby blurring the first image sequence. It is understood that in the early stages of the blurring algorithm, the content of the image in the first image sequence may not yet be stable, therefore, the degree of image change is likely to be high in the early stages of blurring, at which point it can be determined that the degree of image change is large. However, after the blurring algorithm reaches a stable period, for example, after the blurring algorithm has run for a certain period, the image may be in a stable state, and the degree of image change is likely to be low, at which point it can be determined that the degree of image change is small.
[0060] Optionally, the electronic device may also be equipped with sensing components, which can collect information such as the environment in which the electronic device is located or the pose parameters of the electronic device. This information, combined with the pose parameters, is then used by a deep learning model to determine the corresponding frame rate adjustment parameters. For example, this deep learning model can be a scene classification algorithm decision model. Exemplarily, the sensing components may include an ambient light sensor and a gyroscope, allowing the ambient light sensor to collect environmental information and the gyroscope to collect the pose information of the electronic device.
[0061] Furthermore, after obtaining the degree of change in the image, the frame rate adjustment parameter can be directly determined based on the degree of change in the image, wherein the frame rate adjustment parameter is inversely correlated with the degree of change in the image.
[0062] The frame rate adjustment parameter can be used to adjust the first frame rate. In some implementations, the first frame rate can be reduced based on the frame rate adjustment parameter to obtain a second frame rate. Therefore, the frame rate adjustment parameter can be used to characterize the degree of reduction in the first frame rate. That is, the larger the frame rate adjustment parameter, the greater the reduction in the first frame rate, and the smaller the resulting second frame rate; conversely, the smaller the frame rate adjustment parameter, the less the reduction in the first frame rate, and the larger the resulting second frame rate.
[0063] Understandably, in order to minimize the computational resources required for bokeh processing while ensuring the quality of the target image sequence obtained through bokeh processing, a larger frame rate adjustment parameter can be determined when the degree of image change is small, while a smaller frame rate adjustment parameter can be determined when the degree of image change is large.
[0064] Specifically, step S230 may include steps S231 to S233.
[0065] Step S231: If the degree of change in the image is greater than or equal to the first threshold, determine the frame rate adjustment parameter as the first value.
[0066] Step S232: When the degree of change in the image is less than the first threshold and greater than or equal to the second threshold, the frame rate adjustment parameter is determined to be a second value, wherein the first threshold is greater than the second threshold and the second value is greater than the first value.
[0067] Step S233: If the degree of change in the image is less than the second threshold, determine the frame rate adjustment parameter as a third value, wherein the third value is greater than the second value.
[0068] In some implementations, the degree of image change can be compared with a first threshold and a second threshold, where the first threshold is greater than the second threshold. Therefore, if the degree of image change is greater than or equal to the first threshold, the image change is considered significant, and the frame rate adjustment parameter can be determined to be the first value.
[0069] If the degree of image change is less than the first threshold and greater than or equal to the second threshold, the degree of image change can be considered to be moderate, and the frame rate adjustment parameter can be determined to be the second value.
[0070] If the degree of change in the image is less than the second threshold, it can be considered that the degree of change in the image is small, and thus the frame rate adjustment parameter can be determined to be the third value.
[0071] The second value is less than the first value, and the third value is greater than the second value.
[0072] Furthermore, after obtaining the frame rate adjustment parameters, the ratio of the first frame rate to the frame rate adjustment parameters can be used as the second frame rate.
[0073] For example, in some implementations, the frame rate adjustment parameter can be characterized by Ratio. For instance, if the first frame rate is 24fps and Ratio=3, then the second frame rate can be 24 / 3=8fps.
[0074] Step S250: Obtain frame rate adjustment parameters, wherein the frame rate adjustment parameters are the ratio of the first frame rate to the second frame rate.
[0075] Step S260: Select the third frame image of the second image sequence at intervals of the fourth value to obtain the third image sequence, wherein the fourth value is the frame rate adjustment parameter -1.
[0076] Furthermore, in order to determine the third image sequence from the second image sequence, a frame rate adjustment parameter can be obtained first. This frame rate adjustment parameter is the ratio of the first frame rate to the second frame rate. For example, if the first frame rate is 24 fps and the second frame rate is 8 fps, then the frame rate adjustment parameter is 24 / 8 = 3.
[0077] Then, a selection operation can be performed on the third frame image of the second image sequence at intervals of the fourth value to obtain the third image sequence, wherein the fourth value is the frame rate adjustment parameter -1.
[0078] Continuing with the example of a first frame rate of 24fps and a second frame rate of 8fps, we can obtain a fourth value of 2. Therefore, the second image sequence can include 24 frames of the third frame per second, while the subsequent third image sequence can include 8 frames of the first frame per second. Thus, a selection operation can be performed on the third frame image every two frames in the second image sequence. This selection operation represents selecting the next third frame image as the first frame image in the third image sequence.
[0079] For example, taking a duration of 1 second as an example, if the third frame images of the 24 frames in the second image sequence correspond to numbers f1, f2, ... up to f24, then the third frame image with number f1 can be selected as the first frame image in the third image sequence. Then, after a two-frame interval, the third frame image with number f4 can be selected as the first frame image in the third image sequence. This process continues until the second image sequence is traversed, thus obtaining the third image sequence composed of the third frame images with numbers f1, f4, f7, f10, f13, f16, f19, and f22. These multiple third frame images are the multiple first frame images in the third image sequence.
[0080] In some implementations, the electronic device may include a sensor layer, a hardware abstraction layer (HAL), and an application layer. The hardware abstraction layer may include a custom zone and a vendor hardware zone (Vendor HAL).
[0081] The sensor layer can acquire a first image sequence and a second image sequence through image acquisition components. The first image sequence and the second image sequence can be transmitted to the supplier's hardware area for data processing.
[0082] The application layer can send control commands to the customized area, which then controls the data processing in the vendor hardware area based on these commands. Specifically, the application layer can send control commands based on the first frame rate, second frame rate, etc. For example, as described above, to obtain the third image sequence from the second image sequence, only a portion of the third frame images needs to be selected. Therefore, the application can send execution requests only for the required portion of the third frame images, and not send execution requests to the customized area for the unnecessary portion. Thus, the customized area only receives the execution request when a third frame image needs to be selected, and sends this request to the vendor hardware area to process the data for that portion of the third frame image in the second image sequence. If the customized layer does not receive an execution request, it will not send one to the vendor hardware area, and therefore, the unnecessary portion of the third frame image in the second image sequence will not be processed. This reduces the amount of data processing required and lowers the demand for computing resources.
[0083] The third frame image, after selection and data processing, can then form the third image sequence.
[0084] The above-mentioned method of selecting a portion of the third frame image from the second image sequence to form the third image sequence can also be called frame skipping.
[0085] Step S270: Determine the second frame image corresponding to each first frame image in the third image sequence in the first image sequence.
[0086] Furthermore, after obtaining the third image sequence, the first image sequence can be blurred using the third image sequence to obtain the target image sequence for preview display. In some implementations, a second frame image corresponding to each first frame image in the third image sequence can first be determined from the first image sequence.
[0087] For example, the second frame image corresponding to each first frame image in the third image sequence can be determined in the first image sequence based on the timestamp. Specifically, step S270 may include steps S271 and S272.
[0088] Step S271: Determine the third timestamp of the third image sequence based on the second timestamp.
[0089] Step S272: Based on the first timestamp and the third timestamp, determine the second frame image in the first image sequence that corresponds to the timestamp of each first frame image in the third image sequence.
[0090] The first image sequence may correspond to a first timestamp, and the second image sequence may correspond to a second timestamp. The first timestamp and the second timestamp are matched, that is, the first timestamp and the second timestamp are the same or similar, for example, the first timestamp and the second timestamp differ by less than 3 ms.
[0091] Since the third image sequence is determined based on the second image sequence, the third timestamp of the third image sequence can also be determined based on the second timestamp. For example, the third timestamp can be generated based on the time corresponding to the second timestamp of each third frame image selected in the second image sequence to constitute the third image sequence.
[0092] Furthermore, based on the first timestamp and the third timestamp, a second frame image corresponding to the timestamp of each first frame image in the third image sequence can be determined in the first image sequence.
[0093] For example, please refer to Figure 5 , Figure 5 A schematic diagram of a frame image provided in an embodiment of this application is shown. Figure 5 The image shows a first image sequence 510, second frame images 511, 512, 513, 514, 515, 516, 517, 518, and 519 included in the first image sequence 510, and a first timestamp 580 corresponding to the first image sequence 510. Additionally, Figure 5 The image also shows a third image sequence 520, which includes a first frame image 521, a first frame image 522, a first frame image 523, and a third timestamp 590 corresponding to the third image sequence 520.
[0094] It can be seen that, in Figure 5 The nine second-frame images and three first-frame images shown indicate that the frame rate adjustment parameter is 3.
[0095] The first timestamp and the third timestamp have the same or similar start time. Therefore, in Figure 5 In the diagram, each set of dashed boxes represents the second frame image corresponding to the timestamp of the first frame image. Specifically, the timestamp of the second frame image 511 corresponds to the timestamp of the first frame image 521; the timestamp of the second frame image 515 corresponds to the timestamp of the first frame image 522; and the timestamp of the second frame image 517 corresponds to the timestamp of the first frame image 523.
[0096] It should be noted that, Figure 5 The images shown are only some frames from the first and third image sequences and do not constitute a specific limitation on the embodiments of this application.
[0097] Step S280: Based on the first frame image, the target frame image corresponding to the first frame image is blurred to obtain the target image sequence for preview display, wherein the target frame image includes a second frame image corresponding to the first frame image and a specified number of second frame images adjacent to the second frame image, the specified number being determined based on the first frame rate and the second frame rate.
[0098] Furthermore, the target frame image corresponding to the first frame image in the third image sequence can be blurred to obtain the target image sequence for preview display. The target frame image includes a second frame image corresponding to the first frame image and a specified number of adjacent second frame images following the first frame image, the specified number being determined based on the first frame rate and the second frame rate.
[0099] In some implementations, the specified amount can be the frame rate adjustment parameter -1, which is the ratio of the first frame rate to the second frame rate minus 1.
[0100] As can be seen, the blurring process is performed on multiple second-frame images using a first-frame image. Specifically, step S280 may also include steps S281 to S283.
[0101] Step S281: If the first identifier is detected, determine the first frame image corresponding to the current second frame image, and perform blurring processing on the current second frame image using the first frame image.
[0102] Step S282: If the second identifier is detected, determine the first frame image corresponding to the nearest second frame image before the current second frame image, and blur the current second frame image using the first frame image.
[0103] Step S283: Use the second frame image after blurring as the target image sequence for preview display.
[0104] In some implementations, the second frame image corresponding to the first frame image may have a first identifier; while the second frame image not corresponding to the first frame image may have a second identifier. Therefore, when blurring a certain second frame image subsequently, if the first identifier is detected, the first frame image corresponding to the current second frame image can be directly determined, and the current second frame image can be blurred using that first frame image.
[0105] If the second identifier is detected, the first frame image corresponding to the nearest second frame image before the current second frame image can be determined, and the current second frame image can be blurred using the first frame image.
[0106] For example, with Figure 5 For example, the specified quantity can be 2. Therefore, each first frame image corresponds to a target frame image that actually includes 3 second frame images. That is, one first frame image can be used to blur 3 second frame images. And... Figure 5 In the first frame image, the second frame image in the target frame image has a first identifier, and the next two adjacent second frame images have a second identifier.
[0107] Therefore, if the current second frame image is 511, which corresponds to the first identifier, then the second frame image 511 can be directly blurred using the first frame image 521 corresponding to the timestamp of the second frame image 511. If the current second frame image is 513, which corresponds to the second identifier, then the first frame image 521 corresponding to the nearest adjacent second frame image 511 before the current second frame image 513 is determined, and the current second frame image 513 is blurred using the first frame image 521.
[0108] It should be noted that the first frame image corresponding to the nearest second frame image before the current second frame image is not the previous second frame image adjacent to the current second frame image, but rather the second frame image that is the closest to the current second frame image and has a corresponding first frame image.
[0109] For some implementation methods Figure 5 The image shown is a third image sequence obtained when the virtual algorithm is in a stable period.
[0110] For example, please see Figure 6 , Figure 6 A schematic diagram of a frame image provided in an embodiment of this application is shown. Figure 6The image shows a first image sequence 610, and two second frame images 611, 612, 613, 614, 615, 616, 617, 618, 619, 6110, 6111, and 6112 included in the first image sequence 610, as well as a first timestamp 680 corresponding to the first image sequence 610. Additionally, Figure 6 The image also shows a third image sequence 620, which includes a first frame image 621, a first frame image 622, and a third timestamp 690 corresponding to the third image sequence 620.
[0111] It can be seen that, in Figure 6 The 12 second-frame images and 2 first-frame images shown indicate that the frame rate adjustment parameter is 6.
[0112] The first timestamp and the third timestamp have the same or similar start time. Therefore, in Figure 6 In the diagram, each set of dashed boxes represents the second frame image corresponding to the timestamp of the first frame image. Specifically, the timestamp of the second frame image 611 corresponds to the timestamp of the first frame image 621; and the timestamp of the second frame image 617 corresponds to the timestamp of the first frame image 622.
[0113] Therefore, in Figure 6 In this context, the specified number can be 5. Therefore, each first frame image corresponds to a target frame image that essentially includes 6 second frame images. That is, one first frame image can be used to blur 6 second frame images. And... Figure 5 In the first frame image, the second frame image in the target frame image has a first identifier, and the next five adjacent second frame images have a second identifier.
[0114] Therefore, if the current second frame image is 611, which corresponds to the first identifier, then the second frame image 611 can be directly blurred using the first frame image 621 corresponding to the timestamp of the second frame image 611. If the current second frame image is 615, which corresponds to the second identifier, then the first frame image 621 corresponding to the nearest adjacent second frame image 611 before the current second frame image 615 is determined, and the current second frame image 615 is blurred using the first frame image 621.
[0115] It should be noted that, Figure 6 The images shown are only some frames from the first and third image sequences and do not constitute a specific limitation on the embodiments of this application.
[0116] For some implementation methods Figure 6 The image shown can be a third image sequence obtained when the virtual algorithm is in a static period.
[0117] The electronic device may be equipped with a depth map calculation module, which then performs a blurring process on the target frame image corresponding to the first frame image based on the first frame image. In essence, the depth map calculation module calculates the depth based on the first frame image, thereby achieving the blurring process on the target frame image corresponding to the first frame image.
[0118] Therefore, the second frame image after the first image sequence has been blurred can constitute the target image sequence.
[0119] Alternatively, each second frame image in the first image sequence can be blurred, and then the blurred first image sequence can be directly used as the target image sequence.
[0120] In the image generation method provided in this application embodiment, while ensuring the quality of the target image sequence obtained through blurring processing, the computational resources required for blurring processing are minimized as much as possible. When the degree of image change is small, a larger frame rate adjustment parameter can be determined; while when the degree of image change is large, a smaller frame rate adjustment parameter can be determined. This achieves dynamic optimization of the frame rate, significantly reduces computation and transmission volume, and makes system resource allocation more in line with actual business needs.
[0121] Please see Figure 7 , Figure 7 A structural block diagram of an electronic device provided in an embodiment of this application is shown. Figure 7 The electronic device 700 shown includes a sensor layer 710, a hardware abstraction layer 720, an application layer 730, and an algorithm process system (APS) 740.
[0122] The hardware abstraction layer 720 includes a custom region 721 and a supplier hardware region 722. The sensor layer 710 is connected to the supplier hardware region 722 via a driver 711 and an image signal processor 712. The custom region 721 is connected to both the supplier hardware region 722 and the application layer 730. The algorithm processing system 740 is connected to the application layer 730 and is used for blurring and preview display; it can also be called a real-time blurring algorithm. The real-time blurring algorithm can generate a depth map based on binocular parallax calculation, and then execute blurring rendering driven by a convolutional neural network to achieve preview display.
[0123] In some implementations, the electronic device 700 may also include a processor ( Figure 7 (not shown in the image), this processor can directly or indirectly interact with Figure 7 The connections between the various layers.
[0124] Optionally, the processing latency of the real-time preview blurring algorithm can be constrained within a specified duration. For example, the specified duration can be 1000 / first frame rate, and the unit can be ms.
[0125] In some implementations, application layer 730 can send an execution request for the second image sequence to customized region 721. If customized region 721 receives the execution request for the second image sequence, it can control vendor hardware region 722 to perform data processing on the second image sequence. In some implementations, data processing of the second image sequence can be performed via an offline reprocessing pipeline. Customized region 721 can trigger data processing by sending a slave preview request to vendor hardware region 722. For example, the electronic device can control the offline reprocessing pipeline via Camera HAL software.
[0126] If the application layer 730 does not send an execution request for the second image sequence to the custom area 721, the custom area 721 prohibits the issuance of a Slave preview request to the vendor hardware area 722. Optionally, the custom area 721 can also return feedback information to the application layer 730, indicating that data processing for the current third frame image in the second image sequence has not been performed. Thus, the application layer 730 can reclaim the buffer space (Slave Buffer) used to receive the processed third frame image, thereby avoiding unnecessary resource waste. This feedback information can be represented by an SRequest Error.
[0127] In the customized area 721, the manufacturer can customize the data stream.
[0128] Since the second image sequence can be used to characterize the image sequence captured by the secondary camera, the execution request for the second image sequence can be characterized as a Slave preview request.
[0129] Additionally, in the electronic device 700, the sensor layer 710 can acquire a first image sequence and a second image sequence via an image acquisition component. The obtained first and second image sequences can be transmitted to the vendor hardware region 722 via the image signal processor 712. Furthermore, the execution request sent by the aforementioned customized region 721 can determine whether it is necessary to skip data processing for certain third frame images, that is, to implement frame skipping execution of data processing for the third frame images in the Slave OfflineReprocess2 pipeline. For example, the obtained first and second image sequences can be transmitted to the image signal processor 712 via the MIPI CSID-3 high-speed hardware transmission interface.
[0130] Therefore, in Figure 7 In the illustrated electronic device 700, by executing a Slave preview request, data processing of certain third-frame images via the sub-offline reprocessing pipeline can be skipped.
[0131] It is understood that, in conjunction with the description in the foregoing embodiments of determining the third image sequence from the second image sequence based on the second frame rate, an execution request can be issued for the third frame image that requires selection from the second image sequence, so that the secondary offline reprocessing pipeline can perform data processing on these third frame images that require selection; while no execution request is issued for the third frame image that does not require selection, thereby releasing the corresponding cache space.
[0132] For example, if the first frame rate of the second image sequence is 24fps and the frame rate adjustment parameter is 3, then only the third frame of the 8-frame image needs to be processed, which greatly reduces the amount of data processing.
[0133] Please see Figure 8 , Figure 8 A structural block diagram of an electronic device provided in an embodiment of this application is shown. Figure 8 Including Figure 7 The electronic device 700 and the connection relationships of each layer shown are not described in detail here.
[0134] In addition, Figure 8In this embodiment, the image signal processor 712 includes a real-time processing pipeline 1 (Realtime1) and a real-time processing pipeline 2 (Realtime2). Real-time processing pipeline 1 performs real-time pipeline processing on the first image sequence acquired by the sensor layer 710; while real-time processing pipeline 2 performs real-time pipeline processing on the second image sequence acquired by the sensor layer 710. It is understood that the sensor layer 710 includes a main sensor 1 and a secondary sensor 2, which can acquire the first image sequence through the main sensor 1 and the second image sequence through the secondary sensor. The first and second image sequences can be raw (RAW) data.
[0135] Real-time pipeline processing can be used to perform black level correction, depigmentation, automatic exposure control, automatic white balance control, automatic focus control, and other processing.
[0136] Optionally, the first and second image sequences processed by the real-time pipeline can be transferred to Dynamic Random Access Memory (DRAM), for example, in YUV420 / P010 format.
[0137] Additionally, the supplier hardware area 722 may include a primary offline reprocessing pipeline 1 and a secondary offline reprocessing pipeline 2.
[0138] exist Figure 8 In the process, the frame rate adjustment parameters can be determined by the algorithm processing system 740 based on the real-time preview blurring algorithm.
[0139] Additionally, if the application layer 730 receives the feedback information S Request Error, it can determine a second marker for the current second frame image. This second marker can be represented by isSlaveSkipping. For example, the second marker for the second frame image can be implemented using metadata.
[0140] Therefore, the application layer 730 includes a master channel 1 and a slave channel 2. After the master channel acquires the second frame image, if it detects the second marker isSlaveSkipping, it can directly perform blurring processing on the current second frame image using the first frame image corresponding to the nearest adjacent second frame image before the second frame image, without having to wait for the third frame image processed by the slave offline reprocessing pipeline. This avoids the situation where the master channel has to wait for the slave channel to receive the third frame image processed by the slave offline reprocessing pipeline before it can further perform blurring processing, which would result in the frame rate of the final blurred target image sequence being reduced to that of the third image sequence.
[0141] The contents of both the master and slave channels can be sent to the algorithm processing system 740. The algorithm processing system 740 performs blurring processing on the first image sequence based on the real-time preview blurring algorithm to obtain the target image sequence for preview display.
[0142] Optionally, the real-time preview blurring algorithm can also trigger based on the third frame image and the first frame image matched by each set of timestamps, such as triggering the execution of processes like timestamp alignment and depth map calculation.
[0143] It should be noted that the above Figure 7 , Figure 8 The electronic device shown can be used to execute the image generation methods provided in the foregoing method embodiments. Specifically, the processor in the electronic device can control the above-mentioned layers to implement the image generation method.
[0144] Therefore, the electronic device provided by the embodiments of this application achieves dynamic balance of each layer through the collaboration of each layer, which can realize dynamic optimization of the secondary offline reprocessing pipeline. Under the premise of ensuring the quality of virtualization processing, unnecessary resource waste can be avoided, the amount of calculation and transmission of redundant data can be significantly reduced, and the allocation of system resources can be more in line with actual business needs.
[0145] Compared to processing each third frame image through a secondary offline reprocessing pipeline (e.g., if the first frame rate is 24fps, and the real-time preview bokeh algorithm only needs 8fps frames for bokeh), the current process still requires data processing of all 24fps frames through the offline reprocessing pipeline. This means processing each frame in both the first and second image sequences offline, resulting in wasted data on some processed frames in the second image sequence (e.g., 66.7% of processed frames in this example). In the image generation method provided in this application, the need for data processing of the third frame in the second image sequence can be flexibly adjusted based on the frame images required by the real-time preview bokeh algorithm, thus reducing resource waste. Experiments conducted by the inventors show that the image generation method provided in this application can reduce the operating current of electronic devices by 30 to 40mA, thereby reducing power consumption. Furthermore, in the image generation method provided in this application embodiment, the dynamic adjustment is only whether to process the data of the third frame image in the second image sequence through the secondary offline reprocessing pipeline, without reducing the frame rate of the first image sequence and the second image sequence acquired by the acquisition component, and without affecting the real-time pipeline processing, thereby ensuring that the shooting parameters of the first image sequence and the second image sequence correspond.
[0146] Please see Figure 9 , Figure 9 The diagram shows a structural block diagram of an image generation apparatus 900 provided in an embodiment of this application. The image generation apparatus 900 includes: an acquisition unit 910, a first determination unit 920, a second determination unit 930, and a preview unit 940.
[0147] The acquisition unit 910 is used to acquire a first image sequence and a second image sequence at a first frame rate, wherein the first image sequence and the second image sequence have corresponding shooting parameters.
[0148] The first determining unit 920 is configured to determine a second frame rate based on the degree of image change in the first image sequence and the first frame rate, wherein the second frame rate is positively correlated with the degree of image change, and the second frame rate is less than or equal to the first frame rate.
[0149] Optionally, the first determining unit 920 can also be used to determine the degree of image change in the first image sequence; The frame rate adjustment parameter is determined based on the degree of change in the image, wherein the frame rate adjustment parameter is inversely correlated with the degree of change in the image; the ratio of the first frame rate to the frame rate adjustment parameter is used as the second frame rate.
[0150] Optionally, the first determining unit 920 can also be used to determine the frame rate adjustment parameter as a first value when the degree of screen change is greater than or equal to a first threshold; determine the frame rate adjustment parameter as a second value when the degree of screen change is less than the first threshold but greater than or equal to a second threshold, wherein the first threshold is greater than the second threshold and the second value is greater than the first value; and determine the frame rate adjustment parameter as a third value when the degree of screen change is less than the second threshold, wherein the third value is greater than the second value.
[0151] The second determining unit 930 is used to determine a third image sequence from the second image sequence based on the second frame rate.
[0152] Optionally, the second determining unit 930 can also be used to obtain a frame rate adjustment parameter, wherein the frame rate adjustment parameter is the ratio of the first frame rate to the second frame rate; and to perform a selection operation on the third frame image of the second image sequence at intervals of a fourth value to obtain the third image sequence, wherein the fourth value is the frame rate adjustment parameter -1.
[0153] The preview unit 940 is used to blur the first image sequence using the third image sequence to obtain a preview display of the target image sequence.
[0154] Optionally, the preview unit 940 can also be used to determine, in the first image sequence, a second frame image corresponding to each first frame image in the third image sequence; and to perform a blurring process on the target frame image corresponding to the first frame image based on the first frame image to obtain the target image sequence for preview display, wherein the target frame image includes the second frame image corresponding to the first frame image and a specified number of second frame images adjacent to the second frame image, the specified number being determined based on the first frame rate and the second frame rate.
[0155] Optionally, the preview unit 940 can also be used to determine the first frame image corresponding to the current second frame image when the first identifier is detected, and to perform blurring processing on the current second frame image using the first frame image; when the second identifier is detected, determine the first frame image corresponding to the nearest adjacent second frame image before the current second frame image, and to perform blurring processing on the current second frame image using the first frame image; and use the blurred second frame image as the target image sequence for preview display.
[0156] Optionally, the preview unit 940 can also be used to determine the third timestamp of the third image sequence based on the second timestamp; and to determine the second frame image corresponding to the timestamp of each first frame image in the third image sequence based on the first timestamp and the third timestamp.
[0157] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0158] In the several embodiments provided in this application, the coupling between the units can be electrical, mechanical, or other forms of coupling. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0159] Please see Figure 10 , Figure 10 This illustration shows a structural block diagram of an electronic device according to an embodiment of this application. The electronic device 110 may be a smartphone, desktop computer, in-vehicle computer, server, or tablet computer, etc. The electronic device 110 in this application may include one or more of the following components: a processor 111, a memory 112, and one or more application programs, wherein the processor 111 is electrically connected to the memory 112, and the one or more programs are configured to perform the methods described in the foregoing embodiments.
[0160] Processor 111 may include one or more processing cores. Processor 111 connects to various parts within the electronic device 110 using various interfaces and lines, and performs various functions and processes data of the electronic device 110 by running or executing instructions, programs, code sets, or instruction sets stored in memory 112, and by calling data stored in memory 112. Optionally, processor 111 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 111 may integrate one or more of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and computer programs; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 111 and may be implemented separately through a communication chip. Specifically, the methods described in the foregoing embodiments can be executed by one or more processors 111.
[0161] In some implementations, memory 112 may include random access memory (RAM) or read-only memory (ROM). Memory 112 can be used to store instructions, programs, code, code sets, or instruction sets. Memory 112 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described below, etc. The data storage area may also store data created by the electronic device 110 during use.
[0162] Please see Figure 11 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 1100 stores program code that can be called by a processor to execute the methods described in the above method embodiments.
[0163] The computer-readable storage medium 1100 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 1100 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 1100 has storage space for program code 1110 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 1110 may be compressed, for example, in a suitable form.
[0164] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. An image generation method, characterized in that, include: A first image sequence and a second image sequence are acquired at a first frame rate, wherein the shooting parameters of the first image sequence and the second image sequence correspond; A second frame rate is determined based on the degree of image change in the first image sequence and the first frame rate. The second frame rate is positively correlated with the degree of image change, wherein the second frame rate is less than or equal to the first frame rate. A third image sequence is determined from the second image sequence based on the second frame rate; In the first image sequence, determine the second frame image corresponding to each first frame image in the third image sequence; Based on the first frame image, the target frame image corresponding to the first frame image is blurred to obtain a preview display of the target image sequence. The target frame image includes a second frame image corresponding to the first frame image and a specified number of second frame images adjacent to the first frame image. The specified number is determined based on the first frame rate and the second frame rate.
2. The method according to claim 1, characterized in that, The step of determining the second frame rate based on the degree of image change in the first image sequence and the first frame rate includes: Determine the degree of image change in the first image sequence; The frame rate adjustment parameters are determined based on the degree of change in the image, wherein the frame rate adjustment parameters are inversely correlated with the degree of change in the image. The ratio of the first frame rate to the frame rate adjustment parameter is used as the second frame rate.
3. The method according to claim 2, characterized in that, The frame rate adjustment parameters are determined based on the degree of image change, wherein the frame rate adjustment parameters are inversely correlated with the degree of image change, including: If the degree of change in the image is greater than or equal to the first threshold, the frame rate adjustment parameter is determined to be a first value; When the degree of change in the image is less than a first threshold and greater than or equal to a second threshold, the frame rate adjustment parameter is determined to be a second value, wherein the first threshold is greater than the second threshold and the second value is greater than the first value; If the degree of change in the image is less than the second threshold, the frame rate adjustment parameter is determined to be a third value, wherein the third value is greater than the second value.
4. The method according to claim 1, characterized in that, The second frame image corresponding to the first frame image has a first identifier, and the second frame image not corresponding to the first frame image has a second identifier. The step of blurring the target frame image corresponding to the first frame image based on the first frame image to obtain the previewed target image sequence includes: If the first identifier is detected, the first frame image corresponding to the current second frame image is determined, and the current second frame image is blurred using the first frame image; If the second identifier is detected, determine the first frame image corresponding to the nearest adjacent second frame image before the current second frame image, and blur the current second frame image using the first frame image; The second frame image after blurring is used as the target image sequence for preview display.
5. The method according to claim 1, characterized in that, The first timestamp corresponding to the first image sequence matches the second timestamp corresponding to the second image sequence. The step of determining the second frame image corresponding to each first frame image in the third image sequence in the first image sequence includes: The third timestamp of the third image sequence is determined based on the second timestamp; Based on the first timestamp and the third timestamp, a second frame image corresponding to the timestamp of each first frame image in the third image sequence is determined in the first image sequence.
6. The method according to claim 1, characterized in that, Determining the third image sequence from the second image sequence based on the second frame rate includes: Obtain frame rate adjustment parameters, wherein the frame rate adjustment parameters are the ratio of the first frame rate to the second frame rate; The third image sequence is obtained by selecting the third frame image at intervals of the fourth value from the second image sequence, wherein the fourth value is the frame rate adjustment parameter -1.
7. An image generation apparatus, characterized in that, include: The acquisition unit is used to acquire a first image sequence and a second image sequence at a first frame rate, wherein the acquisition parameters of the first image sequence and the second image sequence correspond; The first determining unit is configured to determine a second frame rate based on the degree of image change in the first image sequence and the first frame rate, wherein the second frame rate is positively correlated with the degree of image change, and the second frame rate is less than or equal to the first frame rate. The second determining unit is configured to determine a third image sequence from the second image sequence based on the second frame rate; The preview unit is configured to determine, in the first image sequence, a second frame image corresponding to each first frame image in the third image sequence; and to perform a blurring process on the target frame image corresponding to the first frame image based on the first frame image to obtain a preview display target image sequence, wherein the target frame image includes the second frame image corresponding to the first frame image and a specified number of second frame images adjacent to the second frame image, the specified number being determined based on the first frame rate and the second frame rate.
8. An electronic device, characterized in that, include: One or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications being configured to perform the method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The readable storage medium stores program code that can be invoked by a processor to execute the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Shooting control method and device, electronic equipment and readable storage medium
CN117278842A
