Frame rate adjustment method and device, electronic equipment and computer readable storage medium
By adjusting the shooting frame rate of the electronic device in a dark scene and determining the target frame rate based on the zoom command and ambient light brightness value, the problem of longer zooming time in traditional technology is solved, and a faster and smoother zoom effect is achieved.
Patent Information
- Application Number
- CN202411720345.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-02-11
AI Technical Summary
In dark scenes, traditional technology has the problem of long zooming time when smoothing zoom, resulting in a decrease in the preview frame rate and affecting the smoothness and speed of the zoom.
By obtaining the zoom parameters and ambient light brightness values corresponding to the zoom command when receiving the zoom command, determine the target frame rate based on these parameters and the frame rate of the image processor, and adjust the shooting frame rate of the electronic device to ensure that it is dark The zoom time in the scene is not extended.
The zoom time control is achieved when zooming smoothly in dark scenes, ensuring the balance between transition frames and zoom time during zooming, and improving the speed and smoothness of zoom.
Smart Images

Figure CN119421053A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of camera technology, and in particular to a frame rate adjustment method, device, electronic device and computer-readable storage medium. Background Art
[0002] At present, electronic devices generally have multiple cameras of different types, that is, multi-camera electronic devices. Each camera of a multi-camera electronic device has different characteristics, so the camera can be switched in real time according to user needs in different shooting scenes.
[0003] In traditional technology, when the ambient light becomes dim, the general strategy is to adjust the automatic exposure parameters and extend the exposure time to ensure the quality of the output image, but this operation will reduce the preview frame rate. For smooth zoom scenes, since the number of transition frames when triggering smooth zoom switching is fixed, if the frame rate of the preview scene is reduced, the smooth zoom time will be longer. Therefore, in traditional technology, there is a problem of long zoom time when smooth zooming in dark scenes. Summary of the invention
[0004] The embodiments of the present application provide a frame rate adjustment method, device, electronic device and computer-readable storage medium, which can ensure that the zoom duration is not prolonged during smooth zooming in dark scenes, and ensure the balance between transition frames and zoom duration during the zooming process.
[0005] In a first aspect, an embodiment of the present application provides a frame rate adjustment method, which is applied to an electronic device, wherein the electronic device includes an image processor, and the method includes:
[0006] When a zoom instruction is received, obtaining a zoom parameter corresponding to the zoom instruction and a brightness value of the ambient light where the electronic device is located;
[0007] Determining a target frame rate according to the brightness value, the zoom parameter, and a frame rate of an image processor;
[0008] The shooting frame rate of the electronic device is adjusted according to the target frame rate.
[0009] In a second aspect, an embodiment of the present application provides a frame rate adjustment device, which is applied to an electronic device, wherein the electronic device includes an image processor, and the device includes:
[0010] An acquisition module, configured to, upon receiving a zoom instruction, acquire a zoom parameter corresponding to the zoom instruction and a brightness value of the ambient light in which the electronic device is located;
[0011] A first determination module, configured to determine a target frame rate according to the brightness value, the zoom parameter and a frame rate of an image processor;
[0012] An adjustment module is used to adjust the shooting frame rate of the electronic device according to the target frame rate.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, an image processor and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the frame rate adjustment method described in the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the frame rate adjustment method described in the first aspect are implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the frame rate adjustment method described in the first aspect.
[0016] The above-mentioned frame rate adjustment method, device, electronic device and computer-readable storage medium, when the electronic device receives a zoom instruction, can determine the target frame rate according to the brightness value of the ambient light where the electronic device is located, the zoom parameter and the frame rate of the image processor of the electronic device by obtaining the zoom parameter corresponding to the zoom instruction and the brightness value of the ambient light where the electronic device is located, so that the shooting frame rate of the electronic device can be adjusted according to the target frame rate. Since the determined target frame rate is determined according to the brightness value of the ambient light where the electronic device is located, the zoom parameter and the frame rate of the image processor, it can ensure that the zoom duration is not lengthened when zooming smoothly in dark scenes, and ensure the balance between the transition frame and the zoom duration during the zooming process. In this way, after the shooting frame rate of the electronic device is adjusted according to the target frame rate, it can ensure that the electronic device can zoom faster and smoother, and optimize the zoom effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] FIG1 is a diagram showing an application environment of a frame rate adjustment method according to an embodiment;
[0019] FIG2 is a flow chart of a frame rate adjustment method in one embodiment;
[0020] FIG3 is a flow chart of a frame rate adjustment method in another embodiment;
[0021] FIG4 is a flow chart of a frame rate adjustment method in another embodiment;
[0022] FIG5 is a structural block diagram of a frame rate adjustment device in one embodiment;
[0023] FIG6 is a structural block diagram of a frame rate adjustment device in another embodiment;
[0024] FIG7 is a structural block diagram of a frame rate adjustment device in another embodiment;
[0025] FIG8 is a structural block diagram of a frame rate adjustment device in another embodiment;
[0026] FIG9 is a structural block diagram of a frame rate adjustment device in another embodiment;
[0027] FIG10 is a structural block diagram of a frame rate adjustment device in another embodiment;
[0028] FIG. 11 is a schematic diagram of the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0030] The frame rate adjustment method provided in the embodiment of the present application can be applied to the electronic device as shown in Figure 1. Among them, the electronic device is equipped with multiple cameras. When using the electronic device to shoot pictures, the multiple cameras can use a fixed-focus lens relay method to achieve a zoom effect to meet the shooting needs of multiple application scenarios. Optionally, the camera carried on the electronic device may include at least two different cameras including a wide-angle camera, a telephoto camera, an ultra-sensitive camera, an ultra-wide-angle camera, a periscope telephoto camera, and a macro camera. The frame rate adjustment method provided in the embodiment of the present application can be applied to the scene where the electronic device zooms between the above-mentioned multiple cameras.
[0031] In one embodiment, as shown in FIG. 2 , a frame rate adjustment method is provided, and the method is applied to the electronic device in FIG. 1 as an example for description, including the following steps:
[0032] S201, when a zoom instruction is received, obtaining a zoom parameter corresponding to the zoom instruction and a brightness value of the ambient light where the electronic device is located.
[0033] Generally, each camera of a multi-camera electronic device has different characteristics. Therefore, in the shooting scheme of the multi-camera electronic device, spatial alignment transform (SAT) can be used to achieve real-time camera switching according to user needs in different shooting scenes.
[0034] Optionally, in this embodiment, when the user uses the camera application (Application, APP) of the electronic device, the camera APP is triggered to switch to a mode with a SAT function, for example, in the case of a photo mode or a video mode, if the user triggers a zoom operation for the electronic device, the camera APP can generate a zoom instruction according to the zoom parameter corresponding to the triggered zoom operation, and send the zoom instruction to the processor of the electronic device, and the processor of the electronic device receives the zoom instruction sent by the camera APP and obtains the zoom parameter corresponding to the zoom instruction. Optionally, the zoom parameter may include the initial focal length and target focal length of the electronic device. For example, if the triggered zoom operation is to switch the focal length of the electronic device camera from 1.0X to 1.6X, the initial focal length is 1.0X and the target focal length is 1.6X.
[0035] Optionally, the zoom operation triggered in the present embodiment may be a point-cut operation, or may be a slide-cut operation. It can be understood that if the triggered zoom operation is a point-cut operation, the starting point trigger parameter value of the point-cut operation may be determined as the initial focal length, and the end point trigger parameter value may be determined as the target focal length; if the triggered zoom operation is a slide-cut operation, the starting point trigger parameter value of the slide-cut operation may be determined as the initial focal length, and the target focal length may be predicted based on the initial focal length, or the target focal length may be determined based on the latest focal length parameter sent by the camera app.
[0036] Optionally, an optical sensor may be provided in the electronic device, and the electronic device may obtain the brightness value of the ambient light in the electronic device in real time through the optical sensor. For example, the environment in which the electronic device is located may be a dim environment, a normal light environment, or an extremely dark environment, and the electronic device may collect the brightness values under different ambient lights through the optical sensor.
[0037] S202, determining a target frame rate according to the brightness value, the zoom parameter, and the frame rate of the image processor.
[0038] Optionally, in this embodiment, the first preset condition can be determined according to the brightness value of the ambient light where the electronic device is located and / or the original shooting frame rate of the electronic device. As an optional implementation, the first preset condition in this embodiment may include any one of the following conditions: the brightness value of the ambient light where the electronic device is located is greater than the first brightness threshold and less than the second brightness threshold; the brightness value of the ambient light where the electronic device is located is greater than the second brightness threshold, and the original shooting frame rate of the electronic device is less than the preset frame rate threshold. It should be noted that in this embodiment, if the brightness value of the ambient light where the electronic device is located is less than the first brightness threshold, it means that the electronic device is in an extremely dark environment, if the brightness value of the ambient light where the electronic device is located is greater than the first brightness threshold and less than the second brightness threshold, it means that the electronic device is in a dim environment, if the brightness value of the ambient light where the electronic device is located is greater than the second brightness threshold, it means that the electronic device is in a normal brightness environment. In addition, the preset frame rate threshold in the embodiment of the present application can be a frame rate threshold determined according to the processing capability of the image sensor and the image effect. For example, the preset frame rate threshold can be a frame rate of 30fps commonly used by current electronic devices, or it can also be 60fps, or it can be other frame rate thresholds that meet the processing capability of the image sensor and the image effect.
[0039] In this embodiment, if the first preset condition is satisfied that the brightness value of the ambient light in which the electronic device is located is greater than the first brightness threshold and less than the second brightness threshold, that is, when the electronic device is in a dim environment, it is necessary to determine the target frame rate and adjust the current shooting frame rate of the electronic device; in addition, it should be noted that although the frame rate change of the dark scene affects the final number of transition frames, the zoom curve is consistent with the normal scene, so the overall field of view (FOV) change trend is consistent with the zoom of the ordinary shooting scene.
[0040] If the first preset condition that is met is that the brightness value of the ambient light in which the electronic device is located is greater than the second brightness threshold, and the original shooting frame rate of the electronic device is less than the preset frame rate threshold, that is, when the environment in which the electronic device is located is of normal brightness, but the original shooting frame rate of the electronic device is less than the preset frame rate threshold, and the original shooting frame rate is not the optimal shooting frame rate, it is necessary to determine the target frame rate and adjust the current shooting frame rate of the electronic device.
[0041] In this embodiment, as an optional implementation, the electronic device can determine the initial frame rate according to the brightness value of the ambient light in which the electronic device is located and the zoom parameter corresponding to the zoom instruction, and then adjust the determined initial frame rate according to the frame rate of the image processor of the electronic device to determine the target frame rate. Among them, the frame rate of the image processor can be the maximum frame rate value that the image processor can adjust under the current ambient brightness while ensuring the basic quality of the output image, that is, the frame rate of the image processor can be determined as the maximum value of the adjustable frame rate of the image processor according to the brightness value. Optionally, the frame rate of the image processor can be adjusted in advance under different ambient light scenes while ensuring the quality of the image captured by the electronic device, and the maximum adjustable frame rate value of the image processor under different ambient light scenes can be determined.
[0042] S203: Adjust the shooting frame rate of the electronic device according to the target frame rate.
[0043] Optionally, in this embodiment, the shooting frame rate of the electronic device can be adjusted to a determined target frame rate, or the adjustment frame rate of the electronic device can be determined based on the target frame rate, and the shooting frame rate of the electronic device can be determined to be the determined adjusted frame rate. For example, the target frame rate can be added with an adjustment threshold or subtracted from the adjustment threshold to determine the adjusted frame rate.
[0044] Optionally, in this embodiment, the automatic exposure control module may be controlled to adjust exposure parameters to adjust the shooting frame rate of the electronic device.
[0045] It is understandable that in traditional technology, when a user triggers a mode with a SAT function in a camera APP for preview, if the current scene is a dim scene, the exposure time is generally lengthened to trigger frame reduction to ensure image clarity; in an embodiment of the present application, if a user triggers a zoom operation in a dark scene, when the first preset condition is met, the target frame rate is determined based on the brightness value of the ambient light in which the electronic device is located, the zoom parameters, and the image processing capability of the electronic device. Then, the shooting frame rate of the electronic device is adjusted according to the target frame rate, and the shooting frame rate can be increased. Since the number of transition frames during the zoom operation depends on the difference between the initial focal length and the target focal length, the number of transition frames is usually certain (generally 15 frames). By increasing the frame rate, the speed of the entire zoom process can be significantly accelerated, ensuring that the zoom duration is not lengthened during smooth zooming in dark scenes, and ensuring a balance between transition frames and zoom duration during the zoom process.
[0046] In addition, it should be noted that according to the brightness value of the ambient light where the electronic device is located, the zoom parameters of the zoom operation and the frame rate of the electronic device, the target frame rate can be determined in a differentiated manner. For example, for scenes that are prone to noise or image sensors with weak resolution, the frame rate of the frame increase can be appropriately reduced to ensure that the details of the image will not differ too much from the clarity in normal dark scenes through the target frame rate. Different dark scene characteristics are distinguished by judging the actual light scene of the ambient light where the electronic device is located, and then the preview frame rate is increased by determining the target frame rate in a differentiated frame increase manner, thereby ensuring the balance between the transition frame and the zoom duration during the zoom process (zooming can be performed faster and smoother). At the same time, using different target frame rates for different scenes to increase the frame can also better take into account the negative impact on the actual image effect (clarity and noise) (generally, the image quality will decrease to a certain extent after the frame rate is increased), achieving a balance between zoom experience and image quality, and better improving the zoom experience in dark scenes.
[0047] In addition, since the adjustment of the shooting frame rate takes effect after one or two frames, when the zoom operation occurs, the automatic exposure control command and the image sensor startup command are issued together (for example, the shooting frame rate of the image sensor can be configured to start at the target frame rate). In this way, the frame rate adjustment of the main camera can be completed before the secondary camera is started, avoiding the impact of inconsistent frame rates of the main and secondary cameras on the alignment effect.
[0048] In the above-mentioned frame rate adjustment method, when the electronic device receives a zoom instruction, by obtaining the zoom parameter corresponding to the zoom instruction and the brightness value of the ambient light in which the electronic device is located, the target frame rate can be determined according to the brightness value of the ambient light in which the electronic device is located, the zoom parameter and the frame rate of the image processor of the electronic device, so that the shooting frame rate of the electronic device can be adjusted according to the target frame rate. Since the determined target frame rate is determined according to the brightness value of the ambient light in which the electronic device is located, the zoom parameter and the frame rate of the image processor, it can ensure that the zoom time is not lengthened when zooming smoothly in dark scenes, and ensure the balance between the transition frame and the zoom time in the zooming process. In this way, after the shooting frame rate of the electronic device is adjusted according to the target frame rate, it can ensure that the electronic device can zoom faster and smoother, thereby optimizing the zoom effect.
[0049] In this embodiment, the detailed process of determining the target frame rate according to the brightness value of the ambient light of the electronic device, the zoom parameter of the zoom operation and the frame rate of the electronic device is explained. In one embodiment, as shown in FIG3 , the above S202 includes:
[0050] S301, determining a desired frame rate according to a brightness value and a zoom parameter.
[0051] In this embodiment, as an optional implementation, historical shooting data can be obtained, and based on the brightness value of the ambient light in which the electronic device is located and the zoom parameter of the zoom operation, the frame rate corresponding to the brightness value and the zoom parameter of the ambient light can be determined from the historical shooting data, and the expected frame rate can be determined based on the frame rate. For example, the determined frame rate can be directly determined as the expected frame rate, or the determined frame rate can be fine-tuned and the adjusted frame rate can be determined as the expected frame rate.
[0052] As another optional implementation, a preset neural network model can be trained in advance based on the brightness value of the ambient light where the electronic device is located, the zoom parameters of the zoom operation, and the corresponding frame rate. In this embodiment, the brightness value of the ambient light where the electronic device is located and the zoom parameters of the zoom operation can be input into the trained neural network, and the frame rate output by the neural network model is determined to be the expected frame rate.
[0053] S302: Determine a target frame rate according to the expected frame rate and the frame rate of the image processor.
[0054] Optionally, in this embodiment, the expected frame rate may be corrected according to the frame rate of the image processor to determine the target frame rate. Optionally, in this embodiment, if the expected frame rate is less than the frame rate of the image processor, the expected frame rate may be determined as the target frame rate; if the expected frame rate is greater than or equal to the frame rate of the image processor, the frame rate of the image processor may be determined as the target frame rate.
[0055] In this embodiment, the expected frame rate can be determined according to the brightness value of the ambient light in which the electronic device is located and the zoom parameters of the zoom operation. Since the target frame rate is determined according to the expected frame rate and the frame rate of the image processor of the electronic device, this can ensure that the determined target frame rate meets the image processing capability of the electronic device and the accuracy of the determined target frame rate. The target frame rate can ensure that the zoom duration is not lengthened during smooth zooming in dark scenes, thereby ensuring the balance between transition frames and zoom duration during the zooming process. After adjusting the shooting frame rate of the electronic device according to the target frame rate, it can ensure that the electronic device can zoom faster and smoother, thereby optimizing the zoom effect.
[0056] In some scenarios, the ambient light brightness value of the electronic device has a corresponding frame rate. In this embodiment, the process of determining the expected frame rate according to the brightness value and the zoom parameter of the zoom operation is described in detail. In one embodiment, as shown in FIG. 4 , the above S301 includes:
[0057] S401, determining an initial frame rate corresponding to a brightness value.
[0058] In this embodiment, different ambient light brightness values correspond to different frame rates. In this embodiment, the initial frame rate corresponding to the brightness value of the ambient light where the electronic device is located can be determined according to the corresponding relationship table between the brightness value and the frame rate. For example, the initial frame rate determined according to the brightness value of the ambient light where the electronic device is located can be 30fps, or 40fps, or no frame rate, etc.
[0059] S402, correcting the initial frame rate according to the frame rate increase ratio corresponding to the zoom parameter to obtain a desired frame rate.
[0060] Optionally, in this embodiment, the frame rate corresponding to the zoom parameter can be determined according to the zoom parameter of the zoom operation and a preset rule. For example, the preset rule may be that the frame rate above 10X cannot exceed 30%, and the frame rate between 6X and 10X cannot exceed 50%. Further, the electronic device can correct the initial frame rate according to the determined frame rate, so that the corrected initial frame rate falls within the frame rate corresponding to the zoom parameter, thereby obtaining the expected frame rate.
[0061] In the present embodiment, the process of determining the initial frame rate corresponding to the brightness value of the ambient light in which the electronic device is located is relatively simple, and the initial frame rate can be determined quickly, so that the determined initial frame rate can be corrected according to the frame rate increase ratio corresponding to the zoom parameter to obtain the expected frame rate. In the process of determining the expected frame rate, both the influence of the brightness value of the ambient light in which the electronic device is located and the limitation of the frame rate increase ratio corresponding to the zoom parameter are taken into account, and it can be considered from a variety of different angles to ensure the accuracy of the determined expected frame rate.
[0062] In some scenarios, it may be necessary to reduce the number of transition frames between the initial focal length and the target focal length. In one embodiment, the zoom parameter includes the initial focal length and the target focal length, and the method further includes:
[0063] Step A, reducing the number of transition frames between the initial focal length and the target focal length according to a preset conversion ratio.
[0064] In this embodiment, the number of transition frames can be reduced when the second preset condition is met, wherein the second preset condition can include any one of the following conditions: the brightness value is less than the first brightness threshold; the target frame rate is less than the preset frame rate threshold. It can be understood that if the brightness value of the ambient light where the electronic device is located is less than the above-mentioned first brightness threshold, it can be explained that the electronic device is in an extremely dark environment; if the determined target frame rate is less than the preset frame rate threshold, it can be explained that the determined target frame rate has not yet reached the maximum frame rate that the image sensor can process.
[0065] In this embodiment, when the second preset condition is met, that is, the frame rate of the dark scene is insufficient, or the target frame rate does not reach the maximum frame rate that the image processor can handle, it is necessary to prioritize ensuring that the zoom time is not prolonged to avoid excessive image noise. Therefore, the number of transition frames between the initial focal length and the target focal length can be reduced according to the preset conversion ratio (for example, the number of transition frames can be reduced to 12 frames or 10 frames). Otherwise, for some scenes (for example, darker scenes), in order to ensure the effect without increasing the frame rate, if the frame rate is around 15fps, it will take 1 second to change if the zoom operation is triggered, and the zoom speed will be too slow.
[0066] In this embodiment, the second preset condition may include that the brightness value of the ambient light in which the electronic device is located is less than the first brightness threshold, or that the determined target frame rate is less than the preset frame rate threshold. When the second preset condition is met, the number of transition frames between the initial focal length and the target focal length is reduced according to the preset conversion ratio, thereby ensuring that the zoom time will not be prolonged and avoiding excessive noise in the image.
[0067] When the electronic device has completed zooming, it is also necessary to reduce the shooting frame rate of the electronic device to the frame rate when the zoom operation is triggered by smoothly reducing the frame rate. In one embodiment, the method further includes:
[0068] Step B: when the shooting frame rate is adjusted to the target frame rate, reducing the shooting frame rate of the electronic device in a preset step.
[0069] In this embodiment, for the zoom scene, once the lens focal length variation range (zoom ratio) starts to change, the corresponding number of frames will be included in the transition frame limit. If the frame advancement operation is not completed before the field of view angle alignment changes, the first one or two frames of the transition frame will still be based on the original low frame rate. This will cause the entire zoom time to be longer (the number of transition frames has been determined according to the frame rate after the frame advancement, but the actual frame rate has not been brought up in time). Therefore, it is necessary to complete the frame advancement before the field of view angle alignment changes. Therefore, it is necessary to trigger the parameter adjustment of the automatic exposure module when the zoom event is received to perform the frame advancement operation.
[0070] The frame rate after the frame increase is maintained during the entire zoom operation period, and the spatial alignment change is changed based on the adjusted frame rate until the zoom is completed. After the zoom is completed, that is, after the shooting frame rate of the electronic device is adjusted to the target frame rate, considering the user's perception, the frame rate cannot be directly switched, and needs to be stepped down, which will have a better improvement in the smoothness of the preview. Therefore, when the shooting frame rate of the electronic device is adjusted to the target frame rate, the shooting frame rate of the electronic device can be smoothly reduced in a preset step manner. The timing of frame reduction takes into account that the user may repeatedly zoom. Generally, in this scenario, even if the zoom ratio is stable, the main and secondary cameras will be turned on for several seconds at the same time. Therefore, the preview frame rate should not be reduced after the zoom ratio is stable. It is best to perform frame reduction processing after the secondary camera is turned off (at this time, only the main camera is still working, and the complexity of frame reduction is relatively simple, and there is no need to consider the synchronization of the main and secondary camera frame rates). As an optional implementation, frame reduction can be performed when the zoom is completed and stabilized for a few frames, for example, it can be performed when the zoom is completed and stabilized for about 10 frames, to avoid repeated frame increase / frame reduction during continuous switching.
[0071] In addition, since the noise difference after the brightness changes from frame increase to frame non-acceleration will be particularly large, the smoothing of frames will be stopped if the brightness changes significantly during the process of reducing the shooting frame rate of the electronic device by a preset step. As another possible scenario, if a new zoom instruction is received during the process of reducing the shooting frame rate of the electronic device by a preset step, the smoothing frame reduction operation also needs to be stopped, and it is necessary to return to the above step S201 to perform the frame increase operation.
[0072] In this embodiment, when it is detected that the zoom operation is completed, the shooting frame rate of the electronic device is reduced in preset steps, which can smoothly reduce the shooting frame rate of the electronic device and improve the preview smoothness of the electronic device camera.
[0073] To facilitate understanding by those skilled in the art, the following is a detailed introduction to a frame rate adjustment method for an electronic device provided by the present disclosure, wherein the electronic device includes an image processor. The method may include:
[0074] S1, when a zoom instruction is received, obtaining a zoom parameter corresponding to the zoom instruction and a brightness value of the ambient light where the electronic device is located.
[0075] S2, determining an initial frame rate corresponding to the brightness value.
[0076] S3, correcting the initial frame rate according to the frame rate increase ratio corresponding to the zoom parameter to obtain a desired frame rate.
[0077] S4, determining, according to the brightness value, that the frame rate of the image processor is a maximum value of the adjustable frame rate of the image processor.
[0078] S5, if the expected frame rate is less than the frame rate of the image processor, the expected frame rate is determined as the target frame rate; if the expected frame rate is greater than or equal to the frame rate of the image processor, the frame rate of the image processor is determined as the target frame rate.
[0079] S6, adjusting the shooting frame rate of the electronic device according to the target frame rate.
[0080] S7, when the shooting frame rate of the electronic device is adjusted to the target frame rate, reducing the shooting frame rate of the electronic device in a preset step.
[0081] S8, if a new zoom instruction is received during the process of reducing the shooting frame rate of the electronic device by a preset step, return to the step of obtaining the zoom parameter corresponding to the zoom instruction and the brightness value of the ambient light where the electronic device is located.
[0082] In addition, during the frame rate adjustment process, the number of transition frames between the initial focal length and the target focal length can be reduced according to a preset conversion ratio.
[0083] It should be noted that for the description of the above steps, reference may be made to the relevant description in the above embodiment, and the effects are similar, so this embodiment will not be repeated here.
[0084] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0085] Based on the same inventive concept, the embodiment of the present application also provides a frame rate adjustment device for implementing the frame rate adjustment method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more frame rate adjustment device embodiments provided below can refer to the limitations of the frame rate adjustment method above, and will not be repeated here.
[0086] In one embodiment, as shown in FIG5 , a frame rate adjustment device is provided, which is applied to an electronic device, wherein the electronic device includes an image processor, including: an acquisition module 10, a first determination module 11 and an adjustment module 12, wherein:
[0087] The acquisition module 10 is used to acquire the zoom parameter corresponding to the zoom instruction and the brightness value of the ambient light where the electronic device is located when receiving the zoom instruction;
[0088] A first determination module 11 is used to determine a target frame rate according to a brightness value, a zoom parameter and a frame rate of an image processor;
[0089] The adjustment module 12 is used to adjust the shooting frame rate of the electronic device according to the target frame rate.
[0090] The frame rate adjustment device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0091] On the basis of the above embodiment, as shown in FIG6 , optionally, the above first determination module 11 includes: a first determination unit 111 and a second determination unit 112, wherein:
[0092] The first determining unit 111 is configured to determine an expected frame rate according to a brightness value and a zoom parameter.
[0093] The second determining unit 112 is configured to determine a target frame rate according to the expected frame rate and the frame rate of the image processor.
[0094] The frame rate adjustment device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0095] Based on the above embodiment, please continue to refer to Figure 6. Optionally, the above first determination unit 111 is specifically used to determine the initial frame rate corresponding to the brightness value; according to the frame increase ratio corresponding to the zoom parameter, the initial frame rate is corrected to obtain the expected frame rate.
[0096] The frame rate adjustment device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0097] Based on the above embodiment, please continue to refer to Figure 6. Optionally, the above-mentioned first determination unit 112 is specifically used to determine the expected frame rate as the target frame rate if the expected frame rate is less than the frame rate of the image processor; if the expected frame rate is greater than or equal to the frame rate of the image processor, the frame rate of the image processor is determined as the target frame rate.
[0098] The frame rate adjustment device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0099] On the basis of the above embodiment, as shown in FIG7 , optionally, the above device further includes: a second determining module 13, wherein:
[0100] The second determination module 13 is used to determine, according to the brightness value, that the frame rate of the image processor is a maximum value of the adjustable frame rate of the image processor.
[0101] The frame rate adjustment device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0102] On the basis of the above embodiment, the above zoom parameters include an initial focal length and a target focal length. As shown in FIG8 , the above device further includes: a first processing module 14, wherein:
[0103] The first processing module 14 is used to reduce the number of transition frames between the initial focal length and the target focal length according to a preset conversion ratio.
[0104] The frame rate adjustment device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0105] On the basis of the above embodiment, as shown in FIG9 , the above device further includes: a second processing module 15, wherein:
[0106] The second processing module 15 is used to reduce the shooting frame rate of the electronic device in a preset step when the shooting frame rate is adjusted to the target frame rate.
[0107] The frame rate adjustment device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0108] On the basis of the above embodiment, as shown in FIG10 , the above device further includes: a third processing module 16, wherein:
[0109] The third processing module 16 is used to return to the step of obtaining the zoom parameter corresponding to the zoom instruction and the brightness value of the ambient light of the electronic device if a new zoom instruction is received during the process of reducing the shooting frame rate of the electronic device by a preset step.
[0110] The frame rate adjustment device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0111] Each module in the above frame rate adjustment device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0112] In one embodiment, a computer device is provided, which may be an electronic device, and its internal structure diagram may be shown in FIG11. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a frame rate adjustment method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0113] Those skilled in the art will understand that the structure shown in FIG. 11 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0114] In one embodiment, an electronic device is provided, including a memory, an image processor, and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0115] When a zoom instruction is received, a zoom parameter corresponding to the zoom instruction and a brightness value of the ambient light where the electronic device is located are obtained;
[0116] Determine a target frame rate according to the brightness value, the zoom parameter and the frame rate of the image processor;
[0117] The shooting frame rate of the electronic device is adjusted according to the target frame rate.
[0118] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0119] Determine the expected frame rate according to the brightness value and the zoom parameter;
[0120] The target frame rate is determined based on the expected frame rate and the frame rate of the image processor.
[0121] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0122] Determine the initial frame rate corresponding to the brightness value;
[0123] According to the frame rate ratio corresponding to the zoom parameter, the initial frame rate is corrected to obtain the expected frame rate.
[0124] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0125] If the expected frame rate is less than the frame rate of the image processor, the expected frame rate is determined as the target frame rate;
[0126] If the expected frame rate is greater than or equal to the frame rate of the image processor, the frame rate of the image processor is determined as the target frame rate.
[0127] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0128] According to the brightness value, the frame rate of the image processor is determined to be a maximum value of an adjustable frame rate of the image processor.
[0129] In one embodiment, the zoom parameters include an initial focal length and a target focal length, and the processor further implements the following steps when executing the computer program:
[0130] Reduces the number of transition frames between the initial focal length and the target focal length according to the preset conversion ratio.
[0131] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0132] When the shooting frame rate is adjusted to the target frame rate, the shooting frame rate of the electronic device is reduced in a preset step.
[0133] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0134] If a new zoom instruction is received during the process of reducing the shooting frame rate of the electronic device in a preset step, the process returns to the step of obtaining the zoom parameter corresponding to the zoom instruction and the brightness value of the ambient light where the electronic device is located.
[0135] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0136] When a zoom instruction is received, a zoom parameter corresponding to the zoom instruction and a brightness value of the ambient light where the electronic device is located are obtained;
[0137] Determine a target frame rate according to the brightness value, the zoom parameter and the frame rate of the image processor;
[0138] The shooting frame rate of the electronic device is adjusted according to the target frame rate.
[0139] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0140] Determine the expected frame rate according to the brightness value and the zoom parameter;
[0141] The target frame rate is determined based on the expected frame rate and the frame rate of the image processor.
[0142] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0143] Determine the initial frame rate corresponding to the brightness value;
[0144] According to the frame rate ratio corresponding to the zoom parameter, the initial frame rate is corrected to obtain the expected frame rate.
[0145] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0146] If the expected frame rate is less than the frame rate of the image processor, the expected frame rate is determined as the target frame rate;
[0147] If the expected frame rate is greater than or equal to the frame rate of the image processor, the frame rate of the image processor is determined as the target frame rate.
[0148] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0149] According to the brightness value, the frame rate of the image processor is determined to be a maximum value of an adjustable frame rate of the image processor.
[0150] In one embodiment, the zoom parameters include an initial focal length and a target focal length, and when the computer program is executed by the processor, the following steps are further implemented:
[0151] Reduces the number of transition frames between the initial focal length and the target focal length according to the preset conversion ratio.
[0152] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0153] When the shooting frame rate is adjusted to the target frame rate, the shooting frame rate of the electronic device is reduced in a preset step.
[0154] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0155] If a new zoom instruction is received during the process of reducing the shooting frame rate of the electronic device in a preset step, the process returns to the step of obtaining the zoom parameter corresponding to the zoom instruction and the brightness value of the ambient light where the electronic device is located.
[0156] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0157] When a zoom instruction is received, a zoom parameter corresponding to the zoom instruction and a brightness value of the ambient light where the electronic device is located are obtained;
[0158] Determine a target frame rate according to the brightness value, the zoom parameter and the frame rate of the image processor;
[0159] The shooting frame rate of the electronic device is adjusted according to the target frame rate.
[0160] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0161] Determine the expected frame rate according to the brightness value and the zoom parameter;
[0162] The target frame rate is determined based on the expected frame rate and the frame rate of the image processor.
[0163] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0164] Determine the initial frame rate corresponding to the brightness value;
[0165] According to the frame rate ratio corresponding to the zoom parameter, the initial frame rate is corrected to obtain the expected frame rate.
[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0167] If the expected frame rate is less than the frame rate of the image processor, the expected frame rate is determined as the target frame rate;
[0168] If the expected frame rate is greater than or equal to the frame rate of the image processor, the frame rate of the image processor is determined as the target frame rate.
[0169] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0170] According to the brightness value, the frame rate of the image processor is determined to be a maximum value of an adjustable frame rate of the image processor.
[0171] In one embodiment, the zoom parameters include an initial focal length and a target focal length, and when the computer program is executed by the processor, the following steps are further implemented:
[0172] Reduces the number of transition frames between the initial focal length and the target focal length according to the preset conversion ratio.
[0173] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0174] When the shooting frame rate is adjusted to the target frame rate, the shooting frame rate of the electronic device is reduced in a preset step.
[0175] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0176] If a new zoom instruction is received during the process of reducing the shooting frame rate of the electronic device in a preset step, the process returns to the step of obtaining the zoom parameter corresponding to the zoom instruction and the brightness value of the ambient light where the electronic device is located.
[0177] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0178] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0179] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A frame rate adjustment method, applied to an electronic device, wherein the electronic device includes an image processor, characterized in that: The method comprises: When a zoom instruction is received, obtaining a zoom parameter corresponding to the zoom instruction and a brightness value of the ambient light where the electronic device is located; Determining a target frame rate according to the brightness value, the zoom parameter, and a frame rate of an image processor; The shooting frame rate of the electronic device is adjusted according to the target frame rate.
2. The method according to claim 1, characterized in that: The determining the target frame rate according to the brightness value, the zoom parameter and the frame rate of the image processor includes: Determining a desired frame rate according to the brightness value and the zoom parameter; The target frame rate is determined according to the expected frame rate and the frame rate.
3. The method according to claim 2, characterized in that The step of determining the expected frame rate according to the brightness value and the zoom parameter includes: Determining an initial frame rate corresponding to the brightness value; The initial frame rate is corrected according to the frame rate ratio corresponding to the zoom parameter to obtain the expected frame rate.
4. The method according to claim 2 or 3, characterized in that: The step of determining the target frame rate according to the expected frame rate and the frame rate includes: If the expected frame rate is less than the frame rate, determining the expected frame rate as the target frame rate; If the expected frame rate is greater than or equal to the frame rate, the frame rate is determined as the target frame rate.
5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: According to the brightness value, the frame rate is determined to be a maximum value of an adjustable frame rate of the image processor.
6. The method according to any one of claims 1 to 3, characterized in that: The zoom parameters include an initial focal length and a target focal length, and the method further includes: According to a preset conversion ratio, the number of transition frames between the initial focal length and the target focal length is reduced.
7. The method according to claim 6, characterized in that The method further comprises: When the shooting frame rate is adjusted to the target frame rate, the shooting frame rate of the electronic device is reduced in a preset step.
8. The method according to claim 7, characterized in that The method further comprises: If a new zoom instruction is received during the process of reducing the shooting frame rate of the electronic device in a preset step, the step of returning to execute the step of obtaining the zoom parameter corresponding to the zoom instruction and the brightness value of the ambient light where the electronic device is located.
9. A frame rate adjustment device, applied to an electronic device, wherein the electronic device includes an image processor, characterized in that: The device comprises: An acquisition module, configured to, upon receiving a zoom instruction, acquire a zoom parameter corresponding to the zoom instruction and a brightness value of the ambient light in which the electronic device is located; A first determination module, configured to determine a target frame rate according to the brightness value, the zoom parameter and a frame rate of an image processor; An adjustment module is used to adjust the shooting frame rate of the electronic device according to the target frame rate.
10. An electronic device comprising a memory, an image processor and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the frame rate adjustment method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Zooming processing method and device for double webcams and mobile terminal
CN106131416A
Information processing method and device
CN111385484A
Shooting frame rate control method, electronic equipment, chip system and readable storage medium
CN116347224A
Shooting control method and device, equipment and storage medium
CN118870212A