A dual-camera module auxiliary focusing method and related device
By establishing a mapping table using the focal length and ranging values of an RGB camera after a DTOF module is damaged, focusing assistance is provided, solving the problem of DTOF module damage requiring factory calibration, reducing repair costs and improving user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN ADAPS PHOTONICS TECH CO LTD
- Filing Date
- 2023-06-02
- Publication Date
- 2026-07-21
Smart Images

Figure CN116668845B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of optics, and more particularly to an auxiliary focusing method and related equipment for a dual-camera module. Background Technology
[0002] A Direct Time-of-Flight (DTOF) module can function as a depth camera, working in conjunction with an RGB (red-green-blue) camera to assist the RGB camera in autofocus. A module combining a depth camera and an RGB camera is called a dual-camera module. Traditional RGB cameras rely on the gradient values of the image for focusing, performing well in bright sunlight with clearly defined object outlines. However, in backlit or low-light conditions, the RGB camera's focusing algorithm performs poorly. When using a dual-camera module, the depth camera measures the distance between the subject and the camera, and the RGB camera uses this distance to adjust its lens to the appropriate position, thus achieving better autofocus.
[0003] During mass production, dual-camera modules require camera parameter calibration. However, this calibration process is typically performed in the factory using specialized equipment. After leaving the factory, if the DTOF module within the dual-camera module is accidentally damaged, it needs to be returned to the factory for calibration, disrupting normal use and reducing the user's product experience. Summary of the Invention
[0004] This application provides an auxiliary focusing method and related equipment for a dual-camera module, which can be used to achieve auxiliary focusing function of the dToF module for RGB cameras as much as possible in the event of accidental damage to the dToF module without returning it to the factory for repair or calibrating the time-of-flight module.
[0005] The first aspect of this application provides an auxiliary focusing method for a dual-camera module, the dual-camera module including a time-of-flight module and a measuring camera, the method comprising:
[0006] When the measuring camera successfully focuses, the measuring parameters, including the focal length value of the measuring camera and the initial ranging value of the time-of-flight module, are obtained to form a first mapping table;
[0007] Periodically calculate the preferred ranging value corresponding to the focal length value from multiple initial ranging values, and form a second mapping table based on the preferred ranging value and the focal length value;
[0008] When the measuring camera fails to focus, the focal length value to be assisted in focusing is determined according to the second mapping table and the ranging value output by the time-of-flight module, so as to adjust the focal length of the measuring camera.
[0009] Optionally, when the measuring camera successfully focuses, the step of acquiring measurement parameters including the focal length value of the measuring camera and the initial ranging value of the time-of-flight module to form a first mapping table further includes:
[0010] Before the dual-camera module is delivered to the user, the focal length value of the measuring camera and the initial ranging value of the time-of-flight module are saved to form a default mapping table.
[0011] Optionally, when the measuring camera successfully focuses, acquiring the measurement parameters, including the focal length value of the measuring camera and the initial ranging value of the time-of-flight module, to form a first mapping table, specifically includes:
[0012] When the measuring camera successfully focuses, the measurement parameters are obtained, including the focal length value of the measuring camera and the initial ranging value of the time-of-flight module. The new focal length value and the new initial ranging value are then inserted into the default mapping table to form the first mapping table.
[0013] Alternatively, corresponding to the original focal length value, the new initial ranging value is inserted into the default mapping table to form the first mapping table.
[0014] Optionally, periodically calculating the preferred ranging value corresponding to the focal length value from a plurality of initial ranging values includes:
[0015] Periodically, among multiple initial ranging values, the ranging value that appears most frequently is determined as the preferred ranging value corresponding to the focal length value.
[0016] Optionally, periodically calculating the preferred ranging value corresponding to the focal length value from a plurality of initial ranging values includes:
[0017] If there are multiple ranging values with the highest frequency, the average ranging value of the multiple initial ranging values is determined periodically from the multiple initial ranging values.
[0018] The preferred distance measurement value is determined as the distance measurement value that has the smallest difference from the average distance measurement value among the plurality of initial distance measurement values.
[0019] Optionally, the focal length value to be assisted in focusing for the measuring camera is determined based on the second mapping table and the ranging value output by the time-of-flight module, specifically including:
[0020] Based on the ranging value output by the time-of-flight module, the second mapping table is searched to find the preferred ranging value that is closest to the ranging value, and the corresponding focal length value is determined as the focal length value to be assisted in focusing for the measuring camera.
[0021] Optionally, forming a second mapping table based on the preferred ranging value and the focal length value includes:
[0022] If the preferred ranging value corresponds to multiple focal length values, a second mapping table is formed by determining the focal length value with the minimum value among the multiple focal length values and the preferred ranging value.
[0023] A second aspect of this application provides an auxiliary focusing system for a dual-camera module, the dual-camera module including a time-of-flight module and a measuring camera, the system comprising:
[0024] The acquisition unit is used to acquire measurement parameters, including the focal length value of the measurement camera and the initial ranging value of the time-of-flight module, when the measurement camera successfully focuses, and form a first mapping table;
[0025] The calculation unit is used to periodically calculate the preferred ranging value corresponding to the focal length value from a plurality of initial ranging values, and to form a second mapping table based on the preferred ranging value and the focal length value;
[0026] An auxiliary focusing unit is used to determine the focal length value of the measuring camera to be assisted in focusing based on the second mapping table and the ranging value output by the time-of-flight module when the measuring camera fails to focus, so as to adjust the focal length of the measuring camera.
[0027] The second aspect of this application provides an auxiliary focusing method for performing the dual-camera module described in the first aspect.
[0028] A third aspect of this application provides a smart electronic device, including: a dual-camera module.
[0029] Central processing unit, memory, input / output interfaces, wired or wireless network interfaces, and power supply;
[0030] The memory is either a short-term storage memory or a persistent storage memory;
[0031] The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the dual-camera module assisted focusing method described in the first aspect.
[0032] A fourth aspect of this application provides a computer-readable storage medium, characterized in that the computer-readable storage medium includes instructions that, when executed on a computer, cause the computer to perform the dual-camera module auxiliary focusing method described in the first aspect.
[0033] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: The dual-camera module assisted focusing method disclosed in this application first obtains measurement parameters, including the focal length value of the measuring camera and the initial ranging value of the time-of-flight module, when the measuring camera successfully focuses, forming a first mapping table; then, periodically, a preferred ranging value corresponding to the focal length value is calculated from multiple initial ranging values, and a second mapping table is formed based on the preferred ranging value and the focal length value; finally, when the measuring camera fails to focus, the focal length value to be assisted focusing for the measuring camera is determined based on the second mapping table and the ranging value output by the time-of-flight module, so as to adjust the focal length of the measuring camera. When the time-of-flight module is replaced, the mapping relationship between the camera focal length and the ranging value of the time-of-flight module can be directly used for assisted focusing, thus eliminating the need to bring the time-of-flight model back to the repair shop for repair or calibration, thereby minimizing costs and increasing the user experience. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0035] Figure 1 This is a schematic diagram of a time-of-flight module disclosed in an embodiment of this application;
[0036] Figure 2 This application discloses a flight time histogram in an embodiment.
[0037] Figure 3 This is a flowchart illustrating an auxiliary focusing method for a dual-camera module disclosed in an embodiment of this application;
[0038] Figure 4 This is a flowchart illustrating another auxiliary focusing method for a dual-camera module disclosed in an embodiment of this application;
[0039] Figure 5 This is a schematic diagram of the auxiliary focusing system of a dual-camera module disclosed in an embodiment of this application;
[0040] Figure 6 This is a schematic diagram of the structure of an auxiliary focusing device for a dual-camera module disclosed in an embodiment of this application. Detailed Implementation
[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0042] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0043] It should be noted that the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.
[0044] As described above regarding the current module ranging, the principle of DTOF module-assisted RGB camera focusing is to calculate the focal length based on the camera's parameters using the actual distance. During calibration, the calibration parameter K is first obtained, and then the actual distance is derived from the measured distance.
[0045] However, it's not difficult to see that there are slight differences between components in the same batch of mass-produced modules. For example, the crystal oscillator frequency of each module may vary slightly, causing the actual ground truth time corresponding to 1ps of the timer / digital converter to be perhaps 0.99ps. If the ground truth is 0.99ps, the DTOF module will calculate the distance based on 1ps, resulting in an inaccurate distance. To reduce errors and improve ranging accuracy, calibration and parameter adjustment are needed to compensate for the crystal oscillator differences. Therefore, when calibrating a DTOF module, the ground truth between the DTOF module and the object being measured is usually input into the module. The module's calibration algorithm will then calibrate the difference between the actual distance and the module's measured distance. However, repair stations lack professional ranging equipment, making it difficult to input the ground truth into the DTOF module for calibration.
[0046] For example, existing calibration methods,
[0047] The dual-camera module is fixed at a distance of 200mm from the reflector. At this time, the Ground Truth time from the module emitting laser light to receiving the reflected light is T1 = 2 * D / C = 2 * 200 (mm) / 0.29979 (mm / ps) = 1334.27ps.
[0048] Calculate the relationship K between the flight times T2 and T1 reported by TDC. K = T1 / T2. Save parameter K to complete this calibration.
[0049] After leaving the factory, when using dToF to measure distance, the flight time T2 obtained from TDC is multiplied by K each time to compensate for crystal oscillator error and make the distance measurement more accurate.
[0050] Please see Figure 1 , Figure 1 This is a schematic diagram of a time-of-flight module disclosed in an embodiment of this application. However, it should be noted in advance that the DTOF module described in this embodiment is one of the modules in a dual-camera module, and the other component of the dual-camera module is a measurement camera. In one specific embodiment, the measurement camera can be a depth camera or an RGB camera, which will not be elaborated here.
[0051] Therefore, this application proposes an auxiliary focusing method for dual-camera modules, establishing a mapping relationship between the RGB camera lens position and the DTOF module ranging value. Without inputting GroundTruth into the DTOF module, the DTOF module collects the focal length f when the RGB camera successfully focuses, establishes a mapping relationship, and ultimately uses this mapping relationship to assist the RGB camera in focusing.
[0052] Depend on Figure 1As can be seen, the DTOF module includes a laser emitter 1 (VCSEL, vertical cavity surface emitting laser), a single photon avalanche diode 2 (SPAD), and a time-to-digital converter 3 (TDC). The object 4 can be understood as a concrete physical object capable of reflecting photons; however, the specific object represented here is not limited. For ease of understanding and description, the DTOF module and its components will not be described in detail below, nor will their corresponding serial numbers be described. Once the SPAD receives a photon, it generates a current signal. The TDC records the time of the current signal, thereby obtaining the photon's time of flight (VCSEL emission → collision with object → return → SPAD detection of photon).
[0053] The specific distance measurement principle is as follows.
[0054] The VCSEL emits laser pulses, and the SPAD receives the pulses reflected back from the object. The Time Difference Detection (TDC) records the time difference between the photons received by the SPAD and the laser emitted by the VCSEL. Based on the number of photons received by the SPAD in different time periods, a histogram is generated, such as... Figure 2 As shown, Figure 2 This is a flight time histogram disclosed in an embodiment of this application.
[0055] Starting from the moment the VCSEL emits light, the number of photons received by the SPAD is counted every picosecond and plotted as a histogram. Figure 2 Most photons emitted by a VCSEL return upon hitting the object being detected, therefore it is believed that... Figure 2 The time period t during which the number of photons received is considered to be the travel time of the photons between the module and the object. The distance between the module and the object is calculated based on the speed of light c: d = c * t / 2.
[0056] As described above, dual-camera modules require camera parameter calibration during mass production. This calibration process is typically performed at the factory using specialized calibration equipment. After leaving the factory, if the DTOF module within the dual-camera module is accidentally damaged, it needs to be returned to the factory for calibration. If the DTOF module can be calibrated without using the factory's specialized calibration equipment, then returning it to the factory for repair is unnecessary; the DTOF module can simply be replaced at a repair center.
[0057] Please see Figure 3 , Figure 3 This is a flowchart illustrating an auxiliary focusing method for a dual-camera module disclosed in an embodiment of this application. It includes steps 301-303.
[0058] 301. When the measuring camera successfully focuses, the measuring parameters, including the focal length of the measuring camera and the initial ranging value of the time-of-flight module, are obtained to form the first mapping table.
[0059] It's easy to understand that several possibilities exist before assisting with focusing on the dual-camera module. For example, one possibility is that the user has replaced the DTOF module or measuring camera within the dual-camera module, thus requiring a re-determination of the module's focal length. Another possibility is that the user has adjusted the dual-camera module during use. Of course, other possibilities will not be elaborated upon in this embodiment; in other words, there are also situations where calibration of the dual-camera module is necessary.
[0060] In one specific embodiment, when the DTOF module in the dual-camera module is replaced, the ranging value may be inaccurate because the DTOF module lacks a calibration parameter K. The user can use the dual-camera module to take photos in normal lighting conditions and use the traditional focusing method of an RGB camera for autofocus. When the RGB camera successfully focuses, the measurement parameters at that moment can be obtained. Specifically, the measurement parameters may include the focal length value f measured by the RGB camera and the distance d output by the DTOF module. Thus, a first mapping table is formed based on the focal length value f and the distance d. It is easy to understand that the distance d can be understood as the initial ranging value described above.
[0061] It's important to note that because the deviation K value between the distance output by the DTOF module and the actual distance is fixed, each distance output by the DTOF module corresponds to a unique actual distance. It's easy to understand that the deviation K value is due to the difference in crystal oscillator frequencies among the devices in the dual-camera module. Since the crystal oscillator frequency of each module is fixed, the K value is also fixed. For ease of understanding and description, this will not be elaborated upon further.
[0062] Based on the above embodiments, the RGB camera can be understood as the measurement camera mentioned above. Specifically, when the RGB camera successfully focuses, it records the focal length f and the distance d (between the dual-camera module and the object being photographed) output by the DTOF module and saves them to the first mapping table.
[0063] In another specific embodiment, under the same focal length condition, multiple measurements can be taken to obtain multiple initial ranging values corresponding to the same focal length. The specific testing method can be understood as a controlled variable testing method, which will not be elaborated here.
[0064] 302. Periodically calculate the preferred ranging value corresponding to the focal length value from multiple initial ranging values, and form a second mapping table based on the preferred ranging value and the focal length value.
[0065] After establishing the mapping relationship between the focal length value and the initial ranging value, the optimal ranging value corresponding to the focal length value can be calculated periodically from among multiple initial ranging values. Thus, a second mapping table is formed based on the calculated optimal ranging value and the focal length value.
[0066] In one specific embodiment, the following example illustrates the use of initial ranging values corresponding to the same focal length. For instance, if one focal length is f1, then the corresponding initial ranging values for focal length f1 are d1, d2, and d3. After calculation, the initial ranging value d2 is determined to be the ranging value corresponding to focal length f1 that satisfies the preset conditions. Therefore, d2 is determined to be the preferred ranging value, and a second mapping table is established based on f1 and d2.
[0067] It is easy to understand that for other focal length values, such as f2, f3...fn, corresponding optimal test values can also be found. The specific calculation process will not be elaborated here.
[0068] 303. When the measuring camera fails to focus, the focal length value to be assisted in focusing is determined based on the second mapping table and the ranging value output by the time-of-flight module, so as to adjust the focal length of the measuring camera.
[0069] Once the second mapping table is determined, when the measuring camera fails to focus, the required focal length for assisted focusing can be determined based on the second mapping table and the distance measurement value output by the DTOF module during the focusing process, thereby adjusting the focal length of the measuring camera.
[0070] In one specific embodiment, since the ranging value output by the DTOF module can be obtained through the dual-camera module, after obtaining the ranging value output by the current DTOF module, the focal length value corresponding to the ranging value, i.e. the focal length value to be assisted in focusing, can be obtained in the second mapping table, and the focal length of the measuring camera can be adjusted according to the focal length value to be assisted in focusing.
[0071] This embodiment discloses an auxiliary focusing method for a dual-camera module. First, when the measuring camera successfully focuses, measurement parameters, including the focal length of the measuring camera and the initial ranging value of the time-of-flight module, are acquired to form a first mapping table. Then, a preferred ranging value corresponding to the focal length is periodically calculated from multiple initial ranging values, and a second mapping table is formed based on the preferred ranging value and the focal length. Finally, when the measuring camera fails to focus, the focal length to be assisted for focusing is determined based on the second mapping table and the ranging value output by the time-of-flight module, thereby adjusting the focal length of the measuring camera. When the time-of-flight module is replaced, the mapping relationship between the camera's focal length and the ranging value of the time-of-flight module can be directly used for assisted focusing, eliminating the need to bring the time-of-flight model back to a repair shop for repair or calibration, thus minimizing costs and enhancing the user experience.
[0072] For a more detailed description of the autofocus assistance methods described above, please refer to [link / reference]. Figure 4 , Figure 4 This is a flowchart illustrating another auxiliary focusing method for a dual-camera module disclosed in an embodiment of this application. It includes steps 401-405.
[0073] 401. Before the dual-camera module is delivered to the user, save the focal length value of the measuring camera and the initial ranging value of the time-of-flight module to form a default mapping table.
[0074] Because the dual-camera module has a pre-defined mapping relationship before leaving the factory or after replacement at a service center, namely the default mapping table described above. It's easy to understand that the default mapping table can be interpreted as the focal length value of the measuring camera and the initial ranging value of the DTOF module retained through traditional calibration methods before leaving the factory or after replacement. The correlation between this focal length and the initial ranging value forms the default mapping table.
[0075] In one specific embodiment, before the dual-camera module is handed over to the user for normal use, a default mapping table is used. The data in this mapping table is obtained by averaging the parameters of the same batch of modules. Specifically, the module parameters can be the focal length value after calibration measurement and the corresponding distance measurement value output by the DTOF module.
[0076] In another specific embodiment, a mapping table for measuring the camera focal length and DTOF distance values can be found in Table 1 below.
[0077] 0.5 102 1.0 518 3.0 1300 8.0 4800
[0078] Here, the focal length f is the focal length value, and the distance d1 can be understood as the initial distance measurement value.
[0079] 402. When the measuring camera successfully focuses, the measurement parameters are obtained, including the focal length value of the measuring camera and the initial ranging value of the time-of-flight module. The new focal length value and the new initial ranging value are inserted into the default mapping table to form the first mapping table.
[0080] In this embodiment, step 402 is the same as described above. Figure 3 Step 301 is similar and will not be elaborated here. However, it should be noted that due to factors such as the camera's depth of field, the actual distance will fluctuate within the depth of field range when the camera successfully focuses. Therefore, one focal length f can correspond to multiple actual distances D, that is, multiple DTOF distances d. It should be noted that depth of field refers to the range of distances in front of and behind the subject that can be imaged in sharp focus from the front edge of the camera lens or other imaging device. Aperture, lens, and the distance from the focal plane to the subject are important factors affecting depth of field.
[0081] In one specific embodiment, when the measuring camera successfully focuses, the latest measurement parameters acquired by the measuring camera under the condition of successful focusing can be inserted into a default mapping table to form a first mapping table. Specifically, this means inserting the new focal length value and the new initial ranging value into the default mapping table.
[0082] Based on the above embodiments, in another specific embodiment, it is also possible that the focal length value has not changed. In this case, the initial distance measurement value corresponding to the original focal length value obtained in the new test process can be inserted into the default mapping table to form the first mapping table.
[0083] In short, it can be understood that the latest focal length value f, which has undergone focus testing, or the initial test value d, is inserted into the default mapping table to form the first mapping table. It's easy to understand that the initial distance measurement value is the distance value d output by the DTOF module.
[0084] To facilitate understanding of the mapping relationship between the focal length f and the distance d mentioned above, please refer to Table 2, which is a mapping table of camera focal length and DTOF distance values in this embodiment.
[0085] 0.5 103 102 102 … 102 3.0 1300 1287 1288 … 1288 8.0 4800 4758 4762 … 4762
[0086] It is easy to understand that, as described above, any focal length value f can correspond to multiple true distances D, that is, multiple DTOF distances d, which in turn correspond to multiple initial ranging values.
[0087] 403. Periodically, among multiple initial ranging values, determine the ranging value that appears most frequently as the preferred ranging value corresponding to the focal length value.
[0088] Once the first mapping table is determined, the optimal ranging value corresponding to the focal length value can be determined periodically from multiple initial ranging values, based on the ranging value that appears most frequently at that time.
[0089] In one specific embodiment, referring to Table 2, the value with the highest frequency among d1 to dn can be selected as the d value. For example, for a focal length f of 0.5mm, the distance value with the highest frequency is 102mm. Therefore, the preferred ranging value corresponding to a focal length of 0.5mm can be determined to be 102mm.
[0090] In another specific embodiment, if there are multiple ranging values with the highest frequency, the average ranging value of the multiple initial ranging values can be determined periodically. Specifically, the ranging value with the smallest difference from the average ranging value among the multiple initial ranging values can be determined as the preferred ranging value. Specifically, if multiple values have the same frequency, the value closest to the average value of d1 to dn is selected as the d value (preferred ranging value). The specific calculation method is not described in detail here.
[0091] 404. If the preferred ranging value corresponds to multiple focal length values, determine the focal length value with the minimum value among the multiple focal length values and form a second mapping table with the preferred ranging value.
[0092] In one embodiment, when the preferred ranging value corresponds to multiple focal length values, a second mapping table can be formed between the focal length value with the minimum value among the multiple focal length values and the preferred focal length value.
[0093] Based on the above embodiments and referring to Table 2, please refer to... Figure 3 Table 3 is a mapping table between DTOF distance values and camera focal length values, which can also be understood as a second mapping table.
[0094] 102 0.5 518 1.0 1288 3.0 4762 8.0
[0095] It should be noted that for Table 2, a larger f-value is not considered an error, and choosing a larger f-value is acceptable. This is because when there is a situation where one d-value corresponds to multiple f-values, it means that all f-values are within the depth of field, and any f-value can be selected (to capture a clear image). To clarify the specific rules, it is stipulated that the smallest f-value should be selected.
[0096] It should also be noted that Tables 2 and 3 above are only one specific embodiment of focal length and distance in one type of dual-camera module. The corresponding mapping relationship will also change for different batches or different devices, which will not be elaborated here.
[0097] 405. When the measuring camera fails to focus, the second mapping table is searched based on the ranging value output by the time-of-flight module to find the optimal ranging value that is closest to the ranging value, and the corresponding focal length value is determined as the focal length value to be assisted in focusing the measuring camera.
[0098] When the measuring camera fails to focus, the system can find the closest optimal ranging value in the second mapping table based on the ranging value output by the DTOF module. This allows the system to locate the corresponding focal length and determine it as the target focusing focal length for the measuring camera. The user can then adjust the dual-camera module based on this target focusing focal length.
[0099] In one specific embodiment, when the measuring camera fails to focus, the d value that is closest to the distance output by the DTOF module is used to map an f value to guide the measuring camera to focus to a suitable focal length.
[0100] In summary, it is also important to understand that the measuring camera can be understood as an RGB camera, but we will not go into details here.
[0101] In another specific embodiment, when taking photos in normal lighting conditions, autofocus is performed using the traditional focusing method of an RGB camera. The more times the RGB camera successfully focuses, the richer the data in the mapping table, and the better the DTOF module guides the RGB module in focusing.
[0102] The dual-camera module auxiliary focusing method disclosed in this embodiment can assist focusing when the repair station lacks professional ranging or calibration equipment. It utilizes the mapping relationship between the focal length f of the RGB camera and the depth d of the DTOF to reduce costs and avoid returning the camera to the factory for repair.
[0103] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0104] If the plan involves sensitive information (such as user information or corporate information), it should state that the collection, use, and processing of sensitive information must comply with the laws, regulations, and standards of the relevant countries and regions, and must be carried out with the permission or consent of the relevant entities (such as users or companies).
[0105] Please see Figure 5 , Figure 5 This is a schematic diagram of the auxiliary focusing system of a dual-camera module disclosed in an embodiment of this application.
[0106] The acquisition unit 501 is used to acquire measurement parameters, including the focal length value of the measurement camera and the initial ranging value of the time-of-flight module, when the measurement camera successfully focuses, and form a first mapping table.
[0107] The calculation unit 502 is used to periodically calculate the preferred ranging value corresponding to the focal length value from multiple initial ranging values, and form a second mapping table based on the preferred ranging value and the focal length value;
[0108] The auxiliary focusing unit 503 is used to determine the focal length value of the measuring camera to be assisted in focusing based on the second mapping table and the ranging value output by the time-of-flight module when the measuring camera fails to focus, so as to adjust the focal length of the measuring camera.
[0109] For example, the system further includes: a storage unit 504;
[0110] The storage unit 504 is used to save the focal length value of the measuring camera and the initial ranging value of the time-of-flight module before the dual-camera module is handed over to the user, forming a default mapping table.
[0111] For example, the system further includes: an insertion unit 505;
[0112] The acquisition unit 501 is specifically used to acquire measurement parameters, including the focal length value of the measurement camera and the initial ranging value of the time-of-flight module, when the measurement camera successfully focuses, and insert the new focal length value and the new initial ranging value into the default mapping table to form the first mapping table;
[0113] Alternatively, insertion unit 505 is used to insert the new initial distance measurement value into the default mapping table to correspond to the original focal length value, forming the first mapping table.
[0114] For example, the system further includes: a determining unit 506;
[0115] The determining unit 506 is used to periodically determine, among multiple initial ranging values, the ranging value that appears most frequently as the preferred ranging value corresponding to the focal length value.
[0116] For example, the system also includes:
[0117] The determining unit 506 is specifically used to periodically determine the average distance value among multiple initial distance values when there are multiple distance values with the highest frequency.
[0118] The determining unit 506 is also used to determine the preferred ranging value among multiple initial ranging values that has the smallest difference from the average ranging value.
[0119] For example, the system further includes: a lookup unit 507;
[0120] The lookup unit 507 is used to look up the second mapping table based on the ranging value output by the time-of-flight module to find the preferred ranging value that is closest to the ranging value, and to find the corresponding focal length value to determine as the focal length value to be assisted in focusing the measuring camera.
[0121] For example, the system includes:
[0122] The determining unit 506 is specifically used to determine the focal length value with the minimum value among the multiple focal length values and form a second mapping table with the preferred ranging value when the preferred ranging value corresponds to multiple focal length values.
[0123] Please refer to the following: Figure 6 The schematic diagram of an auxiliary focusing device for a dual-camera module disclosed in this application includes: a dual-camera module and...
[0124] Central processing unit 601, memory 605, input / output interface 604, wired or wireless network interface 603, and power supply 602;
[0125] Memory 605 is either a short-term storage memory or a persistent storage memory;
[0126] The central processing unit 601 is configured to communicate with the memory 605 and execute instructions stored in the memory 605 to perform the aforementioned operations. Figure 3 or Figure 4 The auxiliary focusing method of the dual-camera module in the illustrated embodiment.
[0127] This application also provides a chip system, characterized in that the chip system includes at least one processor and a communication interface, the communication interface and the at least one processor are interconnected via a circuit, and the at least one processor is used to run computer programs or instructions to perform the aforementioned... Figure 3 or Figure 4 The auxiliary focusing method of the dual-camera module in the illustrated embodiment.
[0128] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0129] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0130] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0131] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0132] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for assisting focusing with a dual-camera module, the dual-camera module comprising a time-of-flight module and a measuring camera, characterized in that, The method includes: When the measuring camera successfully focuses, the measurement parameters include the focal length value of the measuring camera and the initial ranging value of the time-of-flight module, forming a first mapping table; the first mapping table contains multiple initial ranging values corresponding to the same focal length value; Periodically perform statistical analysis on multiple initial ranging values corresponding to the same focal length value in the first mapping table, calculate the preferred ranging value corresponding to the focal length value, and form a second mapping table based on the preferred ranging value and the focal length value; When the measuring camera fails to focus, the focal length value to be assisted in focusing is determined according to the second mapping table and the ranging value output by the time-of-flight module, so as to adjust the focal length of the measuring camera.
2. The assisted focusing method according to claim 1, characterized in that, When the measuring camera successfully focuses, the measurement parameters, including the focal length value of the measuring camera and the initial ranging value of the time-of-flight module, are acquired to form a first mapping table. Prior to this, the process also includes: Before the dual-camera module is delivered to the user, the focal length value of the measuring camera and the initial ranging value of the time-of-flight module are saved to form a default mapping table.
3. The assisted focusing method according to claim 2, characterized in that, When the measuring camera successfully focuses, the measurement parameters acquired include the focal length value of the measuring camera and the initial ranging value of the time-of-flight module, forming a first mapping table, specifically including: When the measuring camera successfully focuses, the measurement parameters are obtained, including the focal length value of the measuring camera and the initial ranging value of the time-of-flight module. The new focal length value and the new initial ranging value are then inserted into the default mapping table to form the first mapping table. Alternatively, corresponding to the original focal length value, the new initial ranging value is inserted into the default mapping table to form the first mapping table.
4. The assisted focusing method according to claim 1, characterized in that, The step of periodically calculating the preferred ranging value corresponding to the focal length value from a plurality of initial ranging values includes: Periodically, among multiple initial ranging values, the ranging value that appears most frequently is determined as the preferred ranging value corresponding to the focal length value.
5. The assisted focusing method according to claim 4, characterized in that, The step of periodically calculating the preferred ranging value corresponding to the focal length value from a plurality of initial ranging values includes: If there are multiple ranging values with the highest frequency, the average ranging value of the multiple initial ranging values is determined periodically from the multiple initial ranging values. The preferred distance measurement value is determined as the distance measurement value that has the smallest difference from the average distance measurement value among the plurality of initial distance measurement values.
6. The assisted focusing method according to claim 1, characterized in that, The focal length to be assisted in focusing for the measuring camera is determined based on the second mapping table and the ranging value output by the time-of-flight module, specifically including: Based on the ranging value output by the time-of-flight module, the second mapping table is searched to find the preferred ranging value that is closest to the ranging value, and the corresponding focal length value is determined as the focal length value to be assisted in focusing for the measuring camera.
7. The assisted focusing method according to claim 1, characterized in that, The step of forming a second mapping table based on the preferred ranging value and the focal length value includes: If the preferred ranging value corresponds to multiple focal length values, a second mapping table is formed by determining the focal length value with the minimum value among the multiple focal length values and the preferred ranging value.
8. An auxiliary focusing system for a dual-camera module, the dual-camera module comprising a time-of-flight module and a measuring camera, characterized in that, The system includes: The acquisition unit is used to acquire measurement parameters, including the focal length value of the measurement camera and the initial ranging value of the time-of-flight module, when the measurement camera successfully focuses, to form a first mapping table; the first mapping table contains multiple initial ranging values corresponding to the same focal length value; The calculation unit is used to periodically perform statistical analysis on multiple initial ranging values corresponding to the same focal length value in the first mapping table, calculate the preferred ranging value corresponding to the focal length value, and form a second mapping table based on the preferred ranging value and the focal length value. An auxiliary focusing unit is used to determine the focal length value of the measuring camera to be assisted in focusing based on the second mapping table and the ranging value output by the time-of-flight module when the measuring camera fails to focus, so as to adjust the focal length of the measuring camera.
9. An intelligent electronic device, characterized in that, Including dual-camera modules and Central processing unit, memory, input / output interfaces, wired or wireless network interfaces, and power supply; The memory is either a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the assisted focusing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on a computer, cause the computer to perform the assisted focusing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Photographic equipment, photographic method and program for realizing photographic method and its storage medium
CN1497320A
Active depth sensing based autofocus
WO2021072648A1
Calibration method and apparatus for binocular camera, image correction method and apparatus for binocular camera, storage medium, terminal and intelligent device
WO2022037633A1