Camera control method and device, electronic equipment and storage medium

By dynamically updating the return switching distance of the first camera in the electronic device, the camera switching problem caused by the fixed refund switching distance was solved, and the picture quality and user experience were improved.

CN119342339AActive Publication Date: 2025-01-21BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, when the electronic device determines whether the camera needs to be switched, it adopts a fixed return switching distance, resulting in the camera shooting quality after the switch is lower than the camera before the switch, reducing the user's shooting experience.

Method used

By obtaining the actual minimum focusing distance of the first camera in the multi -camera of the electronic device and the return switching distance at the current shooting, the dynamic update returns the switching distance. At the time, the update refund the switching distance and determine whether the camera needs to be switched according to the updated return switching distance.

Benefits of technology

It realizes the dynamic adjustment of the return switching distance based on the actual minimum focus distance, improves the accuracy of camera switching, improves the image quality of the shooting picture and the user's shooting experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342339A_ABST
    Figure CN119342339A_ABST
Patent Text Reader

Abstract

The invention provides a camera control method and apparatus, an electronic device and a storage medium. The method comprises the steps of obtaining an actual minimum focusing distance and a return switching distance of a first camera in multiple cameras of the electronic device; when the difference between the actual minimum focusing distance and the return switching distance is greater than a set difference threshold value, updating the return 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 return switching distance meet a set return switching condition, controlling the electronic equipment to be switched from the first camera to the second camera for shooting. Therefore, the dynamic adjustment of the return switching distance supported by the first camera can be realized based on the actual minimum focusing distance of the first camera which is currently shooting, and whether the electronic equipment needs to switch the camera or not is judged based on the dynamically adjusted return switching distance, so that the quality of a shot picture can be improved.
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 equipment, and in particular to a camera control method, device, electronic equipment and storage medium. Background Art

[0002] At present, the cameras of electronic devices (such as smart phones, wearable devices, smart robots, smart car machines, etc.) can adopt multi-camera modes, such as 3SAT (Spatial Alignment Transform) (i.e., 3 cameras), 4SAT (i.e., 4 cameras), etc. Due to hardware characteristics, in different shooting environments, only one camera of the multiple cameras of the electronic device may have the best shooting quality. Therefore, it is necessary to fall back 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 between each other, the W camera and the T (Tele, telephoto) camera can be switched between each other, the W camera and the UT (Ultra-Tele, ultra-telephoto) camera can be switched between each other, and so on.

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

[0004] In this way, the image quality of the camera after switching may be lower than that of the camera before switching, thereby reducing the user's shooting experience. Summary of the invention

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

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

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

[0008] Obtaining the actual minimum focus distance of a first camera among multiple cameras of an electronic device, and the retraction switching distance of the first camera during current shooting; wherein the first camera is the camera currently shooting, and the retraction switching distance is used to indicate the focus distance of camera switching;

[0009] When the difference between the actual minimum focus distance and the retreat switching distance during the current shooting is greater than a set difference threshold, updating the retreat switching distance during the current shooting according to the actual minimum focus distance;

[0010] Acquire the distance between the first camera and the object in the picture taken by the first camera;

[0011] When the distance and the updated return switching distance during current shooting meet the set return switching condition associated with the first camera, the electronic device is controlled to switch from the first camera to the second camera in the multiple cameras for shooting.

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

[0013] A first acquisition unit is used to acquire an actual minimum focus distance of a first camera among multiple cameras of the electronic device, and a retraction switching distance of the first camera during current shooting; wherein the first camera is the camera currently shooting, and the retraction switching distance is used to indicate the focus distance of the camera switching;

[0014] an updating unit, configured to update the retreat switching distance during current shooting according to the actual minimum focus distance when the difference between the actual minimum focus distance and the retreat switching distance during current shooting is greater than a set difference threshold;

[0015] A second acquisition unit, used to acquire the distance between the photographed object in the photographed picture of the first camera and the first camera;

[0016] A control unit is used to control the electronic device to switch from the first camera to the second camera in the multiple cameras for shooting when the distance and the updated current shooting fallback switching distance meet the set fallback switching condition associated with the first camera.

[0017] An embodiment of the third aspect of the present disclosure proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the camera control method described in the embodiment of the first aspect of the present disclosure.

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

[0019] The fifth aspect embodiment of the present disclosure proposes a computer program product, which, when an instruction processor in the computer program product executes, executes the camera control method described in the first aspect embodiment of the present disclosure.

[0020] The technical solution disclosed in the present invention obtains the actual minimum focus distance of the first camera in the multi-camera of the electronic device, and the retraction switching distance of the first camera during the current shooting; when the difference between the actual minimum focus distance and the retraction switching distance during the current shooting is greater than the set difference threshold, the retraction switching distance during the current shooting is updated according to the actual minimum focus distance; obtains the distance between the shooting object and the first camera in the shooting picture of the first camera; when the distance and the updated retraction switching distance during the current shooting meet the set retraction 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. Thus, it is possible to dynamically adjust the retraction switching distance supported by the first camera based on the actual minimum focus distance of the first camera currently shooting in the electronic device, and judge whether the electronic device needs to switch the camera based on the dynamically adjusted retraction switching distance, so as to solve the problem that the shooting quality of the camera after switching is lower than the shooting quality of the camera before switching when the fixed retraction switching distance is used to judge whether the electronic device needs to switch the camera, and achieve the effect of improving the picture quality of the shooting picture and improving the shooting experience of the user in the multi-camera mode.

[0021] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments 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 schematic diagram of a camera switching process provided by an embodiment of the present disclosure;

[0029] Figure 7 A schematic diagram of the structure of a camera control device provided by an embodiment of the present disclosure;

[0030] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0031] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0032] Currently, the fallback distance uses a fixed threshold value. The fixed fallback distance can take into account the fallback of all camera sensors. For example, the fallback distance corresponding to the sensor can be set according to the theoretical minimum focus distance provided by the camera sensor module manufacturer.

[0033] Because the camera sensor module reserves a portion of the focus motor movement margin due to production line installation, temperature drift and other reasons, this margin will differ from the theoretical minimum focus distance provided by the module manufacturer according to the actual sensor installation process. For electronic devices with large differences, determining whether to switch the camera based on the Fallback distance set by the theoretical minimum focus distance may result in the image quality of the camera after switching being lower than that of the camera before switching, reducing the user's shooting experience.

[0034] As an example, the scenario of switching between the W camera and the UT camera is used for illustrative explanation. For switching from a distant view to a close view, that is, the camera currently shooting the preview screen 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, switch from the UT camera to the W camera to shoot the preview screen. 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 screen.

[0035] As for switching from a close-up view to a distant view, that is, the camera currently shooting the preview screen is the W camera, when the distance between the shooting object and the W camera is greater than the Fallback distance + the set threshold, it can be determined to switch the camera, that is, switch from the W camera to the UT camera to shoot the preview screen; and when the distance between the shooting object and the W camera is less than or equal to the Fallback distance + the set threshold, it can be determined not to switch the camera, that is, continue to use the W camera to shoot the preview screen.

[0036] For example, suppose that in a certain shooting environment, the camera currently shooting the preview screen is a UT camera. At this time, the shooting quality of the UT camera is the best. Suppose that the theoretical minimum focus distance of the UT camera is 100 cm (centimeter), the actual minimum focus distance is 70 cm, and the actual fallback distance for switching the UT camera to the W camera is 100 cm. When the distance between the shooting object in the preview screen and the UT camera (hereinafter referred to as the object distance) is 90 cm, since the object distance (90 cm) is greater than the actual minimum focus distance (70 cm), the UT camera can focus clearly. However, since the object distance (90 cm) is less than the fallback distance (100 cm), the fallback or switching condition of the camera is met, so the UT camera will be automatically switched to the W camera. At this time, in the current shooting environment, the image quality of the preview screen shot by the W camera is lower than that of the preview screen shot by the UT camera, which reduces the user's shooting experience.

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

[0038] The camera control method, device, electronic device 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 in an embodiment of the present disclosure is provided.

[0040] The embodiment of the present disclosure takes the camera control method being configured in a camera control device as an example. The camera control device can be applied to any electronic device so that the electronic device can perform a camera control function.

[0041] Among them, the electronic device can be any device with computing capabilities, such as a personal computer (PC), a mobile terminal, a server, etc. The mobile terminal can be, for example, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, an intelligent robot, an intelligent car machine, and other hardware devices with various operating systems, touch screens and / or display screens.

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

[0043] Step S101, obtaining the actual minimum focusing distance of the first camera among multiple cameras of the electronic device, and the retraction switching distance of the first camera during current shooting; wherein the first camera is the camera currently shooting.

[0044] The fallback distance (or fallback distance threshold) is used to indicate the focus distance of the camera switch.

[0045] In an embodiment of the present disclosure, when a shooting request (including a preview request, a photo request, and a video recording request) is received, the actual minimum focus distance of the first camera among multiple cameras of the electronic device can be obtained, as well as the retraction switching distance of the first camera during the current shooting (or the retraction switching distance currently supported by the first camera) can be obtained.

[0046] The first camera is a camera currently shooting. For example, taking the shooting request as a preview request as an example, the first camera can be a camera currently shooting a preview picture.

[0047] Step S102 : when the difference between the actual minimum focus distance and the retreat switching distance during current shooting is greater than a set difference threshold, the retreat switching distance during current shooting is updated according to the actual minimum focus distance.

[0048] In the embodiment of the present disclosure, the difference may be a difference, an absolute value of the difference, a square of the difference, and the like.

[0049] In the embodiment of the present disclosure, the set difference threshold is a preset 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 focus distance and the back-off switching distance during the current shooting can be calculated, and it can be determined whether the difference is greater than a set difference threshold. If the difference is greater than the set difference threshold, the back-off switching distance during the current shooting can be updated according to the actual minimum focus distance. For example, the actual minimum focus distance can be assigned to the back-off switching distance during the current shooting to obtain an updated back-off switching distance during the current shooting.

[0051] 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 abnormal Fallback (or abnormal camera switching) caused by frequent updates of the back-off switching distance, in a possible implementation method of an embodiment of the present application, it is not necessary to update the back-off switching distance during the current shooting.

[0052] Step S103, obtaining the distance between the photographed object in the photographed image of the first camera and the first camera.

[0053] In the embodiment of the present disclosure, the photographed object may be an object (such as a person, a landscape, etc.) located in the foreground area of ​​the photographed picture of the first camera.

[0054] In the embodiment of the present disclosure, the distance (or depth) between the photographed object in the photographed picture of the first camera and the first camera may be acquired.

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

[0056] As another example, the distance between the photographed object and the electronic device can be measured by a distance measuring device in the electronic device, and used as the distance between the photographed object and the first camera.

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

[0058] Of course, other algorithms may also be used to calculate the distance between the photographed object and the first camera, and the embodiment of the present disclosure is not limited to this.

[0059] Step S104, when the distance and the updated return switching distance during current shooting meet the set return switching condition associated with the first camera, control the electronic device to switch from the first camera to the second camera in the multi-camera for shooting.

[0060] Among them, the focal lengths of the second camera and the first camera can be fallback, that is, the second camera and the first camera are pre-configured cameras that can switch with each other. For example, when the first camera is a W camera (that is, the focal length of the first camera is in the W interval), the second camera may be a UW camera (that is, 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 (that is, the focal length of the first camera is in the T interval), the second camera may be a W camera (that is, the focal length of the second camera is in the W interval) or a UW camera (that is, 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 (that is, the focal length of the first camera is in the UT interval), the second camera may be a W camera (that is, the focal length of the second camera is in the W interval), a UW camera (that is, the focal length of the second camera is in the UW interval), and a T camera (that is, 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 UE focal length can fallback.

[0061] Among them, 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 to say, in order to solve the problem of poor image quality of the shooting picture (such as the preview picture) in different shooting scenes in the multi-camera mode, a multi-level Fallback mechanism can be provided in the present application. For example, assuming that the focal length of the first camera currently shooting the preview picture is the W interval, two layers of Fallback such as W2UW can be supported (i.e., switching between the W camera and the UW camera). For another example, assuming that the focal length of the first camera currently shooting the preview picture is the T interval, three layers of Fallback such as W2UW2T can be supported (i.e., switching between the W camera, the UW camera, and the T camera). For another example, assuming that the focal length of the first camera currently shooting the preview picture is the UT interval, four layers of Fallback such as W2UW2T2UT can be implemented (i.e., switching between the W camera, the UW camera, the T camera, and the UT camera). In summary, the image quality of the best preview picture 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 application, the Fallback mechanism between each focal length can be configured according to actual needs.

[0064] In the embodiment of the present disclosure, the set fallback switching condition is a fallback switching condition pre-set for the first camera, and the set fallback switching condition is not only associated with the first camera, but also associated with the second camera to be switched to.

[0065] As a possible implementation method, when the field of view angle of the first camera (referred to as the first field of view angle in this disclosure) is smaller than the field of view angle of the second camera (referred to as the second field of view angle in this disclosure) (i.e., switching from a distant view to a close view, such as switching from the T camera (first camera) to the W camera (second camera)), the set fallback switching condition associated with the first camera may be: the distance between the subject and the first camera is smaller than the updated fallback switching distance during the current shooting.

[0066] As another possible implementation, when the first field of view of the first camera is greater than the field of view of the second camera (i.e., the close view is switched to the long view, such as the W camera (first camera) switching to the T camera (second camera)), the set fallback switching condition associated with the first camera may be: the distance between the photographed object and the first camera is greater than the target value, wherein the target value is determined based on the sum of the updated fallback switching distance during the current shooting and the above-mentioned set difference threshold. For example, the sum of the updated fallback switching distance during the current shooting and the above-mentioned set difference threshold may be used as the target value.

[0067] In the disclosed embodiment, it can be determined whether the above distance and the updated current shooting fallback switching distance meet the set fallback switching condition associated with the first camera. If the distance and the updated current shooting fallback switching distance meet 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 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 the preview screen.

[0068] If the distance and the updated current shooting fallback switching distance do not satisfy the set fallback switching condition associated with the first camera, there is no need to switch the camera, and the electronic device can continue to be controlled to shoot the above-mentioned shooting object with the first camera. For example, when the shooting request is a preview request, the electronic device can continue to be controlled to shoot the preview screen with the first camera.

[0069] The camera switching method of the disclosed embodiment is to obtain the actual minimum focus distance of the first camera in the multi-camera of the electronic device and the retraction switching distance of the first camera during the current shooting; when the difference between the actual minimum focus distance and the retraction switching distance during the current shooting is greater than the set difference threshold, the retraction switching distance during the current shooting is updated according to the actual minimum focus distance; obtain the distance between the shooting object and the first camera in the shooting picture of the first camera; when the distance and the updated retraction switching distance during the current shooting meet the set retraction switching condition associated with the first camera, control the electronic device to switch from the first camera to the second camera in the multi-camera for shooting. Thus, it is possible to dynamically adjust the retraction switching distance supported by the first camera based on the actual minimum focus distance of the first camera currently shooting in the electronic device, and judge whether the electronic device needs to switch the camera based on the dynamically adjusted retraction switching distance, so as to solve the problem that the shooting quality of the camera after switching is lower than the shooting quality of the camera before switching when the fixed retraction switching distance is used to judge whether the electronic device needs to switch the camera, and achieve the effect of improving the picture quality of the shooting picture and improving the shooting experience of the user in the multi-camera mode.

[0070] In order to clearly explain how to obtain the actual minimum focusing distance of the first camera in the above embodiment, the present disclosure proposes another camera control method.

[0071] Figure 2 A flowchart of another camera control method provided in an embodiment of the present disclosure.

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

[0073] Step S201, obtaining a theoretical minimum focusing distance of a first camera among multiple cameras of an electronic device.

[0074] Among them, the first camera is the camera currently shooting.

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

[0076] Step S202: obtaining current temperature information of the electronic device.

[0077] In the embodiment of the present disclosure, the current temperature information may be collected by relevant sensors in the electronic device.

[0078] Step S203: determining the actual minimum focusing distance of the first camera according to the current temperature information and the theoretical minimum focusing distance.

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

[0080] In a possible implementation of an embodiment of the present disclosure, the actual minimum focusing distance is calculated, for example, by calculating the focus offset based on the current temperature information of the electronic device, that is, the focus offset caused by the temperature drift can be calculated based on the current temperature information, and the calibration data information of the AF (Automatic Focus) module in the electronic device can be obtained. Therefore, in the present disclosure, the actual minimum focusing distance of the first camera can be calculated based on the calibration data information, the focus offset and the theoretical minimum focusing distance.

[0081] In summary, 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, the actual minimum focusing distance of the first camera is calculated, which can improve the accuracy and reliability of the calculation result.

[0082] Step S204, obtaining the return switching distance of the first camera during the current shooting.

[0083] The return switching distance is used to indicate the focus distance of the camera switching.

[0084] Step S205 , when the difference between the actual minimum focus distance and the retreat switching distance during current shooting is greater than a set difference threshold, the retreat switching distance during current shooting is updated according to the actual minimum focus distance.

[0085] Step S206, obtaining the distance between the photographed object in the photographed image of the first camera and the first camera.

[0086] Step S207, when the distance and the updated return switching distance during current shooting meet the set return switching condition associated with the first camera, control the electronic device 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 found in the relevant description in any embodiment of the present disclosure, and will not be repeated here.

[0088] The camera control method of the disclosed embodiment calculates the actual minimum focusing distance of the first camera based on multiple pieces of information, which can improve the accuracy and reliability of the calculation result.

[0089] In order to clearly explain how to obtain the retraction switching distance of the first camera during the current shooting in the above embodiment, the present disclosure proposes another camera control method.

[0090] Figure 3A flowchart of another camera control method provided in an embodiment of the present disclosure.

[0091] like Figure 3 As shown, the camera control method may include the following steps:

[0092] Step S301, obtaining an actual minimum focusing distance of a first camera among multiple cameras of an electronic device.

[0093] Among them, the first camera is the camera currently shooting.

[0094] Step S302, determining whether the current shooting is the first shooting with the first camera, if so, executing step S303, if not, executing step S304.

[0095] Step S303: Determine the return switching distance for the current shooting according to the 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 back-off switching distance during the current shooting can be determined according to the theoretical minimum focusing distance of the first camera.

[0097] As an example, the retraction switching distance during the current shooting can be determined according to the sum of the theoretical minimum focus distance and the set value. Generally, the set value can be set to 0, at which time the retraction switching distance during the current shooting is equal to the theoretical minimum focus distance.

[0098] It should be noted that step S302 and step S303 are two parallel implementation methods. In actual application, only one needs to be executed.

[0099] Step S304, determining whether the return switching distance during the previous shooting with the first camera is updated, if so, executing step S305, if not, executing step S306.

[0100] It should be noted that step S305 and step S306 are two parallel implementation methods. In actual application, only one needs to be executed.

[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 of the previous shooting using the first camera is updated.

[0102] For example, when the first camera was used to take a picture for the last time, the actual minimum focus distance of the first camera during the previous picture can be determined, and it can be determined whether the difference between the actual minimum focus distance during the previous picture and the back-off switching distance corresponding to the previous picture is greater than a set difference threshold. If so, the back-off switching distance corresponding to the previous picture can be updated according to the actual minimum focus distance during the previous picture. At this time, the back-off switching distance corresponding to the previous picture is updated; if not, there is no need to update the back-off switching distance corresponding to the previous picture. At this time, the back-off switching distance corresponding to the previous picture is not updated.

[0103] Step S305, determining the retreat switching distance for the current shooting according to the updated corresponding retreat switching distance of the previous shooting.

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

[0105] Step S306, determining the retreat switching distance for the current shooting according to the corresponding retreat switching distance of the previous shooting.

[0106] In the embodiment of the present disclosure, when the retreat switching distance corresponding to the previous shooting has not been updated, the retreat switching distance corresponding to the previous shooting can be used as the retreat switching distance for the current shooting.

[0107] Step S307 , when the difference between the actual minimum focus distance and the retreat switching distance during current shooting is greater than a set difference threshold, the retreat switching distance during current shooting is updated according to the actual minimum focus distance.

[0108] Step S308: Obtain the distance between the photographed object in the photographed image of the first camera and the first camera.

[0109] Step S309: When the distance and the updated return switching distance during current shooting meet the set return switching condition associated with the first camera, control the electronic device to switch from the first camera to the second camera in the multi-camera for shooting.

[0110] For explanations of steps S307 to S309, reference may be made to the relevant descriptions in any embodiment of the present disclosure, and will not be repeated here.

[0111] The camera control method of the disclosed embodiment uses the most recently updated retreat switching distance as the retreat switching distance during current shooting, which can improve the accuracy of obtaining the retreat switching distance during current shooting.

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

[0113] Figure 4 A flowchart of another camera control method provided in an embodiment of the present disclosure.

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

[0115] Step S401, obtaining the actual minimum focusing distance of the first camera among the multiple cameras of the electronic device, and the retraction switching distance of the first camera during the current shooting; wherein the first camera is the camera currently shooting, and the retraction switching distance is used to indicate the focusing distance of the camera switching.

[0116] Step S402, determining the difference between the actual minimum focus distance and the retraction switching distance during the current shooting.

[0117] For explanations of steps S401 to S402, reference may be made to the relevant descriptions in any embodiment of the present disclosure, and will not be repeated here.

[0118] Step S403, determining whether the difference is greater than a set difference threshold, if so, executing steps S404 to S408, if not, executing step S409.

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

[0120] Step S404: updating the back-off switching distance during the current shooting according to the actual minimum focusing distance.

[0121] Step S405: obtaining the distance between the photographed object in the photographed image of the first camera and the first camera.

[0122] Step S406, determining whether the distance and the updated return switching distance during the current shooting meet the set return switching condition associated with the first camera, if so, executing step S407, if not, executing step S408.

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

[0124] Step S407, controlling the electronic device to switch from the first camera to the second camera in the multi-camera for shooting.

[0125] Step S408: Continue to control the electronic device to use the first camera to photograph the subject.

[0126] For explanations of steps S404 to S408, reference may be made to the relevant descriptions in any embodiment of the present disclosure, and will not be repeated here.

[0127] Step S409, determining whether the distance and the back-off switch during the current shooting satisfy the set back-off switch condition associated with the first camera, if so, executing step S407, if not, executing step S408.

[0128] In the embodiment of the present disclosure, when the above-mentioned difference is less than or equal to the set difference threshold, in order to avoid the ping-pong effect, that is, to avoid abnormal Fallback (or abnormal camera switching) caused by frequent updates of the fallback switching distance, it is not necessary to update the fallback switching distance during the current shooting.

[0129] At this time, it can be determined whether the distance between the photographed object and the first camera and the fallback switching distance during the current shooting meet the set fallback switching conditions associated with the first camera. If the distance and the fallback switching distance during the current shooting meet the set fallback switching conditions associated with the first camera, the electronic device can be controlled to switch from the first camera to the second camera for shooting. If the distance and the fallback switching distance during the current shooting do not meet the set fallback switching conditions associated with the first camera, there is no need to switch the camera. At this time, the electronic device can continue to be controlled to use the first camera to shoot the object.

[0130] As a possible implementation method, when the first field of view angle of the first camera is smaller than the second field of view angle of the second camera, it can be determined whether the distance is smaller than the back-off switching distance during the current shooting. If the distance is smaller than the back-off switching distance during the current shooting, it is determined that the distance and the back-off switching distance during the current shooting satisfy the set back-off 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 back-off switching distance during the current shooting, it is determined that the distance and the back-off switching distance during the current shooting do not satisfy the set back-off switching condition associated with the first camera. At this time, the electronic device can continue to be controlled to use the first camera to shoot the subject.

[0131] As another possible implementation method, 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 during the current shooting + the set difference threshold). If the distance is greater than (the fallback switching distance during the current shooting + the set difference threshold), it is determined that the distance and the fallback switching distance during the current shooting meet 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 less than or equal to (the fallback switching distance during the current shooting + the set difference threshold), it is determined that the distance and the fallback switching distance during the current shooting do not meet the set fallback switching condition associated with the first camera. At this time, the electronic device can continue to be controlled to use the first camera to shoot the subject.

[0132] The camera control method of the disclosed embodiment can avoid abnormal Fallback (or abnormal camera switching) caused by frequent updates of the current shooting back-off switching distance by directly judging whether the electronic device needs to switch the camera according to the back-off switching distance during the current shooting when the difference is less than or equal to the set difference threshold, thereby further improving the user's shooting experience.

[0133] In order to clearly illustrate any of the above embodiments, the present disclosure also proposes a camera control method.

[0134] Figure 5 A flowchart of another camera control method provided in an embodiment of the present disclosure.

[0135] like Figure 5 As shown, the camera control method may include the following steps:

[0136] Step S501, obtaining the actual minimum focusing distance of the first camera among the multiple cameras of the electronic device, and the retraction switching distance of the first camera during the current shooting; wherein the first camera is the camera currently shooting, and the retraction switching distance is used to indicate the focusing distance of the camera switching.

[0137] Step S502: when the difference between the actual minimum focus distance and the retreat switching distance during current shooting is greater than a set difference threshold, the retreat switching distance during current shooting is updated according to the actual minimum focus distance.

[0138] Step S503: Obtain the distance between the photographed object in the photographed image of the first camera and the first camera.

[0139] For explanations of steps S501 to S503, reference may be made to the relevant descriptions in any embodiment of the present disclosure, and 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 so, executing step S505, if not, executing step S510.

[0141] It should be noted that the explanations of the first camera and the second camera in the aforementioned embodiment 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 methods. In actual application, only one needs to be executed.

[0143] Step S505, determining whether the distance is less than the updated back-switching distance during the current shooting, if so, executing steps S506 to S507, if not, executing steps S508 to S509.

[0144] It should be noted that steps S508 to S509 and steps S508 to S509 are two parallel implementation methods. In actual application, only one needs to be executed.

[0145] Step S506, determining whether the distance and the updated return switching distance during current shooting satisfy the set return switching condition associated with the first camera.

[0146] In the embodiment of the present disclosure, when the first field of view angle is smaller than the second field of view angle, that is, the distant view is switched to the near view, at this time, it can be determined whether the distance is smaller than the updated fallback switching distance for the current shooting. If the distance is smaller than the updated fallback switching distance for the current shooting, it is determined that the distance and the updated fallback switching distance for the current shooting meet the set fallback 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 return switching distance during the current shooting do not satisfy the set return switching condition associated with the first camera.

[0149] In the embodiment of the present disclosure, when the first field of view angle is smaller than the second field of view angle, that is, the distant view switches to the near view, at this time, it can be determined whether the distance is smaller than the updated fallback switching distance for the current shooting. If the distance is greater than or equal to the updated fallback switching distance for the current shooting, it is determined that the distance and the updated fallback switching distance for the current shooting do not satisfy the set fallback switching condition associated with the first camera.

[0150] Step S509: Continue to control the electronic device to use the first camera to shoot the subject.

[0151] Step S510, determine whether the distance is greater than the target value, if so, execute steps S506 to S507, if not, execute steps S508 to S509.

[0152] The target value is determined based on the sum of the updated return switching distance during the current shooting and the set difference threshold.

[0153] In the embodiment of the present disclosure, when the first field of view angle is greater than the second field of view angle, that is, the close view is switched to the distant view, at this time, 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 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 fallback switching distance do not meet the set fallback switching condition associated with the first camera.

[0154] The camera control method of the disclosed embodiment determines whether the electronic device needs to switch cameras by comprehensively considering the distance between the shooting object and the first camera, the updated back-off switching distance during the current shooting, and the field of view of the first camera and the second camera, thereby further improving the image quality of the shooting picture and improving the user's shooting experience.

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

[0156] Step 1: Add a new path to read the actual minimum focus distance calculated by the AF module (or AF algorithm module). When the multi-camera control logic processing App (Application) (hereinafter referred to as the multi-camera control module) sends each frame shooting request (such as preview request), it reads the actual minimum focus distance of the first camera currently shooting (referred to as the current sensor) in real time. Synchronously update the related Fallback distance.

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

[0158] Step 3, multi-camera control module: Add control logic: Determine whether ABS(CurrMinFocusDis – LastMinFocusDis) ≤ protection interval value (denoted as the first set difference threshold in this disclosure). If satisfied, update the Fallback distance supported by the current sensor with the latest actual minimum focus distance of the current sensor that supports Fallback. Thus, dynamic update of the threshold of the sensor that supports Fallback can be achieved, and the problem of abnormal Fallback caused by the excessive difference between the Fallback distance and the actual minimum focus distance can be solved.

[0159] Among them, ABS represents the absolute value function.

[0160] Taking the first camera as sensorA for exemplary illustration, the camera switching process can be as Figure 6 shown, where AHWMinDIs represents the theoretical minimum focus distance of sensorA; ActDis represents the actual minimum focus distance of sensor A; A_FB represents the Fallback distance (or Fallback distance threshold) of sensorA, and the initial value is AHWMinDIs; B represents the protection interval (denoted as the set difference threshold in this disclosure) between the dynamic actual minimum focus distance of sensorA and the current A_FB, and its function is to avoid abnormal Fallback switching problems caused by frequent updates of A_FB. The specific implementation logic is as follows:

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

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

[0163] Assume the Fallback mechanism is: W2T. For the far view to near view (i.e., sensorA is the T camera), if the distance dis between the shooting object and sensorA < A_FB, then the T camera switches to the W camera; for the near view to far view (i.e., sensorA is the W camera), if dis > A_FB + B, then the W camera switches to the T camera.

[0164] In summary, the camera control method provided by the embodiments of this disclosure can calculate the actual minimum focus distance of the sensor in the current shooting preview screen by using the calibration data information of the production line AF algorithm + the current temperature information (or current actual temperature) of the electronic device + the theoretical minimum focus distance provided by the sensor module manufacturer. The multi-camera control logic processes the App Figure 6The multi-camera control module (referred to as the multi-camera control module) uses the actual minimum focus distance of the current sensor to dynamically update the Fallback distance of the current sensor. This can solve the abnormal Fallback problem caused by the large difference between the actual minimum focus distance of the current sensor and the theoretical focus distance, and optimize the user's Fallback experience in multi-camera mode.

[0165] With the above Figures 1 to 5 Corresponding to the camera control method provided in the embodiment, the present disclosure also provides a camera control device. Figures 1 to 5 The camera control method provided in the embodiment corresponds to the embodiment, so the implementation of the camera control method is also applicable to the camera control device provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.

[0166] Figure 7 A schematic diagram of the structure of a camera control device provided in an embodiment of the present disclosure.

[0167] like Figure 7 As shown, the camera control device 700 includes: a first acquisition unit 701 , an update unit 702 , a second acquisition unit 703 and a control unit 704 .

[0168] Among them, the first acquisition unit 701 is used to obtain the actual minimum focusing distance of the first camera among the multiple cameras of the electronic device, and the retreat switching distance of the first camera during the current shooting; wherein the first camera is the camera currently shooting, and the retreat switching distance is used to indicate the focusing distance of the camera switching.

[0169] The updating unit 702 is used to update the retreat switching distance during current shooting according to the actual minimum focus distance when the difference between the actual minimum focus distance and the retreat switching distance during current shooting is greater than a set difference threshold.

[0170] The second acquisition unit 703 is used to acquire the distance between the photographed object in the photographed picture of the first camera and the first camera.

[0171] The control unit 704 is used to control the electronic device to switch from the first camera to the second camera in the multi-camera for shooting when the distance and the updated current shooting fallback switching distance meet the set fallback switching condition associated with the first camera.

[0172] As a possible implementation method of an 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 fallback switching condition is set to: the distance is smaller than the updated fallback switching distance during the current shooting; when the first field of view angle is larger than the second field of view angle, the fallback switching condition is set to: the distance is greater than the target value, wherein the target value is determined based on the sum of the updated fallback switching distance during the current shooting and the set difference threshold.

[0173] As a possible implementation method of the embodiment of the present disclosure, the first acquisition unit 701 is specifically used to: obtain the theoretical minimum focusing distance of the first camera; obtain the current temperature information of the electronic device; and determine the actual minimum focusing distance based on the current temperature information and the theoretical minimum focusing distance.

[0174] As a possible implementation method of the embodiment of the present disclosure, the first acquisition unit 701 is specifically used to: determine the focus offset according to the current temperature information; obtain the calibration data information of the auto focus AF module in the electronic device; determine the actual minimum focus distance according to the calibration data information, the focus offset and the theoretical minimum focus distance.

[0175] As a possible implementation of the embodiment of the present disclosure, the first acquisition unit 701 is specifically used to: when the current shooting is the first shooting with the first camera, determine the retracting switching distance for the current shooting according to the theoretical minimum focusing distance of the first camera; when the current shooting is not the first shooting with the first camera, determine whether the retracting switching distance for the previous shooting with the first camera is updated; if updated, determine the retracting switching distance for the current shooting according to the updated retracting switching distance corresponding to the previous shooting; if not updated, determine the retracting switching distance for the current shooting according to the retracting switching distance corresponding to the previous shooting. .

[0176] As a possible implementation of the embodiment of the present disclosure, the camera control device 700 may further include:

[0177] The judgment module is used to judge whether the distance and the return switching distance during the current shooting meet the set return switching condition associated with the first camera when the difference is less than or equal to the set difference threshold.

[0178] The control unit 704 is further configured to control the electronic device to switch from the first camera to the second camera for shooting if the distance and the current shooting return switching distance meet the set return switching condition associated with the first camera.

[0179] As a possible implementation method of the embodiment of the present disclosure, the control unit 704 is also used to: if the distance and the current return switching distance during shooting do not meet the set return switching condition associated with the first camera, continue to control the electronic device to use the first camera to shoot the subject.

[0180] As a possible implementation method of the embodiment of the present disclosure, the control unit 704 is also used to: if the distance and the updated current shooting fallback switching distance do not meet the set fallback switching condition associated with the first camera, continue to control the electronic device to use the first camera to shoot the subject.

[0181] The camera control device of the disclosed embodiment obtains the actual minimum focus distance of the first camera in the multi-camera of the electronic device and the retraction switching distance of the first camera during the current shooting; when the difference between the actual minimum focus distance and the retraction switching distance during the current shooting is greater than the set difference threshold, the retraction switching distance during the current shooting is updated according to the actual minimum focus distance; obtains the distance between the shooting object and the first camera in the shooting picture of the first camera; when the distance and the updated retraction switching distance during the current shooting meet the set retraction 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. Thus, it is possible to dynamically adjust the retraction switching distance supported by the first camera based on the actual minimum focus distance of the first camera currently shooting in the electronic device, and judge whether the electronic device needs to switch the camera based on the dynamically adjusted retraction switching distance, so as to solve the problem that the shooting quality of the camera after switching is lower than the shooting quality of the camera before switching when the fixed retraction switching distance is used to judge whether the electronic device needs to switch the camera, and achieve the effect of improving the picture quality of the shooting picture and improving the shooting experience of the user in the multi-camera mode.

[0182] In order to implement the above embodiments, the present disclosure also proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the camera control method described in the above embodiments.

[0183] In order to implement the above embodiments, the present disclosure further proposes a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to enable the computer to execute the camera control method described in the above embodiments.

[0184] In order to implement the above embodiments, the present disclosure further proposes a computer program product, which implements the camera control method described in the above embodiments when an instruction processor in the computer program product is executed.

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

[0186] Reference Figure 8 , the electronic device 800 may 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 operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may 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 on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

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

[0190] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. 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 shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

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

[0192] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0193] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also 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 exemplary 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 exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0195] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

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

[0197] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0198] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0199] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present disclosure belong.

[0200] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0201] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0202] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

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

[0204] The storage medium mentioned above may be a read-only memory, a disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present disclosure. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present disclosure.

Claims

1. A camera control method, characterized in that: include: Obtaining the actual minimum focus distance of a first camera among multiple cameras of an electronic device, and the retraction switching distance of the first camera during current shooting; wherein the first camera is the camera currently shooting, and the retraction switching distance is used to indicate the focus distance of camera switching; When the difference between the actual minimum focus distance and the retreat switching distance during the current shooting is greater than a set difference threshold, updating the retreat switching distance during the current shooting according to the actual minimum focus distance; Acquire the distance between the first camera and the object in the picture taken by the first camera; When the distance and the updated return switching distance during current shooting meet the set return switching condition associated with the first camera, the electronic device is controlled to switch from the first camera to the second camera in the multiple cameras for shooting.

2. The method according to claim 1, characterized in that 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 set return switching condition is: the distance is smaller than the updated return switching distance during current shooting; When the first field of view angle is greater than the second field of view angle, the set retreat switching condition is: the distance is greater than the target value, wherein the target value is determined based on the sum of the updated retreat switching distance during the current shooting and the set difference threshold.

3. The method according to claim 1, characterized in that: Obtaining the actual minimum focusing distance of the first camera includes: Obtaining a theoretical minimum focusing distance of the first camera; Acquiring current temperature information of the electronic device; The actual minimum focusing distance is determined according to the current temperature information and the theoretical minimum focusing distance.

4. The method according to claim 3, characterized in that The determining the actual minimum focusing distance according to the current temperature information and the theoretical minimum focusing distance includes: Determining a focus offset according to the current temperature information; Acquiring calibration data information of an auto-focus AF module in the electronic device; The actual minimum focus distance is determined according to the calibration data information, the focus offset and the theoretical minimum focus distance.

5. The method according to claim 1, characterized in that Obtaining the retraction switching distance of the first camera during current shooting, including: When the current shooting is the first shooting with the first camera, determining the return switching distance for the current shooting according to the theoretical minimum focusing distance of the first camera; When the current shooting is not the first shooting with the first camera, determining whether the return switching distance in the previous shooting with the first camera is updated; If an update occurs, the back-switching distance for the current shooting is determined according to the updated back-switching distance corresponding to the previous shooting; If no update occurs, the retreat switching distance for the current shooting is determined according to the corresponding retreat switching distance for the previous shooting.

6. The method according to claim 1, characterized in that The method further comprises: When the difference is less than or equal to the set difference threshold, determining whether the distance and the retreat switching distance during the current shooting satisfy the set retreat switching condition; If the distance and the retreat switching distance during the current shooting meet the set retreat switching condition, the electronic device is controlled to switch from the first camera to the second camera for shooting.

7. The method according to claim 6, characterized in that After determining whether the distance and the retreat switching distance during the current shooting satisfy the set retreat switching condition, the method further includes: If the distance and the current shooting return switching distance do not satisfy the set return condition, the electronic device continues to be controlled to use the first camera to shoot the shooting object.

8. The method according to any one of claims 1 to 7, characterized in that After obtaining the distance between the object in the picture taken by the first camera and the first camera, the method further includes: If the distance and the updated current shooting retreat switching distance do not satisfy the set retreat switching condition, the electronic device continues to be controlled to use the first camera to shoot the shooting object.

9. A camera control device, characterized in that: include: A first acquisition unit is used to acquire an actual minimum focus distance of a first camera among multiple cameras of the electronic device, and a retraction switching distance of the first camera during current shooting; wherein the first camera is the camera currently shooting, and the retraction switching distance is used to indicate the focus distance of the camera switching; an updating unit, configured to update the retreat switching distance during current shooting according to the actual minimum focus distance when the difference between the actual minimum focus distance and the retreat switching distance during current shooting is greater than a set difference threshold; A second acquisition unit, used to acquire the distance between the photographed object in the photographed picture of the first camera and the first camera; A control unit is used to control the electronic device to switch from the first camera to the second camera in the multiple cameras for shooting when the distance and the updated fallback switching distance during current shooting meet the set fallback switching condition associated with the first camera.

10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed 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 method according to any one of claims 1 to 8.

11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 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

  • Electronic device, controller device, and control method

    US20210176405A1