CN115150553B - Focusing method, focusing device, electronic equipment and storage medium - Google Patents

Focusing method, focusing device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115150553B
CN115150553B CN202210745428.3A CN202210745428A CN115150553B CN 115150553 B CN115150553 B CN 115150553B CN 202210745428 A CN202210745428 A CN 202210745428A CN 115150553 B CN115150553 B CN 115150553B
Authority
CN
China
Prior art keywords
distance
focusing
control voltage
voltage
electronic equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210745428.3A
Other languages
Chinese (zh)
Other versions
CN115150553A (en
Inventor
于盼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210745428.3A priority Critical patent/CN115150553B/en
Publication of CN115150553A publication Critical patent/CN115150553A/en
Application granted granted Critical
Publication of CN115150553B publication Critical patent/CN115150553B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Lens Barrels (AREA)

Abstract

The embodiment of the application discloses a focusing method, a focusing device, electronic equipment and a storage medium. The method is applied to electronic equipment, the electronic equipment comprises an adjustable lens module, and the method comprises the following steps: acquiring a focusing object; acquiring a focusing distance between the electronic equipment and the focusing object; if the focusing distance between the electronic equipment and the focusing object is changed from a first distance to a second distance, adjusting the control voltage to a preset voltage and then to a target control voltage, wherein the control voltage is a voltage corresponding to the first distance, and the target control voltage is a voltage corresponding to the second distance; and controlling the adjustable lens module to focus based on the target control voltage. By the method, the focusing accuracy can be improved when the focusing distance between the electronic equipment and the focusing object changes by adjusting the control voltage to the preset voltage and then adjusting the preset voltage to the target voltage.

Description

Focusing method, focusing device, electronic equipment and storage medium
Technical Field
The application belongs to the technical field of electronic equipment, and particularly relates to a focusing method, a focusing device, electronic equipment and a storage medium.
Background
With rapid development of information technology, electronic devices (such as mobile phones, tablet computers, etc.) are becoming more and more popular. There are also more and more functions integrated in electronic devices, and in terms of taking pictures, not only high pixels are required, but also focusing requirements are higher and higher. In the related focusing method, focusing inaccuracy is easy to occur when focusing distance is converted.
Disclosure of Invention
In view of the above, the present application proposes a focusing method, apparatus, electronic device, and storage medium to achieve improvement of the above problems.
In a first aspect, an embodiment of the present application provides a focusing method, which is applied to an electronic device, where the electronic device includes an adjustable lens module, and the method includes: acquiring a focusing object; acquiring a focusing distance between the electronic equipment and the focusing object; if the focusing distance between the electronic equipment and the focusing object is changed from a first distance to a second distance, adjusting the control voltage to a preset voltage and then to a target control voltage, wherein the control voltage is a voltage corresponding to the first distance, and the target control voltage is a voltage corresponding to the second distance; and controlling the adjustable lens module to focus based on the target control voltage.
In a second aspect, an embodiment of the present application provides a focusing device, which is operated in an electronic device, where the electronic device includes an adjustable lens module, and the device includes: an object acquisition unit configured to acquire a focused object; a distance acquisition unit, configured to acquire a focusing distance between the electronic device and the focusing object; the voltage adjusting unit is used for adjusting the control voltage to a target control voltage after adjusting the control voltage to a preset voltage if the focusing distance between the electronic equipment and the focusing object is changed from a first distance to a second distance, wherein the control voltage is a voltage corresponding to the first distance, and the target control voltage is a voltage corresponding to the second distance; and the focusing unit is used for controlling the adjustable lens module to focus based on the target control voltage.
In a third aspect, embodiments of the present application provide an electronic device including one or more processors and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having program code stored therein, wherein the above-described method is performed when the program code is run.
The embodiment of the application provides a focusing method, a focusing device, electronic equipment and a storage medium. Firstly, acquiring a focusing object, acquiring a focusing distance between the electronic equipment and the focusing object, if the focusing distance between the electronic equipment and the focusing object is changed from a first distance to a second distance, adjusting a control voltage to a preset voltage, then adjusting the control voltage to a target control voltage, wherein the control voltage is a voltage corresponding to the first distance, the target control voltage is a voltage corresponding to the second distance, and finally controlling the adjustable lens module to focus based on the target control voltage. By the method, the control voltage can be adjusted to the preset voltage, so that the focusing state of the adjustable lens module can be adjusted to the preset focusing state, the preset voltage is adjusted to the target voltage on the basis of the preset focusing state, the focusing state of the adjustable lens module can be always in the preset focusing state, and the focusing accuracy is improved when the focusing distance between the electronic equipment and the focusing object is changed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows an application scenario of a focusing method according to an embodiment of the present application;
fig. 2 shows an application scenario of a focusing method according to an embodiment of the present application;
FIG. 3 is a flowchart of a focusing method according to an embodiment of the present application;
FIG. 4 is a schematic view showing a power change curve of an adjustable lens according to an embodiment of the present application;
FIG. 5 is a schematic diagram showing the power change curve of the tunable lens after voltage adjustment according to an embodiment of the present application;
FIG. 6 is a flowchart of a focusing method according to another embodiment of the present application;
FIG. 7 is a flowchart of a focusing method according to another embodiment of the present application;
FIG. 8 is a flowchart of a focusing method according to still another embodiment of the present application;
Fig. 9 is a block diagram showing a focusing device according to an embodiment of the present application;
fig. 10 is a block diagram showing a focusing device according to an embodiment of the present application;
FIG. 11 shows a block diagram of an electronic device or server for performing a focusing method according to an embodiment of the present application in real time;
fig. 12 shows a storage unit for storing or carrying program codes for implementing the focusing method according to the embodiment of the present application in real time.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
With rapid development of information technology, electronic devices (such as mobile phones, tablet computers, etc.) are becoming more and more popular. There are also more and more functions integrated in electronic devices, and in terms of taking pictures, not only high pixels are required, but also focusing requirements are higher and higher.
However, in the research of the related focusing method, the inventor finds that, due to the characteristics of the piezoelectric thin film material of the adjustable Lens, when the voltage is applied and the voltage is reduced to the same voltage value, the focal power has deviation, so that a hysteresis phenomenon similar to that of a common mover motor is formed, and focusing is inaccurate. Among them, hysteresis (Hysteresis), which refers to the state of a system (mainly a physical system), is not only related to the input of the current system, but also has different results due to the different paths of the past input process. In other words, after a system has been operated through a certain input path, the state cannot be returned to its original state even if the same input value is changed back to the original state.
Accordingly, the inventors have proposed a focusing method, apparatus, electronic device, and storage medium in the present application. Firstly, acquiring a focusing object, acquiring a focusing distance between the electronic equipment and the focusing object, if the focusing distance between the electronic equipment and the focusing object is changed from a first distance to a second distance, adjusting a control voltage to a preset voltage, then adjusting the control voltage to a target control voltage, wherein the control voltage is a voltage corresponding to the first distance, the target control voltage is a voltage corresponding to the second distance, and finally controlling the adjustable lens module to focus based on the target control voltage. By the method, the control voltage can be adjusted to the preset voltage, so that the focusing state of the adjustable lens module can be adjusted to the preset focusing state, the preset voltage is adjusted to the target voltage on the basis of the preset focusing state, the focusing state of the adjustable lens module can be always in the preset focusing state, and the focusing accuracy is improved when the focusing distance between the electronic equipment and the focusing object is changed.
In the embodiment of the application, the provided focusing method can be executed by the electronic equipment. In this manner performed by the electronic device, all steps in the focusing method provided by the embodiments of the present application may be performed by the electronic device. For example, as shown in fig. 1, acquiring a focus object is performed by a processor of the electronic apparatus 100; acquiring a focusing distance between the electronic equipment and the focusing object; if the focusing distance between the electronic equipment and the focusing object is changed from a first distance to a second distance, adjusting the control voltage to a preset voltage and then to a target control voltage, wherein the control voltage is a voltage corresponding to the first distance, and the target control voltage is a voltage corresponding to the second distance; and controlling the adjustable lens module to focus based on the target control voltage.
Furthermore, the focusing method provided in the embodiment of the present application may also be executed by a server (cloud). Correspondingly, in the mode executed by the server, the electronic equipment can acquire the focusing object and synchronously send the focusing object to the server, and then the server acquires the focusing distance between the electronic equipment and the focusing object in real time; if the focusing distance between the electronic equipment and the focusing object is changed from a first distance to a second distance, adjusting the control voltage to a preset voltage and then to a target control voltage, wherein the control voltage is a voltage corresponding to the first distance, and the target control voltage is a voltage corresponding to the second distance; and controlling the adjustable lens module to focus based on the target control voltage.
In addition, the method can be cooperatively executed by the electronic device and the server. In this manner, which is cooperatively performed by the electronic device and the server, some of the steps in the focusing method provided by the embodiments of the present application are performed by the electronic device, and other parts of the steps are performed by the server.
For example, as shown in fig. 2, the electronic device 100 may perform a focusing method including: acquiring a focusing object, then executing acquisition of a focusing distance between the electronic equipment and the focusing object by the server 200, and executing, by the electronic equipment 100, if the focusing distance between the electronic equipment and the focusing object is changed from a first distance to a second distance, adjusting a control voltage to a preset voltage and then to a target control voltage, wherein the control voltage is a voltage corresponding to the first distance, and the target control voltage is a voltage corresponding to the second distance; and controlling the adjustable lens module to focus based on the target control voltage.
In this way, the steps performed by the electronic device and the server are not limited to those described in the above examples, and in practical applications, the steps performed by the electronic device and the server may be dynamically adjusted according to practical situations.
It should be noted that, the electronic device 100 may be, in addition to the smart phone shown in fig. 1 and fig. 2, a device including an adjustable lens module, such as a car device, a wearable device, a tablet computer, a notebook computer, and the like. The server 120 may be a stand-alone physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 3, a focusing method provided in an embodiment of the present application is applied to an electronic device or a server as shown in fig. 1 or fig. 2, and the method includes:
step S110: and acquiring a focusing object.
In an embodiment of the present application, the electronic device includes an adjustable lens module; the adjustable lens module comprises an adjustable lens, and the adjustable lens is made of a piezoelectric film material, such as a piezoelectric ceramic film. The focusing object may be any object within a shooting scene of the electronic device, and the object may be a table, a computer, a book, an animal, or may be a specific face image. The focusing objects corresponding to different shooting scenes can be different, for example, in an automobile shooting scene, the focusing objects can be automobiles; in a scene taking scene, the in-focus object may be a flower, grass, tree, etc.
As one method, the electronic device may store images of a plurality of objects in advance, and after detecting an operation of opening the camera, the electronic device may scan the objects in the shooting scene, recognize whether or not there is an image of the object stored in advance, and if there is an image of the object stored in advance, use the object as a focusing target.
As another way, the electronic device may also acquire the in-focus object in real time. When the camera of the electronic equipment is detected to be opened, any object in a shooting scene corresponding to the camera can be used as a focusing object. Alternatively, the in-focus object may include a static object or a dynamic object. If the focusing object is a dynamic object, the object which enters the shooting scene first can be taken as the focusing object according to the shooting scene. For example, if in a portrait shooting scene, a person who first enters the shooting scene may be taken as an object of focusing.
Alternatively, when there are a plurality of objects in the shooting scene, an object corresponding to the touch operation of the user may be used as the focusing object. Specifically, the screen of the electronic device is a touch screen, after the camera is opened, all objects in a shooting scene can be displayed in the touch screen of the electronic device, when a user determines that focusing is required to be performed on a certain object, the object can be determined through touch operation, when the electronic device detects the touch operation of the user, the object in the touch area of the user is identified, and the object identified by the touch area is used as a focusing object. The touch operation of the user may be a click operation or a short sliding operation. Alternatively, the clicking operation may be a single-click operation or a double-click operation, which is not particularly limited herein.
Step S120: and acquiring the focusing distance between the electronic equipment and the focusing object.
In the embodiment of the present application, the focusing distance refers to the distance between object images, and is the sum of the distance from the lens to the object and the distance from the lens to the photosensitive element.
As one way, a distance sensor is provided in the electronic device, and the electronic device can determine a focusing distance between the focusing object and the electronic device through the distance sensor. For example, the distance between each point in the focusing area where the focusing object is located and the electronic device may be determined according to the distance sensor, and an average distance value of the distances between all points in the focusing area and the electronic device may be taken as the focusing distance. For example, a face image of a person may be set as a focusing target, and when the person enters a shooting scene, the person may be set as a focusing target, and a region of the face image may be set as a focusing region.
The distance sensor may be an optical distance sensor, an infrared distance sensor, an ultrasonic distance sensor, or the like. The infrared distance sensor is commonly used in electronic devices, and the infrared sensor is provided with an infrared transmitting tube and an infrared receiving tube, when infrared rays emitted by the infrared transmitting tube are received by the infrared receiving tube, the focusing distance between the electronic device and a focusing object can be determined based on the time of the emitted infrared rays and the received time and the emission speed of the infrared rays. The working principle of other types of distance sensors is different, and the focusing distance between the electronic equipment and the focusing object is judged through the emission and the acceptance of a certain substance, wherein the emitted substance can be ultrasonic waves, light pulses and the like.
Step S130: if the focusing distance between the electronic equipment and the focusing object is changed from the first distance to the second distance, adjusting the control voltage to a preset voltage and then to a target control voltage, wherein the control voltage is a voltage corresponding to the first distance, and the target control voltage is a voltage corresponding to the second distance.
The larger the focusing distance between the electronic equipment and the focusing object is, the smaller the determined control voltage is used for controlling the adjustable lens module.
In the embodiment of the application, the preset voltage is preset voltage for avoiding the problem of imaging blurring caused by inaccurate focusing due to hysteresis. The preset voltage can be determined based on the focal power change curve of the adjustable lens voltage and the focal power change curve of the adjustable lens voltage, and the focal power change curve of the adjustable lens voltage are overlapped by adjusting the control voltage to the preset voltage, so that only the focal power change curve of the adjustable lens voltage or only the focal power change curve of the adjustable lens voltage is used. As shown in fig. 4, fig. 4 is a schematic diagram of a power change curve of an adjustable lens, a forward MFT in fig. 4 represents a power change curve of an adjustable lens with a voltage applied, and a reverse MFT represents a power change curve of an adjustable lens with a voltage applied, and as can be seen from fig. 4, the power change curve of the adjustable lens with the voltage applied and the power change curve of the adjustable lens with the voltage applied do not coincide, so that when the adjustable lens with the voltage applied to the same voltage value, the corresponding powers may be different, and a hysteresis phenomenon may occur.
As one aspect, if the distance sensor detects that the focusing distance between the electronic device and the focusing object is changed from the first distance to the second distance, the corresponding control voltage is adjusted from the control voltage corresponding to the first distance to the control voltage corresponding to the second distance.
In order to solve the problem of imaging blurring caused by inaccurate focusing in the focusing process, the control voltage corresponding to the first distance can be adjusted to a preset voltage, and then the preset voltage is adjusted to the control voltage corresponding to the second distance. As shown in fig. 5, fig. 5 is a schematic diagram of an optical power change curve of an adjustable lens after voltage adjustment, and as can be seen from fig. 5, when a focusing distance between an electronic device and a focusing object changes, after adjusting a control voltage corresponding to the focusing distance before the focusing distance changes to a preset voltage, the control voltage is adjusted to a control voltage corresponding to the focusing distance after the focusing distance changes, so that the optical power change curve of the adjustable lens with voltage and the optical power change curve of the adjustable lens with voltage reduction overlap, and hysteresis phenomenon is eliminated.
Optionally, in the embodiment of the present application, a correspondence between the focusing distance and the control voltage may be stored in the electronic device or the server in advance, where different focusing distances correspond to different control voltages. The control voltage corresponding to each focusing distance can be determined through a plurality of experiments.
After the focusing distance between the electronic device and the focusing object is obtained through the distance sensor, the control voltage corresponding to the current focusing distance can be determined through the corresponding relation between the focusing distance and the control voltage stored in the electronic device or the server in advance, and then the control voltage can be adjusted to the control voltage corresponding to the current focusing distance.
Optionally, the electronic device or the server may also store the corresponding relationship among the focusing distance, the control voltage, and the preset voltage in advance. Wherein, every two focusing distances can correspond to two preset voltages, and the preset voltages corresponding to different two focusing distances can be different. Optionally, each two focusing distances may include a first focusing distance and a second focusing distance, each two focusing distances may correspond to two preset voltages and may include a first preset voltage and a second preset voltage, where the first preset voltage is a preset voltage corresponding to the first focusing distance to the second focusing distance, and the second preset voltage is a preset voltage corresponding to the second focusing distance to the first focusing distance.
When the focusing distance between the electronic equipment and the focusing object is determined to be changed (including the conversion from the first distance to the second distance and the conversion from the second distance to the first distance), the corresponding preset voltage is determined according to the corresponding relation among the focusing distance, the control voltage and the preset voltage, and then the control voltage before the conversion of the focusing distance can be adjusted to the preset voltage and then adjusted to the corresponding control voltage after the conversion of the focusing distance.
Step S140: and controlling the adjustable lens module to focus based on the target control voltage.
In this embodiment of the present application, a driving chip in a peripheral packaging circuit of an adjustable lens module may be used to supply the adjustable lens module with the control voltage of the above size, so that the piezoelectric ceramic film may deform to drive the polymer to deform, so as to change the radius of curvature and focal power of the lens of the adjustable lens and the effective focal length of the whole adjustable lens module, thereby enabling the adjustable lens module to complete focusing at different focusing distances. Therefore, the adjustable lens module can realize focusing, and a motor is not needed in the focusing process, so that magnetic interference cannot be generated.
According to the focusing method, firstly, a focusing object is obtained, the focusing distance between the electronic equipment and the focusing object is obtained, if the focusing distance between the electronic equipment and the focusing object is changed from a first distance to a second distance, the control voltage is adjusted to a preset voltage and then to a target control voltage, wherein the control voltage is a voltage corresponding to the first distance, the target control voltage is a voltage corresponding to the second distance, and finally, the adjustable lens module is controlled to focus based on the target control voltage. By the method, the control voltage can be adjusted to the preset voltage, so that the focusing state of the adjustable lens module can be adjusted to the preset focusing state, the preset voltage is adjusted to the target voltage on the basis of the preset focusing state, the focusing state of the adjustable lens module can be always in the preset focusing state, and the focusing accuracy is improved when the focusing distance between the electronic equipment and the focusing object is changed.
Referring to fig. 6, a focusing method provided in an embodiment of the present application is applied to an electronic device or a server as shown in fig. 1 or fig. 2, and the method includes:
step S210: and acquiring a focusing object.
Step S220: and acquiring the focusing distance between the electronic equipment and the focusing object.
Step S230: and if the focusing distance between the electronic equipment and the focusing object is a first distance, determining a first control voltage for controlling the adjustable lens module based on the first distance.
In the embodiment of the application, the first distance is a focusing distance between the electronic device and the focusing object, which is determined by the distance sensor.
After determining that the focusing distance between the electronic device and the focusing object is the first distance, the control voltage corresponding to the first distance may be determined through a correspondence relationship between the focusing distance and the control voltage.
Step S240: and if the focusing distance between the electronic equipment and the focusing object is a second distance, determining a second control voltage for controlling the adjustable lens module based on the second distance.
In the embodiment of the application, the second distance is a focusing distance between the electronic device and the focusing object, which is determined by the distance sensor.
After determining that the focusing distance between the electronic device and the focusing object is the second distance, the control voltage corresponding to the second distance may be determined by a correspondence relationship between the focusing distance and the control voltage.
Step S250: and if the focusing distance between the electronic equipment and the focusing object is changed from the first distance to the second distance, adjusting the first control voltage to the preset voltage and then adjusting the first control voltage to the second control voltage.
In the embodiment of the application, when the focusing distance between the electronic device and the focusing object is detected to be changed from the first distance to the second distance, whether the first control voltage is subjected to voltage reduction operation or voltage addition operation can be determined by comparing the magnitudes of the first distance and the second distance, so that the control voltage is converted to the second control voltage. If the first distance is greater than the second distance, the voltage reduction operation is carried out on the first control voltage, so that the control voltage is converted into the second control voltage; if the first distance is smaller than the second distance, the first control voltage is determined to be subjected to voltage-adding operation, so that the control voltage is converted to the second control voltage.
Step S260: and controlling the adjustable lens module to focus based on the second control voltage.
In this embodiment of the present application, after the control voltage is adjusted to the second control voltage, the adjustable lens module is controlled to focus by the second control voltage.
The focusing method comprises the steps of firstly obtaining a focusing object, obtaining a focusing distance between electronic equipment and the focusing object, then determining a first control voltage for controlling an adjustable lens module based on the first distance if the focusing distance between the electronic equipment and the focusing object is a first distance, and determining a second control voltage for controlling the adjustable lens module based on the second distance if the focusing distance between the electronic equipment and the focusing object is a second distance; if the focusing distance between the electronic equipment and the focusing object is changed from the first distance to the second distance, the first control voltage is adjusted to the preset voltage and then to the second control voltage, and finally the adjustable lens module is controlled to focus based on the second control voltage. By the method, the control voltage can be adjusted to the preset voltage, so that the focusing state of the adjustable lens module can be adjusted to the preset focusing state, the preset voltage is adjusted to the target voltage on the basis of the preset focusing state, the focusing state of the adjustable lens module can be always in the preset focusing state, and the focusing accuracy is improved when the focusing distance between the electronic equipment and the focusing object is changed.
Referring to fig. 7, a focusing method provided in an embodiment of the present application is applied to an electronic device or a server as shown in fig. 1 or fig. 2, and the method includes:
step S310: and acquiring a focusing object.
Step S320: and acquiring the focusing distance between the electronic equipment and the focusing object.
Step S330: and if the focusing distance between the electronic equipment and the focusing object is a first distance, determining a first control voltage for controlling the adjustable lens module based on the first distance.
Step S340: and if the focusing distance between the electronic equipment and the focusing object is a second distance, determining a second control voltage for controlling the adjustable lens module based on the second distance.
Step S350: if the first distance is smaller than the second distance, if the focusing distance between the electronic equipment and the focusing object is changed from the first distance to the second distance, the first control voltage is reduced to zero and then increased to the second control voltage.
In this embodiment of the present application, since the first distance is smaller than the second distance, the first control voltage corresponding to the first distance is greater than the second control voltage corresponding to the second distance. If the distance sensor is used for determining that the focusing distance between the electronic equipment and the focusing object is changed from the first distance to the second distance, the near focusing is determined to be switched to the far focusing, and at the moment, the first control voltage needs to be subjected to voltage reduction operation and is changed to the second control voltage, so that the adjustable lens module is controlled to focus through the second control voltage.
Optionally, when the voltage reduction operation is performed on the first control voltage, the first control voltage corresponding to the first distance may be reduced to 0V, and then the control voltage is increased to the second control voltage corresponding to the second distance, so that the voltage reduction operation may be avoided, and hysteresis phenomenon may be avoided. For example, if the first distance is 10cm, the corresponding first control voltage is 4V; the second distance is 5m, the corresponding second control voltage is 2V, when the focusing distance between the electronic equipment and the focusing object is detected to be converted from 10cm to 5m, the first control voltage needs to be reduced to 2V, and at the moment, the first control voltage can be reduced to 0V and then increased to 2V.
Step S360: and controlling the adjustable lens module to focus based on the second control voltage.
The focusing method comprises the steps of firstly obtaining a focusing object, obtaining a focusing distance between electronic equipment and the focusing object, then determining a first control voltage for controlling an adjustable lens module based on the first distance if the focusing distance between the electronic equipment and the focusing object is a first distance, and determining a second control voltage for controlling the adjustable lens module based on the second distance if the focusing distance between the electronic equipment and the focusing object is a second distance; if the first distance is smaller than the second distance, and the focusing distance between the electronic equipment and the focusing object is changed from the first distance to the second distance, the first control voltage is reduced to zero and then increased to the second control voltage, and finally the adjustable lens module is controlled to focus based on the second control voltage. By the method, the focusing state of the adjustable lens module can be adjusted to the preset focusing state by adjusting the control voltage to 0, so that the focusing state of the adjustable lens module can be always in the preset focusing state by adjusting the control voltage from 0 to the target voltage on the basis of the preset focusing state, and the focusing accuracy is improved when the focusing distance between the electronic equipment and the focusing object is changed.
Referring to fig. 8, a focusing method provided in an embodiment of the present application is applied to an electronic device or a server as shown in fig. 1 or fig. 2, and the method includes:
step S410: and acquiring a focusing object.
Step S420: and acquiring the focusing distance between the electronic equipment and the focusing object.
Step S430: and if the focusing distance between the electronic equipment and the focusing object is a first distance, determining a first control voltage for controlling the adjustable lens module based on the first distance.
Step S440: and if the focusing distance between the electronic equipment and the focusing object is a second distance, determining a second control voltage for controlling the adjustable lens module based on the second distance.
Step S450: if the first distance is greater than the second distance, if the focusing distance between the electronic equipment and the focusing object is changed from the first distance to the second distance, the first control voltage is increased to the preset voltage and then increased to the second control voltage.
In this embodiment of the present application, since the first distance is greater than the second distance, the first control voltage corresponding to the first distance is smaller than the second control voltage corresponding to the second distance. If the distance sensor is used for determining that the focusing distance between the electronic equipment and the focusing object is changed from the first distance to the second distance, the distance sensor is used for determining that the focusing distance is changed from the far-view focusing to the near-view focusing, and at the moment, the first control voltage is required to be subjected to voltage-adding operation and is changed to the second control voltage, so that the adjustable lens module is controlled to focus through the second control voltage.
Alternatively, when the first control voltage is subjected to the voltage increasing operation, the first control voltage corresponding to the first distance may be increased to the preset voltage, and then the control voltage may be increased to the second control voltage corresponding to the second distance.
Step S460: and controlling the adjustable lens module to focus based on the second control voltage.
The focusing method comprises the steps of firstly obtaining a focusing object, obtaining a focusing distance between electronic equipment and the focusing object, then determining a first control voltage for controlling an adjustable lens module based on the first distance if the focusing distance between the electronic equipment and the focusing object is a first distance, and determining a second control voltage for controlling the adjustable lens module based on the second distance if the focusing distance between the electronic equipment and the focusing object is a second distance; if the first distance is greater than the second distance, and the focusing distance between the electronic device and the focusing object is changed from the first distance to the second distance, the first control voltage is increased to the preset voltage, then the preset voltage is increased to the second control voltage, and finally the adjustable lens module is controlled to focus based on the second control voltage. By the method, the control voltage can be adjusted to the preset voltage, so that the focusing state of the adjustable lens module can be adjusted to the preset focusing state, the preset voltage is adjusted to the target voltage on the basis of the preset focusing state, the focusing state of the adjustable lens module can be always in the preset focusing state, and the focusing accuracy is improved when the focusing distance between the electronic equipment and the focusing object is changed.
Referring to fig. 9, a focusing device 500 provided in an embodiment of the present application is operated in an electronic device, where the electronic device includes an adjustable lens module, and the device 500 includes:
an object acquisition unit 510 for acquiring a focused object.
A distance acquiring unit 520, configured to acquire a focusing distance between the electronic device and the focusing object.
And the voltage adjusting unit 530 is configured to adjust the control voltage to a target control voltage after the focusing distance between the electronic device and the focusing object is changed from the first distance to the second distance, where the control voltage is a voltage corresponding to the first distance, and the target control voltage is a voltage corresponding to the second distance.
As one way, the voltage adjusting unit 530 may be specifically configured to adjust the first control voltage to the preset voltage and then adjust the first control voltage to the second control voltage if the focusing distance between the electronic device and the focusing object is changed from the first distance to the second distance.
Optionally, the voltage adjusting unit 530 may be specifically configured to increase the first control voltage to the second control voltage after reducing the first control voltage to zero if the first distance is smaller than the second distance, and if the focusing distance between the electronic device and the focusing object is changed from the first distance to the second distance.
Optionally, the voltage adjusting unit 530 may be specifically configured to increase the first control voltage to the preset voltage and then increase the first control voltage to the second control voltage if the first distance is greater than the second distance, and if the focusing distance between the electronic device and the focusing object is changed from the first distance to the second distance.
And a focusing unit 540 for controlling the adjustable lens module to focus based on the target control voltage.
Referring to fig. 10, the apparatus 500 may further include:
a voltage determining unit 550, configured to determine a first control voltage for controlling the adjustable lens module based on a first distance if a focusing distance between the electronic device and the focusing object is the first distance; and if the focusing distance between the electronic equipment and the focusing object is a second distance, determining a second control voltage for controlling the adjustable lens module based on the second distance.
It should be noted that, in the present application, the device embodiment and the foregoing method embodiment correspond to each other, and specific principles in the device embodiment may refer to the content in the foregoing method embodiment, which is not described herein again.
An electronic device or server provided in the present application will be described with reference to fig. 11.
Referring to fig. 11, based on the above focusing method and apparatus, another electronic device or server 800 capable of executing the above focusing method is further provided in the embodiments of the present application. The electronic device or server 800 includes one or more (only one shown) processors 802, memory 804, a network module 806, and a tunable lens module 808 coupled to one another. The memory 804 stores therein a program capable of executing the contents of the foregoing embodiments, and the processor 802 can execute the program stored in the memory 804.
Wherein the processor 802 may include one or more processing cores. The processor 802 utilizes various interfaces and lines to connect various portions of the overall electronic device or server 800, perform various functions of the electronic device or server 800, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 804, and invoking data stored in the memory 804. Alternatively, the processor 802 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 802 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 802 and may be implemented solely by a single communication chip.
The Memory 804 may include random access Memory (Random Access Memory, RAM) or Read-Only Memory (rom). Memory 804 may be used to store instructions, programs, code, sets of codes, or instruction sets. The memory 804 may include a stored program area that may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described below, etc., and a stored data area. The storage data area may also store data created by the electronic device or server 800 in use (e.g., phonebook, audiovisual data, chat log data), and the like.
The network module 806 is configured to receive and transmit electromagnetic waves, and to implement mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices, such as an audio playback device. The network module 806 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and the like. The network module 806 may communicate with various networks such as the internet, intranets, wireless networks, or with other devices via wireless networks. The wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network. For example, the network module 806 may interact with base stations.
The adjustable Lens module 808 may include an adjustable Lens (TLens) module, a PCB (Printed Circuit Board) board, an imaging sensor, and a Lens carrier. Wherein, adhere to and be provided with imaging sensor on the PCB board, imaging sensor top is provided with adjustable lens module, adjustable lens module is used for focusing based on control voltage, and adjustable lens module top is provided with the lens carrier of fixed lens, is provided with the camera lens above the lens carrier.
Referring to fig. 12, a block diagram of a computer readable storage medium according to an embodiment of the present application is shown. The computer readable storage medium 900 has stored therein program code that can be invoked by a processor to perform the methods described in the method embodiments described above.
The computer readable storage medium 900 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, computer readable storage medium 900 includes non-volatile computer readable media (non-transitory computer-readable storage medium). The computer readable storage medium 900 has storage space for program code 910 that performs any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 910 may be compressed, for example, in a suitable form.
According to the focusing method, the focusing device, the electronic equipment and the storage medium, firstly, a focusing object is obtained, the focusing distance between the electronic equipment and the focusing object is obtained, if the focusing distance between the electronic equipment and the focusing object is changed from a first distance to a second distance, the control voltage is adjusted to a preset voltage and then is adjusted to a target control voltage, wherein the control voltage is a voltage corresponding to the first distance, the target control voltage is a voltage corresponding to the second distance, and finally, the adjustable lens module is controlled to focus based on the target control voltage. By the method, the control voltage can be adjusted to the preset voltage, so that the focusing state of the adjustable lens module can be adjusted to the preset focusing state, the preset voltage is adjusted to the target voltage on the basis of the preset focusing state, the focusing state of the adjustable lens module can be always in the preset focusing state, and the focusing accuracy is improved when the focusing distance between the electronic equipment and the focusing object is changed.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (9)

1. A focusing method, characterized in that it is applied to an electronic device, the electronic device including an adjustable lens module, the method comprising:
acquiring a focusing object;
acquiring a focusing distance between the electronic equipment and the focusing object;
if the focusing distance between the electronic equipment and the focusing object is changed from a first distance to a second distance, adjusting the control voltage to a preset voltage and then to a target control voltage, wherein the control voltage is a voltage corresponding to the first distance, and the target control voltage is a voltage corresponding to the second distance;
if the focusing distance between the electronic device and the focusing object is changed from the first distance to the second distance, adjusting the control voltage to a preset voltage and then to a target control voltage, including:
if the first distance is smaller than the second distance, if the focusing distance between the electronic equipment and the focusing object is changed from the first distance to the second distance, the control voltage is reduced to zero and then increased to the target control voltage;
and controlling the adjustable lens module to focus based on the target control voltage.
2. The method of claim 1, wherein if the focusing distance between the electronic device and the focusing object is changed from the first distance to the second distance, adjusting the control voltage to the preset voltage, and then adjusting to the target control voltage, further comprises:
if the focusing distance between the electronic equipment and the focusing object is a first distance, determining a first control voltage for controlling the adjustable lens module based on the first distance;
and if the focusing distance between the electronic equipment and the focusing object is a second distance, determining a second control voltage for controlling the adjustable lens module based on the second distance.
3. The method of claim 2, wherein if the focusing distance between the electronic device and the focusing object is changed from the first distance to the second distance, adjusting the control voltage to the preset voltage and then adjusting to the target control voltage comprises:
and if the focusing distance between the electronic equipment and the focusing object is changed from the first distance to the second distance, adjusting the first control voltage to the preset voltage and then adjusting the first control voltage to the second control voltage.
4. The method of claim 3, wherein if the focusing distance between the electronic device and the focusing object is changed from the first distance to the second distance, adjusting the first control voltage to a preset voltage and then adjusting to the second control voltage comprises:
if the first distance is greater than the second distance, if the focusing distance between the electronic equipment and the focusing object is changed from the first distance to the second distance, the first control voltage is increased to the preset voltage and then increased to the second control voltage.
5. The method of any of claims 1-4, wherein the greater the focus distance between the electronic device and the object in focus, the less a control voltage is determined for controlling the adjustable lens module.
6. The method of any of claims 1-4, wherein the tunable lens module includes a tunable lens, the tunable lens being a piezoelectric thin film material.
7. A focusing device for use with an electronic device, the electronic device including an adjustable lens module, the device comprising:
An object acquisition unit configured to acquire a focused object;
a distance acquisition unit, configured to acquire a focusing distance between the electronic device and the focusing object;
the voltage adjusting unit is used for adjusting the control voltage to a target control voltage after adjusting the control voltage to a preset voltage if the focusing distance between the electronic equipment and the focusing object is changed from a first distance to a second distance, wherein the control voltage is a voltage corresponding to the first distance, and the target control voltage is a voltage corresponding to the second distance; if the focusing distance between the electronic device and the focusing object is changed from the first distance to the second distance, adjusting the control voltage to a preset voltage and then to a target control voltage, including: if the first distance is smaller than the second distance, if the focusing distance between the electronic equipment and the focusing object is changed from the first distance to the second distance, the control voltage is reduced to zero and then increased to the target control voltage;
and the focusing unit is used for controlling the adjustable lens module to focus based on the target control voltage.
8. An electronic device is characterized by comprising an adjustable lens module and one or more processors; one or more programs are stored in the memory and configured to perform the method of any of claims 1-6 by the one or more processors.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a program code, wherein the program code, when being executed by a processor, performs the method of any of claims 1-6.
CN202210745428.3A 2022-06-27 2022-06-27 Focusing method, focusing device, electronic equipment and storage medium Active CN115150553B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210745428.3A CN115150553B (en) 2022-06-27 2022-06-27 Focusing method, focusing device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210745428.3A CN115150553B (en) 2022-06-27 2022-06-27 Focusing method, focusing device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115150553A CN115150553A (en) 2022-10-04
CN115150553B true CN115150553B (en) 2024-02-20

Family

ID=83411052

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210745428.3A Active CN115150553B (en) 2022-06-27 2022-06-27 Focusing method, focusing device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115150553B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04196685A (en) * 1990-11-26 1992-07-16 Hitachi Ltd Display device for video camera
JP2006126329A (en) * 2004-10-27 2006-05-18 Canon Inc Lens-driving device, and camera having the driving device, lens and camera system
CN104796616A (en) * 2015-04-27 2015-07-22 惠州Tcl移动通信有限公司 Focusing method and focusing system based on distance sensor of mobile terminal
CN113452888A (en) * 2021-07-06 2021-09-28 Oppo广东移动通信有限公司 Image capturing device, electronic equipment and focusing method
CN113960704A (en) * 2021-11-02 2022-01-21 深圳技术大学 Automatic focusing method, system and device of liquid lens and storage medium
CN114554085A (en) * 2022-02-08 2022-05-27 维沃移动通信有限公司 Focusing method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007187983A (en) * 2006-01-16 2007-07-26 Sony Corp Imaging device and lens position adjustment method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04196685A (en) * 1990-11-26 1992-07-16 Hitachi Ltd Display device for video camera
JP2006126329A (en) * 2004-10-27 2006-05-18 Canon Inc Lens-driving device, and camera having the driving device, lens and camera system
CN104796616A (en) * 2015-04-27 2015-07-22 惠州Tcl移动通信有限公司 Focusing method and focusing system based on distance sensor of mobile terminal
CN113452888A (en) * 2021-07-06 2021-09-28 Oppo广东移动通信有限公司 Image capturing device, electronic equipment and focusing method
CN113960704A (en) * 2021-11-02 2022-01-21 深圳技术大学 Automatic focusing method, system and device of liquid lens and storage medium
CN114554085A (en) * 2022-02-08 2022-05-27 维沃移动通信有限公司 Focusing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115150553A (en) 2022-10-04

Similar Documents

Publication Publication Date Title
CN109547701B (en) Image shooting method and device, storage medium and electronic equipment
KR101784639B1 (en) Method, apparatus and computer program product for object detection and segmentation
US11336826B2 (en) Method and apparatus having a function of constant automatic focusing when exposure changes
CN110969056B (en) Document layout analysis method, device and storage medium for document image
CN106599758A (en) Image quality processing method and terminal
US20200128181A1 (en) Electronic device and method for obtaining images
CN113065591B (en) Target detection method and device, electronic equipment and storage medium
CN110463177A (en) The bearing calibration of file and picture and device
KR102524982B1 (en) Apparatus and method for applying noise pattern to image processed bokeh
CN112291473B (en) Focusing method and device and electronic equipment
CN109068063B (en) Three-dimensional image data processing and displaying method and device and mobile terminal
CN114390201A (en) Focusing method and device thereof
CN110213456B (en) Scanned document correction method, electronic device, and computer-readable storage medium
CN110072057B (en) Image processing method and related product
CN105678296A (en) Method and apparatus for determining angle of inclination of characters
CN107992894B (en) Image recognition method, image recognition device and computer-readable storage medium
CN111311588B (en) Repositioning method and device, electronic equipment and storage medium
CN115150553B (en) Focusing method, focusing device, electronic equipment and storage medium
CN112543284A (en) Focusing system, method and device
CN115484383B (en) Shooting method and related device
US20220268935A1 (en) Electronic device comprising camera and method thereof
KR20220151932A (en) Electronic device and operation method thereof
KR20230033994A (en) Electronic device including a plurality of cameras and operating method thereof
CN113132643B (en) Image processing method and related product
CN113364966B (en) Shooting method, shooting device and storage medium for team shooting

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant