CN108646384B - Focusing method and device and mobile terminal - Google Patents

Focusing method and device and mobile terminal Download PDF

Info

Publication number
CN108646384B
CN108646384B CN201810333389.XA CN201810333389A CN108646384B CN 108646384 B CN108646384 B CN 108646384B CN 201810333389 A CN201810333389 A CN 201810333389A CN 108646384 B CN108646384 B CN 108646384B
Authority
CN
China
Prior art keywords
lens
distance
change interval
photosensitive chip
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
CN201810333389.XA
Other languages
Chinese (zh)
Other versions
CN108646384A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201810333389.XA priority Critical patent/CN108646384B/en
Publication of CN108646384A publication Critical patent/CN108646384A/en
Application granted granted Critical
Publication of CN108646384B publication Critical patent/CN108646384B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/28Systems for automatic generation of focusing signals
    • G02B7/282Autofocusing of zoom lenses
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/28Systems for automatic generation of focusing signals
    • G02B7/36Systems for automatic generation of focusing signals using image sharpness techniques, e.g. image processing techniques for generating autofocus signals

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Studio Devices (AREA)
  • Lens Barrels (AREA)

Abstract

The invention discloses a focusing method, a focusing device and a mobile terminal, which are used for solving the problem that in the prior art, the focal length of a lens is changed due to overhigh or overlow temperature of the lens, so that pictures shot by the lens are not clear. The method comprises the following steps: acquiring the distance between a lens and a photosensitive chip within a preset time period; determining a first ratio of the distance equal to the maximum value of a preset change interval and a second ratio of the distance equal to the minimum value of the preset change interval; if the first ratio is larger than or equal to a first preset value, increasing the maximum value of a change interval of the distance between the lens and the photosensitive chip; and if the second ratio is greater than or equal to a second preset value, reducing the minimum value of the change interval of the distance between the lens and the photosensitive chip.

Description

Focusing method and device and mobile terminal
Technical Field
The invention relates to the technical field of computers, in particular to a focusing method, a focusing device and a mobile terminal.
Background
With the continuous improvement of the functions of the mobile terminal, the photographing function has become one of the basic functions of the mobile terminal, and the automatic focusing system of the camera module of the mobile terminal mainly comprises the following components: lens, motor and drive and sensitization chip thereof. The lens and the photosensitive chip are the main imaging devices, and the motor and the drive thereof are the main auto-focusing devices. The principle of camera focusing of the existing camera in a long-distance view state and a close-distance view state is that according to different object distances, a motor pushes a lens, the relative distance between the lens and a photosensitive chip is changed, reflected light of an object is focused and imaged on the chip, and the most clear imaging state is achieved.
As shown in fig. 1, the focusing range of the auto-focusing module is from a close range to an infinite range, and the relative position between the lens and the photosensitive chip is also changed, in short, when the object is in the close range and the long range respectively, the corresponding imaging positions are different, and the distance between the lens and the photosensitive chip needs to be adjusted, so that the photosensitive chip can always obtain a clear imaging effect. For a camera module on a mobile terminal, a lens is fixed, and the camera module is mainly realized by driving the lens to move by a motor.
In the prior art, in order to improve the photographing efficiency and avoid the influence on the user experience caused by the overlong time of photographing a picture by a user, the distance range between the lens and the photosensitive chip is often set in advance according to the characteristics of the lens and the motor and an automatic focusing algorithm in a long-shot state and a short-shot state, and the lens is driven by the motor in the long-shot state or the short-shot state to adjust the distance between the lens and the photosensitive chip, so that a clear picture is photographed.
However, when the lens is in an environment with too high temperature (for example, the temperature of the lens is too high after a long time by the mobile terminal) or too low temperature (for example, the temperature is often lower than zero degree in an outdoor environment in winter), the focal length of the lens changes, and after the focal length of the lens changes, if the motor further pushes the lens to move according to the previously preset moving distance, the image captured by the camera is not clear enough, which affects user experience.
Disclosure of Invention
The embodiment of the invention provides a focusing method, a focusing device and a mobile terminal, and aims to solve the problem that in the prior art, the focal length of a lens is changed due to overhigh or overlow temperature of the lens, so that pictures shot by the lens are not clear.
In order to solve the technical problem, the invention is realized as follows: in a first aspect, an embodiment of the present invention provides a focusing method, including:
acquiring the distance between a lens and a photosensitive chip within a preset time period;
determining a first ratio of the distance between the lens and the photosensitive chip within the preset time period to the distance of the maximum value of a preset change interval, and a second ratio of the distance between the lens and the photosensitive chip within the preset time period to the distance of the minimum value of the preset change interval;
if the first ratio is larger than or equal to a first preset value, increasing the maximum value of a change interval of the distance between the lens and the photosensitive chip;
if the second ratio is greater than or equal to a second preset value, reducing the minimum value of the change interval of the distance between the lens and the photosensitive chip;
the preset change interval is a preset change interval of the distance between the lens and the photosensitive chip.
In a second aspect, an embodiment of the present invention further provides a focusing apparatus, including:
the acquiring unit is used for acquiring the distance between the lens and the photosensitive chip within a preset time period;
the determining unit is used for determining a first proportion of the distance between the lens and the photosensitive chip in the preset time period equal to the distance of the maximum value of a preset change interval and a second proportion of the distance between the lens and the photosensitive chip in the preset time period equal to the distance of the minimum value of the preset change interval;
the increasing unit is used for increasing the maximum value of a change interval of the distance between the lens and the photosensitive chip if the first ratio is larger than or equal to a first preset value;
a reduction unit configured to reduce a minimum value of a variation interval of a distance between the lens and the photosensitive chip if the second ratio is greater than or equal to a second preset value;
the preset change interval is a preset change interval of the distance between the lens and the photosensitive chip.
In a third aspect, an embodiment of the present invention further provides a mobile terminal, including: a memory, a processor and a computer program stored on the memory and executable on the processor, which computer program when executed by the processor implements the steps as a focusing method.
In the embodiment of the invention, by acquiring the distance between the lens and the photosensitive chip within the preset time period, because the probability that the distance between the lens and the photosensitive chip is the maximum value of the preset change interval of the distance between the lens and the photosensitive chip is often smaller in the normal photographing process of the lens, and the focal length of the lens changes once the temperature of the environment where the lens is located is too high or too low, under the condition, a motor in the automatic focusing module pushes the lens to the maximum value or the minimum value of the preset change interval in order to push the lens to find the clear point of a photographed object, the probability that the maximum value and/or the minimum value of the distance in the distance record appears is higher, and when the first ratio of the distance equal to the maximum value of the preset change interval is determined to be greater than or equal to the first preset value, the maximum value of the change interval of the distance between the lens and the photosensitive chip can be increased, when the second proportion of the distance equal to the minimum value of the preset change interval is determined to be larger than or equal to the second preset value, the minimum value of the change interval of the distance between the lens and the photosensitive chip can be reduced, and therefore the automatic focusing module can shoot clear pictures in the adjusted change interval.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a schematic diagram of a long-range view and a short-range view of an auto-focus module according to an embodiment of the present invention;
fig. 2 is a schematic flowchart illustrating an embodiment of a focusing method according to the present invention;
FIG. 3 is a schematic structural diagram of a focusing device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
In order to solve the problems in the prior art, the present invention provides a focusing method, and an execution subject of the method, which may be but is not limited to a mobile phone, a tablet computer, a wearable device, and the like, can be configured to execute at least one of the user terminals of the method provided by the embodiments of the present invention.
For convenience of description, the following description will be made on embodiments of the method, taking as an example that the execution subject of the method is a mobile terminal capable of executing the method. It is understood that the mobile terminal is used as the main body of the method and is only an exemplary illustration, and should not be construed as a limitation of the method.
Specifically, the focusing method provided by the invention comprises the following steps: firstly, acquiring a distance record between a lens and a photosensitive chip within a preset time period; then, determining a first ratio of the distance between the lens and the photosensitive chip within a preset time period to the distance of the maximum value of the preset change interval, and a second ratio of the distance between the lens and the photosensitive chip within the preset time period to the distance of the minimum value of the preset change interval; if the first ratio is larger than or equal to a first preset value, increasing the maximum value corresponding to the change interval of the distance between the lens and the photosensitive chip; and if the second occupation ratio is larger than or equal to a second preset numerical value, reducing the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip, wherein the preset change interval is the preset change interval of the distance between the lens and the photosensitive chip.
In the embodiment of the invention, by acquiring the distance between the lens and the photosensitive chip within the preset time period, because the probability that the distance between the lens and the photosensitive chip is the maximum value of the preset change interval of the distance between the lens and the photosensitive chip is often smaller in the normal photographing process of the lens, and the focal length of the lens changes once the temperature of the environment where the lens is located is too high or too low, under the condition, a motor in the automatic focusing module pushes the lens to the maximum value or the minimum value of the preset change interval in order to push the lens to find the clear point of a photographed object, the probability that the maximum value and/or the minimum value of the distance in the distance record appears is higher, and when the first ratio of the distance equal to the maximum value of the preset change interval is determined to be greater than or equal to the first preset value, the maximum value of the change interval of the distance between the lens and the photosensitive chip can be increased, when the second proportion of the distance equal to the minimum value of the preset change interval is determined to be larger than or equal to the second preset value, the minimum value of the change interval of the distance between the lens and the photosensitive chip can be reduced, and therefore the automatic focusing module can shoot clear pictures in the adjusted change interval.
The following describes in detail an implementation process of the focusing method with reference to a flowchart of fig. 2, including:
step 101, acquiring the distance between a lens and a photosensitive chip within a preset time period;
as described in the background, taking the precision of the motor drive as 10 bits as an example, the motor drive can output 210Give the motor for 1024 electric currents of equidimension not to make the motor drive the corresponding 1024 displacements of equidimension of camera lens removal, obviously, in practical application, if take a picture at every turn all drive the camera lens removal according to the displacement of 1024 equidimensions in proper order through the motor in the auto focus module, then can influence user's use and experience with the efficiency of obtaining clear photo. In order to improve the photographing efficiency, a preset variation interval of the distance between the lens and the photo sensor is often set based on the characteristics of the lens, the photo sensor, the motor and the driving of the motor, that is, the minimum value and the maximum value of the distance between the corresponding lens and the photo sensor under two limit photographing distance conditions, namely, a long shot (for example, at infinity) and a short shot (for example, self-photographing).
In the above scenario, when the lens changes its focal length due to an excessively high or low temperature, this may directly result in that the preset variation interval of the distance between the lens and the photosensitive chip, which is preset before, will no longer satisfy the actual shooting requirements of the close view and the long view, that is, the maximum value of the distance between the lens and the photosensitive chip, which is preset before, will no longer correspond to the shooting distance of the close view, and the minimum value of the distance between the lens and the photosensitive chip will no longer correspond to the shooting distance of the long view, so that when shooting the close view, the long view, or an object between the close view and the long view, a clear picture may not be shot due to the limitation of the preset variation interval of the distance between the lens and the photosensitive chip.
In order to solve the problem, in the embodiment of the present invention, based on the characteristic that, in the actual shooting process, when a user uses an automatic shooting module to shoot a photo, usually, an object between a close view and a distant view is shot, that is, when the automatic focusing module is actually used, the probability that the distance between a lens and a photosensitive chip reaches two limit values, namely, the maximum value and the minimum value, is often smaller, the distance between the lens and the photosensitive chip in a historical time period can be obtained, whether the focal length of the lens is changed or not can be determined by determining the occupation ratio of the maximum value and/or the minimum value of the distance between the lens and the photosensitive chip in the distance record in the historical time period when the automatic focusing module is focusing, and when a first occupation ratio of the distance equal to the maximum value is greater than or equal to a first preset value, the maximum value corresponding to the change interval of the distance between the lens and the photosensitive chip is increased, and when the second proportion of the distance equal to the minimum distance is greater than or equal to a second preset value, the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip is reduced, so that the automatic focusing module can shoot clear photos.
It should be understood that the distance between the lens and the photosensitive chip corresponds to the number of steps of a motor for pushing the lens to move (where the number of steps is used to measure the unit of the distance moved by the motor), and in practical applications, the number of steps of the motor may be stored in an Electrically Erasable Programmable Read Only Memory (EEPROM) of the mobile terminal, so that the record of the distance between the lens and the photosensitive chip within a preset time period may be obtained, and specifically, the number of steps of the motor for pushing the lens to move within the preset time period may be obtained first; then, based on the number of steps of the motor in a preset time period, the distance between the lens and the photosensitive chip is determined.
Step 102, determining a first ratio of the distance between the lens and the photosensitive chip within a preset time period to the distance of the maximum value of a preset change interval, and a second ratio of the distance between the lens and the photosensitive chip within the preset time period to the distance of the minimum value of the preset change interval;
the preset change interval is a preset change interval of the distance between the lens and the photosensitive chip, namely the preset change interval of the distance between the lens and the photosensitive chip, which is determined based on the characteristics of the lens and the photosensitive chip, when the lens is in a normal temperature range. The preset change interval comprises a maximum value and a minimum value, after the distance between the lens and the photosensitive chip in the preset time period is obtained, a first number of the distances, the distance of which is equal to the maximum value of the preset change interval, and a second number of the distances, the distance of which is equal to the minimum value of the preset change interval, can be determined in the distances, and based on the total number of the distances between the lens and the photosensitive chip in the preset time period, the first number and the second number, the ratio of the first number to the total number is determined, namely, a first ratio of the distances, the distance between the lens and the photosensitive chip in the preset time period is equal to the maximum value of the preset change interval, and the ratio of the second number to the total number, namely, a second ratio of the distances, the distance between the lens and the photosensitive chip in the preset time period is equal to the minimum value of the preset change interval.
103, if the first ratio is larger than or equal to a first preset value, increasing the maximum value corresponding to the change interval of the distance between the lens and the photosensitive chip;
specifically, since the focal length of the lens in the embodiment of the present invention is often changed due to the over-high or over-low temperature of the lens, on one hand, the variation range of the distance between the lens and the photosensitive chip can be increased according to the preset adjustment gradient, so that the variation range of the distance between the lens and the photosensitive chip can meet the actual photographing requirement, that is, the requirement of the definition; on the other hand, a temperature sensor may be implanted in the auto-focus camera module, and a variation interval of the distance between the lens and the photosensitive chip under different temperature conditions is obtained in advance, so increasing the maximum value corresponding to the variation interval of the distance between the lens and the photosensitive chip may include the following two ways:
in the first mode, if the first ratio is greater than or equal to the first preset value, the maximum value corresponding to the change interval of the distance between the lens and the photosensitive chip may be increased, specifically, the maximum value corresponding to the change interval of the distance between the lens and the photosensitive chip may be increased based on a preset adjustment gradient, so as to increase the change interval of the distance between the lens and the photosensitive chip. After the variation range of the distance between the lens and the photosensitive chip is enlarged based on the preset adjustment gradient, if the control end of the automatic focusing module determines that the shot picture is still not clear enough, the maximum value corresponding to the variation interval of the distance between the lens and the photosensitive chip can be continuously increased based on the preset adjustment gradient until the control end determines that the variation range of the distance between the lens and the photosensitive chip can meet the shooting requirements of the close shot and the shot object between the far shot and the close shot.
In practical applications, since the step number change interval of the motor is often stored in the auto-focus module, the maximum value corresponding to the change interval of the distance between the lens and the photosensitive chip is increased based on the preset adjustment gradient, and the maximum value corresponding to the step number change interval of the motor for pushing the lens to move can be increased.
In a second mode, if the first ratio is greater than or equal to a first preset value, the maximum value corresponding to the change interval of the distance between the lens and the photosensitive chip is increased, specifically, first, if the first ratio is greater than or equal to the first preset value, the ambient temperature of the lens can be obtained, specifically, a temperature sensor can be implanted in the automatic focusing camera module, the ambient temperature of the lens can be obtained through the temperature sensor, and the change range of the distance between the lens and the photosensitive chip under the premise of meeting the shooting definition is obtained in advance under different temperature conditions; then, the maximum value corresponding to the variation section of the distance between the lens and the photosensitive chip may be increased based on the ambient temperature in which the lens is located.
In addition, since the change interval of the step number of the motor is often stored in the automatic focusing module, after the ambient temperature of the lens is obtained through the temperature sensor, the step number change interval of the motor corresponding to the temperature can be determined, wherein different temperature ranges and the step number change interval of the motor corresponding to the temperature ranges have a one-to-one mapping relation; and finally, increasing the maximum value corresponding to the change section of the distance between the lens and the photosensitive chip based on the maximum value corresponding to the change section of the step number of the motor corresponding to the temperature.
And 104, if the second ratio is larger than or equal to a second preset value, reducing the minimum value of the change interval of the distance between the lens and the photosensitive chip.
Similar to step 103, if the second ratio is greater than or equal to the second preset value, reducing the minimum value of the variation interval of the distance between the lens and the photosensitive chip may also include the following two implementation manners:
in the first mode, if the second ratio is greater than or equal to a second preset value, the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip may be decreased, specifically, the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip may be decreased based on a preset adjustment gradient, so as to increase the change interval of the distance between the lens and the photosensitive chip. After the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip is reduced based on the preset adjustment gradient, if the control end of the automatic focusing module determines that the shot picture is still not clear enough, the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip can be continuously reduced based on the preset adjustment gradient until the control end determines that the change range of the distance between the lens and the photosensitive chip can meet the shooting requirements of a long shot and a shot object between the long shot and a short shot.
In practical application, since the step number change interval of the motor is often stored in the auto-focusing module, the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip is reduced based on the preset adjustment gradient, and the minimum value corresponding to the step number change interval of the motor for pushing the lens to move can be reduced.
In a second mode, if the second ratio is greater than or equal to a second preset value, reducing a minimum value corresponding to a change interval of the distance between the lens and the photosensitive chip, specifically, first, if the second ratio is greater than or equal to the second preset value, obtaining an ambient temperature of the lens, specifically, implanting a temperature sensor in the automatic focusing camera module, obtaining the ambient temperature of the lens through the temperature sensor, and obtaining a change range of the distance between the lens and the photosensitive chip under the premise of meeting the shooting definition in advance under different temperature conditions; then, the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip can be reduced based on the ambient temperature of the lens.
In addition, since the change interval of the step number of the motor is often stored in the automatic focusing module, after the ambient temperature of the lens is obtained through the temperature sensor, the step number change interval of the motor corresponding to the temperature can be determined, wherein different temperature ranges and the step number change interval of the motor corresponding to the temperature ranges have a one-to-one mapping relation; and finally, reducing the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip based on the minimum value corresponding to the step number change interval of the motor corresponding to the temperature.
If the first ratio is greater than or equal to a first preset value and the second ratio is greater than or equal to a second preset value, on one hand, the maximum value of the change interval of the distance between the lens and the photosensitive chip can be increased and the minimum value of the change interval of the distance between the lens and the photosensitive chip can be reduced based on a preset adjustment gradient; on the other hand, the ambient temperature of the lens can be acquired through the temperature sensor, the change interval of the distance between the lens and the photosensitive chip corresponding to the ambient temperature of the lens is acquired based on the ambient temperature of the lens, and the change interval of the distance between the lens and the photosensitive chip is adjusted based on the acquired change interval of the distance between the lens and the photosensitive chip corresponding to the ambient temperature of the lens, so that the automatic focusing module can shoot clear photos based on the change interval of the distance between the lens and the photosensitive chip.
The embodiment of the invention also provides an implementation mode, after the temperature sensor is implanted in the automatic focusing module, the change interval of the distance between the lens and the photosensitive chip under different temperature conditions can be obtained in advance, so that after the environment temperature of the lens is determined through the temperature sensor, the change interval of the distance between the lens and the photosensitive chip corresponding to the environment temperature of the lens or the change interval of the step number of the motor for pushing the lens to move can be determined based on the environment temperature of the lens, and the change interval of the distance between the lens and the photosensitive chip can be directly adjusted or adjusted by adjusting the change interval of the step number of the motor for pushing the lens to move.
In the embodiment of the invention, by acquiring the distance between the lens and the photosensitive chip within the preset time period, because the probability that the distance between the lens and the photosensitive chip is the maximum value of the preset change interval of the distance between the lens and the photosensitive chip is often smaller in the normal photographing process of the lens, and the focal length of the lens changes once the temperature of the environment where the lens is located is too high or too low, under the condition, a motor in the automatic focusing module pushes the lens to the maximum value or the minimum value of the preset change interval in order to push the lens to find the clear point of a photographed object, the probability that the maximum value and/or the minimum value of the distance in the distance record appears is higher, and when the first ratio of the distance equal to the maximum value of the preset change interval is determined to be greater than or equal to the first preset value, the maximum value of the change interval of the distance between the lens and the photosensitive chip can be increased, when the second proportion of the distance equal to the minimum value of the preset change interval is determined to be larger than or equal to the second preset value, the minimum value of the change interval of the distance between the lens and the photosensitive chip can be reduced, and therefore the automatic focusing module can shoot clear pictures in the adjusted change interval.
The embodiment of the present invention further provides a focusing apparatus 200, as shown in fig. 3, including the following functional units:
an obtaining unit 201, configured to obtain a distance between a lens and a photosensitive chip within a preset time period;
a determining unit 202, configured to determine a first ratio of a distance between the lens and the photosensitive chip in the preset time period to a distance of a maximum value of a preset variation interval, and a second ratio of a distance between the lens and the photosensitive chip in the preset time period to a distance of a minimum value of the preset variation interval;
an increasing unit 203, configured to increase a maximum value of a variation interval of a distance between the lens and the photosensitive chip if the first ratio is greater than or equal to a first preset value;
a reducing unit 204, configured to reduce a minimum value of a variation interval of a distance between the lens and the photosensitive chip if the second ratio is greater than or equal to a second preset value;
the preset change interval is a preset change interval of the distance between the lens and the photosensitive chip.
In an embodiment, the increasing unit 203 is configured to:
if the first proportion is larger than or equal to a first preset value, acquiring the ambient temperature of the lens;
and increasing the maximum value corresponding to the change interval of the distance between the lens and the photosensitive chip based on the ambient temperature of the lens.
In an embodiment, the increasing unit 203 is configured to:
determining a step number change interval of a motor for pushing the lens to move corresponding to the temperature based on the ambient temperature of the lens;
and increasing the maximum value corresponding to the change interval of the distance between the lens and the photosensitive chip based on the maximum value corresponding to the step number change interval of the motor.
In an embodiment, the reducing unit 204 is configured to:
if the second proportion is larger than or equal to a first preset value, acquiring the ambient temperature of the lens;
and reducing the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip based on the ambient temperature of the lens.
In an embodiment, the reducing unit 204 is configured to:
determining a step number change interval of a motor for pushing the lens to move corresponding to the temperature based on the ambient temperature of the lens;
and reducing the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip based on the minimum value corresponding to the step number change interval of the motor.
The device provided by the embodiment of the present invention can implement each process implemented by the mobile terminal in the method embodiment of fig. 2, and is not described here again in order to avoid repetition.
Figure 4 is a schematic diagram of a hardware configuration of a mobile terminal implementing various embodiments of the present invention,
the mobile terminal 300 includes, but is not limited to: radio frequency unit 301, network module 302, audio output unit 303, input unit 304, sensor 305, display unit 306, user input unit 307, interface unit 308, memory 309, processor 310, and power supply 311. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 4 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 310 is configured to obtain a distance between the lens and the photosensitive chip within a preset time period; determining a first ratio of the distance between the lens and the photosensitive chip within the preset time period to the distance of the maximum value of a preset change interval, and a second ratio of the distance between the lens and the photosensitive chip within the preset time period to the distance of the minimum value of the preset change interval; if the first ratio is larger than or equal to a first preset value, increasing the maximum value of a change interval of the distance between the lens and the photosensitive chip; if the second ratio is greater than or equal to a second preset value, reducing the minimum value of the change interval of the distance between the lens and the photosensitive chip; the preset change interval is a preset change interval of the distance between the lens and the photosensitive chip.
In the embodiment of the invention, by acquiring the distance between the lens and the photosensitive chip within the preset time period, because the probability that the distance between the lens and the photosensitive chip is the maximum value of the preset change interval of the distance between the lens and the photosensitive chip is often smaller in the normal photographing process of the lens, and the focal length of the lens changes once the temperature of the environment where the lens is located is too high or too low, under the condition, a motor in the automatic focusing module pushes the lens to the maximum value or the minimum value of the preset change interval in order to push the lens to find the clear point of a photographed object, the probability that the maximum value and/or the minimum value of the distance in the distance record appears is higher, and when the first ratio of the distance equal to the maximum value of the preset change interval is determined to be greater than or equal to the first preset value, the maximum value of the change interval of the distance between the lens and the photosensitive chip can be increased, when the second proportion of the distance equal to the minimum value of the preset change interval is determined to be larger than or equal to the second preset value, the minimum value of the change interval of the distance between the lens and the photosensitive chip can be reduced, and therefore the automatic focusing module can shoot clear pictures in the adjusted change interval.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 301 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 310; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 301 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 301 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 302, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
The audio output unit 303 may convert audio data received by the radio frequency unit 301 or the network module 302 or stored in the memory 309 into an audio signal and output as sound. Also, the audio output unit 303 may also provide audio output related to a specific function performed by the mobile terminal 300 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 303 includes a speaker, a buzzer, a receiver, and the like.
The input unit 304 is used to receive audio or video signals. The input Unit 304 may include a Graphics Processing Unit (GPU) 3041 and a microphone 3042, and the Graphics processor 3041 processes image data of a still picture or video obtained by an image capturing apparatus (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 306. The image frames processed by the graphic processor 3041 may be stored in the memory 309 (or other storage medium) or transmitted via the radio frequency unit 301 or the network module 302. The microphone 3042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 301 in case of the phone call mode.
The mobile terminal 300 also includes at least one sensor 305, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 3061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 3061 and/or a backlight when the mobile terminal 300 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 305 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 306 is used to display information input by the user or information provided to the user. The Display unit 306 may include a Display panel 3061, and the Display panel 3061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 307 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 307 includes a touch panel 3071 and other input devices 3072. The touch panel 3071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 3071 (e.g., operations by a user on or near the touch panel 3071 using a finger, a stylus, or any suitable object or attachment). The touch panel 3071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 310, and receives and executes commands sent by the processor 310. In addition, the touch panel 3071 may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 307 may include other input devices 3072 in addition to the touch panel 3071. Specifically, the other input devices 3072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described herein.
Further, the touch panel 3071 may be overlaid on the display panel 3061, and when the touch panel 3071 detects a touch operation on or near the touch panel, the touch operation is transmitted to the processor 310 to determine the type of the touch event, and then the processor 310 provides a corresponding visual output on the display panel 3061 according to the type of the touch event. Although the touch panel 3071 and the display panel 3061 are shown as two separate components in fig. 4 to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 3071 and the display panel 3061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 308 is an interface through which an external device is connected to the mobile terminal 300. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 308 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 300 or may be used to transmit data between the mobile terminal 300 and external devices.
The memory 309 may be used to store software programs as well as various data. The memory 309 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 309 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 310 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 309 and calling data stored in the memory 309, thereby performing overall monitoring of the mobile terminal. Processor 310 may include one or more processing units; preferably, the processor 310 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 310.
The mobile terminal 300 may further include a power supply 311 (such as a battery) for supplying power to various components, and preferably, the power supply 311 may be logically connected to the processor 310 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the mobile terminal 300 includes some functional modules that are not shown, and thus, the detailed description thereof is omitted.
Preferably, an embodiment of the present invention further provides a mobile terminal, including a processor 310, a memory 309, and a computer program stored in the memory 309 and capable of running on the processor 310, where the computer program is executed by the processor 310 to implement each process of the above focusing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the foregoing focusing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (11)

1. A focusing method, comprising:
acquiring the distance between a lens and a photosensitive chip within a preset time period;
determining a first ratio of the distance between the lens and the photosensitive chip within the preset time period to the distance of the maximum value of a preset change interval, and a second ratio of the distance between the lens and the photosensitive chip within the preset time period to the distance of the minimum value of the preset change interval;
if the first ratio is larger than or equal to a first preset value, increasing the maximum value of a change interval of the distance between the lens and the photosensitive chip;
if the second ratio is greater than or equal to a second preset value, reducing the minimum value of the change interval of the distance between the lens and the photosensitive chip;
the preset change interval is a preset change interval of the distance between the lens and the photosensitive chip.
2. The method of claim 1, wherein if the first ratio is greater than or equal to a first preset value, increasing a maximum value of a variation interval of the distance between the lens and the light sensing chip comprises:
if the first proportion is larger than or equal to a first preset value, acquiring the ambient temperature of the lens;
and increasing the maximum value corresponding to the change interval of the distance between the lens and the photosensitive chip based on the ambient temperature of the lens.
3. The method of claim 2, wherein increasing a maximum value corresponding to a variation interval of the distance between the lens and the light sensing chip based on an ambient temperature in which the lens is located comprises:
determining a step number change interval of a motor for pushing the lens to move corresponding to the temperature based on the ambient temperature of the lens;
and increasing the maximum value corresponding to the change interval of the distance between the lens and the photosensitive chip based on the maximum value corresponding to the step number change interval of the motor.
4. The method of claim 1, wherein if the second fraction is greater than or equal to a second predetermined value, decreasing a minimum value of a variation interval of the distance between the lens and the photo-sensing chip comprises:
if the second proportion is larger than or equal to a second preset value, acquiring the ambient temperature of the lens;
and reducing the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip based on the ambient temperature of the lens.
5. The method of claim 4, wherein reducing the minimum value corresponding to the variation interval of the distance between the lens and the photosensitive chip based on the ambient temperature of the lens comprises:
determining a step number change interval of a motor for pushing the lens to move corresponding to the temperature based on the ambient temperature of the lens;
and reducing the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip based on the minimum value corresponding to the step number change interval of the motor.
6. A focusing apparatus, comprising:
the acquiring unit is used for acquiring the distance between the lens and the photosensitive chip within a preset time period;
the determining unit is used for determining a first proportion of the distance between the lens and the photosensitive chip in the preset time period equal to the distance of the maximum value of a preset change interval and a second proportion of the distance between the lens and the photosensitive chip in the preset time period equal to the distance of the minimum value of the preset change interval;
the increasing unit is used for increasing the maximum value of a change interval of the distance between the lens and the photosensitive chip if the first ratio is larger than or equal to a first preset value;
a reduction unit configured to reduce a minimum value of a variation interval of a distance between the lens and the photosensitive chip if the second ratio is greater than or equal to a second preset value;
the preset change interval is a preset change interval of the distance between the lens and the photosensitive chip.
7. The apparatus of claim 6, wherein the increasing unit is to:
if the first proportion is larger than or equal to a first preset value, acquiring the ambient temperature of the lens;
and increasing the maximum value corresponding to the change interval of the distance between the lens and the photosensitive chip based on the ambient temperature of the lens.
8. The apparatus of claim 7, wherein the increasing unit is to:
determining a step number change interval of a motor for pushing the lens to move corresponding to the temperature based on the ambient temperature of the lens;
and increasing the maximum value corresponding to the change interval of the distance between the lens and the photosensitive chip based on the maximum value corresponding to the step number change interval of the motor.
9. The apparatus of claim 6, wherein the reduction unit is to:
if the second proportion is larger than or equal to a second preset value, acquiring the ambient temperature of the lens;
and reducing the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip based on the ambient temperature of the lens.
10. The apparatus of claim 9, wherein the reduction unit is to:
determining a step number change interval of a motor for pushing the lens to move corresponding to the temperature based on the ambient temperature of the lens;
and reducing the minimum value corresponding to the change interval of the distance between the lens and the photosensitive chip based on the minimum value corresponding to the step number change interval of the motor.
11. A mobile terminal, comprising: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when being executed by the processor, realizes the steps of the focusing method as claimed in any one of claims 1 to 5.
CN201810333389.XA 2018-04-13 2018-04-13 Focusing method and device and mobile terminal Active CN108646384B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810333389.XA CN108646384B (en) 2018-04-13 2018-04-13 Focusing method and device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810333389.XA CN108646384B (en) 2018-04-13 2018-04-13 Focusing method and device and mobile terminal

Publications (2)

Publication Number Publication Date
CN108646384A CN108646384A (en) 2018-10-12
CN108646384B true CN108646384B (en) 2020-09-01

Family

ID=63746145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810333389.XA Active CN108646384B (en) 2018-04-13 2018-04-13 Focusing method and device and mobile terminal

Country Status (1)

Country Link
CN (1) CN108646384B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113031195A (en) * 2021-03-10 2021-06-25 江苏金视传奇科技有限公司 Infrared noninductive automatic focusing device

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01288806A (en) * 1988-05-16 1989-11-21 Minolta Camera Co Ltd Device for correcting lens back fluctuation in camera
DE69634221T2 (en) * 1995-03-31 2006-05-18 Canon K.K. Method and device for processing visual information
CA2442324C (en) * 2001-03-27 2011-07-05 Council Of Scientific And Industrial Research A multi-fiber optic 2d-array device for sensing and localizing environment perturbation using speckle image processing
EP1789843A2 (en) * 2004-08-25 2007-05-30 Panavision Imaging, Inc Method and apparatus for controlling a lens, and camera module incorporating same
CN100559255C (en) * 2006-03-15 2009-11-11 亚洲光学股份有限公司 The image capture unit of automatic focusing method and use said method
CN100582851C (en) * 2007-12-04 2010-01-20 鸿富锦精密工业(深圳)有限公司 Focus system and method for promoting resolving power of optical lens
JP2011075647A (en) * 2009-09-29 2011-04-14 Canon Inc Imaging optical system having autofocus function, and photographing system of the same
EP2448246B1 (en) * 2010-10-28 2019-10-09 Axis AB Method for focusing
US9383540B1 (en) * 2012-10-30 2016-07-05 Google Inc. System and method for controlling the focus of a lens
DE102014107044B4 (en) * 2014-05-19 2016-01-14 Carl Zeiss Industrielle Messtechnik Gmbh Improved autofocus method for a coordinate measuring machine and coordinate measuring machine
CN105407343B (en) * 2015-12-15 2017-08-01 瑞声声学科技(苏州)有限公司 Pick-up lens and its depth of field calibration method

Also Published As

Publication number Publication date
CN108646384A (en) 2018-10-12

Similar Documents

Publication Publication Date Title
CN108513070B (en) Image processing method, mobile terminal and computer readable storage medium
CN110300267B (en) Photographing method and terminal equipment
CN109743498B (en) Shooting parameter adjusting method and terminal equipment
CN110913139B (en) Photographing method and electronic equipment
AU2020263183B2 (en) Parameter Obtaining Method and Terminal Device
CN107124556B (en) Focusing method, focusing device, computer readable storage medium and mobile terminal
CN107730460B (en) Image processing method and mobile terminal
CN110213484B (en) Photographing method, terminal equipment and computer readable storage medium
CN110519503B (en) Method for acquiring scanned image and mobile terminal
CN111083260A (en) Electronic device, control method and control device thereof, and computer-readable storage medium
CN108174110B (en) Photographing method and flexible screen terminal
CN108307123B (en) Exposure adjusting method and mobile terminal
CN111405181B (en) Focusing method and electronic equipment
CN111510623B (en) Shooting method and electronic equipment
CN108063897B (en) Camera assembly, focal length adjusting method and mobile terminal
CN110944114B (en) Photographing method and electronic equipment
CN108111750B (en) Zoom adjustment method, mobile terminal and computer readable storage medium
CN110881105B (en) Shooting method and electronic equipment
CN109104573B (en) Method for determining focusing point and terminal equipment
CN111028192B (en) Image synthesis method and electronic equipment
CN110769162B (en) Electronic equipment and focusing method
CN110913133B (en) Shooting method and electronic equipment
CN108646384B (en) Focusing method and device and mobile terminal
CN108550182B (en) Three-dimensional modeling method and terminal
CN108391050B (en) Image processing method and mobile terminal

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