Photographing parameter adjustment method, electronic device, and storage medium

By calculating and smoothly switching shooting parameters in electronic devices, the screen jitter or stuttering problems occur when users change shooting parameters are solved, improving the user experience.

WO2025119320A1PCT designated stage expired Publication Date: 2025-06-12HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/137362
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-08
Filing Date
2024-12-06
Publication Date
2025-06-12

AI Technical Summary

Technical Problem

When existing electronic devices change shooting parameters, the screen will shake or stutter, resulting in poor user experience.

Method used

By calculating the frame return time of the image frame in an electronic device in real time, and determining the transition shooting parameters based on the initial and target shooting parameters, smooth switching is achieved to avoid picture jitter or lag.

Benefits of technology

It effectively avoids screen shaking or stuttering during switching shooting parameters, improving the user's visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024137362_12062025_PF_FP_ABST
    Figure CN2024137362_12062025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a photographing parameter adjustment method, an electronic device, and a storage medium. The method comprises: an electronic device receives and responds to a first operation of a user for a camera application, and acquires target photographing parameters; the electronic device acquires a frame returning moment of a first image frame, the first image frame being an image frame acquired by the electronic device on the basis of initial photographing parameters upon receiving the first operation; the electronic device determines first transition photographing parameters on the basis of the frame returning moment of the first image frame, the initial photographing parameters and the target photographing parameters; and the electronic device acquires a second image frame on the basis of the first transition photographing parameters and displays same. According to the method, the electronic device can calculate one or more transition photographing parameters in real time on the basis of a frame returning moment of an image frame, and sequentially switch from the initial photographing parameters to the target photographing parameters on the basis of the one or more transition photographing parameters, thereby avoiding screen jittering or jamming in the photographing parameter switching process, and improving the user visual experience.
Need to check novelty before this filing date? Find Prior Art

Description

Shooting parameter adjustment method, electronic device and storage medium

[0001] This application claims priority to the Chinese patent application with application number 202311693137.5 filed with the State Intellectual Property Office of China on December 8, 2023, and priority to the Chinese patent application with the invention name “A shooting parameter adjustment method, electronic device and storage medium”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a shooting parameter adjustment method, an electronic device, and a storage medium. Background Art

[0003] With the development of science and technology, the shooting effects of electronic devices (such as digital cameras, or mobile phones and tablet computers with cameras, etc.) are getting better and better, and using electronic devices to shoot has become a common choice for people.

[0004] When users use electronic devices to shoot, they can adjust shooting parameters to achieve the desired effect. For example, users can adjust the shooting range by zooming in or out, or adjust shooting parameters such as exposure. Currently, when users change camera shooting parameters, the electronic device will experience a delay in responding to the user's operation, resulting in image jitter or freezes, and a poor user experience. Summary of the Invention

[0005] The present application provides a shooting parameter adjustment method, an electronic device and a storage medium. The electronic device can calculate one or more transition shooting parameters in real time based on the return frame moment of the image frame, and smoothly switch to the target shooting parameters according to the one or more transition shooting parameters in turn, avoiding picture jitter or freeze, and improving the user's visual experience.

[0006] In the first aspect, the present application provides a shooting parameter adjustment method, the method comprising: the electronic device receives and responds to a first operation of a user on a camera application, obtains target shooting parameters, the target shooting parameters are the shooting parameters set by the first operation; the electronic device obtains a return frame moment of a first image frame, the first image frame is an image frame captured based on the initial shooting parameters after the electronic device receives the first operation; the electronic device determines a first transition shooting parameter based on the return frame moment of the first image frame, the initial shooting parameters and the target shooting parameters; the electronic device captures a second image frame based on the first transition shooting parameters; the electronic device displays the second image frame in the camera application.

[0007] Optionally, the electronic device is not limited to determining one transition shooting parameter, and may also determine more other transition shooting parameters, which is not limited in this application.

[0008] Through this method, the electronic device can calculate one or more transition shooting parameters in real time based on the return frame moment of the image frame, and smoothly switch from the initial shooting parameters to the target shooting parameters according to one or more transition shooting parameters in turn, avoiding picture jitter or freeze during the switching of shooting parameters, thereby improving the user's visual experience.

[0009] In combination with the first aspect, in a possible implementation method, the electronic device determines the first transition shooting parameter based on the return frame time of the first image frame, the initial shooting parameters and the target shooting parameters, specifically including: the electronic device obtains a smooth adjustment curve based on the initial shooting parameters and the target shooting parameters, the starting point of the smooth adjustment curve is the initial shooting parameters, and the end point of the smooth adjustment curve is the target shooting parameters; the electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the return frame time of the first image frame.

[0010] In some embodiments, the smooth adjustment curve may be a Bezier curve. The total duration of the smooth adjustment curve may be fixed or determined by initial shooting parameters and target shooting parameters. The total duration of the smooth adjustment curve may also be different depending on the initial shooting parameters and the target shooting parameters.

[0011] The starting point of the smooth adjustment curve may correspond to the time when the electronic device receives the first operation for the camera application. The ending point of the smooth adjustment curve may correspond to the time determined by adding the starting point of the smooth adjustment curve to the total duration of the smooth adjustment curve.

[0012] The electronic device can obtain a smooth adjustment curve based on the initial shooting parameters and the target shooting parameters, and determine one or more transition shooting parameters from the smooth adjustment curve through the return frame moment of the image frame, so that the camera application can smoothly switch from the initial shooting parameters to the target shooting parameters based on the one or more transition shooting parameters. The change in the shooting parameters of the image frame finally obtained by the electronic device conforms to the change law of the smooth adjustment curve, so that the shooting parameters can be smoothly transitioned to the target shooting parameters, avoiding picture jitter or freeze, and improving the user's visual experience.

[0013] In combination with the first aspect, in one possible implementation, before the electronic device receives and responds to the user's first operation on the camera application, the method also includes: the electronic device receives and responds to the second operation of starting the camera application, obtaining initial shooting parameters; the electronic device captures image frames based on the initial shooting parameters and displays the image frames.

[0014] In this way, before the electronic device receives a user operation to change the shooting parameters, the electronic device captures and displays image frames with the initial shooting parameters.

[0015] In combination with the first aspect, in a possible implementation method, the electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the return frame time of the first image frame, specifically including: the electronic device determines whether the return frame time of the first image frame is earlier than the time corresponding to the target shooting parameter in the smooth adjustment curve; when the return frame time of the first image frame is earlier than the time corresponding to the target shooting parameter, the electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the return frame time of the first image frame.

[0016] In one possible implementation, the method further includes: when the return frame time of the first image frame is later than the time corresponding to the target shooting parameter, the electronic device captures a third image frame based on the target shooting parameter; and the electronic device displays the third image frame in the camera application.

[0017] In this way, the electronic device can determine whether to determine the transition shooting parameters based on the image frame's frame return time and the time corresponding to the target shooting parameters in the smooth adjustment curve. In the case where the image frame's frame return time is earlier than the time corresponding to the target shooting parameters in the smooth adjustment curve, the electronic device can determine one or more transition shooting parameters based on the image frame's frame return time. In the case where the image frame's frame return time is later than the time corresponding to the target shooting parameters in the smooth adjustment curve, the electronic device does not need to determine other transition zoom parameters, and zooming ends.

[0018] In combination with the first aspect, in a possible implementation, the electronic device includes an application framework layer and a hardware abstraction layer; the first image frame is an image frame sent by the hardware abstraction layer to the application framework layer after the electronic device receives the first operation, and the return frame moment of the first image frame is the moment when the hardware abstraction layer sends the first image frame to the application framework layer.

[0019] In combination with the first aspect, in a possible implementation method, the electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the return frame time of the first image frame, specifically including: the electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the return frame time of the first image frame through the application framework layer.

[0020] In this way, first, the calculation process of the transition shooting parameters is completed in the application architecture layer, which reduces the interaction steps between the application layer and the application architecture layer, saves the time of the application layer sending the transition shooting parameters to the application architecture layer, and after the HAL layer returns the image frame, the application framework layer can promptly send the camera request carrying the transition shooting parameters to the HAL layer. Secondly, when the HAL layer returns the image frame to the application architecture layer, the application architecture layer can determine the transition shooting parameters in real time based on the return frame time of the image frame returned by the HAL layer, so that the smooth adjustment curve corresponding to the image frame returned by the HAL layer during the shooting parameter adjustment process conforms to the change law of the preset smooth adjustment curve, making the shooting parameter adjustment process smoother, without image jitter or freeze, and improving the user's visual experience.

[0021] In combination with the first aspect, in a possible implementation, the electronic device also includes a camera module; before the electronic device captures the second image frame based on the first transition shooting parameter, the method also includes: in response to the electronic device determining the first transition shooting parameter from the smooth adjustment curve based on the return frame moment of the first image frame through the application framework layer, the electronic device sends a first request to the HAL layer through the application framework layer, and the first request carries the first transition shooting parameter; the electronic device sends the first request to the camera module through the HAL layer; the electronic device captures the second image frame based on the first transition shooting parameter, specifically including: in response to the first request, the electronic device captures the second image frame based on the first transition shooting parameter through the camera module.

[0022] In this way, the application framework layer, HAL layer and hardware layer can cooperate with each other to complete the shooting parameter adjustment process.

[0023] In combination with the first aspect, in a possible implementation, the shooting parameter includes any one of the following: zoom ratio, exposure, aperture, white balance, sharpness, contrast, and saturation.

[0024] In a second aspect, the present application provides an electronic device, which includes a memory and a processor, wherein the memory and the processor are coupled, and the memory is used to store a computer program. When the processor executes and calls the computer program, the electronic device executes a shooting parameter adjustment method provided in any possible implementation of the first aspect.

[0025] In a third aspect, the present application provides a computer-readable storage medium comprising instructions. When the instructions are executed on an electronic device, the electronic device executes a shooting parameter adjustment method provided in any possible implementation of the first aspect.

[0026] In a fourth aspect, the present application provides a computer program product comprising instructions. When the computer program product is run on an electronic device, the electronic device executes a shooting parameter adjustment method provided in any possible implementation of the first aspect.

[0027] In a fifth aspect, the present application provides a chip system, which includes one or more processors, and the processors are used to call computer instructions to enable an electronic device to execute a shooting parameter adjustment method provided in any possible implementation of the first aspect above.

[0028] For the description of the beneficial effects of the second to fifth aspects, reference may be made to the description of the beneficial effects in the first aspect, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] FIG1 is a schematic diagram showing a zoom smoothing adjustment curve;

[0030] FIG2 is a schematic diagram showing the interaction between the software and hardware architecture of a camera application for switching an initial zoom ratio to a target zoom ratio based on a smooth adjustment curve;

[0031] FIG3 shows a schematic diagram of a zoom curve;

[0032] FIG4A shows a schematic structural diagram of the electronic device 100;

[0033] FIG4B is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention;

[0034] 5A-5I are schematic diagrams showing the electronic device 100 adjusting the zoom ratio of a camera application based on user operations;

[0035] FIG6A shows a software architecture diagram of an electronic device 100 for capturing images at an initial zoom ratio, provided by an embodiment of the present application;

[0036] FIG6B shows a software architecture diagram of another electronic device 100 for capturing images with a transitional zoom ratio according to an embodiment of the present application;

[0037] FIG6C shows a schematic diagram of a method flow of a photographing method provided in an embodiment of the present application;

[0038] 7A-7D are schematic diagrams showing zoom smoothing adjustment curves;

[0039] FIG8 is a flow chart of a method for adjusting shooting parameters provided in this application. DETAILED DESCRIPTION

[0040] The following is a clear and detailed description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0041] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0042] The term "user interface (UI)" in the following embodiments of this application refers to the media interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The commonly used form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operations displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of a wearable device.

[0043] When an electronic device displays the photo preview screen or video preview screen of a camera application, the user can change shooting parameters. Shooting parameters may include, but are not limited to, any of the following: zoom ratio, exposure, aperture, white balance, sharpness, contrast, saturation, etc.

[0044] If a user operation to adjust a shooting parameter is detected, the electronic device may generate a smooth adjustment curve based on the initial shooting parameter and the target shooting parameter, and smoothly adjust the parameter to be adjusted from the initial shooting parameter to the target shooting parameter based on the smooth adjustment curve. The initial shooting parameter value refers to the shooting parameter value before the current shooting parameter adjustment operation is detected, and the target shooting parameter value refers to the shooting parameter value after the adjustment trigger operation is detected.

[0045] It is understood that the smooth adjustment curve may include initial shooting parameters, one or more transition shooting parameters, and target shooting parameters. The electronic device can sequentially obtain a preview image frame using the initial shooting parameters, one or more transition shooting parameters, and the target shooting parameters. This avoids the situation where the electronic device directly adjusts the shooting parameters to the target shooting parameters, resulting in a sudden change in the image.

[0046] Illustratively, the shooting parameter may be a zoom ratio, the initial shooting parameter may be an initial zoom ratio, and the target shooting parameter may be a target zoom ratio.

[0047] FIG1 shows a schematic diagram of a zoom smoothing adjustment curve.

[0048] As shown in Figure 1, upon detecting a user operation to adjust the zoom ratio, the electronic device can generate a zoom smoothing adjustment curve as shown in Figure 1 based on the initial zoom ratio and the target zoom ratio. The Bezier curve shown in Figure 1 is a curve obtained by starting with the initial zoom ratio and ending with the target zoom ratio. The Bezier curve includes one or more transition zoom ratios. For example, the Bezier curve shown in Figure 1 includes transition zoom ratio 1, transition zoom ratio 2, and transition zoom ratio 3.

[0049] In response to detecting a user operation to adjust the zoom ratio, the electronic device can obtain a preview image frame through transition zoom ratio 1, transition zoom ratio 2, transition zoom ratio 3 and target zoom ratio in sequence, thereby achieving a smooth transition from the initial zoom ratio to the target zoom ratio.

[0050] Currently, electronic devices use camera applications to smoothly adjust parameters to be adjusted from initial shooting parameters to target shooting parameters.

[0051] FIG2 shows a schematic diagram of the software and hardware architecture interaction of a camera application switching an initial zoom ratio to a target zoom ratio based on a smooth adjustment curve.

[0052] As shown in Figure 2, a layered architecture divides the system into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, the system is divided into four layers: application layer, application framework layer, hardware abstraction layer, and hardware layer, from top to bottom.

[0053] The application layer may include a series of application packages, which may include a camera application, etc.

[0054] The camera application integrates a camera request sending module and a timing module.

[0055] The camera request sending module is used to send camera requests and zoom adjustment requests to the application framework layer. Camera requests may include but are not limited to preview requests, photo taking requests, etc.

[0056] The preview request may be sent after the camera application is started. The photo request may be sent after the camera application detects a photo operation. The zoom ratio adjustment request may be sent after the camera application detects an operation to adjust the zoom ratio.

[0057] The timing module is used to obtain the frame interval and, after detecting the user operation of adjusting the zoom ratio, determine one or more transition zoom ratios based on the frame interval and the Bezier curve, so that the camera request sending module can determine the number of times to send the zoom ratio adjustment request to the program framework layer based on the one or more transition zoom ratios.

[0058] The application framework layer (Frameworks, FWK) provides the application programming interface (API) and programming framework for the application packages in the application layer. The application framework layer also includes some predefined functions.

[0059] In some embodiments, the application framework layer may further include a request queue (RequestQueue) module, and the request queue processing module may include camera requests and zoom ratio adjustment requests sent by the camera application.

[0060] In some embodiments, the application framework layer may further include a request queue processing (RequestThread) module. The request queue processing module may include a wait for request (WaitForRequest) module, a send batch request (SendRequestsBatch) module, and a prepare hardware abstraction layer request (PrepareHardwareAbstractLayerRequest, which may be referred to as PrepareHALRequest) module.

[0061] Among them, the WaitForRequest module can be used to keep the camera request to be executed in the request queue processing module waiting when there is no empty buffer in the N cache buffers allocated to the camera request of the camera application in the buffer area of ​​the electronic device. The PrepareHALRequest module can be used to construct the Capture request of the HAL layer and the output buffer outputBuffers. When there is an empty buffer in the N cache buffers allocated to the camera request of the camera application, the PrepareHALRequest module can obtain the buffer from the Allocate Buffer interface for the camera request sent by the camera application. The Send batch request module can be used to send the Capture request of the HAL layer constructed by the PrepareHALRequest module to the HAL layer.

[0062] For example, N can be 8, meaning that the number of buffers allocated by the electronic device to the camera application for camera requests can be 8. N can also be other values, such as 7 or 9, and the present application does not limit the value of N. The following description uses the example of N being 8 as an example.

[0063] In some embodiments, the application framework layer may further include an Allocate Buffer interface for allocating a buffer for a camera request issued by a camera application. For example, the Allocate Buffer interface may specify the address of a buffer for storing the camera request.

[0064] In some embodiments, the application framework layer may further include a result processing module that can be used to obtain image frames uploaded by the HAL layer and display the obtained image frames. When the image frames are successfully displayed, the buffer storing the successfully displayed image frames is cleared. The result processing module can notify the Allocate Buffer interface of the buffer address storing the successfully displayed image frames.

[0065] In some embodiments, the application framework layer may also include a frame return data processing module. After the result processing module obtains the image frame uploaded by the HAL layer, it sends the image frame return time to the frame return data processing module. The frame return data processing module can determine the frame interval based on the image frame return time. The image frame return time can refer to the moment when the result processing module receives the image frame uploaded by the HAL layer, and the frame interval can refer to the time difference between the return times of two adjacent image frames.

[0066] In some embodiments, the application framework layer may also be referred to as the application framework layer.

[0067] The hardware abstraction HAL layer is an interface layer located between the application framework layer and the hardware layer, providing a virtual hardware platform for the operating system.

[0068] The Hardware Abstraction Layer (HAL) receives camera requests from the application framework layer and sends the camera parameters and buffer address in the camera request to the camera module. It also calls the result-returning interface (for example, ProcessCaptureResult) to send image frames captured by the camera module according to the camera parameters to the result processing module in the application framework layer.

[0069] The hardware layer may include a camera module, an image signal processor, a display, and the like. The camera module may include one or more camera image sensors (e.g., image sensor 1, image sensor 2, etc.). Optionally, the camera module may also include a time-of-flight (TOF) sensor, a multispectral sensor, and the like. The image signal processor may be used to process image frames captured by the camera module. The display may be used to display the image frames sent by the result processing module.

[0070] In combination with the above system structure, the following describes in detail the processing mechanism of the electronic device 100 for a camera request generated based on a user operation for changing a zoom ratio, taking zoom as an example.

[0071] 1. When the electronic device 100 receives an operation from the user to start the camera application, the electronic device 100 starts the camera application. The camera application can issue multiple camera requests for obtaining preview images. The first camera request for obtaining preview images issued by the camera application can fill up the N buffers reserved for camera requests in the cache area.

[0072] Optionally, after the camera application is started, if the shooting parameters have not changed, the camera application may only send a camera request to the application framework layer once.

[0073] For the process of how the electronic device 100 processes the camera request sent by the camera application and sends the image frame for display, please refer to the process description of how the electronic device 100 processes the zoom ratio adjustment request and sends the image frame in steps 6 to 14. This application will not go into details here.

[0074] 2. The application framework layer of the electronic device 100 obtains the return frame time of the image frame.

[0075] When the application framework layer of the electronic device 100 obtains the image frame uploaded by the HAL layer, it can determine the frame return time of the image frame based on the time when the image frame was uploaded by the HAL layer.

[0076] The application framework layer of the electronic device 100 can determine the frame interval based on the frame return time of two adjacent image frames.

[0077] 3. The camera application obtains the frame interval.

[0078] In some embodiments, the frame interval may refer to an average frame interval, i.e., an average of multiple frame intervals. In other embodiments, the frame interval may refer to a real-time frame interval, which may refer to the time difference between the return time of the most recently returned image frame and the return time of the immediately preceding returned image frame.

[0079] 4. The camera app receives the zoom operation.

[0080] The camera application can receive and respond to the user's zoom operation, determine the initial zoom ratio and the target zoom ratio, and then determine a zoom smoothing adjustment curve based on the initial zoom ratio and the target zoom ratio. The zoom smoothing adjustment curve shows the corresponding relationship between time and zoom ratio.

[0081] 5. The camera application determines one or more transition zoom ratios based on the frame interval and the zoom smoothing curve.

[0082] After obtaining the frame interval and zoom smoothing adjustment curve, the camera application can determine one or more transitional zoom factors based on the frame interval and zoom smoothing adjustment curve. This allows the camera application to determine the number of zoom factor adjustment requests to be sent to the application framework layer based on the one or more transitional zoom factors.

[0083] For example, as shown in FIG1 , time t1 may be the time when the camera application receives a zoom operation, and time t2 may be the end time of the zoom smoothing adjustment curve. After time t1, the camera application may determine time t3, time t4, and time t5 based on the first frame interval. Transitional zoom magnifications 1, 2, and 3 may be determined based on time t3, time t4, and time t5 and the zoom smoothing adjustment curve, respectively.

[0084] The camera application can sequentially send zoom adjustment request 1 including transition zoom ratio 1, zoom adjustment request 2 including transition zoom ratio 2, zoom adjustment request 3 including transition zoom ratio 3, and zoom adjustment request 4 including the target zoom ratio to the application framework layer, so that the camera module can capture and display image frames based on the transition zoom ratios.

[0085] 6. The camera application sends a zoom adjustment request 1 to the application framework layer.

[0086] The electronic device 100 may receive a user's operation to change the zoom ratio of the camera application. Based on this operation, after the application framework layer receives the image frame returned by the HAL layer, the camera application in the electronic device 100 may send a zoom ratio adjustment request 1 to the application framework layer.

[0087] 7. The request queue processing module obtains the cache get buffer.

[0088] In some embodiments, the application framework layer may include an Allocate Buffer interface. In response to the zoom magnification request 1 sent by the camera application, the HAL request preparation module may send a get buffer request to the Allocate Buffer interface to obtain a free buffer and allocate the free buffer for the zoom magnification request 1.

[0089] 8. The application framework layer allocates a cache for zoom ratio adjustment request 1.

[0090] When there is an empty buffer among the N buffers reserved for camera requests in the cache area of ​​electronic device 100, electronic device 100 can send the zoom magnification adjustment request 1 to the preparation HAL request module in the request queue processing module. After obtaining the buffer address allocated to the zoom magnification adjustment request 1 by the Allocate Buffer interface, the preparation HAL request module can store the zoom magnification adjustment request 1 in the buffer.

[0091] 9. The application framework layer sends a zoom ratio adjustment request to the HAL layer.

[0092] After the application framework layer allocates a buffer for the zoom ratio adjustment request 1, the application framework layer sends the zoom ratio adjustment request 1 to the HAL layer, and the zoom ratio adjustment request 1 carries the transition zoom ratio 1. The zoom ratio adjustment request 1 may also carry other data, which is not limited in this application.

[0093] Specifically, the HAL request preparation module can construct the zoom adjustment request 1 into a HAL layer Capture request and send it to the HAL layer through the batch request sending module. The HAL layer then sends the camera parameters in the Capture request and the buffer address of the Capture request to the camera module. The camera parameters in the Capture request may include, but are not limited to, the transition zoom ratio 1.

[0094] 10. The HAL layer sends a zoom adjustment request to the camera module.

[0095] In response to the zoom ratio adjustment request sent by the application framework layer, the HAL layer sends the zoom ratio adjustment request to the camera module.

[0096] 11. The electronic device 100 turns on the camera, obtains the image frame captured by the camera based on the zoom ratio adjustment request, and sends the image frame to the HAL layer.

[0097] The camera module in the electronic device 100 can receive the zoom adjustment request and the buffer address of the zoom adjustment request from the HAL layer. The camera module can then acquire image frames according to the camera parameters (e.g., transition zoom ratio 1) and store the acquired image frames in the buffer corresponding to the buffer address carried in the zoom adjustment request.

[0098] In some examples, the image frames captured by the camera module can be transmitted to the image signal processor, which can pre-process the image frames and upload them to the HAL layer through the camera driver or the image processor driver.

[0099] 12. The HAL layer uploads the image frame to the result processing module in the application framework layer.

[0100] After receiving the image frame uploaded by the image signal processor, the HAL layer uploads the image frame to the result processing module in the application framework layer.

[0101] In some examples, the HAL layer may upload the image frame to the camera application through the application framework layer, and the camera application may process the image frame before sending it to the result processing module.

[0102] 13. The result processing module sends the image frame to the display.

[0103] After receiving the image frame uploaded by the HAL layer, the result processing module may send the image frame for display, that is, the result processing module sends the image frame to the display and displays the image frame through the display.

[0104] 14. The electronic device 100 clears the buffer storing the zoom factor adjustment request.

[0105] In some embodiments, after the display successfully displays the image frame, it notifies the result processing module that the image frame has been successfully displayed. It is understood that after the image frame is displayed, the buffer in the electronic device's cache storing the image frame and the zoom factor adjustment request used to obtain the image frame is cleared. The result processing module can send the address of the cleared buffer to the Allocate Buffer interface. The Allocate Buffer interface can subsequently assign the cleared buffer address to the next zoom factor adjustment request.

[0106] In some embodiments, the result processing module will also send the return frame time of the image frame to the return frame data processing module, so that the return frame data processing module can statistically obtain the frame interval of multiple image frames displayed by the electronic device 100.

[0107] After the HAL layer sends the image frame obtained in response to zoom ratio adjustment request 1 to the application framework layer, the application layer can then send zoom ratio adjustment request 2 to the application framework layer and then follow steps 7-13 to obtain the image frame corresponding to zoom ratio adjustment request 2. This process continues until the application framework layer obtains the image frame corresponding to zoom ratio adjustment request 4, at which point the application layer stops sending zoom ratio adjustment requests to the application framework layer. Thereafter, electronic device 100 continuously captures and displays image frames at the target zoom ratio.

[0108] As shown in Figure 1, electronic device 100 uses a camera application to smoothly adjust the zoom magnification from an initial zoom magnification to a target zoom magnification. The camera application determines one or more transitional zoom magnifications based on the frame interval and a zoom smoothing adjustment curve. During the zoom process, the camera module captures image frames based on the one or more transitional zoom magnifications issued by the camera application and returns them to the HAL layer, which then returns the image frames to the application framework layer.

[0109] During the zoom process, based on the zoom magnification and return time of the image frame returned by the HAL layer to the application framework layer, the HAL layer can obtain the zoom curve shown in Figure 3. The zoom curve shown in Figure 3 reflects the zoom process of the image frame collected by the electronic device 100 during the zoom process.

[0110] Based on the above analysis, it can be seen that the camera application determines one or more transitional zoom ratios based on the frame interval and the zoom smoothing curve. However, due to hardware performance limitations and unstable image acquisition and processing algorithms, the camera application can no longer adjust the transitional zoom ratio based on the real-time image frame return time. Furthermore, it takes time for the application layer to send a zoom request to the application framework layer. After the HAL layer returns the image frame, the application framework layer cannot promptly send the zoom request to the HAL layer. Furthermore, the time required for the application layer to send a zoom request to the application framework layer and the time required for the application framework layer to send a zoom request to the HAL layer are both unstable. Ultimately, the time when the HAL layer returns the image frame in response to the zoom request and the corresponding transitional zoom ratio will deviate from the zoom smoothing curve. The HAL layer ultimately obtains the zoom curve shown in Figure 3. This deviates from the zoom smoothing curve, which manifests as image delay and jitter on the display, affecting the user's visual experience.

[0111] Based on this, the present application provides a method for adjusting shooting parameters. The method includes the following steps:

[0112] Step 1: The electronic device 100 determines initial shooting parameters and target shooting parameters.

[0113] When the electronic device 100 displays the camera application's photo preview interface or video preview interface, the user can change shooting parameters from initial shooting parameters to target shooting parameters. Shooting parameters may include, but are not limited to, any of the following: zoom ratio, exposure, aperture, white balance, sharpness, contrast, saturation, etc.

[0114] The initial shooting parameter value refers to the shooting parameter value before the current shooting parameter adjustment operation is detected, and the target shooting parameter value refers to the shooting parameter value after the adjustment trigger operation is detected.

[0115] Exemplarily, the shooting parameter may be a zoom ratio, and the electronic device 100 may increase the zoom ratio of the camera application based on user operation. For example, if the electronic device 100 increases the zoom ratio from 1X to 5X based on user operation, the initial zoom ratio is 1X and the target zoom ratio is 5X.

[0116] The electronic device 100 may also reduce the zoom ratio of the camera application based on user operation. For example, if the electronic device 100 reduces the zoom ratio from 1X to 0.5X based on user operation, the initial zoom ratio is 1X and the target zoom ratio is 0.5X.

[0117] Step 2: The electronic device 100 obtains a smooth adjustment curve based on the initial shooting parameters and the target shooting parameters.

[0118] It is understood that the smooth adjustment curve may include initial shooting parameters, one or more transition shooting parameters, and target shooting parameters. The electronic device can sequentially obtain a preview image frame using the initial shooting parameters, one or more transition shooting parameters, and the target shooting parameters. This avoids the situation where the electronic device directly adjusts the shooting parameters to the target shooting parameters, resulting in a sudden change in the image.

[0119] Exemplarily, when the shooting parameter is a zoom ratio, the electronic device 100 can obtain a zoom ratio smooth adjustment curve based on the initial zoom ratio and the target zoom ratio. The zoom ratio smooth adjustment curve is a curve that starts from the initial zoom ratio and ends at the target zoom ratio. The initial zoom ratio corresponds to time t1, and the target zoom ratio corresponds to time t2, t2 is later than t1, where t1 is the moment when the user chooses to switch to the target zoom ratio. The zoom ratio smooth adjustment curve is used for the electronic device 100 to obtain multiple image frames through the initial zoom ratio, one or more zoom ratios and the target zoom ratio in sequence, so as to achieve smooth switching from the initial zoom ratio to the target zoom ratio.

[0120] Step three: The electronic device 100 determines one or more transition shooting parameters based on the image frame return time and the smooth adjustment curve, and sequentially obtains multiple image frames through one or more zoom ratios and target zoom ratios, and displays the multiple image frames.

[0121] The electronic device 100 collects image frames periodically or irregularly. After t1, the electronic device 100 obtains image frame A collected based on the initial shooting parameters and displays image frame A. The return time of image frame A is t3.

[0122] In response to acquiring image frame A, the electronic device 100 determines transition shooting parameter 1 based on t3 and the smooth adjustment curve. Thereafter, the electronic device 100 acquires image frame B based on transition shooting parameter 1 and displays image frame B. The return time of image frame B is t4.

[0123] In response to acquiring image frame B, the electronic device 100 determines transition shooting parameter 2 based on t4 and the smooth adjustment curve. Thereafter, the electronic device 100 acquires image frame C based on transition shooting parameter 2 and displays image frame C. The return time of image frame C is t5.

[0124] If t5 is later than t2 , the electronic device 100 no longer determines other transition shooting parameters, and continuously acquires and displays image frames using the target shooting parameters.

[0125] Not limited to transition shooting parameter 1, transition shooting parameter 2, and transition shooting parameter 3, the electronic device 100 can also determine more or fewer other transition shooting parameters, which is not limited in this application.

[0126] Through the above method, the electronic device 100 can calculate one or more transition shooting parameters in real time, so that the electronic device 100 can promptly capture and display image frames according to one or more transition shooting parameters, so that the change of shooting parameters conforms to the preset smooth adjustment curve, and the shooting parameters can smoothly transition to the target shooting parameters, avoiding picture jitter or freeze, thereby improving the user's visual experience.

[0127] The following describes the hardware structure of an electronic device 100 provided in an embodiment of the present application.

[0128] FIG. 4A shows a schematic structural diagram of the electronic device 100 .

[0129] The following embodiments are described in detail using electronic device 100 as an example. It should be understood that the electronic device 100 shown in FIG4A is merely an example, and that electronic device 100 may have more or fewer components than shown in FIG4A , may combine two or more components, or may have a different component configuration. The various components shown in FIG4A may be implemented in hardware, including one or more signal processing and / or application-specific integrated circuits, software, or a combination of hardware and software.

[0130] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0131] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0132] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0133] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0134] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0135] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0136] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby enabling the touch function of the electronic device 100.

[0137] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0138] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0139] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0140] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0141] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0142] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0143] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0144] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.

[0145] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0146] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0147] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0148] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0149] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0150] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

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

[0152] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0153] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display screen panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniLED, a microLED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.

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

[0155] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise and brightness. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.

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

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

[0158] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0159] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0160] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0161] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0162] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0163] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0164] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.

[0165] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.

[0166] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.

[0167] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0168] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.

[0169] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0170] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0171] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.

[0172] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.

[0173] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0174] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0175] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.

[0176] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0177] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.

[0178] The touch sensor 180K is also called a "touch panel." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, in a location different from that of the display screen 194.

[0179] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.

[0180] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0181] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0182] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.

[0183] The SIM card interface 195 is used to connect a SIM card.

[0184] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0185] FIG4B is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present invention.

[0186] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, these layers, from top to bottom, include the application layer, application framework layer, hardware abstraction layer (HAL), driver layer, and hardware layer.

[0187] The application layer can include a series of application packages.

[0188] As shown in FIG4B , the application package may include a camera application, and the application package may also include gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications, which are not shown in FIG4B .

[0189] The camera application includes, but is not limited to, a camera request sending module. This module can be used to send camera requests and focus adjustment requests to the application framework layer. Camera requests can include, but are not limited to, preview requests and photo requests.

[0190] The preview request may be sent after the camera application is started. The photo request may be sent after the camera application detects a photo operation. The focus adjustment request may be sent after the camera application detects a focus adjustment operation.

[0191] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes a number of predefined functions. The application framework layer may include a window manager, content provider, view system, telephony manager, resource manager, and notification manager. The window manager manages window programs. It can obtain the display screen size, determine whether a status bar is present, lock the screen, and take screenshots. The content provider stores and retrieves data and makes it accessible to applications. This data may include video, images, audio, incoming and outgoing calls, browsing history and bookmarks, and the phone book. The view system includes visual controls, such as those that display text and images. The view system can be used to build applications. A display interface may consist of one or more views. For example, a display interface containing a text message notification icon may include a view that displays text and a view that displays images. The telephony manager provides communication functions for electronic device 100, such as managing call status (including connected and ended calls). The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, and video files. The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0192] As shown in Figure 4B, the application framework layer also includes a shooting parameter generation module, a request queue processing module, an allocation buffer interface, a result processing module, an image cropping module, a vsync signal monitoring module, a display thread, a timer, a buffer manager, and a rendering process surface flinger.

[0193] The shooting parameter generation module is configured to generate a smooth adjustment curve based on the initial shooting parameters and the target shooting parameters sent by the camera application when detecting that the user has adjusted the shooting parameters. The module also determines one or more transition shooting parameters based on the image frame return time and the smooth adjustment curve.

[0194] The shooting parameter generation module is also used to send a transition shooting parameter to the HAL layer when it detects that the HAL layer uploads an image frame to the result processing module. The HAL layer then sends the transition shooting parameter to the camera module, so that the camera module can obtain the image frame based on the transition shooting parameter.

[0195] In some embodiments, the shooting parameter generation module may also be located in the HAL layer. This application does not limit the location of the shooting parameter generation module.

[0196] For the functions of the request queue processing module and the allocation buffer area interface, please refer to the description in the embodiment of Figure 2, and this application will not go into details here.

[0197] The result processing module is used to receive the image frame and the shooting parameters of the image frame sent by the HAL layer, or store the buffer address of the image frame and the shooting parameters of the image frame.

[0198] The result processing module is further used to send the image frame and the shooting parameters of the image frame, or the buffer address storing the image frame and the shooting parameters of image frame A to the image cropping module.

[0199] In some embodiments, the result processing module is further configured to store the image frame and the shooting parameters of the image frame, or the buffer address storing the image frame and the shooting parameters of the image frame in the buffer manager.

[0200] The image cropping module is configured to obtain the image frame's return time and send it to the shooting parameter generation module. The shooting parameter generation module can obtain transition shooting parameter 1 based on the image frame's return time and the smoothing adjustment curve. The image cropping module then determines a cropping ratio based on the image frame's shooting parameters and transition shooting parameter 1. Based on the cropping ratio, the image frame received by the result processing module is cropped to obtain transition image frame 1. The transition image frame 1, or the buffer address storing the transition image frame 1, is then sent to the buffer manager.

[0201] In some embodiments, the image cropping module is further configured to determine transition shooting parameter 2 from the smooth adjustment curve based on the image frame's return frame time and a preset duration. The image cropping module determines cropping ratio 2 based on the image frame's shooting parameters and transition shooting parameter 2, and crops the image frame based on cropping ratio 2 to obtain transition image frame 2. The image cropping module then sends transition image frame 2 or the buffer address storing transition image frame A2 to the buffer manager.

[0202] The preset duration may be related to the output frame rate of the camera application and the value of the number of interpolated frames a, for example, the preset duration = (a+1) / (1 / (output frame rate). For example, if the output frame rate of the camera application is 30 pfs, that is, the HAL layer returns an image frame to the application framework layer every 33.3 ms, when a is 1, the preset duration may be 16.7 ms.

[0203] For another example, if the output frame rate of the camera application is 60pfs, that is, the HAL layer returns an image frame to the application framework layer every 16.7ms, when a is 1, the preset duration can be 8.35ms.

[0204] The buffer manager is used to store image frames to be displayed or to store the buffer address of image frames to be displayed.

[0205] The buffer manager is further configured to send the stored image frame or the buffer address storing the image frame to the display sending thread when the display sending thread obtains the image frame.

[0206] The display sending thread is used to determine the timing of obtaining the next image frame to be sent for display from the buffer manager based on the vsync signal period or the timer period.

[0207] Specifically, in one possible implementation, the display thread can be configured to obtain the next image frame to be displayed from the buffer manager after m vsync signal cycles have elapsed since the previous image frame was displayed, and send the obtained image frame to the camera application. The camera application can then send the obtained image frame to the rendering process.

[0208] Optionally, in one possible implementation, the display thread may also obtain the next image frame to be displayed from the buffer manager after a timer display period has elapsed since the previous image frame was displayed, and send the obtained image frame to the camera application. The camera application may then send the obtained image frame to the rendering process.

[0209] The vsync signal monitoring module is used to monitor the vsync signal cycle in the rendering process and send the vsync signal cycle to the display thread.

[0210] The timer can be used to send a timer period signal to the display thread, wherein the period of the timer can be determined by the screen refresh frame rate of the electronic device.

[0211] The rendering process is used to render the image frames sent by the camera application and send the rendering results (i.e., the rendered image frames) to the camera application. The camera application can display the rendering results.

[0212] In some embodiments, the application framework layer may also be referred to as the application framework layer.

[0213] The hardware abstraction HAL layer is an interface layer located between the application framework layer and the hardware layer, providing a virtual hardware platform for the operating system.

[0214] The HAL layer receives camera requests from the application framework layer and sends the camera parameters and buffer address in the camera request to the camera module. It also calls the result-returning interface (for example, ProcessCaptureResult) to send image frames captured by the camera module according to the camera parameters to the result processing module in the application framework layer.

[0215] Optionally, the HAL layer may store the image frame acquired by the camera module into the buffer address of the corresponding camera request, and send the image frame or the buffer address of the image frame to the result processing module in the application framework layer.

[0216] In some embodiments, the HAL layer is further configured to send the camera parameters of the image frame to the result processing module. For example, the camera parameters may be shooting parameters corresponding to the image frame, such as initial shooting parameters, transition shooting parameters, or target shooting parameters.

[0217] In some embodiments, the HAL layer is further configured to send a frame return time of the image frame to the result processing module, wherein the frame return time of the image frame is the time when the HAL layer sends the image frame to the result processing module.

[0218] The driver layer includes but is not limited to the camera driver and the display driver. The camera driver is used to drive the camera module to capture image frames, and the display driver is used to drive the display to display image frames.

[0219] The hardware layer may include a camera module, an image signal processor, a display, and the like. The camera module may include one or more camera image sensors (e.g., image sensor 1, image sensor 2, etc.). Optionally, the camera module may also include a time of flight (TOF) sensor, a multispectral sensor, and the like. The image signal processor may be used to process image frames captured by the camera module. The display may be used to display image frames sent by the camera application.

[0220] Next, the electronic device 100 provided in an embodiment of the present application will be described with reference to a UI diagram to adjust shooting parameters based on user operations.

[0221] The embodiment of the present application is described by taking the zoom ratio as an example of a shooting parameter.

[0222] 5A-5I are schematic diagrams showing the electronic device 100 adjusting the zoom ratio of a camera application based on user operations.

[0223] In some implementations, the electronic device 100 may receive a user operation to increase the zoom magnification of the camera application. In other implementations, the electronic device 100 may receive a user operation to decrease the zoom magnification of the camera application.

[0224] Increase the zoom ratio of the camera app

[0225] 5A-5E are schematic diagrams showing the electronic device 100 increasing the zoom ratio of a camera application based on a user operation.

[0226] As shown in Figure 5A, the electronic device 100 can display a desktop, in which a page with application icons is displayed, and the page includes multiple application icons (for example, a settings application icon, an application market application icon, a gallery application icon, a browser application icon, etc.). A page indicator is also displayed below the multiple application icons to indicate the positional relationship between the currently displayed page and other pages. A tray area is displayed below the page indicator. Among them, the tray area includes multiple tray icons, for example, a camera application icon, an address book application icon, a phone application icon, and a message application icon. The tray area remains displayed when the page switches. In some embodiments, the above-mentioned page may also include multiple application icons and a page indicator. The page indicator may not be part of the page and may exist separately. The above-mentioned tray icon is also optional, and the embodiments of the present application are not limited to this.

[0227] The electronic device 100 may receive user input (e.g., a single click) on the camera application icon. In response to the input operation, the electronic device 100 may display a user interface as shown in FIG5B . FIG5B is a user interface of a shooting and result processing module provided by the electronic device 100 according to an embodiment of the present application, which may also be referred to as a preview interface.

[0228] As shown in FIG. 5B , the preview interface may include a mode bar 501 , a shooting control 502 , a preview window 503 , a review control 504 , a quick function area 505 , and a zoom ratio adjustment option 506 .

[0229] The mode bar 501 may include multiple shooting mode options, such as "night scene", "portrait", "photo", "video recording", etc. Different shooting modes can provide users with shooting services with different effects. Users can select any shooting mode from multiple shooting modes to shoot according to different needs. For example, "photo recording" may be the default shooting mode for taking photos. "Video recording" is used to record videos. The "night scene" mode is suitable for shooting scenes with dim light, such as at night. The "portrait" mode is suitable for shooting scenes where the subject is a person. The electronic device 100 can also provide more shooting modes, such as "large aperture", "movie", "professional", etc., which are not listed here one by one.

[0230] The electronic device 100 can detect user operations on the shooting mode options in the mode bar 501 and change the currently used shooting mode according to the above user operations. The above user operations are, for example, left / right swipe operations. For example, when it is detected that the mode bar 501 is dragged and slid to the left (left swipe operation) and the float stops at the "Portrait" option, the electronic device 100 can switch to the "Portrait" mode. By default, the electronic device 100 first uses the "Photograph" mode.

[0231] The capture control 502 is used to trigger a photo. The electronic device 100 can detect whether a user action, such as a click, is applied to the capture control 502. Upon detecting a user action on the capture control 502, the electronic device 100 can generate a capture instruction. Based on the capture instruction, the electronic device 100 can retrieve the image reported by the camera at the corresponding timestamp and save it as a photo.

[0232] The preview window 503 can be used to display the image reported by the camera in real time. In different shooting modes, the electronic device 100 can process the image reported by the camera to improve the image display effect. For example, in "Portrait" mode, the electronic device 100 can blur the background of the image reported by the camera to highlight the portrait. Here, the preview window 503 can display the image processed by the image processing algorithm corresponding to each shooting mode in real time, so that the user can perceive the shooting effect corresponding to each shooting mode in real time.

[0233] The review control 504 can be used to browse thumbnails of photos / videos that have been taken. When a user operation acting on the review control 504 is detected, the electronic device 100 can also display the best photo corresponding to the thumbnail.

[0234] The quick function area 505 may include a control 505A for the protagonist recording mode, an AI scene recognition control 505B, a flash control 505C, a color mode control 505D, a setting control 505E, and the like. The control 505A for the protagonist recording mode can be used to trigger the electronic device 100 to identify the protagonist among multiple characters in the preview screen when it is turned on. The AI ​​scene recognition control 505B can be used to trigger the electronic device 100 to identify the shooting scene in the preview screen when it is turned on. The current AI scene recognition control 505B is in the off state. The flash control 505C can be used to trigger the electronic device 100 to turn on or off the flash. The color mode control 505D can be used to trigger the electronic device 100 to use a color filter to process the image captured by the camera. The setting control 505E can be used to set the shooting parameters of the electronic device 100 (for example, image size, image storage format, etc.), turn on the "auto-snap" function of the electronic device 100, and the like.

[0235] The zoom magnification adjustment option 506 shows a plurality of zoom magnification options, such as a 0.5x zoom magnification option, a 1x zoom magnification option, a 2.5x zoom magnification option, and a 10x zoom magnification option.

[0236] The current zoom ratio is 1x. The preview window 503 displays an image frame captured by the electronic device 100 at a zoom ratio of 1x.

[0237] As shown in FIG. 5B , the electronic device 100 may receive a user input operation for the 2.5x zoom magnification option in the zoom magnification adjustment option 506 . In response to the user input operation, the electronic device 100 may switch the zoom magnification from 1x to 2.5x.

[0238] In response to the electronic device 100 switching the zoom magnification from 1x to 2.5x, the electronic device 100 may determine multiple transition zoom magnifications based on the initial zoom magnification 1x and the target zoom magnification 2.5x. For example, the multiple transition zoom magnifications may be 1.4x and 1.9x.

[0239] Optionally, the electronic device 100 is not limited to determining two transition zoom ratios. It can also determine more or fewer transition zoom ratios, which is not limited in this application. The values ​​of the initial zoom ratio, target zoom ratio, and multiple transition zoom ratios can also be other values. This application is only used as an example to explain this application and does not constitute a limitation.

[0240] In response to the electronic device 100 determining a plurality of transition zoom magnifications, the electronic device 100 may sequentially capture image frames based on the plurality of transition zoom magnifications and display the image frames.

[0241] As shown in FIG. 5C and FIG. 5D , FIG. 5C shows an image frame captured by the electronic device 100 at a zoom ratio of 1.4×, and FIG. 5D shows an image frame captured by the electronic device 100 at a zoom ratio of 1.9×.

[0242] Afterwards, the electronic device 100 continuously captures and displays image frames at the target zoom magnification of 2.5x. FIG5E shows image frames captured by the electronic device 100 at a zoom magnification of 2.5x.

[0243] As can be seen from Figures 5A-5E, when the electronic device 100 increases the zoom ratio based on user operation, the electronic device 100 can smoothly switch to the target zoom ratio through multiple transition zoom ratios in sequence, thereby achieving smooth switching from the initial zoom ratio to the target zoom ratio.

[0244] Reduce the zoom level of the camera app

[0245] 5F-5I are schematic diagrams showing the electronic device 100 reducing the zoom magnification of the camera application based on a user operation.

[0246] The electronic device 100 may display a preview interface of the camera application as shown in FIG5F . The current zoom ratio is 2.5x. The preview window 503 displays an image frame captured by the electronic device 100 at a zoom ratio of 2.5x.

[0247] As shown in FIG. 5F , the electronic device 100 may receive a user input operation for the 1x zoom magnification option in the zoom magnification adjustment option 506 . In response to the user input operation, the electronic device 100 may switch the zoom magnification from 2.5x to 1x.

[0248] In response to the electronic device 100 switching the zoom magnification from 2.5x to 1x, the electronic device 100 may determine multiple transition zoom magnifications based on the initial zoom magnification 2.5x and the target zoom magnification 1x. For example, the multiple transition zoom magnifications may be 1.9x and 1.4x.

[0249] Optionally, the electronic device 100 is not limited to determining two transition zoom ratios. It can also determine more or fewer transition zoom ratios, which is not limited in this application. The values ​​of the initial zoom ratio, target zoom ratio, and multiple transition zoom ratios can also be other values. This application is only used as an example to explain this application and does not constitute a limitation.

[0250] In response to the electronic device 100 determining a plurality of transition zoom magnifications, the electronic device 100 may sequentially capture image frames based on the plurality of transition zoom magnifications and display the image frames.

[0251] As shown in FIG. 5G-FIG . 5H , FIG. 5G shows an image frame captured by the electronic device 100 at a zoom ratio of 1.9×, and FIG. 5H shows an image frame captured by the electronic device 100 at a zoom ratio of 1.4×.

[0252] Afterwards, the electronic device 100 continuously captures and displays image frames at the target zoom magnification of 1x. FIG5I shows image frames captured by the electronic device 100 at a zoom magnification of 1x.

[0253] As can be seen from Figures 5F-5I, when the electronic device 100 reduces the zoom ratio based on user operation, the electronic device 100 can smoothly switch to the target zoom ratio through multiple transition zoom ratios in sequence, thereby achieving smooth switching from the initial zoom ratio to the target zoom ratio.

[0254] It should be noted that Figures 5A-5I above illustrate the example of a user changing the zoom ratio in the camera app's photo preview interface. In other embodiments, the user can also change the zoom ratio in the camera app's video preview interface. This application does not limit the application scenario for changing the zoom ratio.

[0255] FIG6A shows a software architecture diagram of an electronic device 100 for capturing images at an initial zoom ratio according to an embodiment of the present application.

[0256] As shown in Figure 6A, the software architecture of the electronic device 100 includes, but is not limited to, the interaction and cooperation between the application layer (such as the camera application), the application framework layer (framework), the hardware abstraction layer (HAL), and the hardware layer. The application layer mainly involves the camera request sending module in the camera application. The application framework layer mainly involves the shooting parameter generation module, the request queue processing module, the allocation buffer interface and the result processing module and the algorithm module. The hardware mainly includes the camera module and the display.

[0257] Before the electronic device 100 receives a user operation to change the zoom ratio, the electronic device 100 may capture and display an image at the initial zoom ratio, including but not limited to the following steps:

[0258] 1. When the electronic device 100 receives an operation from the user to start the camera application, the electronic device 100 starts the camera application. The camera application can issue multiple camera requests for obtaining preview images. The first camera request for obtaining preview images issued by the camera application can fill up the N buffers reserved for camera requests in the cache area.

[0259] Optionally, after the camera application is started, if the shooting parameters have not changed, the camera application may only send a camera request to the application framework layer once.

[0260] For the process of how the electronic device 100 processes the camera request sent by the camera application and sends the image frame for display, please refer to the process description of how the electronic device 100 processes the zoom ratio adjustment request and sends the image frame in steps 6 to 14. This application will not go into details here.

[0261] The camera application sends a camera request to the request queue processing module in the application framework layer.

[0262] The electronic device 100 may receive an operation from a user to start a camera application. Based on this operation, the camera application may send a camera request to the application framework layer, where the camera request carries an initial zoom factor.

[0263] 2. The request queue processing module obtains the cache get buffer.

[0264] In some embodiments, the application framework layer may include an Allocate Buffer interface. In response to a camera request sent by a camera application, the HAL request preparation module may send a get buffer request to the Allocate Buffer interface to obtain a free buffer and allocate the free buffer for the camera request.

[0265] 3. The request queue processing module allocates buffer for camera requests.

[0266] The electronic device 100 may send the camera request to the prepare HAL request module in the request queue processing module. When there is an empty buffer among the N buffers in the cache area of ​​the electronic device 100, the prepare HAL request module obtains the Allocate Buffer interface to allocate a buffer address for the camera request and then stores the camera request in the buffer.

[0267] 4. The request queue processing module sends camera requests to the HAL layer.

[0268] After the application framework layer allocates a buffer for the camera request, the application framework layer sends a camera request to the HAL layer. The camera request carries the initial zoom factor. The camera request can also carry other data, which is not limited in this application.

[0269] Specifically, the HAL request preparation module constructs the camera request into a HAL-layer Capture request and sends it to the HAL layer via the batch request processing module. The HAL layer then sends the camera parameters in the Capture request and the buffer address of the Capture request to the camera module. The camera parameters in the Capture request may include, but are not limited to, the initial zoom factor.

[0270] 5. The HAL layer sends a camera request to the camera module.

[0271] In response to the camera request sent by the application framework layer, the HAL layer then sends the camera request to the camera module.

[0272] 6. The electronic device 100 turns on the camera, obtains the image frame captured by the camera based on the initial zoom ratio, and sends the image frame to the HAL layer.

[0273] The camera module in the electronic device 100 can receive the camera request and the buffer address of the camera from the HAL layer. Then, the camera module can obtain image frames according to the camera parameters (such as the initial zoom factor) and store the obtained image frames in the buffer corresponding to the buffer address carried in the zoom factor adjustment request.

[0274] In some examples, the image frames captured by the camera module can be transmitted to the image signal processor, which can pre-process the image frames and upload them to the HAL layer through the camera driver or the image processor driver.

[0275] 7. The HAL layer uploads the image frame to the result processing module in the application framework layer.

[0276] After receiving the image frame uploaded by the image signal processor, the HAL layer uploads the image frame to the result processing module in the application framework layer.

[0277] In some examples, the HAL layer may upload the image frame to the camera application through the application framework layer, and the camera application may process the image frame before sending it to the result processing module.

[0278] 8. The electronic device 100 displays the image frame.

[0279] After receiving the image frame uploaded by the HAL layer, the result processing module may send the image frame for display, that is, the result processing module sends the image frame to the display and displays the image frame through the display.

[0280] 9. The electronic device 100 clears the buffer storing the zoom factor adjustment request.

[0281] In some embodiments, after the display successfully displays the image frame, it notifies the result processing module that the image frame has been successfully displayed. It will be appreciated that after the image frame is displayed, the buffer in the electronic device's cache storing the image frame and the zoom adjustment request used to obtain the image frame is cleared. The result processing module can send the address of the cleared buffer to the Allocate Buffer interface. The Allocate Buffer interface can subsequently assign the cleared buffer address to the next camera request.

[0282] 10. The result processing module sends the return frame time of the image frame to the shooting parameter generation module.

[0283] Optionally, step 10 may be performed periodically or irregularly after the camera application is started. After the result processing module receives the image frame uploaded by the HAL layer, the result processing module may send the frame return time of the image frame to the shooting parameter generation module, so that the shooting parameter generation module can determine the transition shooting parameters based on the frame return time of the image frame.

[0284] FIG6B shows a software architecture diagram of another electronic device 100 for capturing images with a transitional zoom ratio, provided in an embodiment of the present application.

[0285] As shown in FIG6B , the software architecture of the electronic device 100 includes, but is not limited to, the interaction and collaboration between the application layer (e.g., camera application), the application framework layer (framework), the hardware abstraction layer (HAL), and the hardware layer. The application layer primarily involves the camera request sending module in the camera application. The application framework layer primarily involves the shooting parameter generation module, the request queue processing module, the allocation buffer interface, the result processing module, and the algorithm module. The hardware primarily includes the camera module and display.

[0286] After the electronic device 100 receives the user's operation on the target zoom magnification option, the electronic device 100 can determine one or more transitional zoom magnifications, and sequentially capture and display images based on the one or more transitional zoom magnifications. This includes but is not limited to the following steps:

[0287] 1. The camera app receives the user's zoom operation.

[0288] For example, a camera application may receive a user operation for a target zoom magnification option. To enable the camera application to smoothly switch from an initial zoom magnification to a target zoom magnification, the electronic device may determine one or more transitional zoom magnifications, and sequentially capture and display images based on the one or more transitional zoom magnifications.

[0289] 2. The camera application sends a zoom request to the shooting parameter generation module in the application framework layer.

[0290] In response to the user's zoom operation, the camera application may send a zoom request to the shooting parameter generation module in the application framework layer, where the zoom request carries a target zoom ratio.

[0291] Exemplarily, the camera application may send a zoom request to the shooting parameter generation module in the application framework layer through the camera request sending module.

[0292] 3. The result processing module sends the return frame time of the image frame to the shooting parameter generation module.

[0293] Optionally, step 3 may be performed periodically or irregularly after the camera application is started. After the result processing module receives the image frame uploaded by the HAL layer, the result processing module may send the return frame time of the image frame to the shooting parameter generation module, so that the shooting parameter generation module can determine the transition shooting parameters based on the return frame time of the image frame.

[0294] 4. The shooting parameter generation module sends a zoom request (transition zoom ratio) to the request queue processing module.

[0295] In response to a zoom request sent by the camera application, the shooting parameter generation module can determine a zoom smoothing adjustment curve based on the initial zoom factor and the target zoom factor. Subsequently, the shooting parameter generation module can determine a transitional zoom factor based on the return time of the image frame sent by the result processing module. After determining the transitional zoom factor, the shooting parameter generation module sends a zoom request to the request queue processing module, which carries the transitional zoom factor.

[0296] 5. The request queue processing module obtains the cache get buffer.

[0297] In some embodiments, the application framework layer may include an Allocate Buffer interface. In response to a zoom request sent by the camera application, the HAL request preparation module may send a request to the Allocate Buffer interface to obtain a free buffer and allocate the free buffer for the zoom request.

[0298] 6. The request queue processing module allocates buffer for zoom requests.

[0299] The electronic device 100 may send the zoom request to the prepare HAL request module in the request queue processing module. When there is an empty buffer among the N buffers in the cache area of ​​the electronic device 100, the prepare HAL request module obtains the Allocate Buffer interface to allocate a buffer address for the zoom request and then stores the zoom request in the buffer.

[0300] 7. The request queue processing module sends a zoom request to the HAL layer.

[0301] After the application framework layer allocates a buffer for the zoom request, the application framework layer sends a zoom request to the HAL layer, and the zoom request carries the transition zoom ratio. The zoom request can also carry other data, which is not limited in this application.

[0302] Specifically, the HAL request preparation module can construct the zoom request into a HAL-layer Capture request and send it to the HAL layer through the batch request sending module. The HAL layer then sends the camera parameters in the Capture request and the buffer address of the Capture request to the camera module. The camera parameters in the Capture request can include, but are not limited to, the transition zoom ratio.

[0303] 8. The HAL layer sends a zoom request to the camera module.

[0304] In response to the zoom request sent by the application framework layer, the HAL layer sends the zoom request to the camera module.

[0305] 9. The electronic device 100 turns on the camera, obtains the image frame captured by the camera based on the transition zoom ratio, and sends the image frame to the HAL layer.

[0306] The camera module in the electronic device 100 can receive the zoom request and the buffer address of the camera from the HAL layer. The camera module can then acquire image frames according to the camera parameters (e.g., transition zoom ratio) and store the acquired image frames in the buffer corresponding to the buffer address carried in the zoom ratio adjustment request.

[0307] In some examples, the image frames captured by the camera module can be transmitted to the image signal processor, which can pre-process the image frames and upload them to the HAL layer through the camera driver or the image processor driver.

[0308] 10. The HAL layer uploads the image frame to the result processing module in the application framework layer.

[0309] After receiving the image frame uploaded by the image signal processor, the HAL layer uploads the image frame to the result processing module in the application framework layer.

[0310] In some examples, the HAL layer may upload the image frame to the camera application through the application framework layer, and the camera application may process the image frame before sending it to the result processing module.

[0311] 11. The electronic device 100 displays the image frame.

[0312] After receiving the image frame uploaded by the HAL layer, the result processing module may send the image frame for display, that is, the result processing module sends the image frame to the display and displays the image frame through the display.

[0313] 12. The electronic device 100 clears the buffer storing the zoom magnification adjustment request.

[0314] In some embodiments, after the display successfully displays the image frame, it notifies the result processing module that the image frame has been successfully displayed. It is understood that after the image frame is displayed, the buffer in the electronic device's cache storing the image frame and the zoom adjustment request used to obtain the image frame is cleared. The result processing module can send the address of the cleared buffer to the Allocate Buffer interface. The Allocate Buffer interface can subsequently assign the cleared buffer address to the next zoom request.

[0315] FIG6C shows a schematic flow chart of a shooting method provided in an embodiment of the present application.

[0316] This method is implemented through the interaction between the application layer (e.g., camera application), the application framework layer, the hardware abstraction layer (HAL), and the hardware within the electronic device. The application layer primarily involves the camera request sending module within the camera application. The application framework layer primarily includes the shooting parameter generation module, the request queue processing module, the buffer allocation interface, the result processing module, and the algorithm module. The hardware primarily includes the camera module and display.

[0317] S601-S613 illustrate a process in which the electronic device 100 captures and displays image frames at an initial zoom ratio before the user changes the zoom ratio.

[0318] S614-S633 illustrate a process in which, after the user changes the zoom magnification, the electronic device 100 sequentially captures and displays image frames through one or more transitional zoom magnifications and a target zoom magnification.

[0319] S601. The user clicks the “Camera” desktop icon.

[0320] The electronic device 100 may detect a user's operation of opening a camera application, for example, the user clicks a desktop icon of "camera".

[0321] S602: In response to clicking the “camera” desktop icon to start the camera application, the camera request sending module sends a first camera request (initial zoom ratio) to the request queue processing module.

[0322] For example, as shown in Figure 5A, the user can click the camera application icon. In response to the user operation, the electronic device 100 starts the camera application and displays a preview interface of the camera application, which can be the photo preview interface shown in Figure 5B.

[0323] It is not limited to the photo preview interface. The preview interface of the camera application can also be a video preview interface, and this application does not limit this.

[0324] In response to starting the camera application, the camera request sending module may obtain an initial zoom factor and send a first camera request to the request queue processing module in the application framework layer.

[0325] The first camera request carries an initial zoom ratio. The first camera request may also carry other parameter information, such as an initial zoom ratio, initial exposure, initial aperture, initial white balance, initial sharpness, initial contrast, and initial saturation.

[0326] For example, the initial zoom ratio may be 1x or 2.5x.

[0327] Optionally, the camera request sending module may first send the first camera request to the shooting parameter generation module in the application framework layer, and then the shooting parameter generation module sends the first camera request to the request queue processing module. This application does not limit this.

[0328] S603: The request queue processing module allocates a first buffer for the first camera request through the buffer allocation interface.

[0329] Among them, the first buffer is an idle buffer.

[0330] In some embodiments, the application framework layer may further include an Allocate Buffer interface for allocating a buffer for a camera request issued by a camera application. For example, the Allocate Buffer interface may specify the address of a buffer for storing the camera request.

[0331] In some embodiments, the request queue processing module may include a WaitForRequest module, a PrepareHALRequest module, and a SendRequestsBatch module.

[0332] The WaitForRequest module is used to wait for the first camera request to be executed in the request queue processing module if there are no empty buffers in the N buffers allocated to the camera application in the electronic device's buffer area. The PrepareHALRequest module is used to construct the HAL layer Capture request and output buffers. The SendRequestsBatch module can be used to send the HAL layer Capture request constructed by the PrepareHALRequest module to the HAL layer.

[0333] If there are free buffers among the N buffers allocated to the camera application's camera requests, the PrepareHALRequest module can use the Allocate Buffer API to obtain the first buffer for the first camera request issued by the camera application. The module then stores the first camera request in the first buffer. The PrepareHALRequest module then constructs a HAL layer Capture request based on the first camera request. The PrepareHALRequest module then sends the HAL layer Capture request constructed based on the first camera request to the HAL layer via the SendRequestsBatch module.

[0334] For example, N can be 8, meaning that the number of buffers allocated by the electronic device 100 to the camera application for camera requests can be 8. N can also be other values, such as 7 or 9, and the present embodiment does not limit the value of N. The following description uses the example of N being 8 as an example.

[0335] S604: The request queue processing module sends the first camera request and the address of the first buffer to the HAL layer.

[0336] Optionally, the address of the first buffer may be carried in the first camera request and sent to the HAL layer, or the address of the first buffer may be sent to the HAL layer independently of the first camera request, which is not limited in this application.

[0337] After receiving the first camera request and the address of the first buffer sent by the request queue processing module, the request queue processing module sends the first camera request and the address of the first buffer to the HAL layer.

[0338] S605 : The HAL layer sends the first camera request and the address of the first buffer to the camera module.

[0339] After receiving the first camera request and the address of the first buffer sent by the request queue processing module, the HAL layer sends the first camera request and the address of the first buffer to the camera module.

[0340] S606: The camera module collects and processes the original image stream to obtain image frame A (initial zoom ratio).

[0341] After receiving the first camera request and the address of the first buffer sent by the HAL layer, the camera module responds to the first camera request by turning on and starting to capture and process the raw image stream to obtain image frames. The image frames obtained by the camera module may include image frame A, which is an image frame obtained by the camera module at an initial zoom factor.

[0342] S607: The camera module sends the image frame A (initial zoom ratio) and the address of the first buffer to the HAL layer.

[0343] S608: The HAL layer then sends the image frame A (initial zoom ratio) and the address of the first buffer to the result processing module.

[0344] After the camera module acquires the image frame A based on the initial zoom magnification, the camera module sends the image frame A (initial zoom magnification) and the address of the first buffer to the HAL layer.

[0345] After obtaining the image frame A (initial zoom ratio) and the address of the first buffer sent by the camera module, the HAL layer sends the image frame A (initial zoom ratio) and the address of the first buffer to the result processing module.

[0346] S609: The result processing module sends the return frame time of the image frame A to the shooting parameter generation module.

[0347] The return time of image frame A may be the time when the HAL layer sends image frame A to the result processing module. Upon receiving image frame A from the HAL layer, the result processing module may obtain the return time of image frame A. The result processing module then sends the return time of image frame A to the shooting parameter generation module.

[0348] S610: The result processing module stores the image frame A in a first buffer.

[0349] After obtaining the image frame A (initial zoom factor) and the address of the first buffer sent by the HAL layer, the result processing module can store image frame A in the first buffer based on the address of the first buffer, so that the cached image frame A can be retrieved from the first buffer and displayed later.

[0350] In some embodiments, S609 may be executed after S610, or S609 may be executed simultaneously with S610, which is not limited in this application.

[0351] S611. The result processing module sends the image frame A to the display.

[0352] S612: The result processing module clears the first buffer through the allocation buffer interface.

[0353] Optionally, after the result processing module takes out the image frame A from the first buffer, the result processing module may clear the first buffer through the allocation buffer area interface so that the idle first buffer can store other image frames.

[0354] S613: The display shows image frame A.

[0355] When the display needs to display image frame A, the result processing module can obtain image frame A from the first buffer and send image frame A to the display, so that the display can display image frame A.

[0356] Exemplarily, when the initial zoom magnification is 1x, the image frame A may be an image frame captured by the electronic device 100 at a zoom magnification of 1x as shown in FIG. 5B .

[0357] For example, when the initial zoom magnification is 2.5x, the image frame A may be an image frame captured by the electronic device 100 at a zoom magnification of 2.5x as shown in FIG. 5F .

[0358] In some embodiments, S612 may be executed after S613, or S612 may be executed simultaneously with S613, which is not limited in this application.

[0359] When the user does not change the shooting parameters, for example, the user does not change the zoom ratio, the electronic device 100 may continuously acquire and display multiple image frames based on the initial zoom ratio according to the method of S603 to S613.

[0360] In some embodiments, the electronic device 100 may also receive user operations to change the shooting parameters of the camera application. For example, the electronic device 100 may receive user operations to change the zoom ratio of the camera application. After the zoom ratio of the camera application is changed, the camera application must re-send the target zoom ratio to the application framework layer so that the camera module can re-capture and display the image frames according to the target zoom ratio. Please refer to the description of the embodiments S614-S633 for details.

[0361] S614: The user clicks a target zoom ratio option.

[0362] When the user needs to change the zoom ratio, the user can click on other zoom ratio options in the camera application preview interface, so that the camera application can switch to the zoom ratio selected by the user.

[0363] For example, the target zoom magnification option may be the 2.5x zoom magnification option shown in Fig. 5B. The user clicking on the target zoom magnification option may be the user clicking on the 2.5x zoom magnification option shown in Fig. 5B.

[0364] For example, the target zoom magnification option may also be the 1x zoom magnification option shown in Fig. 5F. The target zoom magnification option clicked by the user may be the 1x zoom magnification option shown in Fig. 5F.

[0365] S615: The camera request sending module sends a second camera request (target zoom ratio) to the shooting parameter generating module.

[0366] In response to the user clicking the target zoom magnification option, the camera request sending module needs to send a second camera request to the camera parameter generating module. The second camera request is used to send the target zoom magnification to the application framework layer.

[0367] The first camera request includes a target zoom ratio. The target camera request may also include other parameter information, such as an initial zoom ratio, initial exposure, initial aperture, initial white balance, initial sharpness, initial contrast, and initial saturation. The target camera request may not include other parameter information, and this application does not limit this.

[0368] Optionally, the camera request sending module may first send the second camera request to the shooting parameter generation module in the application framework layer, and then the shooting parameter generation module sends the second camera request to the request queue processing module. This application does not limit this.

[0369] S616: The shooting parameter generation module obtains a zoom smoothing adjustment curve based on the initial zoom magnification and the target zoom magnification.

[0370] After the shooting parameter generation module obtains the second camera request sent by the camera request sending module, the shooting parameter generation module may obtain the target zoom ratio from the second camera request.

[0371] In response to the target zoom magnification included in the second camera request, the shooting parameter generation module may obtain a zoom smoothing adjustment curve based on the initial zoom magnification and the target zoom magnification. The zoom smoothing adjustment curve is a curve starting from the initial zoom magnification and ending at the target zoom magnification. The total duration of the zoom smoothing adjustment curve is a first duration.

[0372] The time corresponding to the starting point of the zoom smooth adjustment curve may be the time when the user clicks the target zoom magnification option. The time corresponding to the starting point of the zoom smooth adjustment curve may also be the time when the shooting parameter generation module receives the second camera request sent by the camera request sending module. The difference between the time corresponding to the end point of the zoom smooth adjustment curve and the time corresponding to the starting point of the zoom smooth adjustment curve is the first duration.

[0373] In some embodiments, the first duration can be a fixed duration, i.e., the zoom duration is a fixed duration. In other embodiments, the first duration can also be determined by the shooting parameter generation module based on the initial zoom magnification and the target zoom magnification, for example, based on the difference between the initial zoom magnification and the target zoom magnification, i.e., the zoom duration is not a fixed duration. The first duration can also be determined based on other methods, which are not limited in this application.

[0374] It should be noted that, if the initial zoom ratio and / or the target zoom ratio are different, the obtained zoom smoothing adjustment curve will also be different.

[0375] In some embodiments, the shooting parameter generation module may use a cubic Bezier curve to generate a zoom smoothing adjustment curve. A cubic Bezier curve is a mathematical curve used in two-dimensional graphics applications. The path of a cubic Bezier curve is described by a function B(t) given points P0 (starting point), P1 (control point), P2 (control point), and P3 (end point): B(t) = P0(1-t)3 + 3P1t(1-t)2 + 3P22(1-t) + P3t3 Formula (1)

[0376] As shown in formula (1), t in formula (1) represents the first duration, P0 represents the position point corresponding to the initial zoom ratio, and P3 represents the position point corresponding to the target zoom ratio. The shape of the Bezier curve can be adjusted by adjusting the two control points P1 and P2.

[0377] For example, the general shape of the cubic Bezier curve, such as an "S" shape, and the information of the control point P1 and the control point P2 corresponding to the shape of the cubic Bezier curve, that is, the relative position coordinates of the control point P1 and the position point P0, and the relative position coordinates of the control point P2 and the position point P3, can be determined through a limited number of experiments. The information of the control point P1 and the control point P2 is preset in the electronic device 10. Each time the shooting parameters are adjusted, the shooting parameter generation module can adjust the coordinate positions of the starting point and the end point according to the actual situation to obtain a smooth adjustment curve.

[0378] When a zoom smooth adjustment curve needs to be obtained, the shooting parameter generation module can adjust the shape of the cubic Bezier curve based on the initial zoom ratio and the target zoom ratio to obtain a zoom smooth adjustment curve that matches the zoom reduction operation or the zoom increase operation.

[0379] In some embodiments, the initial zoom ratio may be smaller than the target zoom ratio, that is, the zoom ratio of the camera application is increased. The shooting parameter generation module may obtain a zoom smoothing adjustment curve as shown in FIG7A .

[0380] As shown in Figure 7A, the horizontal axis represents time, and the vertical axis represents zoom ratio. The initial zoom ratio corresponds to time t1, and the target zoom ratio corresponds to time t2. The target zoom ratio is greater than the initial zoom ratio. The time difference between t2 and t1 is a first duration, and t2 is greater than t1. Time t1 can be the moment when the user clicks the target zoom ratio option, or it can be the moment when the shooting parameter generation module receives the second camera request sent by the camera request sending module. As shown in Figure 7A, the zoom speed near the start and end of zooming is slower than the zoom speed in the intermediate time periods.

[0381] In other embodiments, the initial zoom ratio may be greater than the target zoom ratio, that is, the zoom ratio applied by the camera is reduced. The shooting parameter generation module may obtain a zoom smoothing adjustment curve as shown in FIG7B .

[0382] As shown in Figure 7B, the horizontal axis represents time, and the vertical axis represents zoom ratio. The initial zoom ratio corresponds to time t1, and the target zoom ratio corresponds to time t2. The target zoom ratio is smaller than the initial zoom ratio. The time difference between t2 and t1 is a first duration, and t2 is greater than t1. Time t1 can be the moment when the user clicks the target zoom ratio option, or it can be the moment when the shooting parameter generation module receives the second camera request sent by the camera request sending module. As shown in Figure 7B, the zoom speed near the start and end of zoom is smaller than the zoom speed in the intermediate time periods.

[0383] It should be noted that the zoom smoothing adjustment curves shown in FIG. 7A and FIG. 7B are zoom smoothing adjustment curves under ideal conditions.

[0384] S617: The shooting parameter generation module obtains the frame return time of image frame B.

[0385] S618: The shooting parameter generation module needs to determine whether the frame return time of the image frame B is later than the time corresponding to the target zoom ratio in the zoom smoothing adjustment curve.

[0386] The HAL layer periodically or sporadically returns image frames captured by the camera module to the application architecture layer. Image frame B may be the image frame returned by the HAL layer to the application architecture layer after the camera application receives a user click on the target zoom resolution option. Image frame B may be the image frame captured at the initial zoom factor.

[0387] After the camera module acquires image frame B based on the initial zoom factor, the HAL layer can return image frame B to the application architecture layer. After receiving image frame B uploaded by the HAL layer, the shooting parameter generation module in the application architecture layer can obtain the return time of image frame B. The return time of image frame B is the time when the HAL layer uploaded image frame B to the application architecture layer.

[0388] After the shooting parameter generation module obtains the frame return time of the image frame B, the shooting parameter generation module needs to determine whether the frame return time of the image frame B is later than the time of the target zoom ratio in the zoom smoothing adjustment curve, such as time t2.

[0389] When the return frame moment of image frame B is earlier than the moment of the target zoom ratio in the zoom smoothing adjustment curve, the shooting parameter generation module needs to continue to obtain other transition zoom ratios and obtain image frames based on other transition zoom ratios, that is, execute S619-S631.

[0390] When the return frame time of image frame B is later than the target zoom ratio in the zoom smoothing adjustment curve, the shooting parameter generation module does not need to obtain other transition zoom ratios. The zoom ends and the image frame is obtained based on the target transition zoom ratio, that is, S632 is executed.

[0391] S619: The shooting parameter generation module determines a first transition zoom ratio based on the zoom smoothing adjustment curve and the frame return time of the image frame B.

[0392] S620: The shooting parameter generation module sends the second camera request to the request queue processing module.

[0393] In some embodiments, the second camera request may carry a first transition zoom factor. In some embodiments, the first transition zoom factor may also be referred to as transition zoom factor 1.

[0394] Before the electronic device 100 receives the user's click on the target zoom factor option, the electronic device 100 continuously captures and displays image frames at the initial zoom factor. Based on the description of S609, it can be seen that the result processing module also sends the return frame time of the image frame captured and displayed at the initial zoom factor to the shooting parameter generation module.

[0395] When the electronic device 100 receives a user click on the target zoom factor option, for example, after time t1, the electronic device 100 also returns N frames of image frames captured at the initial zoom factor. If, after time t1, at time t3, the shooting parameter generation module obtains image frame B returned by the HAL, that is, the return time of image frame B is time t3, and image frame B is an image frame captured at the initial zoom factor.

[0396] Exemplarily, the image frame B may be the image frame shown in FIG. 5B or FIG. 5F .

[0397] Optionally, after obtaining time t3, the shooting parameter generation module may also obtain a transitional zoom magnification of 1 based on a moment before time t3 and the zoom smoothing adjustment curve. The shooting parameter generation module then sends the second camera request to the request queue processing module. Optionally, after obtaining time t3, the shooting parameter generation module may also obtain a transitional zoom magnification of 1 based on a moment after time t3 and the zoom smoothing adjustment curve. The shooting parameter generation module then sends the second camera request to the request queue processing module. This application will only illustrate the example of the shooting parameter generation module obtaining a transitional zoom magnification of 1 based on time t3 and the zoom smoothing adjustment curve.

[0398] In some embodiments, the initial zoom ratio may be smaller than the target zoom ratio, that is, the zoom ratio of the camera application is increased. The shooting parameter generation module can obtain the zoom smoothing adjustment curve shown in FIG7C.

[0399] Exemplarily, as shown in FIG7C , if the shooting parameter generation module obtains the return frame time of image frame B as time t3 , the shooting parameter generation module can obtain the corresponding transition zoom ratio 1 from the zoom smoothing adjustment curve based on time t3 .

[0400] In some embodiments, the initial zoom ratio may be greater than the target zoom ratio, that is, the zoom ratio of the camera application is reduced. The shooting parameter generation module may obtain a zoom smoothing adjustment curve as shown in FIG7D .

[0401] Exemplarily, as shown in FIG7D , if the shooting parameter generation module obtains the return frame time of the image frame B as time t3 , the shooting parameter generation module can obtain the corresponding transition zoom ratio 1 from the zoom smoothing adjustment curve based on time t3 .

[0402] The second camera request includes a transition zoom factor of 1. Optionally, the second camera request may also include other shooting parameters, such as an initial zoom factor, initial exposure, initial aperture, initial white balance, initial sharpness, initial contrast, and initial saturation. The second camera request may not include other shooting parameters, and this application does not limit this.

[0403] S621: The request queue processing module allocates a second buffer for the second camera through the buffer allocation interface.

[0404] S622: The request queue processing module sends the second camera request and the address of the second buffer to the HAL layer.

[0405] S623: The HAL layer sends the second camera request and the address of the second buffer to the camera module.

[0406] S624: The camera module collects and processes the original image stream to obtain an image frame C (first transition zoom ratio).

[0407] S625: The camera module sends the image frame C (first transition zoom ratio) and the address of the second buffer to the HAL layer.

[0408] S626: The HAL layer then sends the image frame C (first transition zoom ratio) and the address of the second buffer to the result processing module.

[0409] S627: The result processing module sends the return frame time of the image frame C to the shooting parameter generation module.

[0410] S628: The result processing module stores the image frame C in a second buffer.

[0411] S629: The result processing module sends the image frame C to the display.

[0412] S630: The result processing module clears the second buffer through the allocation buffer interface.

[0413] S631. The display displays image frame C.

[0414] The second buffer may be the same buffer as the first buffer, or may not be the same buffer, and this application does not limit this.

[0415] For a detailed introduction to S621-S631, please refer to the description in S603-S613, and this application will not go into details here.

[0416] Optionally, the shooting parameter generation module may further obtain the frame return time of the image frame C. The shooting parameter generation module may further determine whether to generate the next transition zoom ratio based on the frame return time of the image frame C.

[0417] For example, when the return frame time of image frame C is later than the return frame time of the target zoom image frame C in the zoom smoothing adjustment curve, the rate zoom ends, and the shooting parameter generation module no longer generates other transition zoom ratios. The image frame can be directly obtained based on the target transition zoom ratio, that is, S632 is executed.

[0418] When the return time of image frame C is earlier than the target zoom ratio in the zoom smooth adjustment curve, the shooting parameter generation module may determine the transition zoom ratio 2 based on the zoom smooth adjustment curve and the return time of image frame C.

[0419] In some embodiments, the initial zoom ratio may be smaller than the target zoom ratio, that is, the zoom ratio of the camera application is increased. The shooting parameter generation module can obtain the zoom smoothing adjustment curve shown in FIG7C.

[0420] Exemplarily, as shown in FIG7C , if the shooting parameter generation module obtains the return frame time of the image frame C as time t4 , the shooting parameter generation module can obtain the corresponding transition zoom ratio 2 from the zoom smoothing adjustment curve based on time t4 .

[0421] In some embodiments, the initial zoom ratio may be greater than the target zoom ratio, that is, the zoom ratio of the camera application is reduced. The shooting parameter generation module may obtain a zoom smoothing adjustment curve as shown in FIG7D .

[0422] Exemplarily, as shown in FIG7D , if the shooting parameter generation module obtains the return frame time of the image frame C as time t4 , the shooting parameter generation module can obtain the corresponding transition zoom ratio 2 from the zoom smoothing adjustment curve based on time t4 .

[0423] After determining the transition zoom magnification 2, the electronic device 100 may capture the image frame D at the transition zoom magnification 2 in a manner similar to S620-S631 and send the image frame D for display.

[0424] The camera module can upload image frame D to the HAL layer, which then uploads image frame D to the application architecture layer. After receiving image frame D from the HAL layer, the shooting parameter generation module in the application architecture layer can obtain the return time of image frame D. This return time is the time when the HAL layer uploaded image frame C to the application architecture layer.

[0425] After the shooting parameter generation module obtains the frame return time of the image frame D, the shooting parameter generation module needs to determine whether the frame return time of the image frame D is later than the time of the target zoom ratio in the zoom smoothing adjustment curve, such as time t2.

[0426] When the return frame time of the image frame D is earlier than the time of the target zoom ratio in the zoom smoothing adjustment curve, the shooting parameter generation module needs to continue to obtain other transition zoom ratios and obtain image frames based on the other transition zoom ratios.

[0427] In some embodiments, the initial zoom ratio may be smaller than the target zoom ratio, that is, the zoom ratio of the camera application is increased. The shooting parameter generation module may obtain a zoom smoothing adjustment curve as shown in FIG7C .

[0428] Exemplarily, as shown in FIG7C , if the shooting parameter generation module obtains the return frame time of the image frame C as time t5 , the shooting parameter generation module can obtain the corresponding transition zoom ratio 3 from the zoom smoothing adjustment curve based on time t5 .

[0429] In some embodiments, the initial zoom ratio may be greater than the target zoom ratio, that is, the zoom ratio of the camera application is reduced. The shooting parameter generation module may obtain a zoom smoothing adjustment curve as shown in FIG7D .

[0430] Exemplarily, as shown in FIG7D , if the shooting parameter generation module obtains the return frame time of the image frame D as time t5 , the shooting parameter generation module can obtain the corresponding transition zoom ratio 3 from the zoom smoothing adjustment curve based on time t5 .

[0431] After determining the transition zoom magnification 3, the electronic device 100 may capture the image frame E at the transition zoom magnification 3 in a manner similar to S620-S631 and send the image frame E for display.

[0432] If the return time of image frame D is later than the target zoom factor in the zoom smoothing adjustment curve, the shooting parameter generation module must continue to obtain other transition zoom factors and obtain image frames based on the other transition zoom factors. The shooting parameter generation module does not need to obtain other transition zoom factors; upon completion of zooming, the module simply obtains image frames based on the target transition zoom factor, thus executing S632.

[0433] The process is deduced in this way until the image frame returned by the HAL layer to the application framework layer is later than the target zoom ratio in the zoom smoothing adjustment curve, for example, at time t2, and the zoom is completed.

[0434] S632: The electronic device 100 acquires and displays a picture frame at the target zoom ratio (refer to S602-S613).

[0435] When the returning frame time of the image frame B is later than the time of the target zoom ratio in the zoom smoothing adjustment curve, the zoom is completed, and the electronic device 100 can acquire and display the picture frame based on the target zoom ratio.

[0436] Specifically, how the electronic device 100 acquires and displays the picture frame at the target zoom ratio can be referred to the description in S602-S613, and this application will not elaborate on it here.

[0437] After the electronic device 100 acquires and displays the picture frame at the target zoom magnification, if the electronic device 100 does not receive a change in the zoom magnification from the user, the electronic device 100 continues to acquire and display the picture frame at the target zoom magnification.

[0438] Optionally, during the zoom process, the HAL layer can obtain the zoom magnification of the image frame and the image frame return time, and obtain the zoom curve shown in Figure 7C or the zoom curve shown in Figure 7D based on the zoom magnification of the image frame and the image frame return time. The zoom curve shown in Figure 7C or Figure 7D reflects the zoom process of the image frame displayed by the electronic device 100 during the zoom process.

[0439] As shown in Figure 7C or Figure 7D, if the user clicks the target zoom ratio option at time t1, the time when the HAL layer returns image frame B to the application architecture layer is time t6. It takes time for the application architecture layer to send a camera request to the HAL layer, and it also takes time for the HAL layer to send a camera request to the camera module. It also takes time for the camera module to process the image. The time difference between time t1 and time t6 is the first duration. The first duration is the delay in communication between layers and the delay in image processing. If the HAL layer starts to return the image captured at the transition zoom ratio to the application architecture layer at or after time t6, the HAL layer can obtain the zoom curve shown in Figure 7C or Figure 7D.

[0440] Based on the analysis of Figure 6C, it can be seen that, first, the calculation process of the transition zoom ratio is completed at the application architecture layer, which reduces the interaction steps between the application layer and the application architecture layer, saves the time of the application layer sending the transition zoom ratio to the application architecture layer, and after the HAL layer returns the image frame, the application framework layer can promptly send the zoom request to the HAL layer. Secondly, when the HAL layer returns the image frame to the application architecture layer, the application architecture layer can determine the transition zoom ratio in real time based on the return frame time of the image frame returned by the HAL layer, so that the zoom curve corresponding to the image frame returned by the HAL layer during the zoom process conforms to the variation pattern of the zoom smoothing adjustment curve, making the zoom process smoother. The zoom ratio can transition from the initial zoom ratio to the target zoom ratio according to the variation pattern of the zoom smoothing adjustment curve, without image jitter or freeze, thereby improving the user's visual experience.

[0441] FIG8 is a flow chart of a method for adjusting shooting parameters provided in this application.

[0442] S801: The electronic device receives and responds to a first operation of a user on a camera application, and obtains target shooting parameters, where the target shooting parameters are shooting parameters set by the first operation.

[0443] For example, the first operation may be an input operation for a 2.5x zoom ratio option as shown in FIG5B , and the target shooting parameter may be a 2.5x zoom ratio.

[0444] For example, the first operation may be an input operation for a 1x zoom ratio option as shown in FIG5F . The target shooting parameter may also be a 1x zoom ratio.

[0445] S802: The electronic device obtains a return frame time of a first image frame, where the first image frame is an image frame captured based on initial shooting parameters after the electronic device receives a first operation.

[0446] In some embodiments, the first image frame may be image frame B shown in FIG. 6C .

[0447] Exemplarily, the first image frame may be image frame 1, image frame 2, or image frame 3 shown in FIG. 7C or FIG. 7D .

[0448] Exemplarily, the frame return time of the first image frame may be time t3, time t4, or time t5 as shown in FIG. 7C or FIG. 7D .

[0449] S803: The electronic device determines a first transition shooting parameter based on the frame return time of the first image frame, the initial shooting parameter, and the target shooting parameter.

[0450] In some embodiments, the initial shooting parameter may be an initial zoom ratio, and the target shooting parameter may be a target zoom ratio.

[0451] S804: The electronic device captures a second image frame based on the first transition shooting parameter.

[0452] In some embodiments, the second image frame may be image frame C shown in FIG. 6C .

[0453] Exemplarily, the first transition shooting parameter may be transition zoom ratio 1, transition zoom ratio 2, or transition zoom ratio 3 as shown in FIG. 7C or FIG. 7D .

[0454] S805: The electronic device displays the second image frame in the camera application.

[0455] Exemplarily, the second image frame may be the image frame shown in FIG. 5C or the image frame shown in FIG. 5D .

[0456] Exemplarily, the second image frame may also be the image frame shown in FIG. 5G or the image frame shown in FIG. 5H .

[0457] Optionally, the electronic device is not limited to determining one transition shooting parameter, and may also determine more other transition shooting parameters, which is not limited in this application.

[0458] Through this method, the electronic device can calculate one or more transition shooting parameters in real time based on the return frame moment of the image frame, and smoothly switch from the initial shooting parameters to the target shooting parameters according to one or more transition shooting parameters in turn, avoiding picture jitter or freeze during the switching of shooting parameters, thereby improving the user's visual experience.

[0459] In one possible implementation, the electronic device determines the first transition shooting parameter based on the return frame time of the first image frame, the initial shooting parameter and the target shooting parameter, specifically including: the electronic device obtains a smooth adjustment curve based on the initial shooting parameter and the target shooting parameter, the starting point of the smooth adjustment curve is the initial shooting parameter, and the end point of the smooth adjustment curve is the target shooting parameter; the electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the return frame time of the first image frame.

[0460] In some embodiments, the smooth adjustment curve may be a Bezier curve. The total duration of the smooth adjustment curve may be fixed or determined by initial shooting parameters and target shooting parameters. The total duration of the smooth adjustment curve may also be different depending on the initial shooting parameters and the target shooting parameters.

[0461] The starting point of the smooth adjustment curve may correspond to the time when the electronic device receives the first operation for the camera application. The ending point of the smooth adjustment curve may correspond to the time determined by adding the starting point of the smooth adjustment curve to the total duration of the smooth adjustment curve.

[0462] The electronic device can obtain a smooth adjustment curve based on the initial shooting parameters and the target shooting parameters, and determine one or more transition shooting parameters from the smooth adjustment curve through the return frame moment of the image frame, so that the camera application can smoothly switch from the initial shooting parameters to the target shooting parameters based on the one or more transition shooting parameters. The change in the shooting parameters of the image frame finally obtained by the electronic device conforms to the change law of the smooth adjustment curve, so that the shooting parameters can be smoothly transitioned to the target shooting parameters, avoiding picture jitter or freeze, and improving the user's visual experience.

[0463] When the initial shooting parameters are less than the target shooting parameters, for example, the initial shooting parameters may be a 1x zoom factor, the target shooting parameters may be a 2.5x zoom factor, and the smooth adjustment curve may be the zoom smooth adjustment curve shown in FIG. 7A or FIG. For information on how the electronic device determines the first transition shooting parameters from the smooth adjustment curve based on the return frame time of the first image frame, please refer to the description of the embodiment in FIG. 7C .

[0464] When the initial shooting parameter is greater than the target shooting parameter, for example, the initial shooting parameter may be a 2.5x zoom factor, the target shooting parameter may be a 1x shooting parameter, and the smooth adjustment curve may be the zoom smooth adjustment curve shown in FIG. 7B or FIG. For information on how the electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the return frame time of the first image frame, please refer to the description of the embodiment in FIG. 7D .

[0465] In one possible implementation, before the electronic device receives and responds to the user's first operation on the camera application, the method also includes: the electronic device receives and responds to the second operation of starting the camera application, obtaining initial shooting parameters; the electronic device captures image frames based on the initial shooting parameters and displays the image frames.

[0466] In this way, before the electronic device receives a user operation to change the shooting parameters, the electronic device captures and displays image frames with the initial shooting parameters.

[0467] In one possible implementation, the electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the frame return time of the first image frame, specifically including: the electronic device determines whether the frame return time of the first image frame is earlier than the time corresponding to the target shooting parameter in the smooth adjustment curve; when the frame return time of the first image frame is earlier than the time corresponding to the target shooting parameter, the electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the frame return time of the first image frame.

[0468] In one possible implementation, the method further includes: when the return frame time of the first image frame is later than the time corresponding to the target shooting parameter, the electronic device captures a third image frame based on the target shooting parameter; and the electronic device displays the third image frame in the camera application.

[0469] In this way, the electronic device can determine whether to determine the transition shooting parameters based on the image frame's frame return time and the time corresponding to the target shooting parameters in the smooth adjustment curve. In the case where the image frame's frame return time is earlier than the time corresponding to the target shooting parameters in the smooth adjustment curve, the electronic device can determine one or more transition shooting parameters based on the image frame's frame return time. In the case where the image frame's frame return time is later than the time corresponding to the target shooting parameters in the smooth adjustment curve, the electronic device does not need to determine other transition zoom parameters, and zooming ends.

[0470] In one possible implementation, the electronic device includes an application framework layer and a hardware abstraction layer; the first image frame is an image frame sent by the hardware abstraction layer to the application framework layer after the electronic device receives a first operation, and the return frame moment of the first image frame is the moment when the hardware abstraction layer sends the first image frame to the application framework layer.

[0471] In one possible implementation, the electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the return frame time of the first image frame, specifically including: the electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the return frame time of the first image frame through the application framework layer.

[0472] In this way, first, the calculation process of the transition shooting parameters is completed in the application architecture layer, which reduces the interaction steps between the application layer and the application architecture layer, saves the time of the application layer sending the transition shooting parameters to the application architecture layer, and after the HAL layer returns the image frame, the application framework layer can promptly send the camera request carrying the transition shooting parameters to the HAL layer. Secondly, when the HAL layer returns the image frame to the application architecture layer, the application architecture layer can determine the transition shooting parameters in real time based on the return frame time of the image frame returned by the HAL layer, so that the smooth adjustment curve corresponding to the image frame returned by the HAL layer during the shooting parameter adjustment process conforms to the change law of the preset smooth adjustment curve, making the shooting parameter adjustment process smoother, without image jitter or freeze, and improving the user's visual experience.

[0473] In one possible implementation, the electronic device also includes a camera module; before the electronic device captures the second image frame based on the first transition shooting parameter, the method also includes: in response to the electronic device determining the first transition shooting parameter from the smooth adjustment curve based on the return frame moment of the first image frame through the application framework layer, the electronic device sends a first request to the HAL layer through the application framework layer, and the first request carries the first transition shooting parameter; the electronic device sends the first request to the camera module through the HAL layer; the electronic device captures the second image frame based on the first transition shooting parameter, specifically including: in response to the first request, the electronic device captures the second image frame based on the first transition shooting parameter through the camera module.

[0474] In this way, the application framework layer, HAL layer and hardware layer can cooperate with each other to complete the shooting parameter adjustment process.

[0475] In a possible implementation, the shooting parameter includes any one of the following: zoom ratio, exposure, aperture, white balance, sharpness, contrast, and saturation.

[0476] The above are only some of the embodiments and implementations of this application. The scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0477] It is understood that the various user interfaces described in the embodiments of this application are merely exemplary interfaces and do not limit the scope of this application. In other embodiments, the user interface may adopt a different interface layout, include more or fewer controls, and add or remove other functional options. As long as they are based on the same inventive concept provided by this application, they are all within the scope of protection of this application.

[0478] It should be noted that, without causing any contradiction or conflict, any feature in any embodiment of the present application, or any part of any feature, can be combined, and the combined technical solution is also within the scope of the embodiments of the present application.

[0479] As described above, 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 above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above 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 scope of the technical solutions of the embodiments of the present application.

Claims

1. A shooting parameter adjustment method, characterized in that: The method comprises: The electronic device receives and responds to a first operation of a user on a camera application, and acquires a target shooting parameter, where the target shooting parameter is a shooting parameter set by the first operation; The electronic device acquires a return frame time of a first image frame, where the first image frame is an image frame acquired based on initial shooting parameters after the electronic device receives the first operation; The electronic device determines a first transition shooting parameter based on the frame return time of the first image frame, the initial shooting parameter and the target shooting parameter; The electronic device acquires a second image frame based on the first transition shooting parameter; The electronic device displays the second image frame within the camera application.

2. The method according to claim 1, characterized in that The electronic device determines the first transition shooting parameter based on the frame return time of the first image frame, the initial shooting parameter and the target shooting parameter, specifically including: The electronic device acquires a smooth adjustment curve based on the initial shooting parameter and the target shooting parameter, wherein the starting point of the smooth adjustment curve is the initial shooting parameter and the end point of the smooth adjustment curve is the target shooting parameter; The electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the frame return time of the first image frame.

3. The method according to claim 1 or 2, characterized in that: Before the electronic device receives and responds to a first operation of the user on the camera application, the method further includes: The electronic device receives and obtains the initial shooting parameters in response to a second operation of starting a camera application; The electronic device captures image frames based on the initial shooting parameters and displays the image frames.

4. The method according to claim 2, characterized in that: The electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the frame return time of the first image frame, specifically including: The electronic device determines whether a frame return time of the first image frame is earlier than a time corresponding to the target shooting parameter in the smooth adjustment curve; In a case where the frame return time of the first image frame is earlier than the time corresponding to the target shooting parameter, the electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the frame return time of the first image frame.

5. The method according to claim 4, characterized in that The method further comprises: When the returning frame time of the first image frame is later than the time corresponding to the target shooting parameter, the electronic device acquires a third image frame based on the target shooting parameter; The electronic device displays the third image frame within the camera application.

6. The method according to any one of claims 1 to 5, characterized in that: When the initial shooting parameter is greater than the target shooting parameter, the first transition shooting parameter is less than the initial shooting parameter and greater than the target shooting parameter; When the initial shooting parameter is smaller than the target shooting parameter, the first transition shooting parameter is larger than the initial shooting parameter and smaller than the target shooting parameter.

7. The method according to any one of claims 2 to 6, characterized in that: The electronic device comprises an application framework layer and a hardware abstraction layer; The first image frame is an image frame sent by the hardware abstraction layer to the application framework layer after the electronic device receives the first operation, and the return frame time of the first image frame is the time when the hardware abstraction layer sends the first image frame to the application framework layer.

8. The method according to claim 7, characterized in that The electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the frame return time of the first image frame, specifically including: The electronic device determines the first transition shooting parameter from the smooth adjustment curve based on the return frame time of the first image frame through the application framework layer.

9. The method according to claim 7 or 8, characterized in that: The electronic device further includes a camera module; before the electronic device acquires a second image frame based on the first transition shooting parameter, the method further includes: In response to the electronic device determining the first transition shooting parameter from the smooth adjustment curve based on the return frame time of the first image frame through the application framework layer, the electronic device sends a first request to the HAL layer through the application framework layer, where the first request carries the first transition shooting parameter; The electronic device sends the first request to the camera module through the HAL layer; The electronic device acquires a second image frame based on the first transition shooting parameter, specifically comprising: In response to the first request, the electronic device captures the second image frame through the camera module based on the first transition shooting parameter.

10. The method according to any one of claims 1 to 9, characterized in that: The shooting parameters include any of the following: zoom ratio, exposure, aperture, white balance, sharpness, contrast, and saturation.

11. An electronic device, characterized in that: The electronic device comprises a memory and a processor; wherein the memory is coupled to the processor, and the memory is used to store a computer program. When the processor executes and calls the computer program, the electronic device executes the method described in any one of claims 1 to 10.

12. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Shooting method and mobile terminal

    CN107995429A

  • Exposure adjustment method, and terminal device

    CN108234894A

  • Image preview method, device, terminal and computer readable storage medium

    CN108833781A

  • Shooting parameter adjusting method and device

    CN111601031A

  • Video shooting method and device and electronic equipment

    CN115379039A