Image processing method and electronic equipment
By obtaining relative motion information in the mobile phone camera and dynamically adjusting the display parameters to solve the problem of screen lag, the balance of smoothness and clarity under different movement conditions is achieved, and the user's shooting experience is improved.
Patent Information
- Application Number
- CN202410168675.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-05
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2044-02-05
AI Technical Summary
The picture stuttering caused by device movement during shooting during the mobile phone camera affects the user's shooting experience.
By obtaining relative motion information, dynamically adjust the display parameters to balance the smoothness and clarity, including frame rate and code rate, and adjust the display parameters according to relative speed or acceleration, ensuring the best shooting experience under different motion conditions.
Ensure smoothness when relatively large exercise and clarity when relatively small exercise, enhance the user's shooting experience.
Smart Images

Figure CN120475249A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic devices, and in particular to an image processing method and electronic device. Background Art
[0002] Camera functions are becoming increasingly common on mobile phones. In response to a user's input, the camera app opens, and a preview window appears on the app's interface. The user can confirm the preview image in the preview window. Finally, the camera app captures the image in response to the user pressing the capture button.
[0003] When shooting with the phone's camera app, if the phone moves, the camera app's viewfinder changes, and the preview image displayed in the camera app's preview box also changes, causing a freeze, which in turn affects the user's shooting experience. Summary of the Invention
[0004] The embodiments of the present application provide an image processing method and an electronic device for solving the problem of image freeze that occurs during camera shooting and improving the user's shooting experience.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, an image processing method is provided. The image processing method can be applied to an electronic device including a camera. The method comprises: first, the electronic device obtains relative motion information between the electronic device and a photographed object; the relative motion information includes a relative velocity between the electronic device and the photographed object, and / or a relative acceleration between the electronic device and the photographed object. After obtaining the relative motion information, the electronic device can adjust display parameters of the electronic device based on the relative motion information. When the relative motion information is first motion information, the electronic device can display a viewfinder corresponding to the camera using the first display parameters. When the relative motion information is second motion information, the electronic device can display a viewfinder corresponding to the camera using the second display parameters. The first motion information is less than the second motion information, the display smoothness corresponding to the first display parameters is less than the display smoothness corresponding to the second display parameters, and the display clarity corresponding to the first display parameters is greater than the display clarity corresponding to the second display parameters. After the electronic device calculates the display parameters to be adjusted based on the motion information, the electronic device adjusts the display parameters to the display parameters to be adjusted, and the preview interface of the electronic device displays the viewfinder corresponding to the camera.
[0007] By adopting this technical solution, during the electronic device's preview process, the electronic device's display parameters can be dynamically adjusted based on the calculated relative motion information between the device and the subject being photographed. This allows the electronic device to achieve greater display smoothness and lower display clarity when the relative motion information is greater, ensuring a smooth shooting experience for the user. Furthermore, when the relative motion information is smaller, the display smoothness and clarity are lower, ensuring the image quality of the user's shots. This improves the shooting experience during the preview process using the electronic device.
[0008] In a possible implementation of the first aspect, the display parameters of the electronic device may include a frame rate and / or a bit rate. In this case, the first display parameter includes a first frame rate, the second display parameter includes a second frame rate, and the first frame rate is less than the second frame rate; and / or the first display parameter includes a first bit rate, the second display parameter includes a second bit rate, and the first bit rate is less than the second bit rate.
[0009] In a possible implementation of the first aspect, the relative motion information may include a relative speed, the first motion information includes a first speed, and the second motion information includes a second speed. When the relative speed is the first speed, the electronic device displays the viewfinder at a first frame rate; when the relative speed is the second speed, the electronic device displays the viewfinder at a second frame rate. The first speed is less than the second speed, the display smoothness corresponding to the first frame rate is less than the display smoothness corresponding to the second frame rate, and the display clarity corresponding to the first frame rate is greater than the display clarity corresponding to the second frame rate. And / or,
[0010] When the relative speed is a first speed, the electronic device displays the viewfinder image at a first bit rate; when the relative speed is a second speed, the electronic device displays the viewfinder image at a second bit rate. The first speed is lower than the second speed, the display smoothness corresponding to the first bit rate is lower than the display smoothness corresponding to the second bit rate, and the display clarity corresponding to the first bit rate is higher than the display clarity corresponding to the second bit rate.
[0011] In a possible implementation of the first aspect, the electronic device may set a first speed threshold and a second speed threshold for the relative speed. When the relative speed is less than or equal to the first speed threshold, the electronic device displays the viewfinder image using a third display parameter (minimum supported parameter). The third display parameter includes a third frame rate and / or a third bit rate. The display smoothness corresponding to the third display parameter is less than or equal to the display smoothness corresponding to the first display parameter, and the display clarity corresponding to the third display parameter is greater than or equal to the display clarity corresponding to the first display parameter.
[0012] When the relative speed is greater than or equal to the second speed threshold, the electronic device displays the viewfinder image using a fourth display parameter (the maximum supported parameter). The first speed threshold is less than the second speed threshold; the fourth display parameter includes a fourth frame rate and / or a fourth bit rate. The display smoothness corresponding to the fourth display parameter is greater than or equal to the display smoothness corresponding to the second display parameter, and the display clarity corresponding to the fourth display parameter is less than or equal to the display clarity corresponding to the second display parameter.
[0013] It can be understood that when the relative speed is greater than the first speed threshold and less than the second speed threshold, the value of the display parameter is proportional to the value of the relative speed, and the value of the display parameter can be calculated based on the current relative speed, the first speed threshold, the second speed threshold, the minimum supportable parameter and the maximum supportable parameter.
[0014] In a possible implementation of the first aspect, the relative motion information may include relative acceleration, the first motion information includes the first acceleration, and the second motion information includes the second acceleration. When the relative acceleration is the first acceleration, the electronic device displays the viewfinder screen at the first frame rate. When the relative acceleration is the second acceleration, the electronic device displays the viewfinder screen at the second frame rate. The first acceleration is smaller than the second acceleration, the display smoothness corresponding to the first frame rate is smaller than the display smoothness corresponding to the second frame rate, and the display clarity corresponding to the first frame rate is greater than the display clarity corresponding to the second frame rate. And / or,
[0015] When the relative acceleration is the first acceleration, the electronic device displays the viewfinder screen at the first bit rate; when the relative acceleration is the second acceleration, the electronic device displays the viewfinder screen at the second bit rate; the first acceleration is less than the second acceleration, the display smoothness corresponding to the first bit rate is less than the display smoothness corresponding to the second bit rate, and the display clarity corresponding to the first bit rate is greater than the display clarity corresponding to the second bit rate.
[0016] In a possible implementation of the first aspect, when the relative acceleration is less than or equal to the first acceleration threshold, the electronic device displays the viewfinder image using a fifth display parameter (a minimum supported parameter); the fifth display parameter includes a fifth frame rate and / or a fifth bit rate. The display smoothness corresponding to the fifth display parameter is less than or equal to the display smoothness corresponding to the first display parameter, and the display clarity corresponding to the fifth display parameter is greater than or equal to the display clarity corresponding to the first display parameter.
[0017] When the relative speed is greater than or equal to the second acceleration threshold, the electronic device displays the viewfinder image using a sixth display parameter (the maximum supported parameter). The first acceleration threshold is less than the second acceleration threshold; the sixth display parameter includes a sixth frame rate and / or a sixth bit rate. The display smoothness corresponding to the sixth display parameter is greater than or equal to the display smoothness corresponding to the second display parameter, and the display clarity corresponding to the sixth display parameter is less than or equal to the display clarity corresponding to the second display parameter.
[0018] It can be understood that when the relative acceleration is greater than the first acceleration threshold and less than the second acceleration threshold, the value of the display parameter is proportional to the value of the relative acceleration, and the value of the display parameter can be calculated based on the current relative acceleration, the first acceleration threshold, the second acceleration threshold, the minimum supportable parameter and the maximum supportable parameter.
[0019] In a possible implementation of the first aspect, the method further includes: the maximum supportable parameter is related to the performance of the electronic device, wherein the performance of the electronic device can be evaluated by the margin of the memory space of the electronic device. If the margin of the memory space of the electronic device is large, then the performance of the electronic device is good; if the margin of the memory space of the electronic device is small, then the performance of the electronic device is poor. Then, the electronic device can adjust the maximum supportable parameter according to the margin of the memory space. The value of the maximum supportable parameter when the margin of the memory space of the electronic device is greater than the preset capacity threshold is greater than the value of the maximum supportable parameter when the margin of the memory space of the electronic device is less than or equal to the preset capacity threshold.
[0020] In a possible implementation of the first aspect, the method further includes: the fourth display parameter and the sixth display parameter (maximum supported parameters) are related to the temperature value of the electronic device. A thermal frequency limit (preset temperature limit threshold) may be set in the electronic device. The electronic device adjusts the fourth display parameter and the sixth display parameter according to the temperature value, that is, the electronic device may adjust the fourth display parameter and the sixth display parameter according to whether the current temperature reaches the thermal frequency limit. The values corresponding to the fourth display parameter and the sixth display parameter when the temperature value of the electronic device is less than the preset temperature limit threshold are greater than the values corresponding to the fourth display parameter and the sixth display parameter when the temperature value of the electronic device is greater than or equal to the preset temperature limit threshold.
[0021] In one possible implementation of the first aspect, the electronic device further includes a gyroscope sensor; and the electronic device obtaining relative motion information between the electronic device and the photographed subject includes: the electronic device detecting the relative motion information between the electronic device and the photographed subject using the gyroscope sensor. Generally speaking, if the electronic device moves and the photographed subject does not move, the electronic device can detect the relative motion information using the built-in gyroscope sensor.
[0022] Alternatively, the electronic device detects relative motion information between the electronic device and the photographed object through a camera. Generally speaking, if the electronic device does not move and the photographed object moves, the electronic device can detect the relative motion information through the camera.
[0023] Alternatively, the electronic device can detect relative motion information between the electronic device and the subject using a gyroscope sensor and a camera. Generally speaking, if the electronic device is moving and the subject is moving, the electronic device can use a built-in gyroscope sensor and a camera to jointly detect relative motion information. The electronic device can detect relative motion information using both the gyroscope sensor and the camera, and then use the larger value of the two as the current relative motion information.
[0024] In a possible implementation of the first aspect, the electronic device may further adjust exposure parameters while maintaining a balance between the base frame rate and the bit rate to ensure display clarity of the preview image on the mobile phone. The method further includes: when the electronic device is in an indoor scene and in a stroboscopic scene, the electronic device adjusts the camera exposure duration to a first duration and the camera exposure gain to a first gain.
[0025] Alternatively, when the electronic device is in an indoor scene and not in a stroboscopic scene, the electronic device adjusts the exposure duration of the camera to a second duration and the exposure gain of the camera to a second gain, wherein the second duration is smaller than the first duration.
[0026] In a possible implementation of the first aspect, the method further includes: when the electronic device is in an outdoor scene, if the exposure time of the camera is greater than a third time and less than the first time, the electronic device adjusts the exposure gain of the camera to a maximum gain limit value and adjusts the corresponding exposure time of the camera to a fourth time; wherein the third time is less than the second time.
[0027] Alternatively, when the electronic device is in an outdoor scene, if the exposure time of the camera is less than or equal to the third time, the electronic device maintains the exposure time of the camera.
[0028] To sum up, this solution can dynamically adjust the display parameters of the electronic device according to the relative motion information. When the relative motion information is smaller, the clarity of the preview interface is guaranteed. When the relative motion information is larger, the smoothness of the preview interface is guaranteed, thereby improving the user's shooting experience.
[0029] In a second aspect, the present application provides an electronic device, comprising: a communication module, a display screen, a memory, and one or more processors; the communication module, the display screen, the memory, and the processor are coupled; wherein computer program code is stored in the memory, and the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes any one of the methods described in the first aspect above.
[0030] In a third aspect, the present application provides a computer-readable storage medium having instructions stored therein. When the computer-readable storage medium is run on a computer, the computer can execute the charging method described in any one of the first aspects above.
[0031] In a fourth aspect, the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any one of the methods described in the first aspect.
[0032] It can be understood that the electronic device described in the second aspect provided above, the computer-readable storage medium described in the third aspect, and the computer program product described in the fourth aspect are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of the relationship between the movement speed / acceleration, fluency sensitivity, and clarity sensitivity of a mobile phone provided in an embodiment of the present application;
[0034] Figure 2 A schematic diagram of a scene in which a mobile phone is moving and the subject being photographed is stationary, provided in an embodiment of the present application;
[0035] Figure 3 This is another schematic diagram of an embodiment of the present application in which the mobile phone moves and the subject being photographed does not move;
[0036] Figure 4 A schematic diagram of an image processing method provided in an embodiment of the present application;
[0037] Figure 5 A schematic diagram of the relationship between a relative speed and a frame rate to be adjusted provided in an embodiment of the present application;
[0038] Figure 6A schematic diagram of the relationship between a relative speed and a bit rate to be adjusted provided in an embodiment of the present application;
[0039] Figure 7 A schematic diagram of a shooting scene provided in an embodiment of the present application;
[0040] Figure 8 A schematic diagram of another shooting scene provided in an embodiment of the present application;
[0041] Figure 9 A schematic diagram of a process for reducing exposure of a mobile phone provided in an embodiment of the present application;
[0042] Figure 10 A schematic diagram of the hardware structure of a mobile phone provided in an embodiment of the present application;
[0043] Figure 11 A timing diagram of software implementation of a charging method provided in an embodiment of the present application;
[0044] Figure 12 A schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present application, not all of the embodiments. The following terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features.
[0046] In the embodiment of the present application, the electronic device is a mobile phone, and the camera application in the mobile phone responds to the user's operation to preview the photo for explanation.
[0047] During the photo preview process, both the phone and the subject can move. For example, the phone can move while the subject remains stationary, or the phone can remain stationary while the subject moves, or both the phone and the subject can move.
[0048] When the phone moves and / or the subject moves, the viewfinder corresponding to the phone's camera application will change, and the preview image displayed in the preview box of the camera application will also change. As a result, there will be screen freezes during the preview image change process, which will affect the user's shooting experience.
[0049] For example, when the phone is moving and the subject is stationary, users' sensitivity to the smoothness and clarity of the preview image varies at different speeds and accelerations. Assuming that the faster the phone is moved during a photo preview, the more sensitive the human eye is to the smoothness of the preview image and the less sensitive it is to its clarity; the slower the phone is moved, the less sensitive the eye is to the smoothness of the preview image and the more sensitive it is to its clarity.
[0050] See also Figure 1 , Figure 1 This is a schematic diagram of the relationship between the mobile speed / acceleration of a mobile phone and the fluency sensitivity and clarity sensitivity provided by an embodiment of the present application. Figure 1 It can be seen that as the movement speed / acceleration increases, the sensitivity to smoothness increases, while the sensitivity to clarity decreases.
[0051] The relationship between movement speed, fluency sensitivity, and clarity sensitivity can be shown in the following table.
[0052]
[0053] Table 1
[0054] As shown in Table 1, when the moving speed / acceleration is less than x1, the user's eye is less sensitive to smoothness and more sensitive to clarity, so the smoothness index can be set to medium and the clarity index can be set to high. When the moving speed / acceleration is greater than or equal to x1 and less than or equal to x2, the user's eye is more sensitive to smoothness and less sensitive to clarity, so the smoothness index can be set to high and the clarity index can be set to medium. When the moving speed / acceleration is greater than x2, the user's eye is more sensitive to smoothness and clarity, so the smoothness index can be set to high and the clarity index can be set to low.
[0055] Among them, the relationship between x1 and x2 can be referred to Figure 1 .Depend on Figure 1 It can be seen that when the moving speed / acceleration is greater than x2, if the moving speed / acceleration becomes larger and larger, after exceeding a certain speed threshold, the user's eye's sensitivity to smoothness may become smaller, and correspondingly, the user's eye's sensitivity to clarity will become greater.
[0056] See also Figure 2 , Figure 2 This is a schematic diagram of a scene in which the mobile phone is moving and the subject is not moving, as provided in an embodiment of the present application. Figure 2 As shown, the vase on the table was photographed by a mobile phone. The vase did not move, but the mobile phone moved from position 1 to position 2.
[0057] Taking the mobile phone moving and the photographed object not moving as an example, the present application provides a flowchart of an image processing method, wherein the specific steps may include S101-S102 as follows:
[0058] S101. The mobile phone obtains relative motion information between itself and the photographed object.
[0059] The relative motion information includes the relative speed between the mobile phone and the photographed object, and / or the relative acceleration between the mobile phone and the photographed object.
[0060] The relative velocity v is determined by the distance s the phone moves relative to the subject during a preset capture duration t. The preset capture duration here can be one frame. After determining the relative velocity v based on the preset capture duration and distance, the relative acceleration a can be determined based on the multiple relative velocities v.
[0061] The relative speed / acceleration between the mobile phone and the photographed object is actually the relative speed / acceleration calculated by calculating the length of the mobile phone's moving path between one preview frame and the next preview frame, and is unrelated to the moving direction of the mobile phone.
[0062] For example, if the phone is at position 1 and moves in the first direction first, then the relative speed 1 of the phone in the first direction can be calculated. After the phone moves to position 2 and then moves in the second direction, the relative speed 2 of the phone in the second direction can be calculated.
[0063] See Figure 3 , Figure 3 FIG shows a schematic diagram of a mobile phone moving and the photographed object not moving. Figure 3 As shown in the figure, the subject being photographed is a vase on a table. In the scenario where the user moves the phone in direction 1 and then in direction 2, the phone can first calculate relative speed 1 of the phone in direction 1 and then relative speed 2 of the phone in direction 2. The phone's display parameters can then be adjusted based on the calculated relative speeds.
[0064] It is understandable that the preview images displayed by the mobile phone at different positions are images of different frames. The moving speed of the mobile phone is calculated by the position of the mobile phone displaying the current frame image and the position of the mobile phone displaying the previous frame image.
[0065] Mobile phones contain gyroscope sensors that can detect the relative speed between the phone and the subject being photographed. Generally speaking, if the phone is moving, the phone uses the gyroscope to detect relative motion information.
[0066] Thus, after calculating the relative motion information between the mobile phone and the subject, the corresponding display parameters of the mobile phone can be adjusted according to the relative motion information. After the display parameters of the mobile phone are adjusted, the preview interface of the mobile phone displays the corresponding viewfinder image of the camera with the adjusted display parameters.
[0067] S102. The preview interface of the mobile phone displays the viewfinder image corresponding to the camera.
[0068] Factors affecting the smoothness of the mobile phone's preview screen may include frame rate and / or bit rate. A higher frame rate indicates better smoothness of the preview screen; a lower frame rate indicates worse smoothness of the preview screen. A higher bit rate indicates better smoothness of the preview screen; a lower bit rate indicates worse smoothness of the preview screen.
[0069] Regarding the clarity of the preview image, if the smoothness is better, the clarity will be correspondingly worse, and if the smoothness is worse, the clarity will be correspondingly better. In other words, if the frame rate and bit rate of the phone are lowered, the smoothness of the next frame of the preview image will be worse, but the clarity will be better. If the frame rate and bit rate of the phone are increased, the smoothness of the next frame of the preview image will be better, but the clarity will be worse.
[0070] In the embodiment of the present application, the display parameters of the mobile phone may include frame rate and / or bit rate. After the mobile phone calculates the relative motion information between the mobile phone and the photographed object, it can determine the display parameters to be adjusted based on the relative motion information and adjust the corresponding display parameters of the mobile phone to the display parameters to be adjusted.
[0071] For the relative motion information of the mobile phone, the first motion information and the second motion information can also be set. When the relative motion information includes the relative speed, then the first motion information includes the first speed, and the second motion information includes the second speed. When the relative speed includes the first speed, the mobile phone can display the viewfinder screen at the first frame rate. When the relative speed includes the second speed, the mobile phone can display the viewfinder screen at the second frame rate. Among them, the first speed is less than the second speed, the display smoothness corresponding to the first frame rate is less than the display smoothness corresponding to the second frame rate, and the display clarity corresponding to the first frame rate is greater than the display clarity corresponding to the second frame rate.
[0072] In some examples, when the relative speed includes a first speed, the mobile phone may display the viewfinder image at a first bit rate. When the relative speed includes a second speed, the mobile phone may display the viewfinder image at a second bit rate. The first speed is less than the second speed, the display smoothness corresponding to the first bit rate is less than the display smoothness corresponding to the second bit rate, and the display clarity corresponding to the first bit rate is greater than the display clarity corresponding to the second bit rate.
[0073] It is understandable that the mobile phone can adjust the bit rate or frame rate according to the relative speed, or adjust the bit rate and frame rate at the same time.
[0074] When the relative motion information includes relative acceleration, the first motion information includes the first acceleration, and the second motion information includes the second acceleration. When the relative acceleration includes the first acceleration, the mobile phone can display the viewfinder image at a first frame rate. When the relative acceleration includes the second acceleration, the mobile phone can display the viewfinder image at a second frame rate. The first acceleration is less than the second acceleration, the display smoothness corresponding to the first frame rate is less than the display smoothness corresponding to the second frame rate, and the display clarity corresponding to the first frame rate is greater than the display clarity corresponding to the second frame rate.
[0075] In some examples, when the relative acceleration includes a first acceleration, the mobile phone may display the viewfinder image at a first bit rate. When the relative acceleration includes a second acceleration, the mobile phone may display the viewfinder image at a second bit rate. The first acceleration is less than the second acceleration, the display smoothness corresponding to the first bit rate is less than the display smoothness corresponding to the second bit rate, and the display clarity corresponding to the first bit rate is greater than the display clarity corresponding to the second bit rate.
[0076] As a result, the mobile phone can dynamically adjust the display parameters of the mobile phone based on the calculated relative motion information between the mobile phone and the photographed object, better balance clarity and smoothness, and ensure the user's best shooting experience.
[0077] See also Figure 4 , Figure 4 This is a schematic diagram of an image processing method provided in an embodiment of the present application. Figure 4 As shown in the figure, the subject being photographed is a vase on a table. The vase is not moving, while the phone is moving in direction 1. The phone can obtain relative motion information between the phone and the vase. For example, the phone calculates the relative speed of the phone's movement based on position 1 and position 2. After calculating the relative speed of the phone's movement, the phone adjusts the display parameters from display parameter 1 to display parameter 2. The phone can then display the corresponding camera view on the preview interface using display parameter 2.
[0078] Each display parameter can include a minimum supportable parameter and a maximum supportable parameter. For example, if the display parameter is frame rate, then the frame rate corresponds to a frame rate range, and the boundary values of the frame rate range are the minimum supportable frame rate and the maximum supportable frame rate. If the display parameter is bit rate, then the bit rate corresponds to a bit rate range, and the boundary values of the bit rate range are the minimum supportable bit rate and the maximum supportable bit rate.
[0079] In an embodiment of the present application, when the relative motion information includes a relative speed, the relative speed also includes a first speed threshold and a second speed threshold. If the relative speed is less than or equal to the first speed threshold, the mobile phone can determine that the display parameter to be adjusted is the minimum supportable parameter, and the mobile phone displays the viewfinder screen with the minimum supportable parameter. If the relative speed is greater than or equal to the second speed threshold, the mobile phone can determine that the display parameter to be adjusted is the maximum supportable parameter, and the mobile phone displays the viewfinder screen with the maximum supportable parameter. If the relative speed is greater than the first speed threshold and less than the second speed threshold, the value of the relative speed of the mobile phone is proportional to the value of the display parameter to be adjusted, that is, the greater the relative speed, the greater the display parameter to be adjusted, then the corresponding display smoothness is greater and the display clarity is smaller. Specifically, the mobile phone can calculate the display parameter to be adjusted based on the current relative speed, the first speed threshold, the second speed threshold, the minimum supportable parameter and the maximum supportable parameter.
[0080] See also Figure 5 , Figure 5 This is a schematic diagram of the relationship between a relative speed and a frame rate to be adjusted provided in an embodiment of the present application. Figure 5 As shown, let the first speed threshold be x1, the second speed threshold be x2, the minimum supported frame rate (third display parameter) be y1, and the maximum supported frame rate (fourth display parameter) be y2. Figure 5 It can be seen that if the calculated relative speed is less than or equal to x1, then the frame rate to be adjusted is y1. If the relative speed is greater than or equal to x2, then the frame rate to be adjusted is y2. If the relative speed is greater than x1 and the relative speed is less than x2, then the frame rate to be adjusted can be calculated according to the formula. Figure 5 From the relationship shown, it can be seen that the frame rate fps to be adjusted can be obtained according to the following formula 1:
[0081]
[0082] The value of the frame rate to be adjusted is proportional to the value of the relative speed. That is, when the relative speed is greater than x1 and less than x2, the greater the relative speed, the greater the frame rate to be adjusted. Furthermore, the value of the frame rate to be adjusted is greater than y1 and less than y2. Therefore, when the relative speed is greater and the frame rate to be adjusted is greater, the corresponding display smoothness is greater and the display clarity is less. When the relative speed is smaller and the frame rate to be adjusted is smaller, the corresponding display smoothness is less and the display clarity is greater.
[0083] The relative speed value range can be [0.3, 20], the initial value x1 can be 0.3, and x2 can be 5. The frame rate range can be [20, 240] frames per second (fps), the initial value y1 can be 30 fps, and the initial value y2 can be 240 fps. The relative speed value calculated by the mobile phone using different algorithms can be different.
[0084] See also Figure 6 , Figure 6 The following is a diagram showing the relationship between a relative speed and a bit rate to be adjusted provided in an embodiment of the present application. Figure 6 As shown, let the first speed threshold be x1, the second speed threshold be x2, the minimum supported bit rate (fifth display parameter) be b1, and the maximum supported bit rate (sixth display parameter) be b2. Figure 6 It can be seen that if the calculated relative speed is less than or equal to x1, then the minimum supportable bit rate is b1. If the relative speed is greater than or equal to x2, then the bit rate to be adjusted is b2. If the relative speed is greater than x1 and the relative speed is less than x2, then the bit rate to be adjusted can be calculated according to the formula. Figure 6 From the relationship shown, it can be seen that the bit rate BR to be adjusted can be obtained according to the following formula 2:
[0085]
[0086] The value of the bitrate to be adjusted is proportional to the value of the relative speed. That is, when the relative speed is greater than x1 and less than x2, the greater the relative speed, the greater the bitrate to be adjusted. Furthermore, the value of the bitrate to be adjusted is greater than b1 and less than b2. Therefore, when the relative speed is greater and the bitrate to be adjusted is greater, the corresponding display smoothness is greater and the display clarity is less. When the relative speed is less and the bitrate to be adjusted is less, the corresponding display smoothness is less and the display clarity is greater.
[0087] The code rate may range from [1, 8] megabits per second (mbps), the initial value b1 may be 2 mbps, and b2 may be 6 mbps.
[0088] In some embodiments, when the relative motion information is relative acceleration, the relative acceleration also includes a first acceleration threshold and a second acceleration threshold. If the relative acceleration is less than or equal to the first acceleration threshold, the mobile phone can determine that the display parameter to be adjusted is the minimum supportable parameter, and the mobile phone displays the viewfinder screen with the minimum supportable parameter. If the relative acceleration is greater than or equal to the second acceleration threshold, the mobile phone can determine that the display parameter to be adjusted is the maximum supportable parameter, and the mobile phone displays the viewfinder screen with the maximum supportable parameter. If the relative acceleration is greater than the first acceleration threshold and less than the second acceleration threshold, the value of the relative acceleration of the mobile phone is proportional to the value of the display parameter to be adjusted, that is, the greater the relative acceleration, the greater the display parameter to be adjusted, then the corresponding display smoothness is greater and the display clarity is lower. Specifically, the mobile phone can calculate the display parameter to be adjusted based on the current relative acceleration, the first acceleration threshold, the second acceleration threshold, the minimum supportable parameter, and the maximum supportable parameter.
[0089] It can be understood that the relationship between the relative acceleration and the frame rate to be adjusted can refer to the relationship between the above-mentioned relative speed and the frame rate to be adjusted, and the relationship between the relative acceleration and the bit rate to be adjusted can refer to the relationship between the above-mentioned relative speed and the frame rate to be adjusted. This application will not elaborate on this.
[0090] In the embodiment of the present application, the value of the maximum supportable parameter can be adjusted according to the performance of the mobile phone. Taking the memory space remaining as an example, a preset capacity threshold can be set in the mobile phone. If the memory space remaining of the mobile phone is greater than the preset capacity threshold, it can be indicated that the performance of the mobile phone is good. If the memory space remaining of the mobile phone is less than or equal to the preset capacity threshold, it can be indicated that the performance of the mobile phone is poor.
[0091] When the remaining memory space of the mobile phone is greater than the preset capacity threshold (the performance of the mobile phone is good), the value corresponding to the maximum supportable parameter is greater than the value corresponding to the maximum supportable parameter when the remaining memory space of the mobile phone is less than or equal to the preset capacity threshold (the performance of the mobile phone is poor).
[0092] If the capture parameter is frame rate, the maximum supported parameter is the maximum supported frame rate. If the phone's RAMres memory capacity is greater than the preset capacity threshold Th1, the maximum supported frame rate is set to y2. If the phone's RAMres memory capacity is less than or equal to the preset capacity threshold Th1, the maximum supported frame rate is set to y3. Here, y2 is greater than y3. y3 can be 120 fps.
[0093] If the mobile phone's memory space RAMres <= the preset capacity threshold Th1, if the calculated relative speed is less than or equal to x1, then the frame rate to be adjusted is y1. If the relative speed is greater than or equal to x2, then the frame rate to be adjusted is y3. If the relative speed is greater than x1 and less than x2, then the frame rate to be adjusted fps can be calculated according to the following formula 3:
[0094]
[0095] If the shooting parameter is bitrate, the maximum supported parameter is the maximum supported bitrate. If the phone's RAMres memory capacity is greater than the preset capacity threshold Th1, the maximum supported bitrate is set to b2. If the phone's RAMres memory capacity is less than or equal to the preset capacity threshold Th1, the maximum supported bitrate is set to b3. b2 is greater than b3. b3 can be 4 Mbps.
[0096] If the calculated relative speed is less than or equal to x1, then the bit rate to be adjusted is b1. If the relative speed is greater than or equal to x2, then the bit rate to be adjusted is b3. If the relative speed is greater than x1 and less than x2, then the bit rate to be adjusted BR can be obtained according to the following formula 4:
[0097]
[0098] In the embodiment of the present application, the value of the maximum supportable parameter can also be adjusted based on the temperature of the mobile phone. The mobile phone is provided with a thermal limit (a preset temperature limit threshold). When the temperature of the mobile phone is lower than the thermal limit, the value corresponding to the maximum supportable parameter is higher than the value corresponding to the maximum supportable parameter when the temperature of the mobile phone is not lower than the thermal limit.
[0099] If the capture parameter is frame rate, the maximum supported parameter is the maximum supported frame rate. If the phone's temperature value Tem < thermal limit Th2, the maximum supported frame rate is set to y2. If the phone's temperature value Tem > = thermal limit Th2, the maximum supported frame rate is set to y4. If y2 is greater than y4, y4 can be 120 fps.
[0100] When the phone's temperature Tem < thermal limit Th2, if the calculated relative speed is less than or equal to x1, the frame rate to be adjusted is y1. If the relative speed is greater than or equal to x2, the frame rate to be adjusted is y4. If the relative speed is greater than x1 and less than x2, the frame rate to be adjusted fps can be calculated using the following formula 5:
[0101]
[0102] If the shooting parameter is bitrate, the maximum supported parameter is the maximum supported bitrate. If the phone's temperature Tem < thermal limit Th2, the maximum supported bitrate is set to b2. If the phone's temperature Tem > = thermal limit Th2, the maximum supported bitrate is set to b4. b2 is greater than b4. b4 can be 4 Mbps.
[0103] When the phone's temperature Tem>=thermal frequency limit Th2, if the calculated relative speed is less than or equal to x1, then the bit rate to be adjusted is b1. If the relative speed is greater than or equal to x2, then the bit rate to be adjusted is b4. If the relative speed is greater than x1 and less than x2, then the bit rate to be adjusted BR can be calculated according to the following formula 6:
[0104]
[0105] It is understood that there is no restriction on the size relationship between y3 and y4. y3 can be greater than y4, y3 can be equal to y4, or y3 can be smaller than y4. There is no restriction on the size relationship between b3 and b4. b3 can be greater than b4, b3 can be equal to b4, or b3 can be smaller than b4.
[0106] In some examples, if the phone is stationary and the subject is moving, the image processing method provided by this application can also be applied. Figure 7 , Figure 7 A schematic diagram of a shooting scene is shown. Figure 7 As shown, the subject being photographed is a car, the phone is not moving, but the car is moving.
[0107] In other examples, if both the mobile phone and the subject are moving, the image processing method provided by this application can also be applied. Figure 8 , Figure 8 A schematic diagram of a shooting scene is shown. Figure 8 As shown, the subject being photographed is a car, and the car is moving as the phone moves.
[0108] In some examples, a mobile phone can use a camera to detect the relative speed between the phone and the subject being photographed. Generally speaking, if the subject is moving, the phone uses the camera to detect relative motion information. The phone can detect relative speed using the camera using the LK (Lucas-Kanade) optical flow method or other conventional methods, the specific methods of which are not detailed in this application.
[0109] In other examples, if both the phone and the subject are moving, the phone can use a combination of its camera and gyroscope to detect the relative speed between them. In this case, the phone can use the larger of the relative speeds detected by the gyroscope and the camera as the current relative speed.
[0110] In all scenarios, the phone can adjust its exposure parameters while maintaining a balance between the basic frame rate and bit rate to ensure the display clarity of the preview image.
[0111] See also Figure 9 , Figure 9 A flowchart of a mobile phone exposure reduction process provided by an embodiment of the present application. If the mobile phone detects that the exposure gain (iso*expo or motion_gain) is greater than 1000, it means that the mobile phone is in an indoor scene at this time. If the mobile phone detects that the exposure gain is not greater than 1000, it means that the mobile phone is in an outdoor scene at this time. Figure 9 The steps are as follows:
[0112] Step S901: When the mobile phone is in an indoor scene, the mobile phone determines whether it is currently in a stroboscopic (Flicker, FLK) scene. Step S9011: If the mobile phone detects that it is currently in a stroboscopic scene, the mobile phone can adjust the current camera exposure duration (motion_expo) to a first duration. The first duration can be 1 / 100 second (banding_step). Step S9012: If the mobile phone detects that it is currently not in a stroboscopic scene, the mobile phone can adjust the current camera exposure duration to a second duration. The second duration is less than the first duration. The second duration can be 1 / 400 second.
[0113] After adjusting the camera's exposure duration, the mobile phone can calculate the current camera exposure gain based on the adjusted exposure duration. Step S9013: After calculating the camera's exposure gain, the mobile phone determines whether the exposure gain is greater than the maximum gain limit (max_gain_thd). If the exposure gain is greater than the maximum gain limit, the current exposure gain is adjusted to the maximum gain limit, and the corresponding exposure duration is calculated based on the maximum gain limit. Thus, the mobile phone's camera applies the gain limit and the corresponding exposure duration. The maximum gain limit can be 8xgain.
[0114] If the exposure gain of the camera calculated by the mobile phone does not exceed the gain limit value, then the camera of the mobile phone applies the adjusted exposure duration and the exposure gain calculated based on the adjusted exposure duration. For example, when the above-mentioned mobile phone adjusts the exposure duration of the camera to a first duration, the mobile phone can adjust the exposure gain of the camera to the exposure gain under the first duration, which can be set to the first gain. When the above-mentioned mobile phone adjusts the exposure duration of the camera to a second duration, the mobile phone can adjust the exposure gain of the camera to the exposure gain under the second duration, which can be set to the second gain.
[0115] Step S902: In this embodiment of the present application, if the mobile phone detects that the camera's exposure gain is greater than the maximum gain limit, the mobile phone maintains the current camera exposure duration. If the mobile phone detects that the camera's exposure gain is not greater than the maximum gain limit, the mobile phone determines whether the phone is in an indoor or outdoor scene based on the exposure gain.
[0116] Step S903: When the mobile phone is in an outdoor scene, if the camera exposure duration is greater than the third duration and less than the first duration, the mobile phone adjusts the exposure gain to the maximum gain limit value, calculates a corresponding exposure duration based on the maximum gain limit value (set as a fourth duration), and adjusts the corresponding exposure duration to the fourth duration; wherein the third duration is less than the second duration. The third duration can be 1 / 600 second.
[0117] Step S904: When the mobile phone is in an outdoor scene, if the exposure time of the mobile phone camera is less than or equal to the third time, the mobile phone maintains the current exposure time of the camera.
[0118] If the mobile phone calculates the corresponding exposure duration based on the maximum gain limit to be less than the fourth duration, the mobile phone sets the corresponding exposure duration of the camera to the fourth duration and recalculates the exposure gain based on the fourth duration. The mobile phone then adjusts the corresponding exposure gain to the fourth exposure gain. The fourth duration is less than the third duration. The fourth duration can be 1 / 900 second.
[0119] In summary, an image processing method provided by an embodiment of the present application can calculate the display parameters of the electronic device to be adjusted based on the relative motion information after the electronic device obtains the relative motion information between the electronic device and the photographed object. Among them, the larger the relative motion information, the larger the display parameter, the greater the corresponding display smoothness, and the smaller the display clarity; the smaller the relative motion information, the smaller the display parameter, the smaller the corresponding display smoothness, and the greater the display clarity. After the electronic device adjusts the display parameters, the viewfinder corresponding to the camera is displayed on the preview interface of the electronic device. Therefore, this solution can dynamically adjust the display parameters of the electronic device according to the relative motion information. When the relative motion information is smaller, the clarity of the preview interface is guaranteed. When the relative motion information is larger, the smoothness of the preview interface is guaranteed, thereby improving the user's shooting experience. In addition, when the electronic device moves and / or the photographed object moves, the quality (clarity) of the captured image can be guaranteed.
[0120] It is understandable that the above image processing method can be applied not only to the photo preview scenario, but also to the video preview scenario or to the video recording process.
[0121] For example, the electronic devices in the embodiments of the present application can be specifically mobile phones, tablet computers, laptop computers, ultra-mobile personal computers (UMPCs), handheld computers, wearable electronic devices (for example, smart watches, smart bracelets, smart glasses), and most other Android terminal devices. The embodiments of the present application do not impose any restrictions on this.
[0122] The following will describe the implementation of the embodiment of the present application in detail with reference to the accompanying drawings. Taking the above-mentioned electronic device as a mobile phone as an example, the hardware structure of the electronic device (such as mobile phone 300) is introduced. Among them, the hardware structure of the electronic device can refer to the detailed description of the mobile phone 300 in the embodiment of the present application, and the embodiment of the present application will not be repeated here. Please refer to Figure 10 , Figure 10 Shows a schematic diagram of the structure of a mobile phone, such as Figure 10 As shown, the mobile phone 300 may include: a processor 310, an external memory interface 320, an internal memory 321, a USB interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, an earphone interface 370D, a sensor module 380, a button 390, a motor 391, an indicator 392, a camera 393, a display screen 394, and a subscriber identification module (SIM) card interface 395, etc.
[0123] Among them, the above-mentioned sensor module 380 may include sensors such as pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor and bone conduction sensor.
[0124] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on mobile phone 300. In other embodiments, mobile phone 300 may include more or fewer components than illustrated, or may combine or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0125] The processor 310 may include one or more processing units. For example, the processor 310 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.
[0126] The controller can be the nerve center and command center of the mobile phone 300. The controller can generate operation control signals based on instruction operation codes and timing signals to complete the control of instruction fetching and execution.
[0127] Processor 310 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 310 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 310. If processor 310 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 310 latency, and thus improves system efficiency.
[0128] In some embodiments, the processor 310 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.
[0129] It is understood that the interface connection relationship between the modules illustrated in this embodiment is merely an illustrative illustration and does not limit the structure of the mobile phone 300. In other embodiments, the mobile phone 300 may also adopt a different interface connection method from the above embodiments, or a combination of multiple interface connection methods.
[0130] The charging management module 340 is configured to receive charging input from a charger. In this embodiment, the charger may be a wired charger, and the charging management module 340 may receive charging input from the wired charger via the USB interface 330 (i.e., the aforementioned charging interface). While the charging management module 340 is charging the battery 342, it can also power the electronic device via the power management module 341.
[0131] The power management module 341 is used to connect the battery 342, the charging management module 340, and the processor 310. The power management module 341 receives input from the battery 342 and / or the charging management module 340 and provides power to the processor 310, the internal memory 321, the external memory, the display 394, the camera 393, and the wireless communication module 360. The power management module 341 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 341 can also be set in the processor 310. In other embodiments, the power management module 341 and the charging management module 340 can also be set in the same device.
[0132] The wireless communication function of the mobile phone 300 can be implemented through the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, the modem processor and the baseband processor.
[0133] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 300 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.
[0134] The mobile communication module 350 can provide wireless communication solutions for mobile phone 300, including 2G / 3G / 4G / 5G. The mobile communication module 350 can include at least one filter, a switch, a power amplifier, a low-noise amplifier (LNA), etc. The mobile communication module 350 can receive electromagnetic waves from antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation.
[0135] The wireless communication module 360 can provide wireless communication solutions for application on the mobile phone 300, 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 technology (NFC), infrared technology (IR), etc.
[0136] Wireless communication module 360 can be one or more devices that integrate at least one communication processing module. Wireless communication module 360 receives electromagnetic waves via antenna 2, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to processor 310. Wireless communication module 360 can also receive signals to be transmitted from processor 310, frequency-modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 2.
[0137] In some embodiments, the antenna 1 of the mobile phone 300 is coupled to the mobile communication module 350, and the antenna 2 is coupled to the wireless communication module 360, so that the mobile phone 300 can communicate with the 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).
[0138] Mobile phone 300 implements display functionality through a GPU, display screen 394, and an application processor. The GPU is a microprocessor for image processing that connects display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 310 may include one or more GPUs that execute program instructions to generate or modify display information.
[0139] Display screen 394 is used to display images, videos, etc. Display screen 394 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLED, or a quantum dot light-emitting diode (QLED).
[0140] The mobile phone 300 can implement a shooting function through an ISP, a camera 393, a video codec, a GPU, a display 394, and an application processor. The ISP is used to process data fed back by the camera 393. The camera 393 is used to capture still images or videos. In some embodiments, the mobile phone 300 may include one or N cameras 393, where N is a positive integer greater than one. 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 mobile phone 300 selects a frequency point, the digital signal processor is used to perform a Fourier transform on the frequency point energy. The video codec is used to compress or decompress digital video. The NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission pattern between neurons in the human brain, it can quickly process input information and can also continuously self-learn. The NPU can realize intelligent cognitive applications such as image recognition, face recognition, speech recognition, and text comprehension in the mobile phone 300.
[0141] The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 300. The external memory card communicates with the processor 310 via the external memory interface 320 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0142] The internal memory 321 can be used to store computer executable program code, which includes instructions. The processor 310 executes various functional applications and data processing of the mobile phone 300 by running the instructions stored in the internal memory 321. For example, in an embodiment of the present application, the processor 310 can execute instructions stored in the internal memory 321, and the internal memory 321 can include a program storage area and a data storage area.
[0143] The program storage area can store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the mobile phone 300 (such as audio data, a phone book, etc.). In addition, the internal memory 321 can include high-speed random access memory and non-volatile memory, such as at least one disk storage device, a flash memory device, or a universal flash storage (UFS).
[0144] The mobile phone 300 can implement audio functions such as music playback and recording through the audio module 370, speaker 370A, receiver 370B, microphone 370C, headphone jack 370D, and application processor.
[0145] The audio module 370 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 370 can also be used to encode and decode audio signals. In some embodiments, the audio module 370 can be set in the processor 310, or some functional modules of the audio module 370 can be set in the processor 310. The speaker 370A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The receiver 370B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. The microphone, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals.
[0146] The headphone jack is used to connect a wired headphone. The headphone jack can be a USB port 330, or a 3.5mm open mobile terminal platform (OMTP) standard port or a cellular telecommunications industry association of the USA (CTIA) standard port.
[0147] The buttons 390 include a power button, a volume button, etc. The buttons 390 can be mechanical buttons. They can also be touch buttons. The motor 391 can generate a vibration prompt. The motor 391 can be used for incoming call vibration prompts, or for touch vibration feedback. The indicator 392 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 395 is used to connect the SIM card. The SIM card can be connected to and separated from the mobile phone 300 by inserting it into the SIM card interface 395 or pulling it out from the SIM card interface 395. The mobile phone 300 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 395 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
[0148] The methods in the following embodiments can all be implemented in the mobile phone 300 having the above hardware structure.
[0149] The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device.
[0150] Figure 11 It is a software structure block diagram of the electronic device according to an embodiment of the present application.
[0151] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers: from top to bottom: the application layer, the application framework layer, the Android runtime (ART) and native C / C++ libraries, the hardware abstraction layer (HAL), and the kernel layer.
[0152] The application layer can include a series of application packages.
[0153] like Figure 11 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
[0154] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0155] like Figure 11As shown, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, an activity manager, an input manager, and the like.
[0156] The Android runtime consists of the core libraries and the Android runtime. The Android runtime is responsible for converting source code into machine code. It primarily utilizes ahead-of-time (AOT) and just-in-time (JIT) compilation technologies.
[0157] The core library primarily provides basic Java class library functionality, such as basic data structures, mathematics, IO, tools, databases, and networking. It also provides an API for users to develop Android applications.
[0158] Native C / C++ libraries can include multiple functional modules, such as surface manager, media framework, libc, OpenGL ES, SQLite, Webkit, etc.
[0159] The hardware abstraction layer (HAL) runs in user space, encapsulates kernel drivers, and provides a calling interface to upper layers. The HAL includes at least a display module, a camera module, an audio module, and a sensor module.
[0160] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0161] The following describes the workflow of the electronic device software and hardware in conjunction with capturing a photo scene.
[0162] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, touch operation timestamp, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture a still image or video through the camera 193.
[0163] The present application also provides a chip system. Figure 12As shown, the chip system 900 includes at least one processor 901 and at least one interface circuit 902. The processor 901 and the interface circuit 902 can be interconnected via lines. For example, the interface circuit 902 can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit 902 can be used to send signals to other devices (such as the processor 901). Exemplarily, the interface circuit 902 can read instructions stored in the memory and send the instructions to the processor 901. When the instructions are executed by the processor 901, the electronic device can execute the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiments of the present application.
[0164] An embodiment of the present application further provides a computer storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes the various functions or steps executed by the mobile phone in the above-mentioned method embodiment.
[0165] The embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps executed by the mobile phone in the above method embodiment.
[0166] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0167] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0168] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0169] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0170] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0171] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements 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.
Claims
1. An image processing method, characterized in that: Applied to an electronic device, the electronic device includes a camera, and the method includes: The electronic device acquires relative motion information between the electronic device and the photographed object; the relative motion information includes a relative speed between the electronic device and the photographed object, and / or a relative acceleration between the electronic device and the photographed object; The preview interface of the electronic device displays the viewfinder screen corresponding to the camera; wherein, when the relative motion information is first motion information, the electronic device displays the viewfinder screen with first display parameters; when the relative motion information is second motion information, the electronic device displays the viewfinder screen with second display parameters; the first motion information is smaller than the second motion information, the display smoothness corresponding to the first display parameter is smaller than the display smoothness corresponding to the second display parameter, and the display clarity corresponding to the first display parameter is greater than the display clarity corresponding to the second display parameter.
2. The method according to claim 1, characterized in that The first display parameter includes a first frame rate, the second display parameter includes a second frame rate, and the first frame rate is less than the second frame rate; and / or, The first display parameter includes a first bit rate, the second display parameter includes a second bit rate, and the first bit rate is smaller than the second bit rate.
3. The method according to claim 2, characterized in that The relative motion information includes a relative speed, the first motion information includes a first speed, and the second motion information includes a second speed; When the relative speed is a first speed, the electronic device displays the viewfinder image at a first frame rate; when the relative speed is a second speed, the electronic device displays the viewfinder image at a second frame rate; the first speed is less than the second speed, the display smoothness corresponding to the first frame rate is less than the display smoothness corresponding to the second frame rate, and the display clarity corresponding to the first frame rate is greater than the display clarity corresponding to the second frame rate; and / or, When the relative speed is a first speed, the electronic device displays the viewfinder screen at a first bit rate; when the relative speed is a second speed, the electronic device displays the viewfinder screen at a second bit rate; the first speed is less than the second speed, the display smoothness corresponding to the first bit rate is less than the display smoothness corresponding to the second bit rate, and the display clarity corresponding to the first bit rate is greater than the display clarity corresponding to the second bit rate.
4. The method according to claim 3, characterized in that When the relative speed is less than or equal to a first speed threshold, the electronic device displays the viewfinder image using a third display parameter; the third display parameter includes a third frame rate and / or a third bit rate; wherein the display smoothness corresponding to the third display parameter is less than or equal to the display smoothness corresponding to the first display parameter, and the display clarity corresponding to the third display parameter is greater than or equal to the display clarity corresponding to the first display parameter; When the relative speed is greater than or equal to a second speed threshold, the electronic device displays the viewfinder screen with a fourth display parameter; the first speed threshold is less than the second speed threshold; the fourth display parameter includes a fourth frame rate and / or a fourth bit rate; wherein, the display smoothness corresponding to the fourth display parameter is greater than or equal to the display smoothness corresponding to the second display parameter, and the display clarity corresponding to the fourth display parameter is less than or equal to the display clarity corresponding to the second display parameter.
5. The method according to any one of claims 2 to 4, characterized in that The relative motion information includes relative acceleration, the first motion information includes a first acceleration, and the second motion information includes a second acceleration; When the relative acceleration is a first acceleration, the electronic device displays the viewfinder image at a first frame rate; when the relative acceleration is a second acceleration, the electronic device displays the viewfinder image at a second frame rate; the first acceleration is less than the second acceleration, the display smoothness corresponding to the first frame rate is less than the display smoothness corresponding to the second frame rate, and the display clarity corresponding to the first frame rate is greater than the display clarity corresponding to the second frame rate; and / or, When the relative acceleration is the first acceleration, the electronic device displays the viewfinder screen at a first bit rate; when the relative acceleration is the second acceleration, the electronic device displays the viewfinder screen at a second bit rate; the first acceleration is less than the second acceleration, the display smoothness corresponding to the first bit rate is less than the display smoothness corresponding to the second bit rate, and the display clarity corresponding to the first bit rate is greater than the display clarity corresponding to the second bit rate.
6. The method according to claim 5, characterized in that When the relative acceleration is less than or equal to a first acceleration threshold, the electronic device displays the viewfinder image using a fifth display parameter; the fifth display parameter includes a fifth frame rate and / or a fifth bit rate; wherein the display smoothness corresponding to the fifth display parameter is less than or equal to the display smoothness corresponding to the first display parameter, and the display clarity corresponding to the fifth display parameter is greater than or equal to the display clarity corresponding to the first display parameter; When the relative speed is greater than or equal to a second acceleration threshold, the electronic device displays the viewfinder screen with a sixth display parameter; the first acceleration threshold is less than the second acceleration threshold; the sixth display parameter includes a sixth frame rate and / or a sixth bit rate; wherein, the display smoothness corresponding to the sixth display parameter is greater than or equal to the display smoothness corresponding to the second display parameter, and the display clarity corresponding to the sixth display parameter is less than or equal to the display clarity corresponding to the second display parameter.
7. The method according to claim 4 or 6, characterized in that The method further comprises: The electronic device adjusts the fourth display parameter and the sixth display parameter according to the remaining memory space; wherein, the values corresponding to the fourth display parameter and the sixth display parameter when the remaining memory space of the electronic device is greater than a preset capacity threshold are greater than the values corresponding to the fourth display parameter and the sixth display parameter when the remaining memory space of the electronic device is less than or equal to the preset capacity threshold.
8. The method according to claim 4, 6 or 7, characterized in that: The method further comprises: The electronic device adjusts the fourth display parameter and the sixth display parameter according to the temperature value; wherein, the values corresponding to the fourth display parameter and the sixth display parameter when the temperature value of the electronic device is less than a preset temperature limit threshold are greater than the values corresponding to the fourth display parameter and the sixth display parameter when the temperature value of the electronic device is greater than or equal to the preset temperature limit threshold.
9. The method according to any one of claims 1 to 8, characterized in that The electronic device further includes a gyroscope sensor; the electronic device acquires relative motion information between the electronic device and the photographed object, including: The electronic device detects relative motion information between the electronic device and the photographed object through the gyroscope sensor; and / or, The electronic device detects relative motion information between the electronic device and the photographed object through the camera.
10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: When the electronic device is in an indoor scene and in a stroboscopic scene, the electronic device adjusts the exposure duration of the camera to a first duration and adjusts the exposure gain of the camera to a first gain; or When the electronic device is in an indoor scene and not in a stroboscopic scene, the electronic device adjusts the exposure duration of the camera to a second duration and adjusts the exposure gain of the camera to a second gain; wherein the second duration is less than the first duration.
11. The method according to claim 10, characterized in that The method further comprises: When the electronic device is in an outdoor scene, if the exposure duration of the camera is greater than a third duration and less than the first duration, the electronic device adjusts the exposure gain of the camera to a maximum gain limit value and adjusts the exposure duration corresponding to the camera to a fourth duration; wherein the third duration is less than the second duration; or When the electronic device is in an outdoor scene, if the exposure duration of the camera is less than or equal to the third duration, the electronic device maintains the exposure duration of the camera.
12. An electronic device, characterized in that: The electronic device includes: a communication module, a display screen, a memory and one or more processors; the communication module, the display screen, the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the electronic device, the electronic device executes the method as described in any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed in an electronic device, the electronic device executes the method according to any one of claims 1 to 11.
14. A computer program product, characterized in that The computer program product includes instructions, and when the instructions are executed in an electronic device, the electronic device executes the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Method for controlling code rate based on human eye sensing model
CN101534432A
Shooting method and device, electronic equipment and storage medium
CN115278047A
Video shooting method and device and electronic equipment
CN116095457A
Frame rate adjusting method, device, equipment and system
CN117425064A
Method for correcting image blurring in a captured digital image
TW202347256A