CN113079310B - Automatic focusing method, automatic focusing device, electronic equipment and computer readable storage medium - Google Patents

Automatic focusing method, automatic focusing device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN113079310B
CN113079310B CN202010006947.9A CN202010006947A CN113079310B CN 113079310 B CN113079310 B CN 113079310B CN 202010006947 A CN202010006947 A CN 202010006947A CN 113079310 B CN113079310 B CN 113079310B
Authority
CN
China
Prior art keywords
module
driving
image acquisition
acquisition module
preset
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
CN202010006947.9A
Other languages
Chinese (zh)
Other versions
CN113079310A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202010006947.9A priority Critical patent/CN113079310B/en
Publication of CN113079310A publication Critical patent/CN113079310A/en
Application granted granted Critical
Publication of CN113079310B publication Critical patent/CN113079310B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals

Abstract

The present disclosure relates to an auto-focusing method, including: controlling a first driving module to drive a first image acquisition module to automatically focus a target object in a preset mode; acquiring a first driving quantity of a first driving module to a first image acquisition module; inquiring a second driving quantity related to the first driving quantity according to a preset incidence relation; and controlling the second driving module to drive the second image acquisition module to automatically focus the target object by a second driving quantity. According to the embodiment of the disclosure, compared with the automatic focusing methods such as contrast focusing, phase focusing, double-shot focusing and the like in the related art, the automatic focusing method can accurately perform automatic focusing under the condition of dark ambient light, and compared with the automatic focusing method of laser focusing in the related art, the automatic focusing method can be applied to accurately perform automatic focusing on more kinds of objects.

Description

Automatic focusing method, automatic focusing device, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of image acquisition technologies, and in particular, to an auto-focusing method, an auto-focusing apparatus, an electronic device, and a computer-readable storage medium.
Background
In the related art, in order to simplify the shooting operation of a user on an object, a terminal with an image acquisition function provides an automatic focusing (also called as an auxiliary focusing) function, and can automatically complete the adjustment of the focal length of an image acquisition module when the user shoots the object, so that the user does not need to manually adjust the focal length.
The automatic focusing mainly comprises modes of double-shot focusing, phase focusing, contrast focusing, laser focusing and the like. In the several modes, laser focusing requires that a shot object has higher reflectivity to laser, and when no image is shot and the reflectivity to laser is lower, the automatic focusing effect is poor; the double-shot focusing, the phase focusing and the contrast focusing require bright ambient light to scan clear object patterns, so that accurate automatic focusing can be performed, and under the condition of dark ambient light, the scanned object patterns are not clear enough, so that the automatic focusing effect is poor.
Disclosure of Invention
The present disclosure provides an auto-focusing method, an auto-focusing apparatus, an electronic device, and a computer-readable storage medium to solve the disadvantages of the related art.
According to a first aspect of the embodiments of the present disclosure, an auto-focusing method is provided, which is applicable to a terminal, where the terminal includes a first image acquisition module and a second image acquisition module, where the first image acquisition module is configured to acquire an infrared image, and the second image acquisition module is configured to acquire a visible light image, and the method includes:
controlling a first driving module to drive a first image acquisition module to automatically focus a target object in a preset mode;
acquiring a first driving quantity of the first driving module to the first image acquisition module;
inquiring a second driving quantity associated with the first driving quantity according to a preset association relation, wherein the preset association relation is used for representing the relation between the first driving quantity of the first driving module and the second driving quantity of the second driving module when the first driving module and the second driving module focus on objects with the same distance to the terminal;
and controlling the second driving module to drive the second image acquisition module to automatically focus the target object by the second driving quantity.
Optionally, before the first driving module is controlled to drive the first image capturing module to automatically focus on the target object in a preset manner, the method further includes:
controlling the first driving module to drive the first image acquisition module to automatically focus the n objects respectively, and controlling the second driving module to drive the second image acquisition module to automatically focus the n objects respectively;
recording the ith infrared sample driving quantity of the first driving module for driving the first image acquisition module to automatically focus the ith object in the n objects, and recording the ith visible light sample driving quantity of the second driving module for driving the second image acquisition module to automatically focus the ith object in the n objects;
establishing an ith sample incidence relation between the ith infrared sample driving quantity and the ith visible light sample driving quantity, and determining the preset incidence relation according to the 1 st sample incidence relation to the nth sample incidence relation;
and i is more than or equal to 1 and less than or equal to n, and the distance from each object in the n objects to the terminal is different.
Optionally, before the first driving module is controlled to drive the first image capturing module to automatically focus on the target object in a preset manner, the method further includes:
judging whether the ambient light brightness of the terminal is lower than a preset brightness;
under the condition that the ambient light brightness of the terminal is lower than preset brightness, the first driving module is controlled to drive the first image acquisition module to automatically focus the target object in the preset mode;
and under the condition that the ambient light brightness of the terminal is not lower than the preset brightness, controlling the second driving module to drive the second image acquisition module to automatically focus the target object in the preset mode.
Optionally, a distance between the first image acquisition module and the second image acquisition module is smaller than a preset distance.
Optionally, the preset manner includes at least one of the following:
contrast focusing, phase focusing.
According to a second aspect of the embodiments of the present disclosure, an automatic focusing apparatus is provided, which is suitable for a terminal, where the terminal includes a first image capturing module and a second image capturing module, where the first image capturing module is configured to capture an infrared image, and the second image capturing module is configured to capture a visible light image, the apparatus includes:
the focusing module is configured to control the first driving module to drive the first image acquisition module to automatically focus on a target object in a preset mode;
an acquisition module configured to acquire a first driving amount of the first image acquisition module by the first driving module;
the query module is configured to query a second driving quantity associated with the first driving quantity according to a preset association relation, wherein the preset association relation is used for representing a relation between the first driving quantity of the first driving module and the second driving quantity of the second driving module when the first driving module and the second driving module focus on objects with the same distance to the terminal;
the focusing module is further configured to control the second driving module to drive the second image acquisition module to automatically focus on the target object by the second driving amount.
Optionally, the focusing module is further configured to control the first driving module to drive the first image capturing module to perform auto-focusing on n objects, respectively, and control the second driving module to drive the second image capturing module to perform auto-focusing on the n objects, respectively;
the device further comprises:
the recording module is configured to record the ith infrared sample driving quantity of the first driving module for driving the first image acquisition module to automatically focus the ith object in the n objects, and record the ith visible light sample driving quantity of the second driving module for driving the second image acquisition module to automatically focus the ith object in the n objects;
the relation establishing module is configured to establish an ith sample incidence relation between the ith infrared sample driving quantity and the ith visible light sample driving quantity, and determine the preset incidence relation according to the 1 st sample incidence relation to the nth sample incidence relation;
and i is more than or equal to 1 and less than or equal to n, and the distance from each object in the n objects to the terminal is different.
Optionally, the apparatus further comprises:
the judging module is configured to judge whether the ambient light brightness of the terminal is lower than a preset brightness;
the focusing module is further configured to control the first driving module to drive the first image acquisition module to automatically focus the target object in the preset mode under the condition that the ambient light brightness of the terminal is lower than preset brightness; and under the condition that the ambient light brightness of the terminal is not lower than the preset brightness, controlling the second driving module to drive the second image acquisition module to automatically focus the target object in the preset mode.
Optionally, a distance between the first image capturing module and the second image capturing module is smaller than a preset distance.
Optionally, the preset manner includes at least one of the following:
contrast focusing and phase focusing.
According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, including: a processor, wherein the processor is configured to implement the method of any of the above embodiments.
According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps in the method according to any one of the embodiments.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the embodiment of the present disclosure, since the infrared ray radiated from the object is hardly affected by the brightness of the ambient light, even in the case of dark ambient light, the clear infrared image can be scanned, and then the auto-focusing can be accurately performed according to the scanned infrared image, so that the first driving amount can be accurately determined, and thus the inquired second driving amount associated with the first driving amount is also accurate. And then drive the second image acquisition module according to the second driving quantity and finish the automatic focusing, do not need the second image acquisition module to carry out the automatic focusing according to the image that scans, just can not receive the ambient light brightness influence yet to can realize accurate auto focusing.
In the embodiment, the first driving quantity is determined, the second driving quantity associated with the first driving quantity is inquired, and the second driving module is driven to carry out automatic focusing according to the second driving quantity, which is not influenced by the ambient light brightness and the reflectivity of the object, so that compared with automatic focusing modes such as contrast focusing, phase focusing, double-shot focusing and the like in the related technology, the automatic focusing method can accurately carry out automatic focusing under the condition of dark ambient light, and compared with the automatic focusing mode of laser focusing in the related technology, the automatic focusing method can be suitable for carrying out accurate automatic focusing on more various objects.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic flow chart diagram illustrating an auto-focusing method according to an embodiment of the present disclosure.
Fig. 2A is a schematic diagram illustrating a partial structure of a terminal according to an embodiment of the present disclosure.
Fig. 2B is a side view of the terminal shown in fig. 2A.
Fig. 2C is a schematic view of the terminal shown in fig. 2A along AA.
Fig. 3 is a schematic flow chart diagram illustrating another auto-focus method in accordance with an embodiment of the present disclosure.
Fig. 4 is a schematic flow chart diagram illustrating yet another auto-focusing method according to an embodiment of the present disclosure.
Fig. 5 is a schematic block diagram illustrating an autofocus device according to an embodiment of the present disclosure.
Fig. 6 is a schematic block diagram illustrating another autofocus device according to an embodiment of the present disclosure.
Fig. 7 is a schematic block diagram illustrating yet another autofocus device in accordance with an embodiment of the present disclosure.
Fig. 8 is a schematic block diagram illustrating an apparatus for auto-focusing according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a schematic flow chart diagram illustrating an auto-focusing method according to an embodiment of the present disclosure. The auto-focusing method shown in this embodiment may be applied to a terminal, which includes but is not limited to an electronic device such as a mobile phone, a tablet computer, and a wearable device. The terminal comprises a first image acquisition module and a second image acquisition module, wherein the first image acquisition module is used for acquiring infrared images, and the second image acquisition module is used for acquiring visible light images.
Fig. 2A is a schematic diagram illustrating a partial structure of a terminal according to an embodiment of the present disclosure. Fig. 2B is a side view of the terminal shown in fig. 2A. Fig. 2C is a schematic view of the terminal shown in fig. 2A along AA.
As shown in fig. 2A, the first image capturing module may be a visible light camera module, the second image capturing module may be an infrared thermal imaging module, the visible light camera module may be connected to the connector through an FPC (Flexible Printed Circuit) and then connected to the related structure through the connector, and the infrared thermal imaging module may be connected to another connector through another FPC and then connected to the related structure through the connector, and the related structure may be, for example, a processor of the terminal.
As shown in fig. 2B, the visible light camera module and the infrared thermal imaging module may be connected through a PCB (Printed Circuit Board), and a reinforcing plate may be further disposed under the PCB to reinforce the structural stability of the PCB.
The visible light camera module can include structures such as visible light camera lens, motor, filter, visible light image sensor, and the motor can drive the motion of visible light camera lens to realize the auto focus of visible light camera module. The infrared thermal imaging module can include structures such as infrared camera lens, motor, correction subassembly, infrared thermal imaging sensor, and the motor can drive the infrared camera lens motion to realize infrared thermal imaging module's auto focus.
As shown in fig. 1, the auto-focusing method may include the steps of:
in step S101, a first driving module is controlled by a preset manner (e.g., contrast focusing, phase focusing) to drive the first image capturing module to automatically focus on a target object;
in step S102, a first driving amount of the first driving module to the first image capturing module is obtained;
in step S103, querying a second driving quantity associated with the first driving quantity according to a preset association relationship, where the preset association relationship is used to represent a relationship between the first driving quantity of the first driving module and the second driving quantity of the second driving module when the first driving module and the second driving module focus on an object with the same distance to the terminal;
in step S104, the second driving module is controlled to drive the second image capturing module to automatically focus on the target object by the second driving amount.
In one embodiment, the first driving module may be controlled to drive the first image capturing module to automatically focus on the target object, and the first image capturing module is used to capture an infrared image, and specifically may generate an image according to infrared radiation of the object, where the wavelength of the infrared radiation includes near infrared 800nm to 1500nm, medium wave infrared 3um to 5um, and long wave infrared 8um to 14um.
The infrared ray that has the object radiation of different temperatures is different, and first image acquisition module can be through infrared thermal imaging sensor response received infrared ray to produce the signal of telecommunication, and then generate infrared image according to the signal of telecommunication.
In addition, in this embodiment, a preset association relationship may be established and stored, where the preset association relationship may represent a relationship between a first driving amount of the first driving module and a second driving amount of the second driving module when the first driving module and the second driving module focus on an object having the same distance to the terminal. Then, the second driving quantity related to the first driving quantity inquired according to the preset association relationship is the driving quantity required by the second driving module to drive the second image acquisition module to perform automatic focusing on the target object.
For example, the first driving module and the second driving module are motors for driving the lens to move, the first driving amount may be a moving amount of the lens in the first image capturing module driven by the motor, and the second driving amount may be a moving amount of the lens in the second image capturing module driven by the motor.
Because the infrared rays radiated by the object are hardly influenced by the brightness of the ambient light, the clear infrared image can be scanned even under the condition of dark ambient light, and then the automatic focusing can be accurately carried out according to the scanned infrared image, so that the first driving quantity can be accurately determined, and the inquired second driving quantity related to the first driving quantity is also accurate. And then drive the second image acquisition module according to the second driving quantity and finish the automatic focusing, do not need the second image acquisition module to carry out the automatic focusing according to the image that scans, just can not receive the ambient light brightness influence yet to can realize accurate auto focusing.
In the embodiment, the first driving quantity is determined, the second driving quantity associated with the first driving quantity is inquired, and the second driving module is driven to carry out automatic focusing according to the second driving quantity, which is not influenced by the ambient light brightness and the reflectivity of the object, so that compared with automatic focusing modes such as contrast focusing, phase focusing, double-shot focusing and the like in the related technology, the automatic focusing method can accurately carry out automatic focusing under the condition of dark ambient light, and compared with the automatic focusing mode of laser focusing in the related technology, the automatic focusing method can be suitable for carrying out accurate automatic focusing on more various objects.
Fig. 3 is a schematic flow chart diagram illustrating another auto-focus method in accordance with an embodiment of the present disclosure. As shown in fig. 3, before the first driving module is controlled to drive the first image capturing module to automatically focus on the target object in a preset manner, the preset association relationship is determined in the following manner:
in step S105, controlling the first driving module to drive the first image capturing module to perform auto focusing on n objects, respectively, and controlling the second driving module to drive the second image capturing module to perform auto focusing on n objects, respectively;
in step S106, recording an ith infrared sample driving amount of the first driving module driving the first image capturing module to perform auto-focusing on an ith object of the n objects, and recording an ith visible light sample driving amount of the second driving module driving the second image capturing module to perform auto-focusing on an ith object of the n objects;
in step S107, an ith sample association relationship between the ith infrared sample driving quantity and the ith visible light sample driving quantity is established, and the preset association relationship is determined according to the 1 st sample association relationship to the nth sample association relationship;
and i is more than or equal to 1 and less than or equal to n, and the distance from each object in the n objects to the terminal is different.
In one embodiment, in order to establish the preset association relationship, n objects may be set first, where a distance from each object to the terminal is different, specifically, a value of n, and a distance from each object to the terminal may be set as needed, and generally, n may be set.
Firstly, a first driving module can be controlled to drive a first image acquisition module to automatically focus n objects respectively, and a second driving module is controlled to drive a second image acquisition module to automatically focus the n objects respectively. It should be noted that, in order to ensure the accuracy of auto-focusing of the second image capturing module, in this step, the second driving module may be controlled to drive the second image capturing module to perform auto-focusing on the n objects respectively when the ambient light brightness is greater than the preset brightness.
Then, for an ith object (not specifically referred to a certain object, but any object of the n objects), the driving amount of the first driving module driving the first image capturing module to perform auto-focusing on the ith object is an ith infrared sample driving amount, and the driving amount of the second driving module driving the second image capturing module to perform auto-focusing on the ith object is an ith visible light sample driving amount.
Then, the ith infrared sample driving quantity and the ith visible light sample driving quantity can be recorded, and the ith sample incidence relation between the ith infrared sample driving quantity and the ith visible light sample driving quantity is established, so that for n objects, n sample incidence relations can be established, namely the 1 st sample incidence relation to the nth sample incidence relation, and the preset incidence relation is determined according to the 1 st sample incidence relation to the nth sample incidence relation.
For example, the distance from the target object to the terminal is 5 meters, in the preset association relationship, the 10 th infrared sample driving amount in the 10 th sample association relationship is a driving amount by which the first driving module drives the first image acquisition module to perform automatic focusing on the 10 th object, for example, the distance from the 10 th object to the terminal is also 5 meters, then the first driving module drives the first image acquisition module to perform automatic focusing on the target object by the first driving amount, and the 10 th infrared sample driving amount in the 10 th sample association relationship in the preset association relationship may be equal to the driving amount of the 10 th infrared sample in the 10 th sample association relationship in the preset association relationship.
Therefore, according to the second driving quantity related to the first driving quantity inquired according to the preset incidence relation, the 10 th visible light sample driving quantity in the 10 th sample incidence relation in the preset incidence relation is equal, so that the inquired second driving quantity related to the first driving quantity can be the 10 th visible light sample driving quantity, the second driving module drives the second image acquisition module to automatically focus on the target object by the second driving quantity, and the automatic focusing on the target object 5 meters away from the terminal can be completed.
Fig. 4 is a schematic flow chart diagram illustrating yet another auto-focusing method according to an embodiment of the present disclosure. As shown in fig. 4, before the first driving module is controlled to drive the first image capturing module to automatically focus on the target object in a preset manner, the method further includes:
in step S108, determining whether the ambient light brightness of the terminal is lower than a preset brightness;
executing the step S101 under the condition that the ambient light brightness of the terminal is lower than a preset brightness, and controlling the first driving module to drive the first image acquisition module to automatically focus on the target object in the preset mode;
in step S109, under the condition that the ambient light brightness of the terminal is not lower than a preset brightness, the second driving module is controlled to drive the second image capturing module to automatically focus on the target object in the preset manner.
In an embodiment, since the auto-focusing of the second image capturing module is completed according to steps S101 to S104 in the embodiment shown in fig. 1, it is necessary to first control the first driving module to drive the first image capturing module to auto-focus, and query the second driving quantity associated with the first driving module, and the operation is more complicated compared with directly controlling the second driving module to drive the second image capturing module to auto-focus.
Therefore, before the step S101 is executed, it may be determined whether the ambient light brightness of the terminal is lower than the preset brightness, and if the ambient light brightness is lower than the preset brightness, there may be a problem that the auto-focusing of the second image capturing module driven by the second driving module is not accurate by directly controlling the second driving module, so that the step S101 and the subsequent steps may be executed, and the ambient light brightness is not lower than the preset brightness, there is no problem that the auto-focusing of the second image capturing module driven by the second driving module is not accurate by directly controlling the second driving module, so that the second driving module may be directly controlled to drive the second image capturing module to auto-focus the target object, so as to reduce the operation steps and complete the focusing as soon as possible.
Optionally, a distance between the first image acquisition module and the second image acquisition module is smaller than a preset distance.
In an embodiment, in the above embodiment, the first driving module drives the first image capturing module to automatically focus on the target object, and the second driving module drives the second image capturing module to automatically focus on the target object by the second driving amount, which are both focusing on the same object, so that it is required to ensure that the target object in the image scanned by the first image capturing module and the target object in the image scanned by the second image capturing module are the same object.
However, since the first image capturing module and the second image capturing module have a certain distance in the space, the field angles of the first image capturing module and the second image capturing module may be different, and if the distance is large, for example, in an extreme case, the distance is so large that the field angles of the first image capturing module and the second image capturing module do not overlap, the target object in the image scanned by the first image capturing module and the target object in the image scanned by the second image capturing module may not be the same object, which may cause the second driving module to drive the second image capturing module to automatically focus on the target object by the second driving amount, and it is difficult to accurately complete focusing.
In this embodiment, the distance between the first image capturing module and the second image capturing module is smaller than the preset distance, for example, the distance between the centers of the lenses of the first image capturing module and the second image capturing module may be specifically set smaller than the preset distance, and the preset distance may be set as required, so as to ensure that the field angles of the first image capturing module and the second image capturing module overlap greatly, so that the target object in the image scanned by the first image capturing module and the target object in the image scanned by the second image capturing module are the same object, and further ensure that the second driving module drives the second image capturing module to automatically focus the target object by the second driving amount, so as to accurately complete focusing.
Optionally, the preset manner includes at least one of the following:
contrast focusing, phase focusing.
Corresponding to the foregoing embodiments of the auto-focusing method, the present disclosure also provides embodiments of an auto-focusing apparatus.
Fig. 5 is a schematic block diagram illustrating an autofocus device in accordance with an embodiment of the present disclosure. The automatic focusing apparatus shown in this embodiment may be applied to a terminal, which includes but is not limited to an electronic device such as a mobile phone, a tablet computer, and a wearable device. The terminal comprises a first image acquisition module and a second image acquisition module, wherein the first image acquisition module is used for acquiring infrared images, and the second image acquisition module is used for acquiring visible light images.
As shown in fig. 5, the auto focusing apparatus may include:
the focusing module 101 is configured to control the first driving module to drive the first image acquisition module to automatically focus on a target object in a preset manner;
an obtaining module 102 configured to obtain a first driving amount of the first driving module to the first image capturing module;
the query module 103 is configured to query a second driving quantity associated with the first driving quantity according to a preset association relationship, where the preset association relationship is used to represent a relationship between the first driving quantity of the first driving module and the second driving quantity of the second driving module when the first driving module and the second driving module focus on an object with the same distance to the terminal;
the focusing module 101 is further configured to control the second driving module to drive the second image capturing module to automatically focus on the target object by the second driving amount.
Fig. 6 is a schematic block diagram illustrating another autofocus device in accordance with an embodiment of the present disclosure. As shown in fig. 6, the focusing module 101 is further configured to control the first driving module to drive the first image capturing module to perform auto focusing on n objects, respectively, and control the second driving module to drive the second image capturing module to perform auto focusing on the n objects, respectively;
the device further comprises:
a recording module 104 configured to record an ith infrared sample driving amount of the first driving module driving the first image capturing module to perform auto-focusing on an ith object of the n objects, and record an ith visible light sample driving amount of the second driving module driving the second image capturing module to perform auto-focusing on an ith object of the n objects;
a relation establishing module 105 configured to establish an ith sample incidence relation between the ith infrared sample driving quantity and the ith visible light sample driving quantity, and determine the preset incidence relation according to a 1 st sample incidence relation to an nth sample incidence relation;
and i is more than or equal to 1 and less than or equal to n, and the distance from each object in the n objects to the terminal is different.
Fig. 7 is a schematic block diagram illustrating yet another autofocus device in accordance with an embodiment of the present disclosure. As shown in fig. 7, the apparatus further comprises:
a judging module 106 configured to judge whether the ambient light brightness of the terminal is lower than a preset brightness;
the focusing module 101 is further configured to control the first driving module to drive the first image capturing module to automatically focus on the target object in the preset manner when the ambient light brightness of the terminal is lower than a preset brightness; and under the condition that the ambient light brightness of the terminal is not lower than the preset brightness, controlling the second driving module to drive the second image acquisition module to automatically focus the target object in the preset mode.
Optionally, a distance between the first image acquisition module and the second image acquisition module is smaller than a preset distance.
Optionally, the preset manner includes at least one of the following:
contrast focusing, phase focusing.
With regard to the apparatus in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments of the related method, and will not be described in detail here.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the disclosure. One of ordinary skill in the art can understand and implement without inventive effort.
An embodiment of the present disclosure further provides an electronic device, including: a processor, wherein the processor is configured to implement the method of any of the above embodiments.
Embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps in the method according to any of the above embodiments.
Fig. 8 is a schematic block diagram illustrating an apparatus 800 for auto focus according to an embodiment of the present disclosure. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 8, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices, 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 or optical disks.
Power components 806 provide power to the various components of device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen that provides an output interface between the 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 an input signal from a 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 boundary of a 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 facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed status of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in the temperature of the device 800. 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 a light 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.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi,2G or 3g,4g LTE, 5G NR, 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 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 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, micro-controllers, microprocessors or other electronic components for performing the auto-focusing method described in any of the above embodiments.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

1. An automatic focusing method is applicable to a terminal, wherein the terminal comprises a first image acquisition module and a second image acquisition module, the first image acquisition module is used for acquiring an infrared image, the second image acquisition module is used for acquiring a visible light image, and the method comprises the following steps:
controlling a first driving module to drive a first image acquisition module to automatically focus a target object in a preset mode;
acquiring a first driving quantity of the first driving module to the first image acquisition module;
inquiring a second driving quantity associated with the first driving quantity according to a preset association relation, wherein the preset association relation is used for representing the relation between the first driving quantity of the first driving module and the second driving quantity of the second driving module when the first driving module and the second driving module focus on objects with the same distance to the terminal;
and controlling the second driving module to drive the second image acquisition module to automatically focus the target object by the second driving quantity.
2. The method according to claim 1, wherein before controlling the first driving module to drive the first image capturing module to automatically focus on the target object in a preset manner, the method further comprises:
controlling the first driving module to drive the first image acquisition module to automatically focus the n objects respectively, and controlling the second driving module to drive the second image acquisition module to automatically focus the n objects respectively;
recording the driving quantity of the ith infrared sample for driving the first image acquisition module to automatically focus the ith object in the n objects by the first driving module, and recording the driving quantity of the ith visible light sample for driving the second image acquisition module to automatically focus the ith object in the n objects by the second driving module;
establishing an ith sample incidence relation between the ith infrared sample driving quantity and the ith visible light sample driving quantity, and determining the preset incidence relation according to the 1 st sample incidence relation to the nth sample incidence relation;
and i is more than or equal to 1 and less than or equal to n, and the distance from each object in the n objects to the terminal is different.
3. The method according to claim 1, wherein before controlling the first driving module to drive the first image capturing module to automatically focus on the target object in a preset manner, the method further comprises:
judging whether the ambient light brightness of the terminal is lower than a preset brightness;
under the condition that the ambient light brightness of the terminal is lower than preset brightness, the first driving module is controlled to drive the first image acquisition module to automatically focus the target object in the preset mode;
and under the condition that the ambient light brightness of the terminal is not lower than the preset brightness, controlling the second driving module to drive the second image acquisition module to automatically focus the target object in the preset mode.
4. The method according to any one of claims 1 to 3, wherein the distance between the first image acquisition module and the second image acquisition module is less than a preset distance.
5. The method according to any one of claims 1 to 3, wherein the predetermined manner comprises at least one of:
contrast focusing, phase focusing.
6. The utility model provides an automatic focusing device, its characterized in that is applicable to the terminal, the terminal includes first image acquisition module and second image acquisition module, wherein, first image acquisition module is used for gathering infrared image, second image acquisition module is used for gathering the visible light image, the device includes:
the focusing module is configured to control the first driving module to drive the first image acquisition module to automatically focus on a target object in a preset mode;
the acquisition module is configured to acquire a first driving quantity of the first driving module to the first image acquisition module;
the query module is configured to query a second driving quantity associated with the first driving quantity according to a preset association relation, wherein the preset association relation is used for representing a relation between the first driving quantity of the first driving module and the second driving quantity of the second driving module when the first driving module and the second driving module focus on objects with the same distance to the terminal;
the focusing module is further configured to control the second driving module to drive the second image acquisition module to automatically focus on the target object by the second driving amount.
7. The apparatus of claim 6, wherein the focusing module is further configured to control the first driving module to drive the first image capturing module to automatically focus the n objects, respectively, and control the second driving module to drive the second image capturing module to automatically focus the n objects, respectively;
the device further comprises:
the recording module is configured to record the ith infrared sample driving quantity of the first driving module for driving the first image acquisition module to automatically focus the ith object in the n objects and record the ith visible light sample driving quantity of the second driving module for driving the second image acquisition module to automatically focus the ith object in the n objects;
the relation establishing module is configured to establish an ith sample incidence relation between the ith infrared sample driving quantity and the ith visible light sample driving quantity, and determine the preset incidence relation according to the 1 st sample incidence relation to the nth sample incidence relation;
and i is more than or equal to 1 and less than or equal to n, and the distance from each object in the n objects to the terminal is different.
8. The apparatus of claim 6, further comprising:
the judging module is configured to judge whether the ambient light brightness of the terminal is lower than a preset brightness;
the focusing module is further configured to control the first driving module to drive the first image acquisition module to automatically focus the target object in the preset mode under the condition that the ambient light brightness of the terminal is lower than preset brightness; and under the condition that the ambient light brightness of the terminal is not lower than the preset brightness, controlling the second driving module to drive the second image acquisition module to automatically focus the target object in the preset mode.
9. The apparatus of any one of claims 6 to 8, wherein a distance between the first image acquisition module and the second image acquisition module is less than a preset distance.
10. The apparatus of any one of claims 6 to 8, wherein the predetermined manner comprises at least one of:
contrast focusing, phase focusing.
11. An electronic device, comprising: a processor, wherein the processor is configured to implement the method of any of claims 1 to 5.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202010006947.9A 2020-01-03 2020-01-03 Automatic focusing method, automatic focusing device, electronic equipment and computer readable storage medium Active CN113079310B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010006947.9A CN113079310B (en) 2020-01-03 2020-01-03 Automatic focusing method, automatic focusing device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010006947.9A CN113079310B (en) 2020-01-03 2020-01-03 Automatic focusing method, automatic focusing device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113079310A CN113079310A (en) 2021-07-06
CN113079310B true CN113079310B (en) 2022-11-04

Family

ID=76608431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010006947.9A Active CN113079310B (en) 2020-01-03 2020-01-03 Automatic focusing method, automatic focusing device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113079310B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106231203A (en) * 2016-09-29 2016-12-14 深圳聚融科技股份有限公司 Can the method and apparatus of exact focus during shooting under visible ray and non-visible light
CN106254682A (en) * 2016-09-22 2016-12-21 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN106331438A (en) * 2015-06-24 2017-01-11 小米科技有限责任公司 Lens focus method and device, and mobile device
CN107018326A (en) * 2017-03-31 2017-08-04 努比亚技术有限公司 A kind of image pickup method and device
CN107124557A (en) * 2017-05-31 2017-09-01 广东欧珀移动通信有限公司 Focusing method, device, computer-readable recording medium and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130155248A1 (en) * 2011-12-20 2013-06-20 Fluke Corporation Thermal imaging camera for infrared rephotography

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106331438A (en) * 2015-06-24 2017-01-11 小米科技有限责任公司 Lens focus method and device, and mobile device
CN106254682A (en) * 2016-09-22 2016-12-21 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN106231203A (en) * 2016-09-29 2016-12-14 深圳聚融科技股份有限公司 Can the method and apparatus of exact focus during shooting under visible ray and non-visible light
CN107018326A (en) * 2017-03-31 2017-08-04 努比亚技术有限公司 A kind of image pickup method and device
CN107124557A (en) * 2017-05-31 2017-09-01 广东欧珀移动通信有限公司 Focusing method, device, computer-readable recording medium and terminal

Also Published As

Publication number Publication date
CN113079310A (en) 2021-07-06

Similar Documents

Publication Publication Date Title
US11516377B2 (en) Terminal, focusing method and apparatus, and computer readable storage medium
CN110557547B (en) Lens position adjusting method and device
CN107241535B (en) Flash lamp adjusting device and terminal equipment
CN113079310B (en) Automatic focusing method, automatic focusing device, electronic equipment and computer readable storage medium
US11792518B2 (en) Method and apparatus for processing image
CN114244999B (en) Automatic focusing method, device, image pickup apparatus and storage medium
CN114339022B (en) Camera shooting parameter determining method and neural network model training method
CN114189622B (en) Image shooting method, device, electronic equipment and storage medium
EP3813349A1 (en) Terminal device, lens adjustment method and readable storage medium
CN107707819B (en) Image shooting method, device and storage medium
CN114666490A (en) Focusing method and device, electronic equipment and storage medium
CN114339019A (en) Focusing method, focusing device and storage medium
CN112702514A (en) Image acquisition method, device, equipment and storage medium
CN114339017B (en) Distant view focusing method, device and storage medium
CN114157801B (en) Switching control method and device of camera module and storage medium
US11838655B2 (en) Image acquiring method and apparatus, electronic device, and storage medium
EP3926944A1 (en) Method and apparatus for displaying captured preview image, and medium
CN116489507A (en) Focusing method, focusing device, electronic equipment and storage medium
CN106959875B (en) Front camera opening method, device and equipment
CN116437202A (en) Focusing method, focusing device, electronic equipment and readable storage medium
CN114827444A (en) Focusing method and device, shooting equipment, electronic equipment and storage medium
CN117412168A (en) Focusing method, device, equipment and storage medium
CN117177055A (en) Focusing method, focusing device and storage medium
CN116843556A (en) Method for debugging noise reduction parameters, device for debugging noise reduction parameters and storage medium
CN117546071A (en) Zoom method, zoom device, electronic apparatus, and storage medium

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