Camera regulation and control method and device, computer equipment and storage medium
By determining optical parameters based on the captured images and setting them to the camera to be called during the operation of the camera of the terminal device, the problems of slow camera switching speed and poor imaging effect are solved, and fast and smooth switching and improved user experience are achieved.
Patent Information
- Application Number
- CN202311718167.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-13
- Publication Date
- 2025-06-13
AI Technical Summary
The prior art has slow speed and poor imaging effects when switching cameras, resulting in poor user experience.
During the operation of at least one camera of the terminal device, optical parameters are determined based on the images captured by the camera, and these parameters are set to each camera in the set of cameras to be called, so as to realize the unified setting of camera parameters.
While maintaining the low power consumption of terminal devices, the rapid and smooth camera switching is achieved, improving the user experience.
Smart Images

Figure CN120151655A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of camera technologies, and particularly to a method and device for camera regulation, a computer device, and a storage medium. Background Art
[0002] Currently, in order to meet the shooting requirements of users in various usage scenarios, electronic devices such as tablet computers and mobile phones are usually equipped with multiple cameras and support free switching between multiple cameras based on user operations or preset logics.
[0003] In the related art, in order to improve the switching smoothness between cameras, usually when receiving an instruction for the user to call a camera, the camera that the user is about to call is turned on, and then after the parameters of the camera are set and the image is stable, the camera switching is performed. However, there are some pain points in this method. For example, the switching speed is very slow, and even the imaging effects of the cameras before and after switching are quite different, resulting in a poor user experience. Summary of the Invention
[0004] To overcome the problems existing in the related art, the present disclosure provides a method and device for camera regulation, a computer device, and a storage medium.
[0005] In a first aspect of the present disclosure, a method for camera regulation is provided. The method includes:
[0006] During the operation of at least one camera of the terminal device, determine optical parameters according to images collected by some or all of the at least one camera, and set parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters;
[0007] Wherein, the set of cameras to be called includes cameras on the terminal device other than some or all of the at least one camera.
[0008] Optionally, the determining optical parameters according to images collected by some or all of the at least one camera, and setting parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters includes:
[0009] Determine optical parameters according to images collected by a specified camera in the at least one camera, and set parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters.
[0010] Optionally, the determining optical parameters according to images collected by a specified camera in the at least one camera, and setting parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters includes:
[0011] Determine white balance parameters based on the images captured by the specified camera among the at least one camera, and set the white balance parameters of each camera in the set of cameras to be called by the terminal device according to the white balance parameters.
[0012] Optionally, the method further includes at least one of the following:
[0013] In response to the terminal device being powered on, turn on the specified camera;
[0014] In response to the user invoking the camera function of the terminal device, turn on the specified camera;
[0015] In response to there being no running camera on the terminal device, turn on the specified camera.
[0016] Optionally, the method further includes:
[0017] In response to the first camera on the terminal device being called and the specified camera not being called, set the running frame rate of the first camera to a first frame rate and set the running frame rate of the specified camera to a second frame rate, where the first frame rate is a frame rate within a first frame rate range, the second frame rate is a frame rate within a second frame rate range, and the minimum value of the first frame rate range is greater than the maximum value of the second frame rate range.
[0018] Optionally, the first frame rate is a positive integer multiple of the second frame rate.
[0019] Optionally, the determining optical parameters based on the images captured by some or all of the at least one camera and setting the parameters of each camera in the set of cameras to be called by the terminal device according to the optical parameters includes:
[0020] Determine optical parameters based on the images captured by some or all of the at least one camera at the first frequency, and set the parameters of each camera in the set of cameras to be called by the terminal device according to the optical parameters.
[0021] Optionally, the determining optical parameters based on the images captured by some or all of the at least one camera and setting the parameters of each camera in the set of cameras to be called by the terminal device according to the optical parameters includes:
[0022] Determine optical parameters based on the images captured by the camera with the highest current running frame rate among the at least one camera, and set the parameters of each camera in the set of cameras to be called by the terminal device according to the optical parameters.
[0023] Optionally, determining optical parameters based on the images captured by the camera with the highest current running frame rate among the at least one camera, and setting the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters, includes:
[0024] Determining exposure parameters based on the images captured by the camera with the highest current running frame rate among the at least one camera, and setting the exposure parameters of each camera in the set of cameras to be called of the terminal device according to the exposure parameters.
[0025] Optionally, the set of cameras to be called includes at least one of the following:
[0026] Among the cameras of the terminal device, the cameras with a user call frequency greater than the frequency threshold;
[0027] The cameras that are not running on the terminal device;
[0028] The cameras that are running on the terminal device.
[0029] Optionally, the optical parameters include at least one of the following:
[0030] Focus parameters, exposure parameters, white balance parameters.
[0031] A second aspect of the present disclosure provides a camera control device, the device includes:
[0032] A parameter setting module, configured to determine optical parameters based on the images captured by some or all of the at least one camera during the operation of the at least one camera of the terminal device, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters;
[0033] Wherein, the set of cameras to be called includes the cameras on the terminal device other than some or all of the at least one camera.
[0034] Optionally, when the parameter setting module is configured to determine optical parameters based on the images captured by some or all of the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters, it is configured to:
[0035] Determine optical parameters based on the images captured by a specified camera among the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters.
[0036] Optionally, when the parameter setting module is used to determine the optical parameters according to the images collected by the specified camera among the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters, it is used for:
[0037] Determine the white balance parameters according to the images collected by the specified camera among the at least one camera, and set the white balance parameters of each camera in the set of cameras to be called of the terminal device according to the white balance parameters.
[0038] Optionally, the device further includes a specified camera activation module for performing at least one of the following:
[0039] Activate the specified camera in response to the startup of the terminal device;
[0040] Activate the specified camera in response to the user invoking the camera function of the terminal device;
[0041] Activate the specified camera in response to there being no running camera on the terminal device.
[0042] Optionally, the device further includes:
[0043] A frame rate setting module for, in response to the first camera on the terminal device being called and the specified camera not being called, setting the running frame rate of the first camera to a first frame rate and setting the running frame rate of the specified camera to a second frame rate, where the first frame rate is a frame rate within a first frame rate range, the second frame rate is a frame rate within a second frame rate range, and the minimum value of the first frame rate range is greater than the maximum value of the second frame rate range.
[0044] Optionally, the first frame rate is a positive integer multiple of the second frame rate.
[0045] Optionally, when the parameter setting module is used to determine the optical parameters according to the images collected by some or all of the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters, it is used for:
[0046] Determine the optical parameters according to the images collected by some or all of the at least one camera at the first frequency, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters.
[0047] Optionally, when the parameter setting module is used to determine the optical parameters according to the images collected by some or all of the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters, it is used for:
[0048] Determine optical parameters based on the images captured by the camera with the highest current running frame rate among the at least one camera, and set the parameters of each camera in the set of cameras to be called by the terminal device according to the optical parameters.
[0049] Optionally, when the parameter setting module is used to determine optical parameters based on the images captured by the camera with the highest current running frame rate among the at least one camera, and set the parameters of each camera in the set of cameras to be called by the terminal device according to the optical parameters, it is used for:
[0050] Determine exposure parameters based on the images captured by the camera with the highest current running frame rate among the at least one camera, and set the exposure parameters of each camera in the set of cameras to be called by the terminal device according to the exposure parameters.
[0051] Optionally, the set of cameras to be called includes at least one of the following:
[0052] Among the cameras of the terminal device, the cameras with a user call frequency greater than the frequency threshold;
[0053] The cameras not running on the terminal device;
[0054] The cameras currently running on the terminal device.
[0055] Optionally, the optical parameters include at least one of the following:
[0056] Focus parameters, exposure parameters, white balance parameters.
[0057] A third aspect of the present disclosure provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. Wherein, when the processor executes the program, the method described in the first aspect is implemented.
[0058] A fourth aspect of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method described in the first aspect is implemented.
[0059] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
[0060] In the embodiments of the present disclosure, during the operation of at least one camera of a terminal device, optical parameters are determined based on images collected by some or all of the at least one camera, and parameters of one or more cameras on the terminal device other than some or all of the at least one camera are set according to the optical parameters. Since in the present disclosure, as long as there is at least one operating camera, optical parameters can be determined based on the images it collects, and these optical parameters can be set to one or more cameras on the terminal device other than the camera based on which the optical parameters are determined. Therefore, the method provided by the present disclosure can, on the premise of keeping the terminal device with low power consumption, realize the unified setting of the optical parameters of most cameras based on a few cameras, so that even when these cameras are in the off state, there are still referenceable optical parameters set, so that when the user switches the camera to these cameras, these cameras can be quickly enabled, and the imaging effects before and after the switch are very similar, improving the user experience during the use of multiple cameras.
[0061] It should be understood that the above general description and subsequent detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Brief Description of the Drawings
[0062] The drawings herein are incorporated into the specification and constitute a part of the present disclosure, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.
[0063] Figure 1 It is an application scenario diagram of a camera control method shown in some exemplary embodiments.
[0064] Figure 2 It is a flowchart of a camera control method shown in some exemplary embodiments.
[0065] Figure 3 It is a flowchart of another camera control method shown in some exemplary embodiments.
[0066] Figure 4 It is a schematic diagram of a synchronization signal shown in some exemplary embodiments.
[0067] Figure 5 It is a block diagram of a camera control device shown in some exemplary embodiments.
[0068] Figure 6 It is a hardware structure diagram of a computer device shown in some exemplary embodiments. Detailed Embodiments
[0069] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0070] The terms used in the present disclosure are for the purpose of describing specific embodiments only and are not intended to limit the present disclosure. The singular forms "a", "the", and "said" used in the present disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0071] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".
[0072] Currently, in order to meet the shooting needs of users in various usage scenarios, electronic devices such as tablet computers and mobile phones are usually configured with multiple cameras and support free switching between multiple cameras based on user operations or based on preset logic.
[0073] In the related art, in order to improve the switching smoothness between cameras, usually when receiving an instruction from the user to call a camera, the camera that the user is about to call is turned on, and then after waiting for the parameters of the camera to be set and the picture to be stable, the camera is switched. However, this method has some pain points, such as the switching speed is very slow, and the imaging effects of the cameras before and after switching are quite different, resulting in a poor user experience. Or, sometimes in the related art, the cameras are selected to be kept always on, but this brings a great power consumption problem and the user experience is also poor.
[0074] In view of this, the present disclosure provides a camera control method, device, computer device, and storage medium.
[0075] The following will be combined with the Figure 1 application scenario diagram shown to give an explanatory description of some concepts involved in the solution. In Figure 1In the example shown, the Controller Image Sensor outputs a Vsync (Vertical Synchronization) signal to the Target Image Sensor, thereby avoiding screen tearing caused by misalignment of the frame headers of different sensors or different refresh rates from the image acquisition rate of the upper-layer system. At the same time, the Controller Image Sensor sends an interrupt synchronization signal XVS (Vertical Synchronization, here a different name is given to the vertical synchronization signal because it plays a different role from the above Vsync) to the synchronization processing unit, so that the synchronization processing unit processes the images transmitted back by the Image Sensor according to the frame rate represented by XVS (XVS can be the frame header information of a frame signal or an interrupt signal located before the frame header information) and generates optical parameters. Each Image Sensor receives the control signal from the synchronization processing unit through I2C (Inter-Integrated Circuit, two-wire serial bus) and transmits the feedback information back. The Image Sensor and its corresponding ISP (Image Signal Processor) transfer images based on mipi (Mobile Industry Processor Interface) signals. It should be noted that Figure 1 The application scenario diagram shown is only an exemplary schematic diagram, which does not limit the application scenario of the present disclosure, and the modules shown therein can be physical circuits or logical structures. For example, the synchronization processing unit can be a logical structure or a kind of hardware (such as ISP0 or the 3A Stats module shown in Figure 1 ), and this hardware can process the field synchronization signal XVS signal and the I2C signal and generate corresponding control logic for these signals. The present disclosure does not limit this.
[0076] Hardware-wise, the Controller Image Sensor can send XVS signals to the synchronization processing unit at the highest frame rate among all cameras. The synchronization processing unit recognizes these signals and, based on the 3A (Auto Focus, abbreviated as AF; Auto Exposure, abbreviated as AE; Auto White Balance, abbreviated as AWB) statistical information (which can be determined by the 3A statistical module or the synchronization processing unit according to the images captured by the camera) and the Image Sensor state machine, sends instructions to control the Image Sensor respectively. (The Image Sensor, i.e., the image sensor, is usually equivalent to the concept of a camera. In the Figure 1 illustrated embodiment, it includes a Controller Image Sensor and at least one Target Image Sensor), thereby achieving unified control of camera parameters and improving the 3A consistency of multiple cameras. When the user switches to the Target Image Sensor, the Controller Image Sensor remains always on in a low-frame-rate and low-power mode and continuously synchronizes with other Target Image Sensors. The user controls the opening and closing of the Image Sensor (image sensor) through the camera application control unit, and the Image Sensor state machine stores the on / off states, operating frame rates, and definition information (such as whether it is a Controller Image Sensor) of these Image Sensors. It should be understood that the above Image Sensor can be either the camera assembled in the device itself or other sensors externally connected through connection methods such as a universal serial bus. Preferably, the Image Sensors involved in the present disclosure can be physically kept at a relatively close distance and in a similar direction (or the images they capture have similar physical meanings, such as different camera positions for image capture of the same scene) to ensure that the technical effects brought by the 3A consistency of multiple cameras are maintained at an optimal level.
[0077] Next, the embodiments of the present disclosure will be described in detail.
[0078] The first aspect of the present disclosure provides a camera control method applied to a terminal device. Please refer to Figure 2 , which includes the following steps:
[0079] Step S201, during the operation of at least one camera of the terminal device, determine optical parameters according to the images collected by some or all of the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters, where the set of cameras to be called includes cameras on the terminal device other than some or all of the at least one camera.
[0080] In other words, the method provided in the present disclosure sets the parameters of each camera in the set of cameras to be called according to the images collected by at least one running camera. Here, the meaning of "running" is that the camera is working (collecting images), which may occur when the user takes a photo or video using a certain camera through the camera program, or when the user scans a code, or uses AR (Augmented Reality) functions and other auxiliary functions implemented based on the camera (such as automatically turning on the night mode based on the brightness sensed by the camera). The optical parameters may include the optical parameters that need to be set for the camera (which may vary according to the actual configuration of the camera). For most cameras, the optical parameters here may include any one or more of the 3A parameters (i.e., focusing parameter, exposure parameter, white balance parameter).
[0081] In some embodiments of the present disclosure, the set of cameras to be called may be determined according to at least one of the following conditions (that is, the set of cameras to be called includes at least one of the following):
[0082] (1) Among the cameras of the terminal device, the cameras with a user call frequency greater than a frequency threshold;
[0083] (2) The cameras on the terminal device that are not running;
[0084] (3) The cameras on the terminal device that are running.
[0085] Among them, the frequency threshold described in (1) can be either a preset value or obtained by summarizing the user's habits of calling the camera. For example, there are three cameras A, B, and C configured on the terminal device. If the user calls camera A 12 times, camera B 5 times, and never calls camera C in the past 5 days (or other time threshold), it can be considered that this user tends to use cameras A and B. Then, the set of cameras to be called can be set as A and B. During the operation of at least one camera (for example, A is running while B and C are not running), based on the images captured by the running camera (i.e., A), the optical parameters of each camera in the set of cameras to be called (i.e., A and B) are set. Based on this, when the user switches from camera A to camera B, since the optical parameters of B have been pre-set, there will be no significant jump in the imaging effect, and at the same time, energy consumption can be saved to the greatest extent. The combination of (2) and (3) is all the cameras assembled on the terminal device. Specifically, if both cameras A and B on the device are running, the optical parameters can be determined based on the images captured by A and the parameters of A or B can be set based on these optical parameters, or the parameters of C can be set based on these optical parameters (while the respective optical parameters of A and B can be determined and set according to the images they capture themselves). The present disclosure does not limit this. It should be noted that the conditions described in (1) are only illustrative examples for preset conditions. In actual application, a total set of cameras can also be set, and based on this total set of cameras, the cameras are screened to determine the set of cameras to be called (that is, the set of cameras to be called includes the cameras in the total set of cameras with a user call frequency greater than the frequency threshold, or includes the cameras in the total set of cameras that are not running, and so on). For example, one or several cameras used only for light sensing or auxiliary imaging (i.e., cameras with a lower demand for parameter setting) are excluded from the set of cameras (and also excluded from the set of cameras to be called).
[0086] In the embodiments of the present disclosure, during the operation of at least one camera of a terminal device, optical parameters are determined based on images collected by some or all of the at least one camera, and parameters of one or more cameras on the terminal device other than some or all of the at least one camera are set according to the optical parameters. Since in the present disclosure, as long as there is at least one operating camera, optical parameters can be determined based on the images it collects, and these optical parameters can be set to one or more cameras on the terminal device other than the camera based on which the optical parameters are determined. Therefore, the method provided by the present disclosure can, on the premise of keeping the terminal device with low power consumption, achieve unified setting of the optical parameters of most cameras based on a small number of cameras, so that even when these cameras are in the off state, there are still referenceable optical parameters set, so that when the user switches the camera to these cameras, these cameras can be quickly enabled, and the imaging effects before and after the switch are very similar, improving the user experience during the use of multiple cameras.
[0087] In some embodiments of the present disclosure, according to different specific optical parameters, images collected by a more preferred camera among at least one camera can be selected to determine the optical parameters, and these optical parameters are set to other cameras. Considering the balance among hardware cost, user requirements, and the diversity of application scenarios, terminal device manufacturers usually configure a main camera and one or more sub-cameras on a multi-camera device. Among them, the main camera usually has stronger image acquisition performance (for example, the resolution of the collected images is higher, the color is more accurate, and the focal length range is wider), and the applicable scenarios are more extensive (that is, more versatile), while the sub-camera can be a camera that can play special advantages in some specific scenarios, such as an ultra-wide-angle camera, a macro camera, etc. These cameras can meet the general-purpose standard in terms of photosensitive performance, but are usually inferior to the main camera in terms of color and the range of applicable scenarios. Therefore, preferably, the optical parameter determination logic of the camera can be specially set according to the above characteristics to ensure that the best effect can be achieved in the consistent parameter setting.
[0088] In some embodiments of the present disclosure, the terminal device has a designated camera. Preferably, the designated camera can be the above-mentioned main camera, or a camera with the best image acquisition performance determined based on the actual hardware configuration (for Figure 1 the embodiment shown, the designated camera can be the Controller Image Sensor).
[0089] Specifically, the determining optical parameters based on images collected by some or all of the at least one camera and setting parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters includes:
[0090] Determine the optical parameters based on the images captured by the specified camera among the at least one camera, and set the parameters of each camera in the set of cameras to be called by the terminal device according to the optical parameters.
[0091] Among them, the specified camera can be pre-specified by the terminal device manufacturer or the debugger, or specified by the user, or according to a preset benchmark test or the aging degree of the camera. Preferably, among the cameras configured on the terminal device, the camera with the best or relatively better image capture performance, or the one that can best balance power consumption and image capture performance, can be used as the specified camera. Based on this, it can be ensured that the optical parameters are determined based on the images captured by the camera with better performance, which has higher accuracy and universality, and further improves the user experience.
[0092] Since the requirements for camera performance by different optical parameters are usually also inconsistent, different images captured by different cameras can be selected as the benchmark for determining the parameters according to different optical parameters. For example, the white balance parameter (i.e., the so-called AWB parameter) has relatively high requirements for image capture quality, that is, better image capture performance is required to ensure the accuracy and universality of the white balance parameter. Therefore, in some embodiments of the present disclosure, the step of determining the optical parameters based on the images captured by the specified camera among the at least one camera and setting the parameters of each camera in the set of cameras to be called by the terminal device according to the optical parameters includes:
[0093] Determine the white balance parameter based on the images captured by the specified camera among the at least one camera, and set the white balance parameter of each camera in the set of cameras to be called by the terminal device according to the white balance parameter.
[0094] Based on this, combined with the foregoing principle, the accuracy and universality of obtaining the white balance parameter can be further improved, thereby reducing the color jump generated before and after the camera switch, and further improving the user experience.
[0095] To ensure that the optical parameters can be determined in real time, thereby further improving the accuracy of obtaining the optical parameters and reducing the jump of the imaging effect generated during the sudden startup or switch of the camera, in some embodiments of the present disclosure, the specified camera also has a preset special startup condition, that is, the method further includes at least one of the following:
[0096] In response to the startup of the terminal device, turn on the specified camera;
[0097] In response to the user invoking the camera function of the terminal device, turn on the specified camera;
[0098] In response to the absence of a running camera on the terminal device, turn on the specified camera.
[0099] In other words, the specified camera can remain always-on in one or more of the following situations: "when the terminal device is powered on, when the user calls the camera function of the terminal device, and when there is no running camera on the device", so as to ensure that the optical parameters can be continuously acquired and set to each camera in the set of cameras to be called in the above one or more situations, further reducing the jump in the imaging effect generated during the sudden turn-on or switching of the camera, thereby further enhancing the user experience. It should be understood that the above three situations are only illustrative examples, and the activation of the specified camera may have other conditions. For example, the specified camera remains always-on under the above one or more conditions only when the preset mode (such as the generally speaking power-saving mode) is in the off state, and when the preset mode is in the on state, the specified camera can be turned on only when the user calls it, so as to achieve the best power-saving effect while also being able to reduce the jump in the imaging effect generated during the camera switching process. The present disclosure does not limit this.
[0100] For the application scenarios involved in the present disclosure, it is possible that the specified camera remains always-on, but the user does not call the specified camera but is calling other cameras. To further reduce the power consumption of the camera, the present disclosure also provides a frame rate setting method. Please refer to Figure 3 , which includes the following steps:
[0101] Step S301, in response to the first camera on the terminal device being called and the specified camera not being called, set the running frame rate of the first camera to a first frame rate and set the running frame rate of the specified camera to a second frame rate, where the first frame rate is a frame rate within a first frame rate range, the second frame rate is a frame rate within a second frame rate range, and the minimum value of the first frame rate range is greater than the maximum value of the second frame rate range.
[0102] In other words, when the specified camera remains always-on, but the user does not call the specified camera but is calling other cameras (i.e., the first camera), the specified camera can be set to run at a low frame rate, and the frame rate of the first camera can be set to run at a high frame rate. The specific values of the low frame rate and the high frame rate can be determined according to the actual situation and the actual configuration of the camera. The present disclosure does not limit this. Preferably, the first frame rate is a positive integer multiple of the second frame rate (i.e., the second frame rate is one-Nth of the first frame rate, where N≥2), so that the image frames transmitted back by the specified camera can completely overlap with the image frames transmitted back by the first camera, avoiding information loss caused by misalignment of the frame rates of the specified camera and the first camera.
[0103] In some embodiments of the present disclosure, determining optical parameters based on images collected by some or all of the at least one camera, and setting parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters, includes:
[0104] Determine optical parameters according to images collected by some or all of the at least one camera at the first frequency, and set parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters.
[0105] Taking Figure 1 the illustrated embodiment as an example, the Controller Image Sensor (i.e., the designated camera) may send an XVS signal to the synchronization processing unit at the first frame rate, so that the synchronization processing unit processes the image frames at the first frame rate and generates optical parameters to be set for each camera in the set of cameras to be called. Please refer to Figure 4 , which shows a synchronization signal. Among them, the upper signal is the image frame sent by the Controller Image Sensor (i.e., the designated camera) ( Figure 4 the part between the rising edge shown in and the nearest falling edge thereafter is an image frame), and the lower signal is the image frame sent by the Target ImageSensor (i.e., the first camera). The first frame rate is twice the second frame rate, and the Controller ImageSensor can send an XVS synchronization signal (i.e., the upward arrow in the figure) to the synchronization processing unit based on the first frame rate. It should be understood that the XVS synchronization signal may also be sent by the Target Image Sensor or other hardware or logic units, or the synchronization processing unit directly determines the frame rate according to the frame header information of each frame and processes each received frame in real time. The present disclosure does not limit this.
[0106] In the present disclosure, in addition to the designated camera, the optical parameters may also have other determination bases. For example, determining optical parameters based on images collected by some or all of the at least one camera, and setting parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters, includes:
[0107] Determine optical parameters according to images collected by the camera with the highest current running frame rate among the at least one camera, and set parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters.
[0108] In other words, the optical parameters can be determined based on the images captured by the camera with the highest current running frame rate among the currently running cameras, and the optical parameters can be set for each camera in the set of cameras to be called. Based on this, it can be ensured that the optical parameters are always determined by the images captured by the camera with the highest frequency, thus ensuring that the optical parameters have the highest timeliness. It should be understood that this parameter determination basis can be used in combination with the "based on the specified camera" described above. Exemplarily, the optical parameters with both the highest timeliness, the highest accuracy, and versatility can be obtained by comprehensively taking values based on the images captured by the specified camera and the images captured by the camera with the highest current running frame rate according to the pre-allocated weights or based on other preset algorithms. Another example is that the determination basis of each parameter can be flexibly selected according to the characteristics of the different parameters included in the optical parameters. As mentioned above, the white balance parameter usually has a relatively high requirement for the quality of image capture, that is, better image capture performance is required to ensure the accuracy and universality of the white balance parameter; while the ambient brightness changes rapidly according to the device position and the shooting range, so the exposure parameter has a higher requirement for the image capture frequency and a relatively lower requirement for the image capture quality. Therefore, the white balance parameter in the optical parameters can be determined based on the specified camera on the terminal device, and the exposure parameter in the optical parameters can be determined based on the images captured by the camera with the highest current running frame rate on the terminal device.
[0109] That is, determining the optical parameters according to the images captured by the camera with the highest current running frame rate among the at least one camera, and setting the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters, includes:
[0110] Determining the exposure parameter according to the images captured by the camera with the highest current running frame rate among the at least one camera, and setting the exposure parameter of each camera in the set of cameras to be called of the terminal device according to the exposure parameter.
[0111] Based on this, the brightness jump generated before and after the camera switch can be reduced, thereby improving the visual experience of the picture and the smoothness of the camera startup and switching processes, and further enhancing the user experience.
[0112] The above at least one embodiment will be further described below by way of an exemplary example.
[0113] If there are three cameras, namely A, B, and C, configured on the terminal device, where A is the main camera and has the highest image acquisition quality and environmental applicability range. When the user does not call any camera, A can be kept turned on and set to run at a low frame rate (e.g., 10 Hz). When the user calls A, it can be set to run at a high frame rate, e.g., 120 Hz. At this time, only camera A of the device is in the running state (in other words, A is both the designated camera and the camera with the highest current running frame rate). Then, the white balance parameter and exposure parameter can be determined based on the image collected by A (at this time, the focus parameter of each camera can also be generated based on the focal length parameter of each camera and the assisted focusing technology), and the generated optical parameters are set into the three cameras A, B, and C, so that when the user suddenly switches to cameras B and C, cameras B and C can be quickly enabled without obvious color jump and brightness jump. At the same time, compared with keeping cameras B and C always on, it also takes into account the power consumption of the camera module, which is beneficial to the device's battery life and prevents the camera from aging. When the user takes camera B as the main camera (e.g., when the user is using B for video recording), B can be set to a high frame rate (e.g., 120 Hz), while keeping A at a low frame rate (e.g., 10 Hz). Then, the exposure parameter is determined based on the image collected by B, and the white balance parameter is determined based on the image collected by A (at this time, the focus parameter of each camera can also be generated based on the focal length parameter of each camera, the image collected by A or B, and the assisted focusing technology), and these parameters are set into A, B, and C. For the specific advantages, please refer to the foregoing embodiments and will not be elaborated herein.
[0114] Corresponding to the foregoing method embodiments, the present disclosure also provides embodiments of a device and a terminal to which the device is applied.
[0115] In a second aspect of the present disclosure, a camera control device is provided. Please refer to Figure 5 , the device includes:
[0116] A parameter setting module 501, configured to determine optical parameters according to images collected by some or all of at least one camera during the operation of the at least one camera on the terminal device, and set parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters;
[0117] Wherein, the set of cameras to be called includes cameras on the terminal device other than some or all of the at least one camera.
[0118] Optionally, when the parameter setting module 501 is configured to determine optical parameters according to images collected by some or all of the at least one camera and set parameters of each camera in the set of cameras to be called of the terminal device, it is configured to:
[0119] Determine optical parameters based on the images captured by the specified camera among the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters.
[0120] Optionally, when the parameter setting module 501 is used to determine optical parameters based on the images captured by the specified camera among the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters, it is used for:
[0121] Determine white balance parameters based on the images captured by the specified camera among the at least one camera, and set the white balance parameters of each camera in the set of cameras to be called of the terminal device according to the white balance parameters.
[0122] Optionally, the device further includes a specified camera activation module for performing at least one of the following:
[0123] Activate the specified camera in response to the startup of the terminal device;
[0124] Activate the specified camera in response to the user invoking the camera function of the terminal device;
[0125] Activate the specified camera in response to there being no running camera on the terminal device.
[0126] Optionally, the device further includes:
[0127] A frame rate setting module for, in response to the first camera on the terminal device being called and the specified camera not being called, setting the operating frame rate of the first camera to a first frame rate and setting the operating frame rate of the specified camera to a second frame rate, where the first frame rate is a frame rate within a first frame rate range, the second frame rate is a frame rate within a second frame rate range, and the minimum value of the first frame rate range is greater than the maximum value of the second frame rate range.
[0128] Optionally, the first frame rate is a positive integer multiple of the second frame rate.
[0129] Optionally, when the parameter setting module 501 is used to determine optical parameters based on the images captured by some or all of the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters, it is used for:
[0130] Determine optical parameters based on the images captured by some or all of the at least one camera at the first frequency, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters.
[0131] Optionally, when the parameter setting module 501 is used to determine optical parameters based on images collected by some or all of the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters, it is used for:
[0132] Determine optical parameters based on the images collected by the camera with the highest current operating frame rate among the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters.
[0133] Optionally, when the parameter setting module 501 is used to determine optical parameters based on the images collected by the camera with the highest current operating frame rate among the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters, it is used for:
[0134] Determine exposure parameters based on the images collected by the camera with the highest current operating frame rate among the at least one camera, and set the exposure parameters of each camera in the set of cameras to be called of the terminal device according to the exposure parameters.
[0135] Optionally, the set of cameras to be called includes at least one of the following:
[0136] Among the cameras of the terminal device, the cameras with a user call frequency greater than a frequency threshold;
[0137] The cameras that are not running on the terminal device;
[0138] The cameras that are running on the terminal device.
[0139] Optionally, the optical parameters include at least one of the following:
[0140] Focus parameters, exposure parameters, white balance parameters.
[0141] The implementation processes of the functions and roles of each module in the above device are specifically detailed in the implementation processes of the corresponding steps in the above method, and will not be elaborated here.
[0142] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the descriptions of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present disclosure. A person of ordinary skill in the art can understand and implement it without creative work.
[0143] In a third aspect, the embodiments of the camera control device provided by the present disclosure can be applied to a computer device. Please refer to the appendix Figure 6 , which exemplarily shows a hardware schematic diagram of a computer device. For example, the device 600 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0144] The device 600 may include one or more of the following components: a processing component 601, a memory 602, a power supply component 603, a multimedia component 604, an audio component 605, an input / output (I / O) interface 606, a sensor component 607, and a communication component 608.
[0145] The processing component 601 generally controls the overall operation of the device 600, such as operations associated with display, telephone call, data communication, camera operation, and recording operation. The processing component 601 may include one or more processors 609 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 601 may include one or more modules to facilitate the interaction between the processing component 601 and other components. For example, the processing component 601 may include a multimedia module to facilitate the interaction between the multimedia component 604 and the processing component 601.
[0146] The memory 602 is configured to store various types of data to support the operation of the device 600. Examples of these data include instructions for any application or method operating on the device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 602 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.
[0147] The power component 603 provides power for various components of the device 600. The power component 603 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 600.
[0148] The multimedia component 604 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can not only sense the boundaries of the touch or swipe actions, but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 604 includes a front camera and / or a rear camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0149] The audio component 605 is configured to output and / or input audio signals. For example, the audio component 605 includes a microphone (MIC) that is configured to receive external audio signals when the device 600 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 602 or transmitted via the communication component 608. In some embodiments, the audio component 605 further includes a speaker for outputting audio signals.
[0150] The I / O interface 606 provides an interface between the processing component 601 and a peripheral interface module, and the peripheral interface module can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a power button, and a lock button.
[0151] The sensor assembly 607 includes one or more sensors for providing a status assessment of various aspects of the device 600. For example, the sensor assembly 607 can detect the on / off state of the device 600, the relative positioning of components, such as the display and keypad of the device 600. The sensor assembly 607 can also detect a change in the position of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration / deceleration of the device 600, and a change in the temperature of the device 600. The sensor assembly 607 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 607 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 607 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0152] The communication component 608 is configured to facilitate communication between the device 600 and other devices in a wired or wireless manner. The device 600 can access a wireless network based on communication standards, such as WiFi, 2G or 3G, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 608 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 608 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0153] In an exemplary embodiment, the device 600 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.
[0154] In a fourth aspect, in an exemplary embodiment of the present disclosure, there is also provided a non-transitory computer-readable storage medium including instructions, such as a memory 602 including instructions, and the above instructions can be executed by a processor 609 of the device 600 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0155] The above describes specific embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0156] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not claimed in the present disclosure. The specification and examples are only to be considered exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0157] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the figures, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
[0158] The above are only the preferred embodiments of the present disclosure and are not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure shall be included within the scope of protection of the present disclosure.
Claims
1. A camera control method, characterized in that, the method includes: During the operation of at least one camera of the terminal device, determine optical parameters according to the images collected by some or all of the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters; wherein, the set of cameras to be called includes the cameras on the terminal device other than some or all of the at least one camera.
2. The camera control method according to claim 1, characterized in that, the determining optical parameters according to the images collected by some or all of the at least one camera, and setting the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters includes: Determine optical parameters according to the images collected by a specified camera in the at least one camera, and set the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters.
3. The camera control method according to claim 2, characterized in that, the determining optical parameters according to the images collected by a specified camera in the at least one camera, and setting the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters includes: Determine white balance parameters according to the images collected by a specified camera in the at least one camera, and set the white balance parameters of each camera in the set of cameras to be called of the terminal device according to the white balance parameters.
4. The camera control method according to claim 2, characterized in that, the method further includes at least one of the following: In response to the startup of the terminal device, turn on the specified camera; In response to the user invoking the camera function of the terminal device, turn on the specified camera; In response to there being no running camera on the terminal device, turn on the specified camera.
5. The camera control method according to claim 4, characterized in that, the method further includes: In response to the first camera on the terminal device being called and the specified camera not being called, set the running frame rate of the first camera to a first frame rate, and set the running frame rate of the specified camera to a second frame rate, wherein the first frame rate is a frame rate within a first frame rate range, the second frame rate is a frame rate within a second frame rate range, and the minimum value of the first frame rate range is greater than the maximum value of the second frame rate range.
6. The camera control method according to claim 5, characterized in that, the first frame rate is a positive integer multiple of the second frame rate.
7. The camera control method according to claim 5, characterized in that, the determining optical parameters according to the images collected by some or all of the at least one camera, and setting the parameters of each camera in the set of cameras to be called of the terminal device according to the optical parameters includes: Determine optical parameters according to the images collected by some or all of the at least one camera at the first frequency, and set the parameters of each camera in the set of cameras to be called by the terminal device according to the optical parameters.
8. The camera control method according to any one of claims 1 or 2, wherein, the determining optical parameters according to the images collected by some or all of the at least one camera, and setting the parameters of each camera in the set of cameras to be called by the terminal device according to the optical parameters includes: determining optical parameters according to the images collected by the camera with the highest current running frame rate among the at least one camera, and setting the parameters of each camera in the set of cameras to be called by the terminal device according to the optical parameters.
9. The camera control method according to claim 8, wherein, the determining optical parameters according to the images collected by the camera with the highest current running frame rate among the at least one camera, and setting the parameters of each camera in the set of cameras to be called by the terminal device according to the optical parameters includes: determining exposure parameters according to the images collected by the camera with the highest current running frame rate among the at least one camera, and setting the exposure parameters of each camera in the set of cameras to be called by the terminal device according to the exposure parameters.
10. The camera control method according to claim 1, wherein, the set of cameras to be called includes at least one of the following: among the cameras of the terminal device, the cameras with a user call frequency greater than a frequency threshold; the cameras not running on the terminal device; the cameras running on the terminal device.
11. The camera control method according to claim 1, wherein, the optical parameters include at least one of the following: focus parameter, exposure parameter, white balance parameter.
12. A camera control device, wherein, the device includes: a parameter setting module, configured to determine optical parameters according to the images collected by some or all of the at least one camera during the operation of the at least one camera of the terminal device, and set the parameters of each camera in the set of cameras to be called by the terminal device according to the optical parameters; wherein, the set of cameras to be called includes the cameras on the terminal device other than some or all of the at least one camera.
13. A computer device, wherein, it includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 11 when executing the program.
14. A computer-readable storage medium, on which a computer program is stored, wherein, the program implements the method according to any one of claims 1 to 11 when executed by a processor.