Focusing method and device, terminal and storage medium

By utilizing the phase difference information and laser information from the second camera device in the terminal to assist in focus control, the problem of focus oscillation during multi-camera switching is solved, achieving more efficient focus clarity and speed.

CN116055865BActive Publication Date: 2026-06-05BEIJING XIAOMI MOBILE SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2021-10-26
Publication Date
2026-06-05

Smart Images

  • Figure CN116055865B_ABST
    Figure CN116055865B_ABST
Patent Text Reader

Abstract

The present disclosure provides a focusing method, device, terminal and storage medium. The method comprises: obtaining focusing information of a first camera; determining phase difference information of a second camera according to the focusing information; and controlling the second camera to focus based on the phase difference information according to the phase difference information. According to the present disclosure, the phase difference information of the second camera can be used to assist the focusing control of the second camera, instead of relying on the physical distance transmission between the first camera and the second camera. When the first camera and the second camera are controlled to focus, the focusing oscillation is avoided, the focusing clarity, the focusing performance and the focusing speed are effectively improved, and the focusing effect is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of terminal technology, and in particular to a focusing method, apparatus, terminal and storage medium. Background Technology

[0002] In the terminal, the camera focusing principle is to use a motor to drive the camera device. Due to the differences in the performance of each camera device (the camera device can be, for example, the first camera device or the second camera device), different focusing logic positions need to be set.

[0003] In related technologies, the switching logic of multiple camera devices relies on the transmission of physical distance. In this way, the preview transition is not smooth enough and focus oscillation is likely to occur during the switching of multiple camera devices. Summary of the Invention

[0004] This disclosure aims to at least partially address one of the technical problems in the related art.

[0005] Therefore, the purpose of this disclosure is to propose a focusing method, device, terminal, and storage medium that can assist in focusing control by referring to the phase difference information of the second camera device, rather than relying on the transmission of the physical distance between the first and second camera devices. When controlling the first and second camera devices to focus, focusing oscillation is avoided, thereby effectively improving focus clarity, focusing performance and focusing speed, and focusing effect.

[0006] Optionally, in some embodiments, obtaining the focus information of the first camera device includes: during the focusing process of the first camera device, obtaining the focus image of the first camera device as the focus information.

[0007] Optionally, in some embodiments, controlling the second camera device to focus based on the phase difference information includes: adjusting the focus position of the second camera device at least once; determining reference phase difference information of the second camera device at the current focus position after each adjustment to obtain multiple reference phase difference information; determining target phase difference information from the multiple reference phase difference information, wherein the target phase difference information satisfies a first convergence condition; and controlling the second camera device to focus based on the focus position corresponding to the target phase difference information.

[0008] Optionally, in some embodiments, determining the phase difference information of the second camera device based on the focus information includes: determining the current scene information captured by the second camera device; determining the change information between the current scene information and reference scene information, wherein the reference scene information is scene information determined based on the focus information of the first camera device; and determining the phase difference information of the second camera device based on the change information.

[0009] Optionally, in some embodiments, determining the phase difference information of the second camera device based on the change information includes: if it is determined based on the change information that no scene change event has occurred, then determining the phase difference information of the second camera device based on the focus information; if it is determined based on the change information that the scene change event has occurred, then determining the phase difference information of the second camera device based on the current focus position of the second camera device and the focus information.

[0010] Optionally, in some embodiments, determining the phase difference information of the second camera device based on the focus information includes: determining a reference image captured by the second camera device; and using the phase difference information between the focus image and the reference image as the phase difference information of the second camera device.

[0011] Optionally, in some embodiments, the focusing method further includes: acquiring laser information, the laser information being used to assist in focusing and imaging; if the phase difference information does not satisfy the first confidence condition, and the laser information satisfies the second confidence condition, then controlling the second camera device to focus based on the laser information.

[0012] Optionally, in some embodiments, controlling the second camera device to focus based on the laser information includes: determining, based on the laser information, the mapping distance between the second camera device and the object to be focused in the reference image; determining, based on the mapping distance, the target focus position of the second camera device; and controlling the second camera device to focus based on the target focus position.

[0013] Optionally, in some embodiments, controlling the second camera device to focus based on the laser information includes: acquiring a first camera parameter of the first camera device and acquiring a second camera parameter of the second camera device; if the first camera parameter and the second camera parameter satisfy a matching condition, then controlling the second camera device to focus based on the laser information.

[0014] Optionally, in some embodiments, the method further includes: if the phase difference information does not satisfy the first confidence condition and the laser information does not satisfy the second confidence condition, then controlling the second camera device to focus with reference to the focus position of the first camera device; or

[0015] If the matching condition is not met between the first camera parameter and the second camera parameter, the second camera device is controlled to focus with reference to the focus position of the first camera device.

[0016] Optionally, in some embodiments, controlling the second camera device to focus based on the laser information includes: adjusting the focus position of the second camera device at least once; determining reference laser information of the second camera device at the current focus position after each adjustment to obtain multiple reference laser information; determining target laser information from the multiple reference laser information, wherein the target laser information satisfies a second convergence condition; and controlling the second camera device to focus based on the focus position corresponding to the target laser information.

[0017] To achieve the above objectives, the focusing method proposed in the first aspect of this disclosure includes: acquiring focusing information of a first camera device; determining phase difference information corresponding to a second camera device based on the focusing information; and controlling the second camera device to focus based on the phase difference information.

[0018] Optionally, in some embodiments, the first acquisition module is configured to: acquire the focused image of the first camera device as the focus information during the focusing process of the first camera device.

[0019] Optionally, in some embodiments, the first control module is configured to: adjust the focus position of the second camera device at least once; determine reference phase difference information of the second camera device at the current focus position after each adjustment to obtain multiple reference phase difference information; determine target phase difference information from the multiple reference phase difference information, wherein the target phase difference information satisfies a first convergence condition; and control the second camera device to focus based on the focus position corresponding to the target phase difference information.

[0020] Optionally, in some embodiments, the determining module is configured to: determine current scene information captured by the second camera device; determine change information between the current scene information and reference scene information, wherein the reference scene information is scene information determined based on the focus information of the first camera device; and determine phase difference information of the second camera device based on the change information.

[0021] Optionally, in some embodiments, the determining module is further configured to: if it is determined that no scene change event has occurred based on the change information, then determine the phase difference information of the second camera device based on the focus information; if it is determined that the scene change event has occurred based on the change information, then determine the phase difference information of the second camera device based on the current focus position of the second camera device and the focus information.

[0022] Optionally, in some embodiments, the determining module is further configured to: determine a reference image captured by the second camera device; and use the phase difference information between the focused image and the reference image as the phase difference information of the second camera device.

[0023] Optionally, in some embodiments, the device further includes: a second acquisition module for acquiring laser information, the laser information being used to assist in focusing and imaging; and a second control module for controlling the second camera device to focus based on the laser information when the phase difference information does not satisfy the first confidence condition and the laser information satisfies the second confidence condition.

[0024] Optionally, in some embodiments, the second control module includes: a first determining submodule, configured to determine the mapping distance between the second camera device and the object to be focused in the reference image based on the laser information; a second determining submodule, configured to determine the target focus position of the second camera device based on the mapping distance; and a control submodule, configured to control the second camera device to focus based on the target focus position.

[0025] Optionally, in some embodiments, the second control module is further configured to: acquire first camera parameters of the first camera device and acquire second camera parameters of the second camera device; if the first camera parameters and the second camera parameters meet a matching condition, control the second camera device to focus based on the laser information.

[0026] Optionally, in some embodiments, the second control module is further configured to: if the phase difference information does not satisfy the first confidence condition and the laser information does not satisfy the second confidence condition, then control the second camera device to focus with reference to the focus position of the first camera device; or

[0027] If the matching condition is not met between the first camera parameter and the second camera parameter, the second camera device is controlled to focus with reference to the focus position of the first camera device.

[0028] Optionally, in some embodiments, the second control module is further configured to: adjust the focus position of the second camera device at least once, determine the reference laser information of the second camera device at the current focus position after each adjustment to obtain multiple reference laser information; determine the target laser information from the multiple reference laser information, wherein the target laser information satisfies a second convergence condition; and control the second camera device to focus based on the focus position corresponding to the target laser information.

[0029] The focusing method proposed in the first aspect of this disclosure acquires the focusing information of a first camera device, determines the phase difference information of a second camera device based on the focusing information, and controls the second camera device to focus based on the phase difference information. This method can assist in focusing control by referring to the phase difference information of the second camera device, rather than relying on the transmission of physical distance between the first and second camera devices. When controlling the first and second camera devices to focus, focusing oscillations are avoided, thereby effectively improving focus clarity, focusing performance and speed, and focusing effect.

[0030] To achieve the above objectives, the focusing device proposed in the second aspect of this disclosure includes: a first acquisition module for acquiring focusing information of a first camera device; a determination module for determining phase difference information of a second camera device based on the focusing information; and a first control module for controlling the second camera device to focus based on the phase difference information.

[0031] The focusing device proposed in the second aspect of this disclosure acquires the focusing information of the first camera device, determines the phase difference information of the second camera device based on the focusing information, and controls the second camera device to focus based on the phase difference information. It can refer to the phase difference information of the second camera device to assist in focusing control, rather than relying on the transmission of physical distance between the first and second camera devices. When controlling the first and second camera devices to focus, focusing oscillation is avoided, thereby effectively improving focus clarity, focusing performance and focusing speed, and focusing effect.

[0032] A third aspect of this disclosure provides a terminal including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the focusing method as proposed in the first aspect of this disclosure.

[0033] A fourth aspect of this disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the focusing method as described in the first aspect of this disclosure.

[0034] A fifth aspect of this disclosure provides a computer program product that, when executed by an instruction processor, performs a focusing method as described in a first aspect of this disclosure.

[0035] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description

[0036] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:

[0037] Figure 1 This is a schematic flowchart of a focusing method proposed in an embodiment of the present disclosure;

[0038] Figure 2 This is a schematic flowchart of a focusing method proposed in another embodiment of this disclosure;

[0039] Figure 3 This is a schematic flowchart of a focusing method proposed in another embodiment of this disclosure;

[0040] Figure 4 This is a schematic diagram of the focusing logic flow in an embodiment of this disclosure;

[0041] Figure 5 This is a schematic diagram of the focusing device according to an embodiment of the present disclosure;

[0042] Figure 6 This is a schematic diagram of the focusing device according to another embodiment of the present disclosure;

[0043] Figure 7 A block diagram is shown that is suitable for implementing embodiments of the present disclosure. Implementation

[0044] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are used only to explain this disclosure, and should not be construed as limiting this disclosure. Rather, embodiments of this disclosure include all variations, modifications, and equivalents falling within the spirit and scope of the appended claims.

[0045] Figure 1 This is a schematic flowchart of a focusing method proposed in an embodiment of this disclosure.

[0046] It should be noted that the focusing method in this embodiment is executed by a focusing device, which may include a first camera device and a second camera device. The first camera device and the second camera device are different. The focusing device may be implemented by software and / or hardware. The focusing device may be configured in a terminal, which may include, but is not limited to, a mobile device or a server.

[0047] like Figure 1 As shown, the focusing method includes:

[0048] S101: Obtain focus information from the first camera device.

[0049] The focus information of the first camera device can be image information captured by the first camera device in the current scene, or it can be other focus-related information generated during the focusing process of the first camera device, without any limitation.

[0050] The terminal in this embodiment may include multiple camera devices. The first camera device may be the currently focusing camera device among the multiple camera devices. The second camera device may be the camera device to be switched to when the currently focusing camera device is focusing. Alternatively, the terminal may also include two camera devices, which may be configured as a master-slave camera architecture. Thus, the camera device configured as the master camera may be referred to as the first camera device, and the camera device configured as the slave camera may be referred to as the second camera device. There is no limitation on this.

[0051] The functions of the first and second camera devices can be, for example, the first camera device is responsible for shooting and framing, and the second camera device is used to assist in shooting and framing (for example, the second camera device is used to assist in imaging by zooming or increasing the amount of light). There are no restrictions on this.

[0052] In this embodiment of the present disclosure, when acquiring the focus information of the first camera device, the first camera device can be controlled to capture the scene and focus. That is, the first camera device is driven by a motor to change the position of the distance between the object and the camera, so that the object in the scene is clearly imaged, thus achieving focus, and the image information of the current focusing scene is captured as the focus information of the first camera device.

[0053] In this embodiment of the present disclosure, the first camera device can be controlled to focus, and the first camera device can be controlled to capture image information in the current focusing scene as the focus information of the first camera device. Then, the phase difference information of the second camera device can be determined based on the focus information of the first camera device.

[0054] S102: Determine the phase difference information of the second camera device based on the focus information.

[0055] In the process of controlling the first camera device to take pictures and frame the shot, the second camera device is usually controlled to assist the first camera device in taking pictures. During this process, the second camera device is controlled to focus. The phase difference information calculated based on the focus information obtained by the first camera device and the image information in the current scene captured by the second camera device when focusing begins can be called the phase difference information of the second camera device.

[0056] In other words, in this embodiment of the present disclosure, the first camera device is controlled to focus and the focus information of the first camera device is obtained. Based on the focus information, the phase difference information between the first camera device and the image information of the current scene captured by the second camera device at the start of focusing is calculated and used as the phase difference information of the second camera device.

[0057] In this embodiment, the focus information of the first device is obtained, and the phase difference information of the second camera device is determined based on the focus information. The phase difference information is then used to assist in controlling the second camera device to focus. Compared with related technologies that rely on the transmission of physical distance between the first and second camera devices, this embodiment refers to the focus information of the first camera device and the phase difference information of the second camera device to assist in focusing, thereby avoiding dependence on the physical distance between the first and second camera devices.

[0058] S103: Control the second camera device to focus based on the phase difference information.

[0059] After obtaining the focus information of the first camera device and determining the phase difference information of the second camera device based on the focus information, the second camera device can be controlled to focus based on the phase difference information.

[0060] In this embodiment of the present disclosure, when controlling the second camera device to focus based on phase difference information, the focus position of the second camera device can be moved and adjusted accordingly based on the phase difference information of the second camera device until the new phase difference information captured during the movement meets the focus sharpness requirements. At this point, it can be determined that the focus is complete, thereby realizing the focusing of the second camera device. Alternatively, any other possible method can be used to control the second camera device to focus based on phase difference information. For example, a focus position can be calculated directly with reference to the phase difference information, and then the second camera device can be controlled to focus based on that focus position.

[0061] In this embodiment, by acquiring the focus information of the first camera device, the phase difference information of the second camera device is determined based on the focus information. Based on the phase difference information, the second camera device is controlled to focus. The phase difference information of the second camera device can be used as a reference to assist in focusing control, rather than relying on the transmission of physical distance between the first and second camera devices. When controlling the first and second camera devices to focus, focus oscillation is avoided, thereby effectively improving focus clarity, focusing performance and focusing speed, and focusing effect.

[0062] Figure 2 This is a schematic flowchart of a focusing method proposed in another embodiment of this disclosure.

[0063] like Figure 2 As shown, the focusing method includes:

[0064] S201: During the focusing process of the first camera device, the focused image of the first camera device is acquired as focusing information.

[0065] The focused image can be an image of the current scene captured by the first camera device when the first camera device completes focusing, or it can be a scene image captured by the first camera device at the optimal focus position point, without any restrictions.

[0066] In this embodiment of the present disclosure, when acquiring the focus information of the first camera device, the first camera device can be controlled to focus. The position of the first camera device is changed by driving the motor to change the distance between the object and the phase distance, so that the object in the scene is clearly imaged, thus achieving focus, and the current focus image information is captured as the focus information of the first camera device.

[0067] S202: Determine the reference image captured by the second camera device.

[0068] The reference image can be an image obtained when the second camera device previews the current scene while focusing.

[0069] In this embodiment of the present disclosure, when determining the reference image captured by the second camera device, the second camera device can be controlled to focus, and when the second camera device starts focusing, an image of the current scene is captured, and the captured image is used as the reference image of the second camera device.

[0070] S203: Use the phase difference information between the focused image and the reference image as the phase difference information of the second camera device.

[0071] After obtaining the focus information of the first camera device and determining the reference image captured by the second camera device, the phase difference information between the focus image and the reference image can be used as the phase difference information of the second camera device.

[0072] In this embodiment of the present disclosure, when using the phase difference information between the focused image and the reference image as the phase difference information of the second camera device, the phase difference information between the focused image and the reference image can be calculated using an image processing model, and the output phase difference information can be used as the phase difference information of the second camera device.

[0073] S204: Adjust the focus position of the second camera device at least once, and determine the reference phase difference information of the second camera device at the current focus position after each adjustment, so as to obtain multiple reference phase difference information.

[0074] In this embodiment of the disclosure, after determining the phase difference information of the second camera device, the focus position of the second camera device can be moved and adjusted multiple times according to the phase difference information of the second camera device. The second camera device captures the phase difference information of different images in the scene during each movement and adjustment process, which can be referred to as the reference phase difference information of the second camera device at the current focus position.

[0075] In this embodiment, the focus position of the second camera device can be adjusted multiple times to obtain multiple reference phase difference information. This allows the focus position of the second camera device to be gradually adjusted based on the phase difference information, avoiding redundant long-distance repeated movements of the focus position of the second camera device and shortening the focusing journey.

[0076] S205: Determine the target phase difference information from multiple reference phase difference information, and the target phase difference information satisfies the first convergence condition.

[0077] After making multiple adjustments to the focus position of the second camera device and obtaining multiple reference phase difference information after each adjustment, the target phase difference information can be determined according to the first convergence condition.

[0078] The first convergence condition can be a pre-set test condition, which can be configured to test the convergence of the reference phase difference information. For example, the first convergence condition can be configured such that the convergence of the reference phase difference information is greater than a convergence threshold. The convergence threshold can be the convergence of the phase difference information that makes the focus sharpness meet the requirements (the quantification of the convergence can be determined by a mathematical formula or a model, for example, using the phase difference information as the independent variable of the mathematical formula and obtaining the calculation result of the mathematical formula as the convergence, or using the phase difference information as the input of the model and obtaining the output value of the model as the convergence). There are no restrictions on this.

[0079] In this embodiment of the present disclosure, after multiple adjustments to the focus position of the second camera device to obtain multiple reference phase difference information, the reference phase difference information can be tested. If the convergence of the reference phase difference information is greater than the convergence threshold, it can be determined that the reference phase difference information meets the first convergence condition. Then, the reference phase difference information is the target phase difference information. Since the target phase difference information meets the first convergence condition, the accuracy of the focus control of the second camera device can be effectively guaranteed.

[0080] S206: Control the second camera device to focus based on the focus position corresponding to the target phase difference information.

[0081] After determining the target phase difference information from multiple reference phase difference information, the focus position of the second camera device can be moved and adjusted according to the target phase difference information, so that the second camera device can be focused based on the target phase difference information. Since the target phase difference information satisfies the first convergence condition, the focus clarity requirements of the second camera device can be met.

[0082] S207: Acquire laser information, which is used to assist in focusing and imaging.

[0083] The laser information can be used to assist in controlling the second camera device to focus. A laser generator can be configured on the focusing device to control the laser generator to generate laser information.

[0084] In this embodiment of the disclosure, when acquiring laser information, the laser generating device can be controlled to emit a low-power laser signal into the scene using the infrared laser sensor of the camera. After the laser signal is reflected, it is captured by the sensor. The terminal can calculate object distance information, etc., by referring to the captured laser signal. This object distance information, etc., can be regarded as laser information. The laser information can be used to assist in controlling the second camera device to focus. Then, the second camera device can be driven to make corresponding movement and adjustment of the focus position according to the laser information to achieve focusing of the second camera device. See the following embodiments.

[0085] In this embodiment of the present disclosure, when controlling the second camera device to focus, the second camera device can be driven to move and adjust the focus position accordingly based on the laser information, and the laser information is used to assist in focusing and imaging to achieve focusing of the second camera device.

[0086] In this embodiment of the present disclosure, after the laser generating device generates laser information, the laser information can be input into the focal length calculation model to calculate the distance that the focus position of the second camera device needs to be moved and adjusted, and drive the second camera device to move the corresponding distance to the focus position with clear imaging. Alternatively, the laser information can be compared with the focus position calculated by autofocus and other focus algorithms, and the distance that the focus position of the second camera device needs to be moved and adjusted can be calculated using a hybrid focus system. There are no limitations on this.

[0087] S208: If the phase difference information does not meet the first confidence condition, but the laser information meets the second confidence condition, then control the second camera device to focus based on the laser information.

[0088] The first confidence condition can be a pre-set verification condition, which can be configured to verify the confidence of the phase difference information. For example, the first confidence condition can be configured such that the accuracy of the phase difference information is greater than a numerical threshold, or the data quality of the phase difference information is greater than a quality threshold, without any restrictions.

[0089] After determining the phase difference information of the second camera device, the reliability of the phase difference information can be tested. If the accuracy of the phase difference information is less than the numerical threshold, or the data quality of the phase difference information is less than the quality threshold, it can be determined that the phase difference information does not meet the first convergence condition.

[0090] In this embodiment of the disclosure, if the phase difference information does not meet the first confidence condition, it indicates that the phase difference information is not up to standard. At this time, other information with higher confidence can be located for focus control. In some embodiments, when the laser information meets the second confidence condition, the focus position of the second camera device can be moved and adjusted accordingly based on the laser information to achieve focus.

[0091] The second credibility condition is a pre-set verification condition that can be configured to verify the credibility of the laser information. For example, the second credibility condition can be configured such that the accuracy of the laser information is greater than a numerical threshold, or the data quality of the laser information is greater than a quality threshold, without any restrictions.

[0092] In this embodiment of the present disclosure, after the laser generating device generates laser information, the laser information can be tested. If the accuracy of the laser information is greater than a numerical threshold, or the data quality of the laser information is greater than a quality threshold, the laser information can be determined to meet the second credibility condition. Then, the second camera device can be controlled according to the laser information to move and adjust the focus position of the second camera device. Since the laser information meets the second credibility condition, the accuracy of the focus control of the second camera device can be effectively guaranteed when the phase difference information is unreliable.

[0093] Optionally, in some embodiments, controlling the second camera device to focus based on laser information can determine the mapping distance between the second camera device and the object to be focused in the reference image based on the laser information. Based on the mapping distance, the target focus position of the second camera device can be determined, and the second camera device can be controlled to focus based on the target focus position. This allows for more accurate positioning of the target focus position of the object to be focused in the reference image based on the mapping distance, achieving clearer focusing.

[0094] The target focus position is the focus position that enables the second camera device to clearly image the object to be focused in the reference image, and the mapping distance refers to the physical distance between the second camera device and the object to be focused in the reference image.

[0095] In this embodiment, after the object distance information is calculated from the laser signal captured by the terminal reference laser generator as laser information, the mapping distance between the second camera device and the object to be focused in the reference image can be calculated and determined based on the object distance information. The target focus position of the second camera device is determined based on the mapping distance, and the second camera device is driven to move from the current focus position to the target focus position to achieve focusing of the second camera device.

[0096] In this embodiment of the present disclosure, when determining the focus position of the second camera device based on the mapping distance, the mapping distance can be input into the autofocus algorithm to calculate the focus position corresponding to the peak position of the focus sharpness curve, which is the target focus position of the second camera device. Alternatively, the mapping distance can be input into the focal length calculation model to calculate the target focus position of the second camera device. There is no limitation on this.

[0097] In this embodiment, by acquiring the focus information of the first camera device, the phase difference information of the second camera device is determined based on the focus information. The second camera device is then controlled to focus based on the phase difference information. This allows for reference to the phase difference information of the second camera device for assisted focus control, rather than relying on the physical distance between the first and second camera devices. When controlling the first and second camera devices to focus, focus oscillations are avoided, effectively improving focus clarity, focusing performance, and focusing speed, thus enhancing the focusing effect. Furthermore, laser information is used to assist in focusing and imaging, thereby improving the success rate of focusing and significantly enhancing focusing accuracy and speed.

[0098] Figure 3 This is a schematic flowchart of a focusing method proposed in another embodiment of this disclosure.

[0099] like Figure 3 As shown, the focusing method includes:

[0100] S301: Obtain focus information from the first camera device.

[0101] The description of S301 can be found in the above embodiments, and will not be repeated here.

[0102] S302: Determine the current scene information captured by the second camera device.

[0103] The current scene information refers to the environmental information of the scene where the object to be focused is located.

[0104] In this embodiment of the present disclosure, when determining the current scene information captured by the second camera device, the second camera device can be controlled to capture the scene image where the current object to be focused is located, and the captured scene image is used as the current scene information captured by the second camera device.

[0105] S303: Determine the change information between the current scene information and the reference scene information, wherein the reference scene information is the scene information determined based on the focus information of the first camera device.

[0106] Among them, the scene information obtained by parsing the focus information of the first camera device can be called the reference scene information. When determining the scene information obtained by the focus information of the first camera device, the positional relationship between the object distance and the phase distance in the focus information of the first camera device can be parsed and processed. Based on the positional relationship between the parsed object distance and the phase distance, the descriptive information related to the scene where the terminal is located (such as the characteristics of the scene, such as changes in the type of objects in the scene, changes in the spatial position of objects, etc., without limitation) can be analyzed as the reference scene information.

[0107] In this embodiment of the disclosure, after obtaining the current scene information and the reference scene information, a comparison of the similarity between the current scene information and the reference scene information can be triggered. The comparison result information can be referred to as the change information between the current scene information and the reference scene information.

[0108] Among them, scene change events can be, for example, the types of scene changes. For instance, after the scene undergoes translation or rotation, the scene information captured by the first camera device during focusing will change accordingly. The change information can be used to determine whether a scene change event has occurred.

[0109] In this embodiment, the change information between the current scene information and the reference scene information is used to help determine the phase difference information of the second camera device, so that the change in the focus state of the second camera device can be captured in a timely manner. This makes the focus processing logic of the second camera device more robust and avoids the influence of scene changes, thereby effectively improving the focus effect, focusing stability and focus continuity.

[0110] S304: Determine the phase difference information of the second camera device based on the change information.

[0111] After determining the change information between the current scene information and the reference scene information, the phase difference information of the second camera device can be determined based on the change information.

[0112] In this embodiment of the present disclosure, when determining the phase difference information of the second camera device based on the change information, a focusing processing algorithm can be used to process the determined change information and obtain the calculation result of the algorithm as the phase difference information of the second camera device.

[0113] Optionally, in some embodiments, when determining the phase difference information of the second camera device based on the change information, if it is determined that no scene change event has occurred based on the change information, then the phase difference information of the second camera device is determined based on the focus information; if it is determined that a scene change event has occurred based on the change information, then the phase difference information of the second camera device is determined based on the current focus position and focus information of the second camera device. This ensures that the second camera device can update its focus state in a timely manner when the scene changes, thereby significantly improving the focusing effect.

[0114] In this embodiment of the present disclosure, when determining the phase difference information of the second camera device based on the change information, it is possible to determine whether a scene change event has occurred based on the change information. If it is determined that no scene change event has occurred based on the change information, the phase difference information of the second camera device is determined. If it is determined that a scene change event has occurred based on the change information, the focus state of the second camera device will change accordingly. Then, the phase difference information of the second camera device is determined based on the current focus position and focus information of the second camera device. After determining the phase difference information of the second camera device, the second camera device can be controlled to focus based on the phase difference information.

[0115] For example, when determining the phase difference information of the second camera device based on its current focus position and focus information, the current focus position and focus information can be processed in conjunction with a certain focus algorithm processing logic, and then the phase difference information can be calculated. Alternatively, the current focus position and focus information can be input into the phase difference information prediction model to obtain the phase difference information output by the prediction model as the phase difference information of the second camera device. There are no restrictions on this.

[0116] S305: Acquires laser information, which is used to assist in focusing and imaging.

[0117] The description of S305 can be found in the above embodiments, and will not be repeated here.

[0118] S306: If the phase difference information does not meet the first confidence condition, and the laser information meets the second confidence condition, then the focus position of the second camera device is adjusted at least once, and after each adjustment, the reference laser information of the second camera device at the current focus position is determined to obtain multiple reference laser information.

[0119] In this embodiment of the present disclosure, when generating laser information using a laser generator, the position of the second camera device can be adjusted. After each adjustment, the laser generator uses the infrared laser sensor of the camera to emit a low-power laser signal into the scene. The laser signal is captured by the sensor after reflection. The terminal obtains the corresponding laser information based on the captured laser signal. The information obtained each time is called reference laser information. By adjusting the focus position of the second camera device multiple times, multiple reference laser information can be output accordingly.

[0120] S307: The target laser information is determined from multiple reference laser information, and the target laser information satisfies the second convergence condition.

[0121] After repeatedly adjusting the focus position of the second camera device and obtaining multiple reference laser information after each adjustment, the target laser information can be determined according to the second convergence condition.

[0122] The second convergence condition is a pre-set verification condition. This second convergence condition can be configured to verify the convergence of the reference laser information. The second convergence condition can be the convergence of the laser information that makes the focus sharpness meet the requirements. (The quantification of this convergence can be determined by a mathematical formula or a model. For example, the phase difference information can be used as the independent variable of the mathematical formula, and the calculated value of the mathematical formula can be used as the convergence. Alternatively, the phase difference information can be used as the input of the model, and the output value of the model can be used as the convergence.) There are no restrictions on this.

[0123] In this embodiment, after multiple adjustments to the focus position of the second camera device to obtain multiple reference laser information, the reference laser information can be tested. If the convergence of the reference laser information is greater than the convergence threshold, it can be determined that the reference laser information meets the second convergence condition. Then, the reference laser information is the target laser information. Since the target laser information meets the second convergence condition, the accuracy of focus control can be effectively guaranteed.

[0124] S308: Control the second camera device to focus based on the focus position corresponding to the target laser information.

[0125] After determining the target laser information from multiple reference laser information based on the second convergence condition, the second camera device can be controlled to move and adjust its focus position based on the target laser information, thereby controlling the second camera device to focus.

[0126] Optionally, in some embodiments, when controlling the second camera device to focus based on the focus position corresponding to the target laser information, the first camera parameters of the first camera device and the second camera parameters of the second camera device can be obtained. If the first camera parameters and the second camera parameters meet the matching condition, the second camera device is controlled to focus based on the laser information. This allows for assisted focusing based on the first camera parameters of the first camera device and the second camera parameters of the second camera device, effectively improving focusing efficiency. Since the first camera parameters and the second camera parameters meet the matching condition, the synchronization of focusing by the first camera device and the second camera device can be guaranteed, further improving the focusing effect.

[0127] Among them, the camera parameters refer to the internal parameters, rotation parameters, and translation parameters acquired by the lenses of the first and second camera devices for the scene. These camera parameters can be used to assist focusing, thereby effectively improving focus clarity.

[0128] The parameter information of the first camera device obtained can be referred to as the first camera parameter, and the parameter information of the second camera device obtained can be referred to as the second camera parameter.

[0129] In this embodiment, when obtaining the first camera parameters of the first camera device and the second camera parameters of the second camera device, the built-in program code can be used to obtain the camera parameters of the device, or any other possible method can be used to obtain the camera parameters of the device, without any limitation.

[0130] The matching condition can be a pre-set verification condition, which can be configured to verify the matching degree of the first camera parameter and the second camera parameter. For example, it can be configured that the matching degree of the first camera parameter and the second camera parameter is greater than a numerical threshold.

[0131] When quantifying the matching degree between the first camera parameter and the second camera parameter, a matching degree detection model can be pre-trained, and the first camera parameter and the second camera parameter can be used as inputs to the matching degree detection model. The value output by the matching degree detection model can be obtained as the matching degree. Alternatively, a pre-calibrated camera matrix can be referenced to process the first camera parameter and the second camera parameter to obtain the corresponding matching degree. There are no restrictions on this.

[0132] In this embodiment of the present disclosure, after obtaining the first camera parameters of the first camera device and the second camera parameters of the second camera device, a check on the matching degree of the first camera parameters and the second camera parameters can be triggered. If the matching degree is greater than a numerical threshold, the second camera device can be controlled to focus based on the laser information. Since the first camera parameters and the second camera parameters meet the matching conditions, the synchronization of the focus of the first camera device and the second camera device can be guaranteed.

[0133] Optionally, in some embodiments, if the phase difference information does not meet the first confidence condition and the laser information does not meet the second confidence condition, the second camera device is controlled to focus by referring to the focus position of the first camera device. Alternatively, if the first camera parameter and the second camera parameter do not meet the matching condition, the second camera device is controlled to focus by referring to the focus position of the first camera device. This enables focusing based on the physical distance between the first and second camera devices even when neither the phase difference information nor the laser information meets the confidence condition. This avoids the situation where the focusing process is interrupted and the second camera device fails to complete focusing, resulting in defocusing and ensuring the synchronization of focusing between the first and second camera devices.

[0134] For example, such as Figure 4 As shown, Figure 4This is a schematic diagram of the focusing logic flow in this embodiment. When the position of the first camera device is at both ends of the focusing process, and the phase difference (PD) information of the second camera device meets the first confidence condition, the second camera device is controlled to focus using the phase difference information. When the phase difference information does not meet the first confidence condition, the laser information (laser information can be, for example, time of flight (Tof)) meets the second confidence condition, and the camera parameters of the first and second camera devices meet the matching condition, the second camera device is controlled to focus using the laser information. If the phase difference information does not meet the first confidence condition, and the laser information does not meet the second confidence condition, or the first camera parameter of the first camera device and the second camera parameter of the second camera device do not meet the matching condition, the second camera device is controlled to focus by referring to the focusing position of the first camera device.

[0135] In this embodiment, by acquiring the focus information of the first camera device, the phase difference information of the second camera device is determined based on the focus information. The second camera device is then controlled to focus based on the phase difference information. This allows for focus control to be assisted by referencing the phase difference information of the second camera device, rather than relying on the physical distance between the first and second camera devices. This avoids focus oscillations when controlling the first and second camera devices to focus, thereby effectively improving focus clarity, focusing performance, and focusing speed, and ultimately, the focusing effect. The change information between the current scene information and the reference scene information is used to assist in determining the phase difference information of the second camera device. It can capture changes in the focusing state of the second camera in a timely manner, making the focusing processing logic of the second camera more robust and avoiding the impact of scene changes. This effectively improves the focusing effect, focusing stability, and focusing consistency. When neither the phase difference information nor the laser information meets the corresponding reliable conditions, the second camera is controlled to focus by referring to the focusing position of the first camera. This allows the second camera to accurately focus even when neither the phase difference information nor the laser information meets the reliable conditions, avoiding the situation where the focusing process is interrupted or the second camera fails to complete focusing, thus ensuring the synchronization of focusing between the first and second cameras.

[0136] Figure 5 This is a schematic diagram of the focusing device proposed in one embodiment of the present disclosure.

[0137] like Figure 5 As shown, the processing apparatus 50 includes:

[0138] The first acquisition module 501 is used to acquire the focus information of the first camera device;

[0139] The determining module 502 is used to determine the phase difference information of the second camera device based on the focus information;

[0140] The first control module 503 is used to control the second camera device to focus based on the phase difference information.

[0141] In some embodiments of this disclosure, the first acquisition module 501 is used for:

[0142] During the focusing process of the first camera device, the focused image of the first camera device is acquired as focusing information.

[0143] In some embodiments of this disclosure, the first control module 503 is configured to:

[0144] The focus position of the second camera device is adjusted at least once, and after each adjustment, the reference phase difference information of the second camera device at the current focus position is determined to obtain multiple reference phase difference information.

[0145] The target phase difference information is determined from multiple reference phase difference information, and the target phase difference information satisfies the first convergence condition.

[0146] The second camera device is controlled to focus based on the focus position corresponding to the target phase difference information.

[0147] In some embodiments of this disclosure, the determining module 502 is configured to:

[0148] Determine the current scene information captured by the second camera device;

[0149] Determine the change information between the current scene information and the reference scene information, wherein the reference scene information is the scene information determined based on the focus information of the first camera device;

[0150] Based on the change information, determine the phase difference information of the second camera device.

[0151] In some embodiments of this disclosure, the determining module 502 is further configured to:

[0152] If it is determined from the change information that no scene change event has occurred, then the phase difference information of the second camera device is determined from the focus information;

[0153] If a scene change event is determined based on the change information, then the phase difference information of the second camera device is determined based on the current focus position and focus information of the second camera device.

[0154] In some embodiments of this disclosure, the determining module 502 is further configured to:

[0155] Determine the reference image captured by the second camera device;

[0156] The phase difference information between the focused image and the reference image is used as the phase difference information of the second camera device.

[0157] In some embodiments of this disclosure, such as Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of a terminal focusing device according to another embodiment of the present disclosure, which also includes:

[0158] The second acquisition module 504 is used to acquire laser information, which is used to assist in focusing and imaging.

[0159] The second control module 505 is used to control the second camera device to focus based on the laser information when the phase difference information does not meet the first confidence condition and the laser information meets the second confidence condition.

[0160] In some embodiments of this disclosure, the second control module 505 includes:

[0161] The first determining submodule 5051 is used to determine the mapping distance between the second camera device and the object to be focused in the reference image based on the laser information;

[0162] The second determining submodule 5052 is used to determine the target focus position of the second camera device based on the mapping distance;

[0163] The control submodule 5053 is used to control the second camera device to focus based on the target focus position.

[0164] In some embodiments of this disclosure, the second control module 505 is further configured to:

[0165] Obtain the first camera parameters of the first camera device, and obtain the second camera parameters of the second camera device;

[0166] If the first camera parameter and the second camera parameter meet the matching conditions, the second camera device is controlled to focus based on the laser information.

[0167] In some embodiments of this disclosure, the second control module 505 is further configured to:

[0168] If the phase difference information does not meet the first confidence condition, and the laser information does not meet the second confidence condition, then the second camera device is controlled to focus by referencing the focus position of the first camera device; or

[0169] If the first camera parameter and the second camera parameter do not meet the matching conditions, the second camera device is controlled to focus by referring to the focus position of the first camera device.

[0170] In some embodiments of this disclosure, the second control module 505 is further configured to:

[0171] The focus position of the second camera device is adjusted at least once, and after each adjustment, the reference laser information of the second camera device at the current focus position is determined to obtain multiple reference laser information.

[0172] The target laser information is determined from multiple reference laser information, and the target laser information satisfies the second convergence condition;

[0173] The second camera device is controlled to focus based on the focus position corresponding to the target laser information.

[0174] With the above Figures 1 to 4 Corresponding to the focusing method provided in the embodiments, this disclosure also provides a focusing device. Since the focusing device provided in the embodiments of this disclosure is similar to the one described above… Figures 1 to 4 The focusing method provided in the embodiments corresponds to the focusing device provided in the embodiments of this disclosure, and will not be described in detail in the embodiments of this disclosure.

[0175] In this embodiment, by acquiring the focus information of the first camera device; determining the phase difference information of the second camera device based on the focus information; and controlling the second camera device to focus based on the phase difference information, the system can refer to the phase difference information of the second camera device to assist in focusing control, rather than relying on the transmission of physical distance between the first and second camera devices. When controlling the first and second camera devices to focus, focus oscillation is avoided, thereby effectively improving focus clarity, focusing performance and focusing speed, and focusing effect.

[0176] To implement the above embodiments, this disclosure also proposes a terminal, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the focusing method proposed in the foregoing embodiments of this disclosure.

[0177] To implement the above embodiments, this disclosure also proposes a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the focusing method proposed in the foregoing embodiments of this disclosure.

[0178] To implement the above embodiments, this disclosure also proposes a computer program product that, when executed by an instruction processor, performs the focusing method as described in the foregoing embodiments of this disclosure.

[0179] Figure 7 A block diagram is shown that is suitable for implementing embodiments of the present disclosure. Figure 7 The terminal 12 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments disclosed herein.

[0180] like Figure 7 As shown, terminal 12 is presented in the form of a general-purpose computing device. The components of terminal 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0181] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0182] Terminal 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by terminal 12, including volatile and non-volatile media, removable and non-removable media.

[0183] Memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and / or cache memory 32. Terminal 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 7 Not shown; usually referred to as a "hard drive".

[0184] although Figure 7Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc read-only memory (CD-ROM), a digital video disc read-only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.

[0185] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this disclosure.

[0186] Terminal 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the terminal 12, and / or with any device that enables the terminal 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, terminal 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of terminal 12 via bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with terminal 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0187] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the focusing method mentioned in the foregoing embodiments.

[0188] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0189] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

[0190] It should be noted that in the description of this disclosure, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this disclosure, unless otherwise stated, "a plurality of" means two or more.

[0191] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.

[0192] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0193] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0194] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0195] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0196] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "example," or "some examples," etc., indicate that a feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the described features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.

[0197] Although embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present disclosure.

Claims

1. A focusing method, characterized in that, The method includes: Obtain the focus information of the first camera device; Based on the focusing information, determine the phase difference information of the second camera device; Based on the phase difference information, the second camera device is controlled to focus based on the phase difference information; The acquisition of focus information of the first camera device includes: During the focusing process of the first camera device, the focused image of the first camera device is acquired as the focusing information; The determination of the phase difference information of the second camera device includes: phase difference information calculated based on the focus information obtained by the first camera device and the image information in the current scene captured when the second camera device starts focusing.

2. The method as described in claim 1, characterized in that, The control of the second camera device to focus based on the phase difference information includes: The focus position of the second camera device is adjusted at least once, and after each adjustment, the reference phase difference information of the second camera device at the current focus position is determined to obtain multiple reference phase difference information. The target phase difference information is determined from the plurality of reference phase difference information, wherein the target phase difference information satisfies the first convergence condition; The second camera device is controlled to focus based on the focus position corresponding to the target phase difference information.

3. The method as described in claim 1, characterized in that, Determining the phase difference information of the second camera device based on the focus information includes: Determine the current scene information captured by the second camera device; Determine the change information between the current scene information and the reference scene information, wherein the reference scene information is scene information determined based on the focus information of the first camera device; Based on the change information, the phase difference information of the second camera device is determined.

4. The method as described in claim 3, characterized in that, Determining the phase difference information of the second camera device based on the change information includes: If it is determined that no scene change event has occurred based on the change information, then the phase difference information of the second camera device is determined based on the focus information; If the scene change event is determined to have occurred based on the change information, then the phase difference information of the second camera device is determined based on the current focus position of the second camera device and the focus information.

5. The method as described in claim 1, characterized in that, Determining the phase difference information of the second camera device based on the focus information includes: Determine the reference image captured by the second camera device; The phase difference information between the focused image and the reference image is used as the phase difference information of the second camera device.

6. The method as described in claim 5, characterized in that, Also includes: Acquire laser information, which is used to assist in focusing and imaging; If the phase difference information does not meet the first confidence condition, and the laser information meets the second confidence condition, then the second camera device is controlled to focus based on the laser information.

7. The method as described in claim 6, characterized in that, The control of the second camera device to focus based on the laser information includes: Based on the laser information, the mapping distance between the second camera device and the object to be focused in the reference image is determined; Based on the mapping distance, the target focus position of the second camera device is determined; The second camera device is controlled to focus based on the target focus position.

8. The method as described in claim 6, characterized in that, The control of the second camera device to focus based on the laser information includes: Obtain the first camera parameters of the first camera device, and obtain the second camera parameters of the second camera device; If the first camera parameter and the second camera parameter meet the matching condition, then the second camera device is controlled to focus based on the laser information.

9. The method as described in claim 8, characterized in that, The method further includes: If the phase difference information does not meet the first confidence condition, and the laser information does not meet the second confidence condition, then the second camera device is controlled to focus with reference to the focus position of the first camera device; or If the matching condition is not met between the first camera parameter and the second camera parameter, the second camera device is controlled to focus with reference to the focus position of the first camera device.

10. The method as described in claim 6 or 8, characterized in that, The control of the second camera device to focus based on the laser information includes: The focus position of the second camera device is adjusted at least once, and after each adjustment, the reference laser information of the second camera device at the current focus position is determined to obtain multiple reference laser information. Target laser information is determined from the plurality of reference laser information, wherein the target laser information satisfies the second convergence condition; The second camera device is controlled to focus based on the focus position corresponding to the target laser information.

11. A focusing device, characterized in that, The device includes: The first acquisition module is used to acquire the focus information of the first camera device; The determining module is used to determine the phase difference information of the second camera device based on the focusing information, wherein the phase difference information is calculated based on the focusing information obtained by the first camera device and the image information in the current scene captured when the second camera device starts focusing; The first control module is used to control the second camera device to focus based on the phase difference information. The first acquisition module is used for: During the focusing process of the first camera device, the focused image of the first camera device is acquired as the focusing information.

12. The apparatus as claimed in claim 11, characterized in that, The first control module is used for: The focus position of the second camera device is adjusted at least once, and after each adjustment, the reference phase difference information of the second camera device at the current focus position is determined to obtain multiple reference phase difference information. The target phase difference information is determined from the plurality of reference phase difference information, wherein the target phase difference information satisfies the first convergence condition; The second camera device is controlled to focus based on the focus position corresponding to the target phase difference information.

13. The apparatus as claimed in claim 11, characterized in that, The determining module is used for: Determine the current scene information captured by the second camera device; Determine the change information between the current scene information and the reference scene information, wherein the reference scene information is scene information determined based on the focus information of the first camera device; Based on the change information, the phase difference information of the second camera device is determined.

14. The apparatus as claimed in claim 13, characterized in that, The determining module is further configured to: If it is determined that no scene change event has occurred based on the change information, then the phase difference information of the second camera device is determined based on the focus information; If the scene change event is determined to have occurred based on the change information, then the phase difference information of the second camera device is determined based on the current focus position of the second camera device and the focus information.

15. The apparatus as claimed in claim 11, characterized in that, The determining module is further configured to: Determine the reference image captured by the second camera device; The phase difference information between the focused image and the reference image is used as the phase difference information of the second camera device.

16. The apparatus as claimed in claim 15, characterized in that, Also includes: The second acquisition module is used to acquire laser information, which is used to assist in focusing and imaging. The second control module is used to control the second camera device to focus based on the laser information when the phase difference information does not meet the first confidence condition and the laser information meets the second confidence condition.

17. The apparatus as claimed in claim 16, characterized in that, The second control module includes: The first determining submodule is used to determine the mapping distance between the second camera device and the object to be focused in the reference image based on the laser information; The second determining submodule is used to determine the target focus position of the second camera device based on the mapping distance; The control submodule is used to control the second camera device to focus based on the target focus position.

18. The apparatus as claimed in claim 16, characterized in that, The second control module is also used for: Obtain the first camera parameters of the first camera device, and obtain the second camera parameters of the second camera device; If the first camera parameter and the second camera parameter meet the matching condition, then the second camera device is controlled to focus based on the laser information.

19. The apparatus as claimed in claim 18, characterized in that, The second control module is also used for: If the phase difference information does not meet the first confidence condition and the laser information does not meet the second confidence condition, then the second camera device is controlled to focus with reference to the focus position of the first camera device; or If the matching condition is not met between the first camera parameter and the second camera parameter, the second camera device is controlled to focus with reference to the focus position of the first camera device.

20. The apparatus as claimed in claim 16 or 18, characterized in that, The second control module is also used for: The focus position of the second camera device is adjusted at least once, and after each adjustment, the reference laser information of the second camera device at the current focus position is determined to obtain multiple reference laser information. Target laser information is determined from the plurality of reference laser information, wherein the target laser information satisfies the second convergence condition; The second camera device is controlled to focus based on the focus position corresponding to the target laser information.

21. A terminal, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of any one of claims 1-10.

22. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-10.