Camera control method and device, electronic equipment and storage medium

By dynamically updating the camera's back-and-forth switching distance, the problem of image quality degradation caused by a fixed back-and-forth switching distance is solved, thus improving the shooting experience of electronic devices.

CN119342339BActive Publication Date: 2025-11-07BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310890509.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-19
Publication Date
2025-11-07
Estimated Expiration
2043-07-19

AI Technical Summary

Technical Problem

In existing technologies, the camera switching of electronic devices is based on a fixed back-switch distance threshold, which results in the image quality of the switched camera being lower than that of the original camera, thus reducing the user's shooting experience.

Method used

By obtaining the actual minimum focusing distance of the first camera among multiple cameras and the back-switch distance during the current shooting, the back-switch distance is dynamically updated, and the camera switching is controlled when the set conditions are met, so as to achieve dynamic adjustment based on the actual minimum focusing distance.

Benefits of technology

It improves the image quality in multi-camera mode, enhances the user's shooting experience, and avoids image quality degradation caused by frequent switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342339B_ABST
    Figure CN119342339B_ABST
Patent Text Reader

Abstract

The present disclosure provides a camera control method and device, electronic equipment and storage medium. The method comprises: obtaining an actual minimum focusing distance of a first camera in a plurality of cameras of an electronic device and a fallback switching distance; when a difference between the actual minimum focusing distance and the fallback switching distance is greater than a set difference threshold, updating the fallback switching distance according to the actual minimum focusing distance; obtaining a distance between a shooting object in a shooting picture of the first camera and the first camera; and when the distance and the updated fallback switching distance satisfy a set fallback switching condition, controlling the electronic device to switch from the first camera to a second camera for shooting. Thus, the actual minimum focusing distance of the first camera currently being shot can be used to dynamically adjust the fallback switching distance supported by the first camera, and whether the electronic device needs to switch the camera can be determined based on the dynamically adjusted fallback switching distance, which can improve the quality of the shooting picture.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of electronic devices, and particularly relates to a camera control method and device, an electronic device, and a storage medium. BACKGROUND

[0002] At present, the camera of an electronic device (such as a smart phone, a wearable device, a smart robot, a smart car, etc.) can adopt a multi-camera mode, such as 3SAT (Spatial Alignment Transform, spatial alignment transform) (i.e., 3 cameras), 4SAT (i.e., 4 cameras), etc. Due to hardware characteristics, only one camera of the multi-camera of the electronic device can have the best shooting quality in different shooting environments, and thus, it is necessary to fallback or switch to the camera with the best shooting quality, for example, the W (Wide, wide-angle) camera and the UW (Ultra-Wide, ultra-wide-angle) camera can be switched to each other, the W camera and the T (Tele, telephoto) camera can be switched to each other, the W camera and the UT (Ultra-Tele, ultra-telephoto) camera can be switched to each other, etc.

[0003] In the related art, a fixed fallback switching distance (Fallback distance, or called fallback switching distance threshold, Fallback distance threshold) is used to determine whether the electronic device needs to switch the camera.

[0004] In this way, the shooting quality of the switched camera can be lower than that of the camera before switching, and the shooting experience of the user is reduced. SUMMARY

[0005] The present disclosure aims to at least solve one of the technical problems in the related art to some extent.

[0006] To this end, the present disclosure proposes the following technical solutions:

[0007] The first aspect of the present disclosure provides a camera control method, comprising:

[0008] obtaining an actual minimum focusing distance of a first camera in a multi-camera of an electronic device, and a fallback switching distance of the first camera at a current shooting; wherein the first camera is the camera for the current shooting, and the fallback switching distance is used to indicate the focusing distance of camera switching;

[0009] when the difference between the actual minimum focusing distance and the fallback switching distance at the current shooting is greater than a set difference threshold, updating the fallback switching distance at the current shooting according to the actual minimum focusing distance;

[0010] acquire a distance between a shooting object in a shooting picture of the first camera and the first camera;

[0011] switch the electronic device from the first camera to a second camera in the multiple cameras for shooting when the distance and the updated back switch distance at the current shooting time satisfy a set back switch condition associated with the first camera.

[0012] The second aspect of the present disclosure provides a camera control device, comprising:

[0013] The first acquisition unit is configured to acquire an actual minimum focusing distance of a first camera in multiple cameras of an electronic device and a back switch distance of the first camera at a current shooting time, wherein the first camera is a camera for the current shooting, and the back switch distance is used to indicate a focusing distance of camera switching.

[0014] The updating unit is configured to update the back switch distance at the current shooting time according to the actual minimum focusing distance when a difference between the actual minimum focusing distance and the back switch distance at the current shooting time is greater than a set difference threshold.

[0015] The second acquisition unit is configured to acquire a distance between a shooting object in a shooting picture of the first camera and the first camera.

[0016] The control unit is configured to switch the electronic device from the first camera to a second camera in the multiple cameras for shooting when the distance and the updated back switch distance at the current shooting time satisfy a set back switch condition associated with the first camera.

[0017] The third aspect of the present disclosure provides an electronic device, comprising at least one processor and a memory connected with the at least one processor in communication, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the camera control method in the first aspect of the present disclosure.

[0018] The fourth aspect of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, and the computer instructions are used to enable the computer to execute the camera control method in the first aspect of the present disclosure.

[0019] The fifth aspect of the present disclosure provides a computer program product, and when an instruction processor in the computer program product executes, the camera control method in the first aspect of the present disclosure is executed.

[0020] The technical solution of the present disclosure comprises the following steps: acquiring an actual minimum focusing distance of a first camera in a plurality of cameras of an electronic device and a retreat switching distance of the first camera at a current shooting time; when a difference between the actual minimum focusing distance and the retreat switching distance at the current shooting time is greater than a set difference threshold, updating the retreat switching distance at the current shooting time according to the actual minimum focusing distance; acquiring a distance between a shooting object in a shooting picture of the first camera and the first camera; when the distance and the updated retreat switching distance at the current shooting time satisfy a set retreat switching condition associated with the first camera, controlling the electronic device to switch from the first camera to a second camera in the plurality of cameras for shooting. Thus, the actual minimum focusing distance of a first camera that is currently shooting in the electronic device can be used to dynamically adjust the retreat switching distance supported by the first camera, and whether the electronic device needs to switch the camera can be determined based on the dynamically adjusted retreat switching distance, so as to solve the problem that the shooting quality of the switched camera is lower than that of the camera before switching when a fixed retreat switching distance is used to determine whether the electronic device needs to switch the camera, thereby improving the shooting quality of the shooting picture and improving the user's shooting experience in the multi-camera mode.

[0021] Additional aspects and advantages of the present disclosure will be made apparent from the following description, which, taken together with the accompanying drawings, describes or illustrates a preferred embodiment of the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0022] The above and / or additional aspects and advantages of the present disclosure will become apparent and be readily appreciated from the following description, taken in conjunction with the accompanying drawings, in which:

[0023] Figure 1 A flowchart of a camera control method provided by an embodiment of the present disclosure;

[0024] Figure 2 A flowchart of another camera control method provided by an embodiment of the present disclosure;

[0025] Figure 3 A flowchart of another camera control method provided by an embodiment of the present disclosure;

[0026] Figure 4 A flowchart of another camera control method provided by an embodiment of the present disclosure;

[0027] Figure 5 A flowchart of another camera control method provided by an embodiment of the present disclosure;

[0028] Figure 6 A flowchart of a camera switching method provided by an embodiment of the present disclosure;

[0029] Figure 7 FIG. 1 is a structural schematic diagram of a camera control device provided by an embodiment of the present disclosure;

[0030] Figure 8 FIG. 1 is a structural schematic diagram of a camera control device provided by an embodiment of the present disclosure; DETAILED DESCRIPTION

[0031] Embodiments of the present disclosure are described in detail below with reference to the accompanying drawings, examples of which are shown in the drawings, wherein the same or similar notations represent 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 intended to explain the present disclosure, and cannot be understood as a limitation of the present disclosure.

[0032] At present, the Fallback distance adopts a fixedly set threshold, and the fixedly set Fallback distance can take into account the Fallback of all camera sensors, for example, the Fallback distance corresponding to a sensor can be set according to the theoretical minimum focusing distance provided by a camera sensor module manufacturer.

[0033] Since the camera sensor module reserves a part of focusing motor movement allowance due to reasons such as production line whole machine installation and temperature drift, the allowance will be different from the theoretical minimum focusing distance provided by the module manufacturer according to different actual sensor installation processes. For electronic devices with large differences, the Fallback distance set based on the theoretical minimum focusing distance to determine whether to switch the camera may cause the shooting quality of the switched camera to be lower than that of the camera before switching, reducing the user's shooting experience.

[0034] As an example, the scene of mutual switching between a W camera and a UT camera is exemplarily illustrated. For far-to-near scene, that is, the camera for shooting the preview picture is the UT camera, when the distance between the shooting object and the UT camera is less than the Fallback distance, it can be determined to switch the camera, that is, to switch from the UT camera to the W camera to shoot the preview picture, and when the distance between the shooting object and the UT camera is greater than or equal to the Fallback distance, it can be determined not to switch the camera, that is., continue to use the UT camera to shoot the preview picture.

[0035] For the case of switching from a close shot to a far shot, if the distance between the shooting object and the W camera is greater than the Fallback distance + a set threshold, it is determined to switch the camera, i.e., to switch from the W camera to the UT camera for shooting the preview picture. If the distance between the shooting object and the W camera is less than or equal to the Fallback distance + the set threshold, it is determined not to switch the camera, i.e., to continue to use the W camera to shoot the preview picture.

[0036] For example, assuming that in a certain shooting environment, the camera currently shooting the preview picture is the UT camera, at this time, the shooting quality of the UT camera is optimal, assuming that the theoretical minimum focusing distance of the UT camera is 100 cm (centimeters), the actual minimum focusing distance is 70 cm, and the actual set Fallback distance of the UT camera switching to the W camera is 100 cm. When the distance (hereinafter referred to as the object distance) between the shooting object in the preview picture and the UT camera is 90 cm, since the object distance (90 cm) is greater than the actual minimum focusing distance (70 cm), the UT camera can focus clearly, but since the object distance (90 cm) is less than the Fallback distance (100 cm), the Fallback or switching condition of the camera is met, and therefore the UT camera is automatically switched to the W camera. At this time, in the current shooting environment, the shooting quality of the preview picture using the W camera is lower than that of the preview picture using the UT camera, which reduces the shooting experience of the user.

[0037] Therefore, to solve the above problems, the present disclosure provides a camera control method, device, electronic equipment and storage medium.

[0038] The camera control method, device, electronic equipment and storage medium of the embodiments of the present disclosure are described below with reference to the accompanying drawings.

[0039] Figure 1 A flowchart of a camera control method provided by the embodiments of the present disclosure is shown in FIG. 1.

[0040] The embodiments of the present disclosure take the camera control method configured in the camera control device as an example, which can be applied to any electronic equipment to enable the electronic equipment to perform the camera control function.

[0041] The electronic equipment can be any device with computing capability, such as a personal computer (PC), a mobile terminal, a server, etc. The mobile terminal can be a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a smart robot, a smart car, etc. hardware devices with various operating systems, touch screens and / or display screens.

[0042] As Figure 1 shown, the camera control method can include the following steps:

[0043] Step S101, obtaining an actual minimum focusing distance of a first camera in a plurality of cameras of an electronic device, and a fallback distance of the first camera at a current shooting time; wherein the first camera is a camera for current shooting.

[0044] Wherein, the fallback distance (or called fallback distance threshold) is used to indicate the focusing distance of camera switching.

[0045] In the embodiments of the present disclosure, when a shooting request (including a preview request, a photographing request, a video recording request) is received, the actual minimum focusing distance of the first camera in the plurality of cameras of the electronic device can be obtained, and the fallback distance of the first camera at the current shooting time (or the fallback distance currently supported by the first camera) can be obtained.

[0046] Wherein, the first camera is a camera for current shooting, for example, taking the shooting request as a preview request as an example, the first camera can be a camera for current shooting of a preview picture.

[0047] Step S102, when the difference between the actual minimum focusing distance and the fallback distance at the current shooting time is greater than a set difference threshold, updating the fallback distance at the current shooting time according to the actual minimum focusing distance.

[0048] In the embodiments of the present disclosure, the difference can be a difference value, an absolute value of the difference value, a square of the difference value, etc.

[0049] In the embodiments of the present disclosure, the set difference threshold is a pre-set difference threshold, wherein the set difference threshold is a difference threshold with a relatively small value.

[0050] In the embodiments of the present disclosure, the difference between the actual minimum focusing distance and the fallback distance at the current shooting time can be calculated, and it is determined whether the difference is greater than the set difference threshold. In the case that the difference is greater than the set difference threshold, the fallback distance at the current shooting time can be updated according to the actual minimum focusing distance, for example, the actual minimum focusing distance can be assigned to the fallback distance at the current shooting time to obtain the updated fallback distance at the current shooting time.

[0051] And in the case that the difference is less than or equal to the set difference threshold, in order to avoid the ping-pong effect, that is, to avoid the case that abnormal fallback (or abnormal camera switching) is caused by frequent updating of the fallback distance, in a possible implementation manner of the embodiments of the present disclosure, the fallback distance at the current shooting time can not be updated.

[0052] In step S103, the distance between the shooting object in the shooting picture of the first camera and the first camera is obtained.

[0053] In the embodiments of the present disclosure, the shooting object can be an object (such as a person, a landscape, etc.) located in the foreground region in the shooting picture of the first camera.

[0054] In the embodiments of the present disclosure, the distance (or depth) between the shooting object in the shooting picture of the first camera and the first camera can be obtained.

[0055] As an example, the first camera can be a depth camera, the depth information of the shooting object can be obtained through the first camera, and the distance between the shooting object and the first camera can be determined according to the depth information of the shooting object.

[0056] As another example, the distance between the shooting object and the electronic device can be measured through a ranging device in the electronic device, and taken as the distance between the shooting object and the first camera.

[0057] As yet another example, the distance between the shooting object and the first camera can be calculated based on the perspective principle. That is, the distance between the shooting object and the first camera can be calculated based on the perspective principle, the focal length of the first camera, the imaging size of the shooting object in the shooting picture, and the actual size (such as the height) of the shooting object.

[0058] Of course, other algorithms can also be used to calculate the distance between the shooting object and the first camera, and the embodiments of the present disclosure do not limit this.

[0059] In step S104, when the distance and the updated retreat switching distance at the current shooting time meet the set retreat switching condition associated with the first camera, the electronic device is controlled to switch from the first camera to the second camera in the multi-camera for shooting.

[0060] The focal length of the second camera can fallback to that of the first camera, that is, the second camera and the first camera are pre-configured cameras capable of mutual switching. For example, when the first camera is a W camera (i.e., the focal length of the first camera is in the W interval), the second camera can be a UW camera (i.e., the focal length of the second camera is in the UW interval), that is, the W focal length and the UW focal length can fallback. For another example, when the first camera is a T camera (i.e., the focal length of the first camera is in the T interval), the second camera can be a W camera (i.e., the focal length of the second camera is in the W interval), a UW camera (i.e., the focal length of the second camera is in the UW interval), that is, the W focal length, the UW focal length and the T focal length can fallback. For another example, when the first camera is a UT camera (i.e., the focal length of the first camera is in the UT interval), the second camera can be a W camera (i.e., the focal length of the second camera is in the W interval), a UW camera (i.e., the focal length of the second camera is in the UW interval), a T camera (i.e., the focal length of the second camera is in the T interval), that is, the W focal length, the UW focal length, the T focal length and the UT focal length can fallback.

[0061] The field of view (FoV) of the UW camera is greater than that of the W camera, the field of view of the W camera is greater than that of the T camera, and the field of view of the T camera is greater than that of the UT camera.

[0062] That is, in order to solve the problem of poor image quality of the captured image (such as a preview image) in different shooting scenes in the multi-camera mode, the present application can provide a multi-level fallback mechanism. For example, assuming that the focal length of the first camera for capturing a preview image is in the W interval, W2UW two-level fallback (i.e., switching between the W camera and the UW camera) can be supported. For another example, assuming that the focal length of the first camera for capturing a preview image is in the T interval, W2UW2T three-level fallback (i.e., switching between the W camera, the UW camera and the T camera) can be supported. For another example, assuming that the focal length of the first camera for capturing a preview image is in the UT interval, W2UW2T2UT four-level fallback (i.e., switching between the W camera, the UW camera, the T camera and the UT camera) can be implemented. In summary, the image quality of the optimal preview image in each focal length interval can be greatly improved.

[0063] It should be noted that the above examples are only illustrative, but the present disclosure is not limited thereto. In actual applications, the fallback mechanism between each focal length interval can be configured according to actual needs.

[0064] In the embodiments of the present disclosure, the set back switching condition is a set back switching condition set in advance for the first camera, which is associated with the first camera and the second camera to be switched to.

[0065] As a possible implementation, when the field of view angle of the first camera (denoted as a first field of view angle in the present disclosure) is less than the field of view angle of the second camera (denoted as a second field of view angle in the present disclosure) (i.e., telephoto to wide-angle, such as T camera (first camera) to W camera (second camera)), the set back switching condition associated with the first camera can be that the distance between the shooting object and the first camera is less than the updated current shooting back switching distance.

[0066] As another possible implementation, when the first field of view angle of the first camera is greater than the field of view angle of the second camera (i.e., wide-angle to telephoto, such as W camera (first camera) to T camera (second camera)), the set back switching condition associated with the first camera can be that the distance between the shooting object and the first camera is greater than a target value, where the target value is determined according to the sum of the updated current shooting back switching distance and the set difference threshold. For example, the sum of the updated current shooting back switching distance and the set difference threshold can be taken as the target value.

[0067] In the embodiments of the present disclosure, it can be determined whether the distance and the updated current shooting back switching distance satisfy the set back switching condition associated with the first camera. If the distance and the updated current shooting back switching distance satisfy the set back switching condition associated with the first camera, the electronic device can be controlled to switch from the first camera to the second camera in the multi-camera for shooting. For example, when the shooting request is a preview request, the electronic device can be controlled to switch from the first camera to the second camera in the multi-camera for shooting of a preview picture.

[0068] If the distance and the updated current shooting back switching distance do not satisfy the set back switching condition associated with the first camera, the switching of the cameras can not be performed, and the electronic device can continue to be controlled to use the first camera to shoot the shooting object. For example, when the shooting request is a preview request, the electronic device can continue to be controlled to use the first camera to shoot a preview picture.

[0069] The camera switching method of the embodiments of the present disclosure can obtain the actual minimum focusing distance of a first camera in the multiple cameras of the electronic device, and the retreat switching distance of the first camera at the current shooting; when the difference between the actual minimum focusing distance and the retreat switching distance at the current shooting is greater than a set difference threshold, the retreat switching distance at the current shooting is updated according to the actual minimum focusing distance; the distance between the shooting object in the shooting picture of the first camera and the first camera is obtained; when the distance and the updated retreat switching distance at the current shooting meet the set retreat switching condition associated with the first camera, the electronic device is controlled to switch from the first camera to a second camera in the multiple cameras for shooting. Thus, the retreat switching distance supported by the first camera currently being shot in the electronic device can be dynamically adjusted based on the actual minimum focusing distance of the first camera, and whether the electronic device needs to switch the camera is determined based on the dynamically adjusted retreat switching distance, so as to solve the problem that the shooting quality of the switched camera is lower than that of the camera before switching when the fixed retreat switching distance is used to determine whether the electronic device needs to switch the camera, and the effect of improving the shooting quality of the shooting picture and improving the shooting experience of the user in the multi-camera mode is achieved.

[0070] In order to clearly illustrate how the actual minimum focusing distance of the first camera is obtained in the above embodiments, the present disclosure proposes another camera control method.

[0071] Figure 2 The flowchart of another camera control method provided by the embodiments of the present disclosure.

[0072] As shown in Figure 2 , the camera control method can include the following steps:

[0073] In step S201, the theoretical minimum focusing distance of the first camera in the multiple cameras of the electronic device is obtained.

[0074] The first camera is the camera currently being shot.

[0075] In the embodiments of the present disclosure, the theoretical minimum focusing distance of the first camera can be provided by the manufacturer of the first camera.

[0076] In step S202, the current temperature information of the electronic device is obtained.

[0077] In the embodiments of the present disclosure, the current temperature information can be obtained by the relevant sensor in the electronic device.

[0078] In step S203, the actual minimum focusing distance of the first camera is determined according to the current temperature information and the theoretical minimum focusing distance.

[0079] In the embodiments of the present disclosure, the actual minimum focusing distance of the first camera can be calculated according to the current temperature information and the theoretical minimum focusing distance.

[0080] In a possible implementation manner of the embodiments of the present disclosure, the actual minimum focusing distance is calculated in the following manner: the focusing offset can be calculated according to the current temperature information of the electronic device, that is, the focusing offset caused by temperature drift can be calculated according to the current temperature information, and the calibration data information of the AF (Automatic Focus) module in the electronic device is obtained, so that in the present disclosure, the actual minimum focusing distance of the first camera can be calculated according to the calibration data information, the focusing offset and the theoretical minimum focusing distance.

[0081] In summary, the actual minimum focusing distance of the first camera is calculated by combining the calibration data information of the AF module, the current temperature information of the electronic device and the theoretical minimum focusing distance of the first camera, which can improve the accuracy and reliability of the calculation result.

[0082] In step S204, the retreat switching distance of the first camera at the current shooting time is obtained.

[0083] The retreat switching distance is used to indicate the focusing distance of camera switching.

[0084] In step S205, when the difference between the actual minimum focusing distance and the retreat switching distance at the current shooting time is greater than a set difference threshold, the retreat switching distance at the current shooting time is updated according to the actual minimum focusing distance.

[0085] In step S206, the distance between the shooting object in the shooting picture of the first camera and the first camera is obtained.

[0086] In step S207, when the distance and the updated retreat switching distance at the current shooting time satisfy a set retreat switching condition associated with the first camera, the electronic device is controlled to switch from the first camera to the second camera in the multi-camera for shooting.

[0087] The explanation of steps S204 to S207 can be referred to the related description in any embodiment of the present disclosure, which will not be repeated here.

[0088] The camera control method in the embodiments of the present disclosure calculates the actual minimum focusing distance of the first camera according to multiple pieces of information, which can improve the accuracy and reliability of the calculation result.

[0089] In order to clearly illustrate how the retreat switching distance of the first camera at the current shooting time is obtained in the above embodiments, another camera control method is provided in the present disclosure.

[0090] Figure 3Another flowchart of a camera control method provided by an embodiment of the present disclosure is shown in FIG. 3.

[0091] As shown in FIG. 3, the camera control method can include the following steps: Figure 3

[0092] In step S301, an actual minimum focusing distance of a first camera in a plurality of cameras of an electronic device is acquired.

[0093] The first camera is a camera currently used for shooting.

[0094] In step S302, it is determined whether the current shooting is the first shooting using the first camera. If yes, step S303 is performed; if no, step S304 is performed.

[0095] In step S303, a retreat switching distance in the current shooting is determined according to a theoretical minimum focusing distance of the first camera.

[0096] In the embodiment of the present disclosure, when the current shooting is the first shooting using the first camera, the retreat switching distance in the current shooting can be determined according to the theoretical minimum focusing distance of the first camera.

[0097] As an example, the retreat switching distance in the current shooting can be determined according to a sum of the theoretical minimum focusing distance and a set value. Generally, the set value can be set to 0, and in this case, the retreat switching distance in the current shooting is equal to the theoretical minimum focusing distance.

[0098] It should be noted that step S302 and step S303 are two parallel implementation manners, and only one of them needs to be performed in actual application.

[0099] In step S304, it is determined whether the retreat switching distance in the previous shooting using the first camera has been updated. If yes, step S305 is performed; if no, step S306 is performed.

[0100] It should be noted that step S305 and step S306 are two parallel implementation manners, and only one of them needs to be performed in actual application.

[0101] In the embodiment of the present disclosure, when the current shooting is not the first shooting using the first camera, it can be further determined whether the retreat switching distance in the previous shooting using the first camera has been updated.

[0102] ​For example, when the first camera is used to capture the previous time, the actual minimum focusing distance of the first camera at the previous time of capturing can be determined, and it is determined whether the difference between the actual minimum focusing distance at the previous time of capturing and the retreat switching distance corresponding to the previous time of capturing is greater than a set difference threshold. If yes, the retreat switching distance corresponding to the previous time of capturing is updated according to the actual minimum focusing distance at the previous time of capturing. At this time, the retreat switching distance corresponding to the previous time of capturing is updated. If no, the retreat switching distance corresponding to the previous time of capturing does not need to be updated. At this time, the retreat switching distance corresponding to the previous time of capturing is not updated.

[0103] In step S305, the retreat switching distance at the current time of capturing is determined according to the updated retreat switching distance corresponding to the previous time.

[0104] In the embodiment of the present disclosure, when the retreat switching distance corresponding to the previous time of capturing is updated, the updated retreat switching distance corresponding to the previous time of capturing can be used as the retreat switching distance at the current time of capturing.

[0105] In step S306, the retreat switching distance at the current time of capturing is determined according to the retreat switching distance corresponding to the previous time.

[0106] In the embodiment of the present disclosure, when the retreat switching distance corresponding to the previous time of capturing is not updated, the retreat switching distance corresponding to the previous time of capturing can be used as the retreat switching distance at the current time of capturing.

[0107] In step S307, when the difference between the actual minimum focusing distance and the retreat switching distance at the current time of capturing is greater than a set difference threshold, the retreat switching distance at the current time of capturing is updated according to the actual minimum focusing distance.

[0108] In step S308, the distance between the object in the capturing picture of the first camera and the first camera is obtained.

[0109] In step S309, when the distance and the updated retreat switching distance at the current time of capturing satisfy the set retreat switching condition associated with the first camera, the electronic device is controlled to switch from the first camera to the second camera in the multi-camera for capturing.

[0110] The explanation of steps S307 to S309 can be referred to the related description in any embodiment of the present disclosure, which will not be repeated here.

[0111] The camera control method in the embodiment of the present disclosure uses the latest updated retreat switching distance as the retreat switching distance at the current time of capturing, which can improve the accuracy of obtaining the retreat switching distance at the current time of capturing.

[0112] To clearly illustrate any of the above embodiments, the present disclosure also proposes a camera control method.

[0113] Figure 4 Another flowchart of a camera control method provided by the embodiments of the present disclosure is shown.

[0114] As Figure 4 shown, the camera control method can include the following steps:

[0115] In step S401, the actual minimum focusing distance of a first camera in a plurality of cameras of an electronic device is obtained, and a retreat switching distance of the first camera at a current shooting time is obtained; wherein the first camera is a camera for current shooting, and the retreat switching distance is used to indicate the focusing distance of camera switching.

[0116] In step S402, the difference between the actual minimum focusing distance and the retreat switching distance at the current shooting time is determined.

[0117] The explanation and description of steps S401 to S402 can be referred to the related description in any of the embodiments of the present disclosure, which will not be repeated here.

[0118] In step S403, it is determined whether the difference is greater than a set difference threshold, if yes, steps S404 to S408 are executed, and if no, step S409 is executed.

[0119] It should be noted that steps S404 to S408 and S409 are two parallel implementation modes, and only one of them needs to be executed in actual application.

[0120] In step S404, the retreat switching distance at the current shooting time is updated according to the actual minimum focusing distance.

[0121] In step S405, the distance between a shooting object in a shooting picture of the first camera and the first camera is obtained.

[0122] In step S406, it is determined whether the distance and the updated retreat switching distance at the current shooting time satisfy a set retreat switching condition associated with the first camera, if yes, step S407 is executed, and if no, step S408 is executed.

[0123] It should be noted that steps S407 and S408 are two parallel implementation modes, and only one of them needs to be executed in actual application.

[0124] In step S407, the electronic device is controlled to switch from the first camera to a second camera in the plurality of cameras for shooting.

[0125] In step S408, the electronic device is continuously controlled to shoot the shooting object by using the first camera.

[0126] The explanation of steps S404 to S408 can refer to the related description in any embodiment of the present disclosure, which will not be repeated here.

[0127] In step S409, it is determined whether the distance and the fallback switching distance at the current shooting time satisfy the set fallback switching condition associated with the first camera. If yes, step S407 is performed. If no, step S408 is performed.

[0128] In the embodiments of the present disclosure, when the difference is less than or equal to the set difference threshold, in order to avoid the ping-pong effect, that is, to avoid the case that the abnormal Fallback (or camera abnormal mutual switching) is caused by frequently updating the fallback switching distance, the fallback switching distance at the current shooting time can not be updated.

[0129] At this time, it can be determined whether the distance between the shooting object and the first camera and the fallback switching distance at the current shooting time satisfy the set fallback switching condition associated with the first camera. In the case that the distance and the fallback switching distance at the current shooting time satisfy the set fallback switching condition associated with the first camera, the electronic device can be controlled to switch from the first camera to the second camera for shooting. In the case that the distance and the fallback switching distance at the current shooting time do not satisfy the set fallback switching condition associated with the first camera, the switching of the cameras can not be performed. At this time, the electronic device can continue to be controlled to shoot the shooting object by using the first camera.

[0130] As a possible implementation, when the first field of view angle of the first camera is less than the second field of view angle of the second camera, it can be determined whether the distance is less than the fallback switching distance at the current shooting time. If the distance is less than the fallback switching distance at the current shooting time, it is determined that the distance and the fallback switching distance at the current shooting time satisfy the set fallback switching condition associated with the first camera. At this time, the electronic device can be controlled to switch from the first camera to the second camera for shooting. If the distance is greater than or equal to the fallback switching distance at the current shooting time, it is determined that the distance and the fallback switching distance at the current shooting time do not satisfy the set fallback switching condition associated with the first camera. At this time, the electronic device can continue to be controlled to shoot the shooting object by using the first camera.

[0131] As another possible implementation, when the first field of view angle of the first camera is greater than the second field of view angle of the second camera, it can be determined whether the distance is greater than (the fallback switching distance at the current shooting time + the set difference threshold), and if the distance is greater than (the fallback switching distance at the current shooting time + the set difference threshold), it is determined that the distance and the fallback switching distance at the current shooting time meet the set fallback switching condition associated with the first camera, and at this time, the electronic device can be controlled to switch from the first camera to the second camera for shooting. If the distance is less than or equal to (the fallback switching distance at the current shooting time + the set difference threshold), it is determined that the distance and the fallback switching distance at the current shooting time do not meet the set fallback switching condition associated with the first camera, and at this time, the electronic device can continue to be controlled to use the first camera to shoot the shooting object.

[0132] The camera control method of the embodiments of the present disclosure can directly determine whether the electronic device needs to switch the cameras according to the fallback switching distance at the current shooting time when the difference is less than or equal to the set difference threshold, which can avoid the case of abnormal Fallback (or abnormal camera switching) caused by frequent updating of the fallback switching distance at the current shooting time, and further improves the shooting experience of the user.

[0133] To clearly illustrate any of the above embodiments, the present disclosure further provides a camera control method.

[0134] Figure 5 Another flowchart of a camera control method provided by the embodiments of the present disclosure is shown.

[0135] As shown in Figure 5 the camera control method can include the following steps:

[0136] In step S501, the actual minimum focusing distance of a first camera in a plurality of cameras of an electronic device and the fallback switching distance of the first camera at the current shooting time are obtained, wherein the first camera is the camera currently shooting, and the fallback switching distance is used to indicate the focusing distance of camera switching.

[0137] In step S502, when the difference between the actual minimum focusing distance and the fallback switching distance at the current shooting time is greater than a set difference threshold, the fallback switching distance at the current shooting time is updated according to the actual minimum focusing distance.

[0138] In step S503, the distance between a shooting object in a shooting picture of the first camera and the first camera is obtained.

[0139] The explanations of steps S501 to S503 can be referred to the related descriptions in any of the embodiments of the present disclosure, which will not be repeated here.

[0140] Step S504, determining whether the first field of view angle of the first camera is smaller than the second field of view angle of the second camera to be switched to, if yes, executing step S505, if no, executing step S510.

[0141] It should be noted that the above-mentioned embodiments of the first camera and the second camera are also applicable to this embodiment, and will not be repeated here.

[0142] It should be noted that step S505 and step S510 are two parallel implementation modes, and only one of them needs to be executed in actual application.

[0143] Step S505, determining whether the distance is smaller than the updated current shooting back switching distance, if yes, executing steps S506-S507, if no, executing steps S508-S509.

[0144] It should be noted that steps S508-S509 and steps S508-S509 are two parallel implementation modes, and only one of them needs to be executed in actual application.

[0145] Step S506, determining that the distance and the updated current shooting back switching distance meet the set back switching condition associated with the first camera.

[0146] In the embodiments of the present disclosure, when the first field of view angle is smaller than the second field of view angle, that is, the long shot is switched to the close shot, at this time, it can be determined whether the distance is smaller than the updated current shooting back switching distance, if the distance is smaller than the updated current shooting back switching distance, it is determined that the distance and the updated current shooting back switching distance meet the set back switching condition associated with the first camera.

[0147] Step S507, controlling the electronic device to switch from the first camera to the second camera for shooting.

[0148] Step S508, determining that the distance and the updated current shooting back switching distance do not meet the set back switching condition associated with the first camera.

[0149] In the embodiments of the present disclosure, when the first field of view angle is smaller than the second field of view angle, that is, the long shot is switched to the close shot, at this time, it can be determined whether the distance is smaller than the updated current shooting back switching distance, if the distance is greater than or equal to the updated current shooting back switching distance, it is determined that the distance and the updated current shooting back switching distance do not meet the set back switching condition associated with the first camera.

[0150] Step S509, continuing to control the electronic device to shoot the shooting object by using the first camera.

[0151] Step S510, determining whether the distance is greater than the target value. If yes, steps S506 to S507 are executed. If no, steps S508 to S509 are executed.

[0152] The target value is determined according to the sum of the updated current shooting time fallback switching distance and the set difference threshold.

[0153] In the embodiments of the present disclosure, when the first field of view is greater than the second field of view, i.e., the near scene is switched to the far scene, it can be determined whether the distance is greater than the target value. If the distance is greater than the target value, it is determined that the distance and the updated current shooting time fallback switching distance meet the set fallback switching condition associated with the first camera. If the distance is less than or equal to the target value, it is determined that the distance and the updated current shooting time fallback switching distance do not meet the set fallback switching condition associated with the first camera.

[0154] The camera control method of the embodiments of the present disclosure determines whether the electronic device needs to switch the camera by comprehensively considering the distance between the shooting object and the first camera, the updated current shooting time fallback switching distance, and the fields of view of the first camera and the second camera, which can further improve the quality of the shooting picture and improve the user's shooting experience.

[0155] In any one of the embodiments of the present disclosure, the dynamic update of the fallback distance can be achieved by the following steps:

[0156] Step 1, a path for reading the actual minimum focusing distance calculated by the AF module (or AF algorithm module) is added. When the multi-camera control logic processing application (hereinafter referred to as multi-camera control module) issues a shooting request (such as a preview request) for each frame, the actual minimum focusing distance of the current first camera (hereinafter referred to as current sensor) is read in real time. The related fallback distance is updated synchronously.

[0157] Step 2, AF algorithm application: calibration data information of the production line AF module + current temperature information of the electronic device (calculate the focusing offset caused by temperature drift) + theoretical minimum focusing distance provided by the camera sensor module manufacturer, to calculate the actual minimum focusing distance CurrMinFocusDis of the current sensor.

[0158] Step 3, multi-camera control module: add control logic: judge whether ABS(CurrMinFocusDis-LastMinFocusDis)≤guard interval value (denoted as a first set difference threshold in the disclosure). If yes, update the Fallback distance supported by the current sensor with the latest actual minimum focus distance of the current sensor supporting Fallback. In this way, the threshold of the sensor supporting Fallback can be dynamically updated, and the problem of abnormal Fallback caused by too large difference between the Fallback distance and the actual minimum focus distance can be solved.

[0159] ABS represents the absolute value function.

[0160] Taking the first camera as sensor A for example, the switching process of the camera can be as shown in Figure 6 AHWMinDIs represents the theoretical minimum focus distance of sensor A; ActDis represents the actual minimum focus distance of sensor A; A_FB represents the Fallback distance (or Fallback distance threshold) of sensor A, and the initial value is AHWMinDIs; B represents the guard interval (denoted as a set difference threshold in the disclosure) of the dynamic actual minimum focus distance of sensor A and the current A_FB, which functions to avoid frequent updating of A_FB and causing abnormal Fallback switching problem. The specific implementation logic is as follows:

[0161] If ABS(ActDis-A_FB)≤B, A_FB remains unchanged;

[0162] If ABS(ActDis-A_FB)>B, A_FB=ActDis.

[0163] Suppose the Fallback mechanism is W2T. For far-to-near switching (i.e., sensor A is a T camera), if dis<A_FB, the T camera switches to a W camera; for near-to-far switching (i.e., sensor A is a W camera), if dis>A_FB+B, the W camera switches to a T camera.

[0164] In summary, the camera control method provided by the embodiment of the disclosure can calculate the actual minimum focus distance of the sensor in the current shooting preview picture by using the calibration data information of the production line AF algorithm + the current temperature information (or the current actual temperature) of the electronic device + the theoretical minimum focus distance provided by the sensor module manufacturer, and the multi-camera control logic processes App( Figure 6The multi-camera control module updates the fallback distance of the current sensor dynamically by using the actual minimum focusing distance of the current sensor, so that the problem of abnormal fallback caused by too large difference between the actual minimum focusing distance and the theoretical focusing distance of the current sensor can be solved, and the fallback experience of the user in the multi-camera mode can be optimized.

[0165] The camera control method provided in the embodiments of the present disclosure can be applied to the camera control device provided in the embodiments of the present disclosure. Figures 1 to 5 The camera control method provided in the embodiments of the present disclosure can be applied to the camera control device provided in the embodiments of the present disclosure. Figures 1 to 5 The camera control method provided in the embodiments of the present disclosure can be applied to the camera control device provided in the embodiments of the present disclosure.

[0166] Figure 7 FIG. 1 is a structural schematic diagram of a camera control device provided in the embodiments of the present disclosure.

[0167] As shown in FIG. 7, the camera control device 700 includes a first acquisition unit 701, an updating unit 702, a second acquisition unit 703, and a control unit 704. Figure 7 The first acquisition unit 701 is configured to acquire an actual minimum focusing distance of a first camera in a plurality of cameras of an electronic device and a fallback switching distance of the first camera at a current shooting time, where the first camera is a camera currently used for shooting, and the fallback switching distance is used to indicate a focusing distance of camera switching.

[0168] The updating unit 702 is configured to update the fallback switching distance at the current shooting time according to the actual minimum focusing distance when a difference between the actual minimum focusing distance and the fallback switching distance at the current shooting time is greater than a set difference threshold.

[0169] The second acquisition unit 703 is configured to acquire a distance between a shooting object in a shooting picture of the first camera and the first camera.

[0170] The control unit 704 is configured to control the electronic device to switch from the first camera to a second camera in the plurality of cameras for shooting when the distance and the updated fallback switching distance at the current shooting time satisfy a set fallback switching condition associated with the first camera.

[0171]

[0172] ​As a possible implementation manner of the embodiment of the present disclosure, when the first field of view angle of the first camera is smaller than the second field of view angle of the second camera, the retreat switching condition is set as: the distance is smaller than the updated retreat switching distance at the current shooting time; when the first field of view angle is greater than the second field of view angle, the retreat switching condition is set as: the distance is greater than a target value, wherein the target value is determined according to the sum of the updated retreat switching distance at the current shooting time and a set difference threshold.

[0173] As a possible implementation manner of the embodiment of the present disclosure, the first obtaining unit 701 is specifically configured to: obtain a theoretical minimum focusing distance of the first camera; obtain current temperature information of the electronic device; and determine an actual minimum focusing distance according to the current temperature information and the theoretical minimum focusing distance.

[0174] As a possible implementation manner of the embodiment of the present disclosure, the first obtaining unit 701 is specifically configured to: determine a focusing offset according to the current temperature information; obtain calibration data information of an automatic focusing AF module in the electronic device; and determine the actual minimum focusing distance according to the calibration data information, the focusing offset and the theoretical minimum focusing distance.

[0175] As a possible implementation manner of the embodiment of the present disclosure, the first obtaining unit 701 is specifically configured to: when the current shooting is the first shooting by using the first camera, determine the retreat switching distance at the current shooting time according to the theoretical minimum focusing distance of the first camera; when the current shooting is not the first shooting by using the first camera, determine whether the retreat switching distance at the previous shooting by using the first camera is updated; if the retreat switching distance is updated, determine the retreat switching distance at the current shooting time according to the updated retreat switching distance corresponding to the previous shooting; and if the retreat switching distance is not updated, determine the retreat switching distance at the current shooting time according to the retreat switching distance corresponding to the previous shooting.

[0176] As a possible implementation manner of the embodiment of the present disclosure, the camera control apparatus 700 can further include:

[0177] The determining module is configured to determine whether the distance and the retreat switching distance at the current shooting time satisfy the set retreat switching condition associated with the first camera when the difference is smaller than or equal to the set difference threshold.

[0178] The control unit 704 is further configured to: if the distance and the retreat switching distance at the current shooting time satisfy the set retreat switching condition associated with the first camera, control the electronic device to switch from the first camera to the second camera for shooting.

[0179] As a possible implementation manner of the embodiment of the present disclosure, the control unit 704 is further configured to: if the distance does not satisfy the set back switching condition associated with the first camera, continue to control the electronic device to capture the shooting object by using the first camera.

[0180] As a possible implementation manner of the embodiment of the present disclosure, the control unit 704 is further configured to: if the distance does not satisfy the set back switching condition associated with the first camera, continue to control the electronic device to capture the shooting object by using the first camera.

[0181] The camera control apparatus of the embodiment of the present disclosure, by acquiring the actual minimum focusing distance of the first camera in the multi-camera of the electronic device, and the back switching distance of the first camera at the current shooting time; when the difference between the actual minimum focusing distance and the back switching distance at the current shooting time is greater than the set difference threshold, updating the back switching distance at the current shooting time according to the actual minimum focusing distance; acquiring the distance between the shooting object in the shooting picture of the first camera and the first camera; when the distance satisfies the set back switching condition associated with the first camera, controlling the electronic device to switch from the first camera to the second camera in the multi-camera for shooting. Thus, the back switching distance supported by the first camera currently being captured in the electronic device can be dynamically adjusted based on the actual minimum focusing distance of the first camera, and whether the electronic device needs to switch the camera is determined based on the dynamically adjusted back switching distance, so as to solve the problem that the shooting quality of the switched camera is lower than that of the camera before switching when the fixed back switching distance is used to determine whether the electronic device needs to switch the camera, and the effect of improving the shooting picture quality and the user's shooting experience in the multi-camera mode is achieved.

[0182] In order to implement the above-mentioned embodiments, the present disclosure further provides an electronic device, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the camera control method described in the above-mentioned embodiments.

[0183] In order to implement the above-mentioned embodiments, the present disclosure further provides a non-transitory computer readable storage medium storing computer instructions, and the computer instructions are used to make the computer perform the camera control method described in the above-mentioned embodiments.

[0184] To achieve the above-mentioned embodiments, the disclosure also proposes a computer program product, when an instruction processor in the computer program product executes, implements the camera control method in the above-mentioned embodiments.

[0185] Figure 8 is a block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 800 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like.

[0186] Referring to Figure 8 , the electronic device 800 can include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0187] The processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 can include one or more processors 820 to execute instructions to complete all or part of steps of the above-mentioned methods. In addition, the processing component 802 can include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0188] The memory 804 is configured to store various types of data to support operations of the electronic device 800. Examples of these data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 can be implemented by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0189] The power component 806 provides power to various components of the electronic device 800. The power component 806 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 800.

[0190] The multimedia component 808 includes a screen to provide an output interface between the electronic device 800 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide, and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touching or a sliding action, but also detect duration and intensity of the touching or sliding action. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a camera mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zooming capability.

[0191] The audio component 810 is configured to output and / or input an audio signal. For example, the audio component 810 includes a microphone (MIC) to receive an external audio signal when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker to output an audio signal.

[0192] The I / O interface 812 provides an interface for the processing component 802 and peripheral interface modules, which can be a keypad, a click wheel, buttons, and the like. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0193] The sensor component 814 includes one or more sensors to provide various state assessments for the electronic device 800. For example, the sensor component 814 can detect an open / closed state of the electronic device 800, relative positioning of components, such as a display and a keypad of the electronic device 800, a change in position of the electronic device 800 or a component of the electronic device 800, presence or absence of user contact with the electronic device 800, an orientation or acceleration / deceleration of the electronic device 800, and a temperature change of the electronic device 800. The sensor component 814 can include a proximity sensor configured to detect presence of a nearby object without any physical touch. The sensor component 814 can further include a light sensor such as a CMOS or CCD image sensor for use in an imaging application. In some embodiments, the sensor component 814 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0194] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 4G, or 5G, or a combination thereof. In an example embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an example embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) techniques, infrared data association (IrDA) techniques, ultra-wideband (UWB) techniques, Bluetooth (BT) techniques, and other techniques.

[0195] In an example embodiment, the electronic device 800 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic elements, for performing the above-described methods.

[0196] In an example embodiment, a non-transitory computer-readable storage medium including instructions, such as the memory 804 including instructions, is also provided, which can be executed by the processor 820 of the electronic device 800 to complete the above-described methods. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device, etc.

[0197] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the disclosure. In the specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Also, the specific features, structures, materials, or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the specification and the features of the different embodiments or examples, without contradiction.

[0198] In addition, the terms "first", "second", and the like are used only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the disclosure, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise explicitly specified.

[0199] 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 custom logic functions or processes, 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 functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.

[0200] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0201] 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.

[0202] Those skilled in the art of the present technology can understand that all or part of the steps carried out by the above-mentioned embodiment method can be completed by programs instructing related hardware, and the programs can be stored in a computer readable storage medium. When the program is executed, it includes one of the steps of the method embodiment or a combination thereof.

[0203] In addition, each functional unit in each embodiment of the present disclosure can be integrated into one processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The integrated module can be realized in the form of hardware or in the form of a software functional module. When the integrated module is realized in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer readable storage medium.

[0204] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and cannot be understood as limiting the present disclosure, and those skilled in the art can make changes, modifications, replacements and variations to the above-mentioned embodiments within the scope of the present disclosure.

Claims

1. A camera control method, characterized by, The method comprises: obtaining an actual minimum focusing distance of a first camera in a multi-camera of an electronic device, and a return switching distance of the first camera at a current shooting time; wherein the first camera is a camera for the current shooting, and the return switching distance is used to indicate a focusing distance of camera switching; when a difference between the actual minimum focusing distance and the return switching distance at the current shooting time is greater than a set difference threshold, updating the return switching distance at the current shooting time according to the actual minimum focusing distance; obtaining a distance between a shooting object in a shooting picture of the first camera and the first camera; when the distance and the updated return switching distance at the current shooting time satisfy a set return switching condition associated with the first camera, controlling the electronic device to switch from the first camera to a second camera in the multi-camera for shooting.

2. The method of claim 1, wherein: when a first field of view angle of the first camera is smaller than a second field of view angle of the second camera, the set return switching condition is that the distance is smaller than the updated return switching distance at the current shooting time; when the first field of view angle is greater than the second field of view angle, the set return switching condition is that the distance is greater than a target value, wherein the target value is determined according to a sum of the updated return switching distance at the current shooting time and the set difference threshold.

3. The method of claim 1, wherein, The method further comprises: obtaining a theoretical minimum focusing distance of the first camera; obtaining current temperature information of the electronic device; determining the actual minimum focusing distance according to the current temperature information and the theoretical minimum focusing distance.

4. The method of claim 3, wherein, The method further comprises: determining a focusing offset according to the current temperature information; obtaining calibration data information of an automatic focusing (AF) module in the electronic device; determining the actual minimum focusing distance according to the calibration data information, the focusing offset, and the theoretical minimum focusing distance.

5. The method of claim 1, wherein, The method further comprises: when the current shooting is a first shooting using the first camera, determining the return switching distance at the current shooting time according to a theoretical minimum focusing distance of the first camera; when the current shooting is a non-first shooting using the first camera, determining whether the return switching distance at a previous shooting using the first camera has been updated; if the return switching distance has been updated, determining the return switching distance at the current shooting time according to the updated return switching distance corresponding to the previous shooting; if the return switching distance has not been updated, determining the return switching distance at the current shooting time according to the return switching distance corresponding to the previous shooting.

6. The method of claim 1, wherein, The method further comprises: when the difference is smaller than or equal to the set difference threshold, determining whether the distance and the return switching distance at the current shooting time satisfy the set return switching condition. If the distance and the back-switching distance at the current shooting time satisfy the set back-switching condition, the electronic device is controlled to switch from the first camera to the second camera for shooting.

7. The method of claim 6, wherein, After the distance and the back-switching distance at the current shooting time are determined to satisfy the set back-switching condition, the method further includes: If the distance and the back-switching distance at the current shooting time do not satisfy the set back-switching condition, the electronic device is continuously controlled to use the first camera to shoot the shooting object.

8. The method according to any one of claims 1-7, characterized in that, After the distance between the shooting object in the shooting picture of the first camera and the first camera is obtained, the method further includes: If the distance and the updated back-switching distance at the current shooting time do not satisfy the set back-switching condition, the electronic device is continuously controlled to use the first camera to shoot the shooting object.

9. A camera control device, characterized by, Comprise: A first obtaining unit is configured to obtain an actual minimum focusing distance of a first camera in a plurality of cameras of an electronic device and a back-switching distance of the first camera at a current shooting time; the first camera is a camera for the current shooting, and the back-switching distance is used to indicate a focusing distance of camera switching; An updating unit is configured to, when a difference between the actual minimum focusing distance and the back-switching distance at the current shooting time is greater than a set difference threshold, update the back-switching distance at the current shooting time according to the actual minimum focusing distance; A second obtaining unit is configured to obtain a distance between a shooting object in a shooting picture of the first camera and the first camera; A control unit is configured to, when the distance and the updated back-switching distance at the current shooting time satisfy a set back-switching condition associated with the first camera, control the electronic device to switch from the first camera to a second camera in the plurality of cameras for shooting.

10. An electronic device, comprising: Comprise: At least one processor; And A memory connected with the at least one processor in communication; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method in any one of claims 1-8.

11. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to execute the method in any one of claims 1-8. The computer instructions are used to enable the computer to execute the method in any one of claims 1-8.

Citation Information

Patent Citations

  • Lens switching method and device, storage medium and electronic equipment

    CN110677581A

  • Camera switching method, terminal and device and computer readable storage medium

    CN112601008A