Image generation method and device, electronic equipment and readable storage medium
By dynamically adjusting the frame rate and image sequence selection, the computing resource consumption and power consumption of blur processing are optimized, solving the high computing resource and high power consumption problems of blurred image generation in the existing technology, and achieving efficient blur processing under different degrees of picture change.
Patent Information
- Application Number
- CN202510736605.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-05
AI Technical Summary
The existing technology consumes a lot of computing resources and high power consumption when generating blurred images. Especially when the degree of picture changes varies, it is difficult to dynamically adjust the frame rate to optimize the blurring effect and resource consumption.
By acquiring a first image sequence and a second image sequence, dynamically adjusting the second frame rate according to the degree of picture change of the first image sequence, and determining a third image sequence from the second image sequence, the first image sequence is blurred using the third image sequence to reduce computing resource consumption.
The blur processing effect is guaranteed when the degree of picture change is high, and resource consumption is reduced when the degree of picture change is low, thereby reducing overall power consumption and optimizing the efficiency and energy consumption of blur processing.
Smart Images

Figure CN120602770A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image acquisition technology, and more specifically, to an image generation method, device, electronic device, and readable storage medium. Background Art
[0002] Currently, with the development of electronic information technology, electronic devices can preview and display blurred images when taking photos. However, the current algorithm used to generate blurred images for preview display consumes a lot of computing resources and consumes high power. Summary of the Invention
[0003] The present application proposes an image generation method, device, electronic device and readable storage medium.
[0004] In a first aspect, an embodiment of the present application provides an image generation method, including: acquiring a first image sequence and a second image sequence at a first frame rate, wherein the first image sequence corresponds to shooting parameters of the second image sequence; determining a second frame rate based on the degree of picture change of the first image sequence and the first frame rate, the second frame rate being positively correlated with the degree of picture change, 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 blurring the first image sequence through the third image sequence to obtain a target image sequence for preview display.
[0005] In a second aspect, an embodiment of the present application further provides an image generation device, comprising: an acquisition unit, a first determination unit, a second determination unit, and a preview unit. The acquisition unit is configured to acquire a first image sequence and a second image sequence at a first frame rate, wherein the first image sequence corresponds to a shooting parameter of the second image sequence; the first determination unit is configured to determine a second frame rate based on the degree of picture change of the first image sequence and the first frame rate, wherein the second frame rate is positively correlated with the degree of picture change, wherein the second frame rate is less than or equal to the first frame rate; the second determination unit is configured to determine a third image sequence from the second image sequence based on the second frame rate; and the preview unit is configured to blur the first image sequence using the third image sequence to obtain a target image sequence for preview display.
[0006] In a third aspect, an embodiment of the present application further provides an electronic device comprising: one or more processors; a memory; and 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, and the one or more programs are configured to execute the method described in the first aspect.
[0007] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which program code is stored. The program code can be called 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 by the embodiments of the present application first capture 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. A second frame rate is then 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, wherein the second frame rate is less than or equal to the first frame rate. A third image sequence is then determined from the second image sequence based on the second frame rate. The first image sequence is then defocused using the third image sequence to obtain a target image sequence for preview display. In the image generation method provided by the present application, the third image sequence used for defocusing the first image training can be dynamically adjusted based on the degree of image change. Specifically, the third image sequence can be determined using a second frame rate, wherein the second frame rate 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 the subsequent defocusing process. When the degree of image change is low, a lower second frame rate can be determined to reduce resource consumption during the defocusing process, thereby reducing overall power consumption.
[0009] Other features and advantages of the embodiments of the present application will be described in the following description and, in part, will become apparent from the description or be understood by practicing the embodiments of the present application. The objectives and other advantages of the embodiments of the present application can be achieved and obtained through the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0011] Figure 1 A diagram showing an application scenario of the image generation method provided in an embodiment of the present application is shown; Figure 2 A flowchart of an image generation method provided by an embodiment of the present application is shown; Figure 3 A schematic diagram of a metastable event provided in an embodiment of the present application is shown; Figure 4A flowchart of an image generation method provided by another embodiment of the present application is shown; Figure 5 A schematic diagram of a frame image provided by an embodiment of the present application is shown; Figure 6 A schematic diagram of a frame image provided by another embodiment of the present application is shown; Figure 7 A structural block diagram of an electronic device provided in an embodiment of the present application is shown; Figure 8 A structural block diagram of an electronic device provided by another embodiment of the present application is shown; Figure 9 The following is a structural block diagram of an image generating device provided by an embodiment of the present application; Figure 10 shows a structural block diagram of another electronic device provided in an embodiment of the present application; Figure 11 A structural block diagram of a computer-readable storage medium provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0012] In order 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 in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for which protection is claimed, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work fall within the scope of protection of the present application.
[0013] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0014] With the advancement of electronic information technology, electronic devices can now preview and display blurred images when taking photos. However, the algorithms used to generate these blurred images for preview display currently consume a lot of computing resources and consume a lot of power. Reducing these computing resources and power consumption is an urgent problem.
[0015] Currently, electronic devices can capture images through image acquisition components, blur them using algorithms, and then preview and display them. Specifically, this can be achieved by using two image sensors working in parallel and in conjunction with the processing pipeline in the Image Signal Processor (ISP).
[0016] However, the inventors found in their research that the current blur processing method uses dual image sensors to capture images at the same frame rate, and each frame of the image needs to be processed subsequently, which consumes a lot of computing resources and causes a significant increase in the system's power consumption.
[0017] Therefore, in order to solve or partially solve the above problems, the present application provides an image generation method, device, electronic device and readable storage medium.
[0018] See also Figure 1 , Figure 1 The application scenario diagram of the image generation method provided by the embodiment of the present application is shown, namely, an image generation scenario 100. The image generation scenario 100 may include an electronic device 110 and a user 120. Figure 1 The electronic device 110 shown in the figure is a smart phone. The user 120 holds the electronic device 110, and the image sequence is captured by the image capture component configured by the electronic device 110, and then the image sequence is blurred to preview and display the blurred image sequence in the electronic device 110. For a detailed introduction, please refer to the subsequent method embodiments.
[0019] For example, the user 120 can take a selfie using the front 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 camera of the electronic device 110. For example, other objects may include specific objects, surrounding scenery, people, etc., which are not specifically limited in the embodiments of the present application.
[0020] See also Figure 2 , Figure 2 A flowchart of an image generation method provided by an embodiment of the present application is shown. The image generation method can be applied to Figure 1 The electronic device in the image generation scenario shown may specifically use a processor of the electronic device as the execution subject of the image generation method. The image generation method may include steps S110 to S140.
[0021] Step S110: capturing a first image sequence and a second image sequence at a first frame rate, wherein shooting parameters of the first image sequence and the second image sequence correspond to shooting parameters of the first image sequence and the second image sequence.
[0022] It is understood that the electronic device may be configured with an image acquisition component, and the image acquisition component may be used to acquire an image sequence. In the embodiments provided herein, the image acquisition component may be used to respectively acquire a first image sequence and a second image sequence. The first image sequence and the second image sequence are both acquired at a first frame rate.
[0023] Exemplarily, the first frame rate is 24, and the frame rates of the first image sequence and the second image sequence are both 24 frames.
[0024] Optionally, the image acquisition component may include two subcomponents, for example, a first subcomponent may acquire a first image sequence at a first frame rate; and a second subcomponent may acquire a second image sequence at a second frame rate. Specifically, for example, the first subcomponent may include a camera as a primary camera, and the second subcomponent may include a camera as a secondary camera. Each subcomponent may include one or more cameras, which can be flexibly adjusted as needed and are not specifically limited in the embodiments of the present application.
[0025] Optionally, the image acquisition component may also include only a group of cameras, through which the acquisition of multiple frame images can be achieved, and further the image acquisition component can be used to capture the first image sequence and the second image sequence.
[0026] It should be noted that, in the embodiment of the present application, the first image sequence can be regarded as a primary image sequence, and the second image sequence can be regarded as a secondary image sequence.
[0027] Furthermore, the captured first image sequence corresponds to the second image sequence shooting parameters, wherein the shooting parameters may include timestamp, automatic exposure control (AEC), automatic white balance (AWB), and auto focus (AF).
[0028] The corresponding shooting parameters may include the shooting parameters being the same or similar.
[0029] Furthermore, it is understood that both the first image sequence and the second image sequence may include multiple frames. Specifically, the first image sequence may include multiple second frames, and the second image sequence may include multiple third frames. Therefore, it can be seen that each second frame in the first image sequence corresponds to each third frame in the second image sequence in terms of timestamp.
[0030] For example, the first image sequence corresponds to a first timestamp, and the second image sequence corresponds to a second timestamp. The first timestamp can indicate the time information of each second frame in the first image sequence, while the second timestamp can indicate the time information of each third frame in the second image sequence. Based on the correspondence between the first timestamp and the second timestamp, it can be determined that each second frame in the first image sequence and each third frame in the second image sequence have a timestamp correspondence. The correspondence between the first timestamp and the second timestamp can include the first timestamp and the second timestamp having the same start time and the same end time.
[0031] Step S120: determining a second frame rate based on the degree of picture change of the first image sequence and the first frame rate, wherein the second frame rate is positively correlated with the degree of picture change, wherein the second frame rate is less than or equal to the first frame rate.
[0032] Furthermore, to reduce the computing resources required for subsequent defocusing, the frame rate of the second image sequence can be reduced. However, it is understood that if the frame rate of the second image sequence is too low, the subsequent defocusing effect may be degraded, such as by causing phase deviation and ghosting artifacts, thereby affecting the quality of the defocused image.
[0033] Therefore, in some embodiments, the second frame rate may be determined based on the degree of picture change in the first image sequence. Specifically, the second frame rate may be determined based on the degree of picture change in the first image sequence and the first frame rate, wherein the second frame rate is positively correlated with the degree of picture change and is less than or equal to the first frame rate.
[0034] That is, the first frame rate can be dynamically adjusted according to the degree of picture change to obtain the second frame rate, and the second frame rate can be made less than or equal to the first frame rate.
[0035] It can be understood that when the degree of picture change is large, it means that the picture content of the first image sequence has changed to a large extent and at a fast speed. At this time, a second frame rate that is as large as possible can be determined to ensure the quality of the image obtained after the subsequent blurring operation; if the degree of picture change is small, it means that the picture content of the first image sequence has changed to a small extent and at a slow speed. At this time, a second frame rate that is as small as possible can be determined to minimize the computing resources required for the blurring operation without affecting the quality of the image obtained after the blurring operation.
[0036] The degree of picture change can be characterized by the degree of change of the target object in the first image sequence. Exemplarily, the target object can be a target object. If the target object is in a stationary state in the first image sequence, it can be determined that the degree of change of the target object in the first image sequence is low, and thus the degree of picture change can be determined to be low; and if the target object is in a moving state in the first image sequence, it can be determined that the degree of change of the target object in the first image sequence is high, and thus the degree of picture change can be determined to be high. In addition, the degree of picture change can also be determined based on the overall degree of change of the picture content in the first image sequence. For example, the electronic device can be deployed with a picture content analysis model, so as to analyze the degree of change of the first image sequence through the picture content analysis model, and then determine the degree of picture change.
[0037] Optionally, if a metastable event is detected, it can be directly determined that the image has changed significantly, thereby obtaining a higher second frame rate. The metastable event can be an event with a high probability of significant image change, as determined in advance based on experience. For example, metastable events may include camera application launch, switching between shooting magnification ranges, shooting algorithm degradation (fallback), shooting frame adjustment, and shooting mode switching.
[0038] For example, see Figure 3 , Figure 3 Schematic diagram of metastable events provided by the embodiment of the present application is shown. Figure 3 , it is shown that the metastable event 300 may include camera application startup 301 , shooting magnification range switching 302 , shooting algorithm degradation 303 , shooting frame adjustment 304 and shooting mode switching 305 .
[0039] Optionally, for some implementations, when a metastable event is detected, the second frame rate can be directly set to the first frame rate, that is, the second frame rate is set to the maximum value that can be achieved, thereby ensuring the quality of subsequent blurring processing to the greatest extent.
[0040] In addition, the blurring process for the first image sequence can be subsequently performed by running the blurring algorithm. In the early stages of the blurring algorithm, the image may not yet be stable. Therefore, there is a high probability that the image will change significantly in the early stages of the blurring algorithm, and a higher second frame rate can be directly determined at this time. After the blurring algorithm enters a stable period, the image may be stable. Therefore, there is a high probability that the image will change slightly in the stable period of the blurring algorithm, and a lower second frame rate can be directly determined at this time.
[0041] In some embodiments, the electronic device can run a camera application, so that the camera application can monitor metastable events, and can also monitor whether it is in the early stage or stable period of blurring processing. The camera application can also analyze the degree of picture change of the first image sequence, and then the camera application can determine the second frame rate.
[0042] Step S130: determining 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 may be determined from the second image sequence. For example, a portion of a third frame image may be extracted from the second image sequence to form the third image sequence.
[0044] Specifically, how to extract part of the third frame image from the second image sequence can be determined according to the ratio of the first frame rate to the second frame rate, thereby obtaining the third image sequence. For detailed description, please refer to the subsequent embodiments.
[0045] Step S140: blurring the first image sequence using the third image sequence to obtain a 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 a target image sequence for preview display.
[0047] It is understandable that the first image frame in the third image sequence may not correspond one-to-one to the second image frame in the first image sequence. Therefore, when performing blurring, at least one second image frame can be blurred using a first image frame to save computing resources. For detailed description, please refer to the subsequent embodiments. Furthermore, after blurring each second image frame using the first image frame, 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, the electronic device may include a display screen. After the electronic device runs a camera application, the target image sequence can be previewed and displayed on the display screen. A user can perform a shooting confirmation 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 a preview display.
[0049] An image generation method provided in an embodiment of the present application first captures 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. A second frame rate is then 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. A third image sequence is then determined from the second image sequence based on the second frame rate. The first image sequence is then defocused using the third image sequence to obtain a target image sequence for preview display. In the image generation method provided in the present application, the third image sequence used for defocusing the first image training can be dynamically adjusted based on the degree of image change. Specifically, the third image sequence can be determined using a second frame rate, wherein the second frame rate 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 the subsequent defocusing process. When the degree of image change is low, a lower second frame rate can be determined to reduce resource consumption during the defocusing process, thereby reducing overall power consumption.
[0050] See also Figure 4 , Figure 4 A flowchart of an image generation method provided by an embodiment of the present application is shown. The image generation method can be applied to Figure 1 The electronic device in the image generation scenario shown may specifically use a processor of the electronic device as the execution subject of the image generation method. The image generation method may include steps S210 to S280.
[0051] Step S210: capturing a first image sequence and a second image sequence at a first frame rate, wherein shooting parameters of the first image sequence and the second image sequence correspond to shooting parameters of the first image sequence and the second image sequence.
[0052] Among them, step S210 has been described in detail in the above embodiment and will not be repeated here.
[0053] Step S220: Determine the degree of picture change of the first image sequence.
[0054] Step S230: determining a frame rate adjustment parameter based on the degree of picture change, wherein the frame rate adjustment parameter is inversely correlated with the degree of picture change.
[0055] Step S240: using the ratio of the first frame rate to the frame rate adjustment parameter as the second frame rate.
[0056] The first image sequence may be directly analyzed by an application program running on the electronic device to determine the degree of picture change.
[0057] Optionally, electronic devices can be used to monitor metastable events. If a metastable event is detected, it can be directly determined that the image has changed significantly. The metastable event can be an empirically determined event with a high probability of causing a significant image change. Specific metastable events can be described in the previous embodiments and will not be further elaborated here.
[0058] Optionally, upon detecting a metastable event, the electronic device 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 blurring operations as much as possible. If no metastable event is detected after the specified time period, the frame rate adjustment parameter can be determined based on the degree of image change, thereby determining the second frame rate. In some embodiments, this solution is also referred to as frame skipping disable logic.
[0059] Optionally, an application running on the electronic device can control the execution of a defocusing algorithm, thereby performing defocusing processing on the first image sequence. It is understood that in the early stages of the defocusing algorithm, the image content in the first image sequence may not yet be stable. Therefore, in the early stages of the defocusing processing, there is a high probability that the image content will change significantly, and in this case, it can be determined that the image content change significantly. After the defocusing algorithm enters a stable period, for example, after the defocusing algorithm has run for a certain period of time, the image content may be in a stable state, and there is a high probability that the image content change will be smaller, and in this case, it can be determined that the image content change significantly.
[0060] Optionally, the electronic device may also be configured with a sensing component, so that the sensing component can collect information such as the environment information of the electronic device or the posture parameters of the electronic device, and then determine the corresponding frame rate adjustment parameters through a deep learning model in combination with the environment information or posture parameters. For example, the deep model can be a scene classification algorithm decision model. Exemplarily, the sensing component may include an ambient light sensor and a gyroscope, so that the ambient light sensor can collect the environment information of the electronic device, and the gyroscope can collect the posture information of the electronic device.
[0061] Furthermore, after obtaining the picture change degree, a frame rate adjustment parameter may be directly determined based on the picture change degree, wherein the frame rate adjustment parameter is inversely correlated with the picture change degree.
[0062] The frame rate adjustment parameter can be used to adjust the first frame rate. In some embodiments, 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 represent the degree of reduction of the first frame rate. That is, the larger the frame rate adjustment parameter, the greater the degree of reduction of the first frame rate, and the smaller the second frame rate; and the smaller the frame rate adjustment parameter, the smaller the degree of reduction of the first frame rate, and the larger the second frame rate.
[0063] It can be understood that in order to minimize the computing resources required for blurring processing while ensuring the quality of the target image sequence obtained by blurring processing, a larger frame rate adjustment parameter can be determined when the degree of picture change is small; and a smaller frame rate adjustment parameter can be determined when the degree of picture change is large.
[0064] Specifically, step S230 may include steps S231 to S233.
[0065] Step S231: when the degree of picture change is greater than or equal to a first threshold, determining the frame rate adjustment parameter to be a first value.
[0066] Step S232: When the degree of picture change is less than a first threshold and greater than or equal to a second threshold, determine the frame rate adjustment parameter 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: When the degree of picture change is less than a second threshold, determine the frame rate adjustment parameter to be a third value, wherein the third value is greater than the second value.
[0068] In some embodiments, the degree of image change may be compared with a first threshold and a second threshold, respectively, wherein the first threshold is greater than the second threshold. Thus, if the degree of image change is greater than or equal to the first threshold, it can be considered that the degree of image change is large, and the frame rate adjustment parameter can be determined to be the first value.
[0069] When the degree of picture change is less than the first threshold and greater than or equal to the second threshold, it can be considered that the degree of picture change is medium, and the frame rate adjustment parameter can be determined to be the second value.
[0070] In the case that the picture change degree is less than the second threshold, it can be considered that the picture change degree is small, and thus the frame rate adjustment parameter can be determined to be the third value.
[0071] The second value is smaller than the first value, and the third value is larger than the second value.
[0072] Furthermore, after obtaining the frame rate adjustment parameter, the ratio of the first frame rate to the frame rate adjustment parameter may be used as the second frame rate.
[0073] For example, in some embodiments, the frame rate adjustment parameter can be represented by Ratio. For example, if the first frame rate is 24 fps and Ratio=3, then the second frame rate can be 24 / 3=8 fps.
[0074] Step S250: Acquire a frame rate adjustment parameter, wherein the frame rate adjustment parameter is a ratio of the first frame rate to the second frame rate.
[0075] Step S260: performing a selection operation on the third frame image at intervals of a fourth value in the second image sequence to obtain the third image sequence, wherein the fourth value is the frame rate adjustment parameter -1.
[0076] Furthermore, to determine the third image sequence from the second image sequence, a frame rate adjustment parameter may be first obtained. The 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 may be performed on the third frame images at intervals of a fourth value in the second image sequence 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 24 fps and a second frame rate of 8 fps, the fourth value can be 2. The second image sequence can then include 24 third-frame images per second, while the subsequently obtained third image sequence can include 8 first-frame images per second. Therefore, a selection operation can be performed on the third-frame images that occur every two frames in the second image sequence. The selection operation can indicate that the third-frame image that occurs every two frames in the second image sequence is selected as a 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 are respectively numbered f1, f2... to f24, then the third frame image numbered f1 can be first selected as a first frame image in the third image sequence; then, after an interval of 2 third frame images, the third frame image numbered f4 can be continued to be selected as a first frame image in the third image sequence; and this is continued until the second image sequence is traversed, thereby obtaining a third image sequence consisting of third frame images numbered f1, f4, f7, f10, f13, f16, f19 and f22, and these multiple third frame images are the multiple first frame images in the third image sequence.
[0080] In some embodiments, an electronic device may include a sensor layer, a hardware abstraction layer (HAL), and an application layer. The HAL may include a custom zone and a vendor hardware zone (Vendor HAL).
[0081] The sensor layer may capture the first image sequence and the second image sequence through the image acquisition component, and the first image sequence and the second image sequence may be transmitted to the supplier hardware area for data processing.
[0082] The application layer can issue control instructions to the customization area, which then controls data processing in the vendor hardware area based on these instructions. Specifically, the application layer can issue control instructions based on a first frame rate, a second frame rate, or other factors. For example, as previously described, to derive a third image sequence from a second image sequence, only a portion of the third frame from the second image sequence needs to be selected. Therefore, the application can send an execution request only for the portion of the third frame that needs to be selected, while not sending an execution request to the customization area for the portion of the third frame that does not need to be selected. Consequently, the customization area only receives an execution request when the third frame needs to be selected and sends it to the vendor hardware area to process the portion of the third frame from the second image sequence that needs to be selected. If the customization layer does not receive an execution request, it does not send an execution request to the vendor hardware area, and thus does not process the portion of the third frame from the second image sequence that does not need to be selected. This reduces the amount of data processing required and the demand on computing resources.
[0083] The third frame image after selection and data processing can constitute a third image sequence.
[0084] The above-mentioned selecting a portion of the third frame image from the second image sequence to form the third image sequence may also be called frame skipping.
[0085] Step S270: determining in the first image sequence the second frames of images corresponding to the first frames of images in the third image sequence.
[0086] Furthermore, after obtaining the third image sequence, the first image sequence can be blurred using the third image sequence to obtain a target image sequence for preview display. For some embodiments, the second frame image corresponding to each first frame image in the third image sequence can first be determined in the first image sequence.
[0087] Exemplarily, the second frames of images corresponding to the first frames of images in the third image sequence may be determined in the first image sequence according to the timestamps. Specifically, step S270 may include steps S271 and S272.
[0088] Step S271: Determine a 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 in the first image sequence the second frames of images corresponding to the timestamps of the first frames of images 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 match, that is, the first timestamp and the second timestamp are the same or similar, for example, the first timestamp and the second timestamp have a deviation within 3 ms.
[0091] Since the third image sequence is determined based on the second image sequence, a 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 from the second image sequence to form the third image sequence.
[0092] Furthermore, based on the first timestamp and the third timestamp, second frames of images corresponding to the timestamps of the first frames of images in the third image sequence may be determined in the first image sequence.
[0093] For example, see Figure 5 , Figure 5 Schematic diagram of a frame image provided by an embodiment of the present application is shown. Figure 5 , a first image sequence 510, second frame images 511, 512, 513, 514, 515, 516, 517, 518, 519 included in the first image sequence 510, and a first timestamp 580 corresponding to the first image sequence 510 are shown. In addition, Figure 5 5. Also shown is 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 As shown in FIG. 9 , there are 9 second frame images and 3 first frame images. From the number, it can be seen that the frame rate adjustment parameter is 3.
[0095] The first timestamp and the third timestamp have the same or similar starting time. Figure 5 In the figure, each group of dotted boxes is the second frame image corresponding to the timestamp of the first frame image. Specifically, the second frame image 511 corresponds to the timestamp of the first frame image 521; the second frame image 515 corresponds to the timestamp of the first frame image 522; and the second frame image 517 corresponds to the timestamp of the first frame image 523.
[0096] It should be noted that Figure 5 What is shown are only some frame images in the first image sequence and the third image sequence, and do not constitute a specific limitation on the embodiments of the present 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 the second frame image corresponding to the first frame image and a specified number of second frame images adjacent to the second frame image, and the specified number is determined based on the first frame rate and the second frame rate.
[0098] Furthermore, a target frame image corresponding to the first frame image in the third image sequence may be blurred based on the first frame image 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 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.
[0099] In some implementations, the designated number may be a frame rate adjustment parameter minus 1, that is, a ratio of the first frame rate to the second frame rate minus 1.
[0100] It can be seen that the blurring process is performed on the plurality of second frame images by using one first frame image. Specifically, step S280 may further include steps S281 to S283.
[0101] Step S281: when the first mark is detected, determining the first frame image corresponding to the current second frame image, and performing blurring processing on the current second frame image using the first frame image.
[0102] Step S282: when the second marker is detected, determining the first frame image corresponding to the second frame image that is closest to the current second frame image, and performing blurring processing on the current second frame image using the first frame image.
[0103] Step S283: using the second frame image after the blurring process as the target image sequence for preview display.
[0104] In some embodiments, a second frame image corresponding to the first frame image may be associated with a first identifier, and a second frame image not associated with the first frame image may be associated with a second identifier. Thus, when blurring a second frame image, if the first identifier is detected, the first frame image corresponding to the current second frame image can be directly determined, and blurring can be performed on the current second frame image using the first frame image.
[0105] If the second marker is detected, the first frame image corresponding to the second frame image closest to 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, Figure 5 For example, the specified number can be 2. Thus, each target frame image corresponding to the first frame image actually includes 3 second frame images. That is, one first frame image can be used to perform blurring processing on 3 second frame images. Figure 5 In the target frame image corresponding to the first frame image, the second frame image corresponds to the first identifier, and the two second frame images subsequent to the second frame image correspond to the second identifier.
[0107] Therefore, if the current second frame image is 511, the second frame image 511 corresponds to the first identifier, and 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, the second frame image 513 corresponds to the second identifier, then the first frame image 521 corresponding to the second frame image 511 closest to 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 second frame image closest to the current second frame image does not represent the previous second frame image adjacent to the current second frame image, but the second frame image closest to the current second frame image and having a corresponding first frame image.
[0109] For some embodiments, Figure 5 What is shown in FIG. 3 is a third image sequence obtained when the virtual algorithm is in a stable period.
[0110] For example, see Figure 6 , Figure 6 Schematic diagram of a frame image provided by an embodiment of the present application is shown. Figure 6, a first image sequence 610, a second frame image 611, a second frame image 612, a second frame image 613, a second frame image 614, a second frame image 615, a second frame image 616, a second frame image 617, a second frame image 618, a second frame image 619, a second frame image 6110, a second frame image 6111, a second frame image 6112 included in the first image sequence 610, and a first timestamp 680 corresponding to the first image sequence 610 are shown. In addition, Figure 6 6 shows a third image sequence 620 , 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 in FIG. 1 and FIG. 2 show that the frame rate adjustment parameter is 6. FIG.
[0112] The first timestamp and the third timestamp have the same or similar starting time. Figure 6 In the figure, each set of dotted boxes is 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; the timestamp of the second frame image 617 corresponds to the timestamp of the first frame image 622.
[0113] Therefore, in Figure 6 In , the specified number can be 5. Thus, each target frame image corresponding to the first frame image actually includes 6 second frame images. That is, one first frame image can be used to perform blurring processing on 6 second frame images. Figure 5 In the target frame image corresponding to the first frame image, the second frame image corresponds to the first identifier, and the five second frame images subsequent to the second frame image correspond to the second identifier.
[0114] Therefore, if the current second frame image is 611, the second frame image 611 corresponds to the first identifier, and 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, the second frame image 615 corresponds to the second identifier, then the first frame image 621 corresponding to the second frame image 611 closest to 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 What is shown are only some frame images in the first image sequence and the third image sequence, and do not constitute a specific limitation on the embodiments of the present application.
[0116] For some embodiments, Figure 6 What is shown in FIG. 3 is a third image sequence obtained when the virtual algorithm is in a static period.
[0117] Among them, the electronic device can be configured with a depth map calculation module, and then blur 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 according to the first frame image, and then blurs the target frame image corresponding to the first frame image.
[0118] Therefore, the second frame image of the first image sequence after the blurring process can constitute the target image sequence.
[0119] Optionally, after blurring each second frame image in the first image sequence, the blurred first image sequence can be directly used as the target image sequence.
[0120] In the image generation method provided in the embodiments of this application, while ensuring the quality of the target image sequence obtained by the defocusing process, the computing resources required for the defocusing process are minimized. When the degree of image change is small, a larger frame rate adjustment parameter can be determined; when the degree of image change is large, a smaller frame rate adjustment parameter can be determined. This achieves dynamic frame rate optimization, significantly reduces computing and transmission volume, and makes system resource allocation more in line with actual business needs.
[0121] See also Figure 7 , Figure 7 The figure shows a structural block diagram of an electronic device provided in an embodiment of the present application. Figure 7 The electronic device 700 shown in FIG. 7 includes a sensor layer 710 , a hardware abstraction layer 720 , an application layer 730 , and an algorithm processing system (APS) 740 .
[0122] The hardware abstraction layer 720 includes a custom area 721 and a vendor hardware area 722. The sensor layer 710 is connected to the vendor hardware area 722 via a driver 711 and an image signal processor 712, respectively. The custom area 721 is connected to the vendor hardware area 722 and the application layer 730, respectively. The algorithm processing system 740 is connected to the application layer 730. The algorithm processing system 740 is used for blur processing and preview display, which can also be called a real-time preview blur (Realtime Bokeh) algorithm. The real-time preview blur can generate a depth map based on binocular disparity calculation, and then perform blur rendering driven by a convolutional neural network to achieve preview display.
[0123] For some embodiments, the electronic device 700 may further include a processor ( Figure 7 ), the processor may directly or indirectly communicate with Figure 7 The layers are connected.
[0124] Optionally, the processing delay of the real-time preview blurring algorithm may be constrained within a specified duration. For example, the specified duration may be 1000 / first frame rate, and the unit may be ms.
[0125] In some embodiments, the application layer 730 can send an execution request for the second image sequence to the customization area 721. If the customization area 721 receives the execution request for the second image sequence, it can control the vendor hardware area 722 to perform data processing on the second image sequence. In some embodiments, data processing of the second image sequence can be performed using an offline reprocessing pipeline. Specifically, the customization area 721 can trigger the execution of data processing by sending a slave preview request to the vendor hardware area 722. For example, the electronic device can control the offline reprocessing pipeline using the Camera HAL software.
[0126] If the application layer 730 does not send an execution request for the second image sequence to the customization area 721, the customization area 721 is prohibited from sending a slave preview request to the vendor hardware area 722. Optionally, the customization area 721 can also return feedback information to the application layer 730, indicating that data processing for the current third frame in the second image sequence has not been performed. Therefore, the application layer 730 can reclaim the buffer space (Slave Buffer) used to receive the third frame after data processing, thereby avoiding unnecessary resource waste. This feedback information can be represented by an SRequest Error.
[0127] The manufacturer can implement customized processing of the data stream in the customized area 721 .
[0128] Since the second image sequence can be used to represent the image sequence captured by the slave camera, the execution request for the second image sequence can be represented as a Slave preview request.
[0129] In addition, in the electronic device 700, the sensor layer 710 can capture the first image sequence and the second image sequence through the image acquisition component. The obtained first image sequence and the second image sequence can be transmitted to the supplier hardware area 722 through the image signal processor 712. Furthermore, the execution request sent by the above-mentioned custom area 721 can be used to determine whether it is necessary to skip the data processing of certain third frames of images, that is, to implement the slave offline reprocessing pipeline (Slave OfflineReprocess2) to skip frames and perform data processing on the third frames of images. Exemplarily, the obtained first image sequence and the second image sequence can be transmitted to the image signal processor 712 through 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 by the secondary offline reprocessing pipeline can be skipped.
[0131] It can be understood that please refer to the determination of the third image sequence from the second image sequence based on the second frame rate introduced in the aforementioned embodiment, that is, an execution request can be issued for the third frame image that needs to be selected from the second image sequence, so that the secondary offline reprocessing pipeline can perform data processing on these third frame images that need to be selected; and no execution request is issued for the third frame image that does not need to be selected, so that the corresponding cache space can be released.
[0132] For example, if the first frame rate of the second image sequence is 24 fps and the frame rate adjustment parameter is 3, data processing may be performed only on the third frame of the 8 frames, thereby greatly reducing the amount of data processing.
[0133] See also Figure 8 , Figure 8 The following is a block diagram of the electronic device provided in the embodiment of the present application. Figure 8 Included Figure 7 The electronic device 700 and the connection relationship between each layer shown in the figure will not be repeated here.
[0134] In addition, Figure 8In the image signal processor 712, real-time processing pipeline 1 (Realtime 1) and real-time processing pipeline 2 (Realtime 2) are included. Real-time processing pipeline 1 is used to perform real-time pipeline processing on the first image sequence acquired by sensor layer 710, while real-time processing pipeline 2 is used to perform real-time pipeline processing on the second image sequence acquired by sensor layer 710. It is understood that sensor layer 710 includes primary sensor 1 and secondary sensor 2. The primary sensor 1 can acquire the first image sequence, while the secondary sensor can acquire the second image sequence. Both the first and second image sequences can be raw (RAW) data.
[0135] Among them, real-time pipeline processing can be used to perform black level correction, demosaicing, automatic exposure control, automatic white balance control, automatic focus control and other processing.
[0136] Optionally, the first image sequence and the second image sequence processed by the real-time pipeline may be transmitted to a dynamic random access memory (DRAM) respectively, for example, in the form of YUV420 / P010 format data.
[0137] In addition, 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 embodiment, the frame rate adjustment parameters can be determined by the algorithm processing system 740 based on the real-time preview blurring algorithm.
[0139] In addition, if the application layer 730 obtains the feedback information S Request Error, a second tag may be determined for the current second frame image, and the second tag may be represented by isSlaveSkipping. For example, the second tag for the second frame image may be implemented through metadata.
[0140] Therefore, the application layer 730 includes a master channel (Master) 1 and a slave channel (Slave) 2. After the master channel obtains the second frame image, if the second flag isSlaveSkipping is detected, the current second frame image can be directly blurred by the first frame image corresponding to the second frame image closest to the second frame image, without waiting for the third frame image processed by the slave offline reprocessing pipeline. This avoids the need for the master channel to wait for the slave channel to receive the third frame image processed by the slave offline reprocessing pipeline before further performing the blurring process, thereby causing the number of frames of the target image sequence obtained by the blurring process to be reduced to the frame rate of the third image sequence.
[0141] The contents of both the master channel (Master) and the slave channel (Slave) may be sent to the algorithm processing system 740 , which performs blurring processing on the first image sequence based on a real-time preview blurring algorithm to obtain a target image sequence for preview display.
[0142] Optionally, through the real-time preview of the blurring algorithm, a trigger can be performed based on the third frame image and the first frame image of each set of timestamp matching, for example, to trigger the execution of timestamp alignment, depth map calculation and other processes.
[0143] It should be noted that the above Figure 7 、 Figure 8 The electronic device shown in the figure can be used to execute the image generation method provided by the aforementioned method embodiments. Specifically, the image generation method can be implemented by controlling the aforementioned layers through a processor in the electronic device.
[0144] Therefore, the electronic device provided by the embodiment of the present application achieves a dynamic balance of each layer through collaboration among various layers, can realize dynamic optimization of the secondary offline reprocessing pipeline, can avoid unnecessary waste of resources while ensuring the quality of virtualization processing, significantly reduce the calculation and transmission of redundant data, and make system resource allocation more in line with actual business needs.
[0145] Compared to processing each third frame image through the secondary offline reprocessing pipeline, for example, the first frame rate is 24fps, and the real-time preview blurring algorithm only needs to implement blurring processing based on the frame image of 8fps. In the current process, all 24fps frame images still need to be processed through the offline reprocessing pipeline, that is, each frame image in the first image sequence and the second image sequence is processed through the offline reprocessing pipeline, which will subsequently cause waste of some frame images in the second image sequence after data processing. Taking this example as an example, 66.7% of the frame images after data processing will be wasted. In the image generation method provided in the embodiment of the present application, it is possible to flexibly adjust whether the third frame image in the second image sequence needs to be processed according to the frame image required by the real-time preview blurring algorithm, thereby reducing resource waste. According to experimental measurements by the inventor, the image generation method provided in the embodiment of the present application can reduce the operating current of the electronic device by 30 to 40mA, thereby reducing power consumption. In addition, in the image generation method provided in the embodiment of the present application, the dynamic adjustment is only whether to perform data processing on 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 will not affect the real-time pipeline processing of the real-time processing pipeline, thereby ensuring that the shooting parameters of the first image sequence and the second image sequence correspond.
[0146] See also Figure 9 , Figure 9 A structural block diagram of an image generating device provided in an embodiment of the present application is shown. The image generating device 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 configured 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 picture change of the first image sequence and the first frame rate, where the second frame rate is positively correlated with the degree of picture change, and the second frame rate is less than or equal to the first frame rate.
[0149] Optionally, the first determining unit 920 may also be configured to determine a degree of picture change of the first image sequence; A frame rate adjustment parameter is determined based on the degree of picture change, wherein the frame rate adjustment parameter is inversely correlated with the degree of picture change; and a ratio of the first frame rate to the frame rate adjustment parameter is used as the second frame rate.
[0150] Optionally, the first determination unit 920 can also be used to determine that the frame rate adjustment parameter is a first value when the degree of picture change is greater than or equal to a first threshold degree; determine that the frame rate adjustment parameter is a second value when the degree of picture change is less than the first threshold and greater than or equal to a second threshold degree, wherein the first threshold degree is greater than the second threshold degree and the second value is greater than the first value; and determine that the frame rate adjustment parameter is a third value when the degree of picture change is less than the second threshold degree, wherein the third value is greater than the second value.
[0151] The second determining unit 930 is configured to determine a third image sequence from the second image sequence based on the second frame rate.
[0152] Optionally, the second determination 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; a selection operation is performed on the third frame image of each fourth value interval in the second image sequence to obtain the third image sequence, wherein the fourth value is the frame rate adjustment parameter -1.
[0153] The preview unit 940 is configured to perform blurring processing on the first image sequence using the third image sequence to obtain a target image sequence for preview display.
[0154] Optionally, the preview unit 940 can also be used to determine, in the first image sequence, second frame images corresponding to each first frame image in the third image sequence; based on the first frame image, blur the target frame image corresponding to 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, and the specified number is 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 blur the current second frame image through the first frame image; when the second identifier is detected, determine the first frame image corresponding to the second frame image closest to the current second frame image, and blur the current second frame image through 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; based on the first timestamp and the third timestamp, determine in the first image sequence the second frame images corresponding to the timestamps of each first frame image in the third image sequence.
[0157] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned 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. In addition, the functional units in the various embodiments of this application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or software functional units.
[0159] See also Figure 10 , Figure 10 The following is a block diagram of an electronic device provided in an embodiment of the present application. The electronic device 110 may be a smartphone, a desktop computer, an in-vehicle computer, a server, or a tablet computer. The electronic device 110 in the present 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 application programs are configured to execute the methods described in the aforementioned embodiments.
[0160] The processor 111 may include one or more processing cores. The processor 111 utilizes various interfaces and circuits to connect various components within the electronic device 110. It executes instructions, programs, code sets, or instruction sets stored in the memory 112, and accesses data stored in the memory 112 to perform various functions and process data within the electronic device 110. Optionally, the processor 111 may be implemented in hardware using at least one of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 111 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and computer programs; the GPU is responsible for rendering and drawing display content; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 111 but may be implemented as a separate communication chip. Specifically, the methods described in the preceding embodiments may be executed by one or more processors 111.
[0161] In some embodiments, the memory 112 may include random access memory (RAM) or read-only memory (ROM). The memory 112 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 112 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 110 during use.
[0162] See also Figure 11 , which shows a block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 1100 stores program code, which can be called by a processor to execute the method described in the above method embodiment.
[0163] Computer-readable storage medium 1100 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, a hard disk, or ROM. Alternatively, computer-readable storage medium 1100 may include non-transitory computer-readable storage medium. Computer-readable storage medium 1100 has storage space for program code 1110 for executing any of the method steps described above. This program code can be read from or written to one or more computer program products. Program code 1110 may be compressed, for example, in a suitable format.
[0164] Finally, it should be noted that 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, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements 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 the present application.
Claims
1. An image generation method, characterized in that: include: Capturing 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 a degree of picture change of the first image sequence and the first frame rate, wherein the second frame rate is positively correlated with the degree of picture change, 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; The first image sequence is blurred by the third image sequence to obtain a target image sequence for preview display.
2. The method according to claim 1, characterized in that The determining the second frame rate based on the degree of picture change of the first image sequence and the first frame rate includes: determining a degree of picture change of the first image sequence; determining a frame rate adjustment parameter based on the degree of picture change, wherein the frame rate adjustment parameter is inversely correlated with the degree of picture change; 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 Determining a frame rate adjustment parameter based on the degree of picture change, wherein the frame rate adjustment parameter is inversely correlated with the degree of picture change, includes: When the degree of picture change is greater than or equal to a first threshold, determining the frame rate adjustment parameter to be a first value; When the picture change degree is less than a first threshold and greater than or equal to a second threshold, determining the frame rate adjustment parameter 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; When the degree of picture change is less than a 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, wherein The blurring of the first image sequence by using the third image sequence to obtain a target image sequence for preview display includes: Determining, in the first image sequence, second frames of image corresponding to respective first frames of image in the third image sequence; Based on the first frame image, a 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, and the specified number is determined based on the first frame rate and the second frame rate.
5. The method according to claim 4, characterized in that The second frame image corresponding to the first frame image corresponds to a first identifier, and the second frame image not corresponding to the first frame image corresponds to a second identifier, and blurring 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 includes: When the first identifier is detected, determining a first frame image corresponding to the current second frame image, and performing blurring processing on the current second frame image using the first frame image; When the second identifier is detected, determining a first frame image corresponding to a second frame image that is closest to the current second frame image, and performing blurring processing on the current second frame image using the first frame image; The second frame image after the blurring process is used as the target image sequence for preview display.
6. The method according to claim 4, characterized in that The first timestamp corresponding to the first image sequence matches the second timestamp corresponding to the second image sequence, and the determining, in the first image sequence, second frames of image corresponding to respective first frames of image in the third image sequence includes: determining a third timestamp of the third image sequence based on the second timestamp; Based on the first timestamp and the third timestamp, second frames of images corresponding to the timestamps of the first frames of images in the third image sequence are respectively determined in the first image sequence.
7. The method according to claim 1, characterized in that The determining a third image sequence from the second image sequence based on the second frame rate includes: Obtaining a frame rate adjustment parameter, wherein the frame rate adjustment parameter is a ratio of the first frame rate to the second frame rate; A selection operation is performed on the third frame image at intervals of a fourth value in the second image sequence to obtain the third image sequence, wherein the fourth value is the frame rate adjustment parameter -1.
8. An image generating device, characterized in that: include: an acquisition unit, configured 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; a first determining unit, configured to determine a second frame rate based on a degree of picture change of the first image sequence and the first frame rate, wherein the second frame rate is positively correlated with the degree of picture change, and wherein the second frame rate is less than or equal to the first frame rate; a second determining unit, configured to determine a third image sequence from the second image sequence based on the second frame rate; The preview unit is configured to perform blurring processing on the first image sequence using the third image sequence to obtain a target image sequence for preview display.
9. An electronic device, characterized in that: include: one or more processors; Memory; 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 programs are configured to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Video shooting method and apparatus, electronic device and computer readable storage medium
CN108322650A
Shooting control method and device, electronic equipment and readable storage medium
CN117278842A
Image processing method, electronic device, computer program product and storage medium
CN118042280A
Information processing apparatus, image generation method, control method, and storage medium
US20200322591A1
Imaging element, imaging apparatus, image data processing method, and program
US20210185272A1