CN114827461A - Shooting focusing method and device and electronic equipment - Google Patents

Shooting focusing method and device and electronic equipment Download PDF

Info

Publication number
CN114827461A
CN114827461A CN202210396869.7A CN202210396869A CN114827461A CN 114827461 A CN114827461 A CN 114827461A CN 202210396869 A CN202210396869 A CN 202210396869A CN 114827461 A CN114827461 A CN 114827461A
Authority
CN
China
Prior art keywords
focusing
statistical curve
focus
curve
statistical
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.)
Pending
Application number
CN202210396869.7A
Other languages
Chinese (zh)
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 Hangzhou Co Ltd
Original Assignee
Vivo Mobile Communication Hangzhou 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 Hangzhou Co Ltd filed Critical Vivo Mobile Communication Hangzhou Co Ltd
Priority to CN202210396869.7A priority Critical patent/CN114827461A/en
Publication of CN114827461A publication Critical patent/CN114827461A/en
Pending legal-status Critical Current

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Automatic Focus Adjustment (AREA)

Abstract

The application discloses a shooting focusing method and device and electronic equipment, and belongs to the field of electronic equipment. The shooting focusing method comprises the following steps: respectively carrying out first filtering processing and second filtering processing on at least two collected original images, and outputting a first focusing statistical curve and a second focusing statistical curve; executing a first focusing operation based on the variation trends of the first focusing statistical curve and the second focusing statistical curve; and the frequency bands of the first filtering processing and the second filtering processing are different.

Description

Shooting focusing method and device and electronic equipment
Technical Field
The application belongs to the field of electronic equipment, and particularly relates to a shooting focusing method and device and electronic equipment.
Background
With the development of electronic devices, a shooting function becomes an increasingly important function of the electronic devices, and focusing on picture information in a shooting process is an important factor affecting the shooting function. At present, under the condition that the confidence of phase focusing is insufficient, the electronic equipment usually adopts a contrast focusing mode to focus the picture information. However, in complex scenes such as far and near scene switching, low illumination, flat scene, etc., the contrast focusing may have the defects of wrong searching direction of the focusing motor, inaccurate searching result, and thus, the picture is stretched, the focusing rate is low, and the effect is poor. Therefore, the reliability of the existing shooting focusing method is poor.
Disclosure of Invention
The embodiment of the application aims to provide a shooting focusing method and electronic equipment, and the problem that the shooting focusing method is poor in reliability can be solved.
In a first aspect, an embodiment of the present application provides a shooting focusing method, where the method includes:
respectively carrying out first filtering processing and second filtering processing on at least two collected original images, and outputting a first focusing statistical curve and a second focusing statistical curve;
executing a first focusing operation based on the variation trends of the first focusing statistical curve and the second focusing statistical curve;
wherein the frequency bands of the first filtering process and the second filtering process are different.
In a second aspect, an embodiment of the present application provides an apparatus for focusing in shooting, where the apparatus includes:
the acquisition module is used for respectively carrying out first filtering processing and second filtering processing on the acquired at least two frames of original images and outputting a first focusing statistical curve and a second focusing statistical curve;
the first focusing module is used for executing a first focusing operation based on the variation trend of the first focusing statistical curve and the second focusing statistical curve;
wherein the frequency bands of the first filtering process and the second filtering process are different.
In a third aspect, embodiments of the present application provide an electronic device, which includes a processor and a memory, where the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product, stored on a storage medium, for execution by at least one processor to implement the method according to the first aspect.
In the embodiment of the application, the first filtering processing and the second filtering processing can be respectively carried out on at least two collected original images, and a first focusing statistical curve and a second focusing statistical curve are output; executing a first focusing operation based on the variation trends of the first focusing statistical curve and the second focusing statistical curve; and the frequency bands of the first filtering processing and the second filtering processing are different. Therefore, in the first focusing operation process, the variation trends of the first focusing statistical curve and the second focusing statistical curve after filtering processing of different frequency bands can be referred, so that the problems that the motor is difficult to search along the accurate direction and focusing efficiency and focusing effect are influenced due to the fact that the variation trend amplitude of the single focusing statistical curve is small can be solved, and more comprehensive and reliable reference basis is provided for accurate focusing through the variation trends of the first focusing statistical curve and the second focusing statistical curve after filtering processing of different frequency bands. Therefore, the first focusing statistical curve and the second focusing statistical curve are focused cooperatively, the focusing requirements under various complex scenes can be met, the focusing efficiency and the focusing effect are ensured, and the focusing reliability is improved.
Drawings
FIG. 1 is a diagram illustrating a focusing statistical curve of a focusing method in a related art;
fig. 2 is a schematic flowchart of a photographing focusing method provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a focusing statistical curve of a focusing method for shooting according to an embodiment of the present disclosure;
FIG. 4 is a second schematic view of a focusing statistical curve of the focusing method for photographing according to the embodiment of the present application;
FIG. 5 is a schematic interface diagram of a focusing method for shooting according to an embodiment of the present disclosure;
FIG. 6 is a flowchart illustrating an embodiment of a scene of a shooting focusing method according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of a photographing focusing device according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 9 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The shooting focusing method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
In the related art, a shooting focusing method usually performs focusing operation based on a single focusing statistical curve, for example, a high-pass filter is used to obtain a focusing statistical value corresponding to medium-high frequency information under normal illumination, a focusing statistical curve corresponding to the medium-high frequency information is generated, and focusing is performed based on the focusing statistical curve corresponding to the medium-high frequency information; and acquiring a focusing statistic value corresponding to the low-frequency information by using a low-pass filter under low illumination, generating a focusing statistic curve corresponding to the low-frequency information, and focusing based on the focusing statistic curve corresponding to the low-frequency information. However, the single-focus statistical curve is difficult to adapt to the focusing requirement in a complex scene.
For example, for a scene switched between a far focus and a near focus in a focusing process, if the focusing is performed at the near focus last time, and a focusing picture is moved to a far view, a blurring degree of the picture is high, and high-frequency information is less, as shown in fig. 1, at a first area 101 far from a focusing position, a variation trend amplitude of a focusing statistical curve is small, which easily causes a problem that a searching direction of a focusing motor is reversed, thereby causing picture stretching, and since a full stroke is required in a process of searching the focusing motor according to a fixed step length, a focusing speed is slow, and a focusing effect is poor. In addition, in a special scene such as a low-texture scene, since the scene itself does not have sufficient details, the focus statistic corresponding to the medium-high frequency information still lacks under normal illumination, and in this case, if the focus statistic curve corresponding to the medium-high frequency information is used for focusing, the defects of long time consumption and poor effect of the focusing process are often caused. In summary, the shooting focusing method in the related art has the problems of poor focusing effect, slow focusing speed and poor reliability in a complex focusing scene.
In order to solve the above problem, embodiments of the present application provide a shooting focusing method capable of improving focusing reliability. Fig. 2 is a schematic flowchart of a shooting focusing method according to an embodiment of the present application. The photographing focusing method may include:
step 201, performing first filtering processing and second filtering processing on at least two acquired original images respectively, and outputting a first focus statistical curve and a second focus statistical curve, wherein frequency bands of the first filtering processing and the second filtering processing are different.
In step 201, the shooting device needs to focus the picture information when shooting the picture information, and the focusing motor can search according to a preset step length, and one frame of original image can be generated every time the search is performed. After the shooting device collects at least two frames of original images, the shooting device can respectively perform first filtering processing and second filtering processing of different frequency bands on the at least two frames of original images, and output a first focusing statistical curve and a second focusing statistical curve.
For example, the original image may be subjected to a filtering process based on a filter, wherein the filter may include a high-pass filter, a low-pass filter, an auxiliary filter, and the like. The high-pass filter can be used as a focusing definition evaluation function of a normal illumination scene, can acquire a focusing statistic value corresponding to high-frequency information in each frame of image, and outputs a focusing statistic curve corresponding to the high-frequency information. The low-pass filter can be used as a focusing definition evaluation function of scenes with less high-frequency information, such as night scenes, low details and the like, can acquire a focusing statistic value corresponding to the low-frequency information in each frame of image, and outputs a focusing statistic curve corresponding to the low-frequency information. The auxiliary filter can be used as a focusing definition evaluation function of a specific scene such as point light source illumination, and can acquire focusing statistical values corresponding to frequency information of other frequency bands except high-frequency information and low-frequency information in each frame of image and output a corresponding focusing statistical curve. For example, in a scene of point light source illumination, the auxiliary filter may obtain a focusing statistical value corresponding to the low and medium frequency information in each frame of image, and output a focusing statistical curve corresponding to the low and medium frequency information.
In order to facilitate understanding of the technical solution of the embodiment of the present application, a first focusing statistical curve is used as a focusing statistical curve corresponding to high-frequency information, and a second focusing statistical curve is used as a focusing statistical curve corresponding to low-frequency information. It is understood that the focusing statistical curve corresponding to the high frequency information and the focusing statistical curve corresponding to the low frequency information are only used as an example of the specific implementation and are not limited by the embodiment of the present application.
And 202, executing a first focusing operation based on the variation trends of the first focusing statistical curve and the second focusing statistical curve.
In step 202, the variation trends of the first focus statistical curve and the second focus statistical curve may be cooperatively referenced, for example, when the variation trend of one of the first focus statistical curve and the second focus statistical curve is relatively gentle and the variation trend of the other focus statistical curve is relatively obvious, the search direction of the focus motor may be determined according to the obvious variation trend of the other focus statistical curve, so that the search direction of the focus motor may be determined more accurately and quickly to perform the first focus operation.
In the embodiment of the application, the shooting focusing method can respectively perform first filtering processing and second filtering processing on at least two collected original images, and output a first focusing statistical curve and a second focusing statistical curve; executing a first focusing operation based on the variation trends of the first focusing statistical curve and the second focusing statistical curve; and the frequency bands of the first filtering processing and the second filtering processing are different. Therefore, in the first focusing operation process, the variation trends of the first focusing statistical curve and the second focusing statistical curve after filtering processing of different frequency bands can be referred, so that the problems that the motor is difficult to search along the accurate direction and focusing efficiency and focusing effect are influenced due to the fact that the variation trend amplitude of the single focusing statistical curve is small can be solved, and more comprehensive and reliable reference basis is provided for accurate focusing through the variation trends of the first focusing statistical curve and the second focusing statistical curve after filtering processing of different frequency bands. Therefore, the first focusing statistical curve and the second focusing statistical curve are focused cooperatively, the focusing requirements under various complex scenes can be met, the focusing efficiency and the focusing effect are ensured, and the focusing reliability is improved.
In some embodiments, the step 202 may include the steps of:
determining a target focusing statistical curve based on the variation trend of the first focusing statistical curve and the second focusing statistical curve;
and executing a first focusing operation according to the target focusing statistical curve.
In this embodiment, the target focusing statistical curve may be determined according to the focusing statistical curve with the largest variation trend in the first focusing statistical curve and the second focusing statistical curve, and the first focusing operation may be performed according to the target focusing statistical curve.
For example, a focusing statistical curve referenced for performing a focusing operation among the first focusing statistical curve and the second focusing statistical curve may be determined according to a variation trend of a corresponding focusing statistical curve at a focusing motor start position. As shown in fig. 3, the first focus statistical curve may be a focus statistical curve FV1 corresponding to high frequency information, the second focus statistical curve may be a focus statistical curve FV2 corresponding to low frequency information, at least two frames of original images at the start position of the focus motor may be obtained, and the variation trend of the focus statistical curve corresponding to the frequency information of the frequency band is determined by calculating the variation ratio between the maximum focus statistical value and the minimum focus statistical value corresponding to the frequency information of the same frequency band in the at least two frames of original images. For example, if the focus motor start position corresponds to "a 2" or "B2" in fig. 3, the trend of the FV2 is greater than the trend of the FV1, so that the FV2 can be determined as the target focus statistical curve, and the first focus operation is performed according to the FV 2. If the focusing motor start position corresponds to "C2" in fig. 3, the trend of the FV1 is greater than the trend of the FV2, so that the FV1 can be determined as the target focusing statistical curve, and the first focusing operation is performed according to the FV 1.
As another example, the first focusing operation may be performed by determining a target focusing statistical curve to which the focusing motor is currently searched for according to a variation trend of the corresponding focusing statistical curve at the current position of the focusing motor. For example, if the current position of the focusing motor corresponds to "a 2" in fig. 3, at this time, the trend of the FV2 is greater than the trend of the FV1, so the focusing motor can continue to search based on the FV2 to reach "B2" in fig. 3, because the trend of the FV2 at "B2 is still greater than the trend of the FV1, the focusing motor can continue to search based on the FV2 to reach" C2 "in fig. 3, because the trend of the FV1 at" C2 "is greater than the trend of the FV2, so the focusing motor can continue to search based on the FV1, and so on, until focusing is performed, and after clear picture information is obtained, the first focusing operation is ended.
Therefore, a target focusing statistical curve which can provide more accurate reference for the first focusing operation can be determined from the first focusing statistical curve and the second focusing statistical curve based on the variation trend, so that the focusing requirements under various complex scenes can be met when the first focusing operation is executed according to the target focusing statistical curve, the focusing efficiency and the focusing effect are ensured, and the focusing reliability is improved.
In some embodiments, the determining the target focusing statistical curve based on the variation trend of the first focusing statistical curve and the second focusing statistical curve may include the following steps:
determining the first focusing statistical curve as a target focusing statistical curve under the condition that the current slope of the first focusing statistical curve is greater than or equal to the current slope of the second focusing statistical curve;
and under the condition that the current slope of the first focusing statistical curve is smaller than the current slope of the second focusing statistical curve, determining the second focusing statistical curve as a target focusing statistical curve.
In the embodiment of the present application, the current slope of the first focus statistical curve may be determined based on a variation trend of the first focus statistical curve, and for example, the current slope of the first focus statistical curve may be determined according to a focus statistical value of the first focus statistical curve of which a current search position of the focus motor corresponds to a last search position. Likewise, the current slope of the second focus statistical curve may be determined based on a variation trend of the second focus statistical curve, and for example, the current slope of the second focus statistical curve may be determined according to a focus statistical value of the second focus statistical curve corresponding to the last search position of the focus motor. It can be understood that the larger the difference between the focus statistics of the current search position and the focus statistics of the last search position is, the larger the current slope of the focus statistics curve is.
For example, as shown in fig. 3, a "a 2" may correspond to the focus statistics of the last searched position of the focus motor, a "B2" may correspond to the focus statistics of the current searched position of the focus motor, and a "C2" may correspond to the focus statistics of the next searched position of the focus motor, at which time, the slope (i.e., the current slope) of FV1 at "B2" may be determined based on the focus statistics corresponding to the high frequency information at "B2" and the focus statistics corresponding to the high frequency information at "a 2". The slope (i.e., the current slope) of FV2 at "B2" may be determined based on the in-focus statistics corresponding to the low frequency information at "B2" and the in-focus statistics corresponding to the low frequency information at "a 2".
The focusing statistical curve with the largest current slope in the first focusing statistical curve and the second focusing statistical curve can be determined as the target focusing statistical curve. The larger the current slope is, the more clearly and accurately the focusing condition of the focusing motor at the current searching position can be reflected by the focusing statistical curve, so that the focusing motor can accurately determine the searching direction, and the rapid and accurate focusing can be realized.
Illustratively, the target focus statistical curve may be determined by comparing the current slope of FV1 with the current slope of FV2, and FV2 may be used as the target focus statistical curve because the current slope of FV1 is less than the current slope of FV 2. A first focusing operation may be performed according to FV2, i.e., the focusing motor may determine a search direction and search according to a preset step size to reach "C2" using FV2 as a reference focusing statistic curve. The slopes of FV1 and FV2 at "C2" may then be calculated, and the target focus statistical curve determined again until focus, ending the first focus operation.
As shown in fig. 3, in an example, FV1 may be defaulted as a starting target focusing statistical curve, and at this time, if the starting search position of the focusing motor is "a 2", and at this time, the current slope corresponding to FV1 is smaller than the current slope of FV2, the starting target focusing statistical curve FV1 may be switched to FV 2. The focusing motor moves to "B2", at which time the current slope corresponding to FV1 is still smaller than the current slope of FV2, FV2 may still be determined as the target focusing statistical curve, the focusing motor moves to "C2", at which time the current slope corresponding to FV1 is larger than the current slope of FV2, the target focusing statistical curve may be switched from FV2 to FV1, and the focusing operation is continuously performed according to FV1 until focusing is performed.
Therefore, the current slopes of the first focusing statistical curve and the second focusing statistical curve can be compared in real time according to the searching condition of the focusing motor, the target focusing statistical curve is determined, the target focusing statistical curve can be ensured to be in the first focusing statistical curve and the second focusing statistical curve, and the focusing statistical curve of the focusing condition of the focusing motor at the current searching position can be reflected most clearly and accurately, so that the focusing motor can determine the searching direction more accurately, rapid and accurate focusing is realized, and the focusing speed and the focusing effect are further improved.
In some embodiments, in the case that the current slope of the first focus statistical curve is smaller than the current slope of the second focus statistical curve, after the second focus statistical curve is determined as the target focus statistical curve, the photographing focusing method may further include the following steps:
increasing the movement step length of the focusing motor;
the above-mentioned performing the focusing operation according to the target focusing statistical curve may include the following steps:
and controlling the focusing motor to move according to the increased movement step length according to the target focusing statistical curve so as to execute the first focusing operation.
As shown in fig. 1, in the related art, a focusing motor usually performs a search movement according to a preset fixed step length, and needs to go to a full stroke according to the fixed step length in the search process, so that the focusing speed is slow, and in addition, since contrast focusing belongs to an a posteriori focusing algorithm, it is necessary to calculate a focusing statistic value of a current frame image after the focusing motor goes to a current search position, and if the step length is increased blindly in order to increase the focusing speed, an overshoot phenomenon (i.e., "C1" in fig. 1) that a focusing point is missed is easily caused, so that the focusing effect is affected.
In order to solve the above problem, in the embodiment of the present application, the first focusing operation may be divided into at least two stages, where the at least two stages may include an accelerated focusing stage and a focusing stage, the first focusing statistical curve is a focusing statistical curve corresponding to high-frequency information, and the second focusing statistical curve is a focusing statistical curve corresponding to low-frequency information.
It can be understood that in a normal illumination scene, and in a scene such as most night scenes and low details, at a position far from a focus point, low-frequency information in the picture information is high in proportion, and high-frequency information is low in proportion, and as the focus motor moves, the change of the low-frequency information is more obvious at this time, that is, the change trend of the second focus statistical curve is larger at this time. And at the position close to the focus point, the picture information is clearer, the high-frequency information is higher in proportion at the moment, the change of the high-frequency information is more obvious, and the change trend of the first focus statistical curve is larger at the moment.
Based on this, if the second focusing statistical curve is determined as the target focusing statistical curve, it may be considered that the focusing motor is at a position far from the focusing point, and at this time, it may be determined that the current focusing is in the accelerated focusing stage, the movement step length of the focusing motor may be increased, and the focusing motor may be controlled to move according to the increased movement step length according to the second focusing statistical curve, so as to perform the first focusing operation.
Therefore, when the first focusing operation is executed, the focusing motor can be flexibly adjusted to the movement step length according to the actual searching position instead of searching according to the fixed preset step length, and the first focusing operation is executed according to the increased movement step length at the position far away from the focusing point, so that the focusing speed is effectively accelerated.
In some embodiments, the increasing the moving step of the focus motor may include the following steps:
under the condition that the current slope of the second focusing statistical curve is smaller than or equal to a preset first threshold value and the current slope of the first focusing statistical curve is smaller than the current slope of the second focusing statistical curve, increasing the movement step length of the focusing motor to a first step length;
and under the condition that the current slope of the second focusing statistical curve is greater than a first threshold value and the current slope of the first focusing statistical curve is less than the current slope of the second focusing statistical curve, increasing the movement step length of the focusing motor to a second step length, wherein the first step length is greater than the second step length.
In the embodiment of the present application, in order to further improve the focusing efficiency and ensure the focusing accuracy, as shown in fig. 4, the accelerated focusing stage may be divided into a first stage 401 and a second stage 402.
For example, in a case where the current slope of the second focus statistical curve is smaller than or equal to the preset first threshold, and the current slope of the first focus statistical curve is smaller than the current slope of the second focus statistical curve, it may be considered that the first stage 401 is currently being performed. The first threshold may be set according to actual conditions, and as shown in fig. 4, when the current slope of FV2 is less than or equal to the preset first threshold, the current slope of FV1 is close to 0. At this time, the search position of the focusing motor is far away from the focusing point and the distance between the search position and the focusing point is far, the moving step length of the focusing motor can be increased to the first step length a, and the focusing motor can search and move according to the first step length a to execute the first focusing operation.
In the case where the current slope of the second focus statistical curve is greater than the first threshold and the current slope of the first focus statistical curve is less than the current slope of the second focus statistical curve, it may be considered to be in the second stage 402 at this time. As shown in fig. 4, the current slope of FV1 is not 0 when the current slope of FV2 is greater than a preset first threshold. At this time, the search position of the focusing motor is far from the focusing point and the distance between the search position and the focusing point is closer to the first step 401, the moving step of the focusing motor may be increased to the second step b, and the focusing motor may search and move according to the second step b to perform the first focusing operation. It is understood that the first step size a may be larger than the second step size b.
In this way, when the movement step length of the focusing motor is increased, the size range of the increased movement step length can be determined by considering the distance between the current searching position of the focusing motor and the focus point, when the distance between the searching position and the focus point is farther, the movement step length of the focusing motor can be increased to a larger first step length, and when the distance between the searching position and the focus point is closer, the movement step length of the focusing motor can be increased to a smaller second step length. Therefore, the overshoot phenomenon that the focus is missed due to the fact that the movement step length is large and the overshoot phenomenon that the focus is missed are improved while the focusing speed is accelerated, and therefore the focusing accuracy is effectively improved and the focusing effect is better.
In some embodiments, in the case that the current slope of the first focus statistical curve is greater than or equal to the current slope of the second focus statistical curve, after determining the first focus statistical curve as the target focus statistical curve, the photographing focusing method may further include the steps of:
reducing the movement step length of the focusing motor;
the performing the first focusing operation according to the target focusing statistical curve may include the following steps:
and controlling the focusing motor to move according to the reduced movement step length according to the target focusing statistical curve so as to execute a first focusing operation.
In the embodiment of the present application, to further ensure the focusing accuracy, as shown in fig. 4, if the first focusing statistical curve is determined as the target focusing statistical curve, it may be considered that the focusing motor is at a position close to the focusing point, at this time, it may be determined that the current focusing is in the focusing stage 403, the movement step of the focusing motor may be reduced, and the focusing motor may be controlled to move according to the reduced movement step according to the first focusing statistical curve, so as to perform the first focusing operation.
For example, if the current slope of FV1 is greater than or equal to the current slope of FV2, FV1 may be determined as the target focusing statistical curve, and it may be considered that the search position of the focusing motor is close to the focusing point at this time, the moving step size of the focusing motor may be reduced to a third step size c, and the focusing motor may search for movement according to the third step size c to perform the first focusing operation.
Therefore, when the first focusing operation is executed, the focusing motor can focus at the searching position close to the focusing point according to a smaller movement step length, and according to the principle of coarse adjustment and fine adjustment, the overshoot phenomenon that the focusing point is missed can be effectively avoided, so that the focusing accuracy is further improved, and the focusing effect is better.
In some embodiments, before performing the first focusing operation based on the variation trends of the first focusing statistical curve and the second focusing statistical curve, the photographing focusing method may further include:
performing third filtering processing on the acquired at least two frames of original images, and outputting a third focusing statistical curve;
performing a first focusing operation based on the variation trends of the first and second focusing statistical curves, including:
and executing the first focusing operation based on the variation trends of the first focusing statistical curve, the second focusing statistical curve and the third focusing statistical curve.
In the embodiment of the application, in order to further ensure the focusing efficiency and the focusing effect and improve the focusing reliability, third filtering processing can be performed on the acquired at least two frames of original images, and a third focusing statistical curve is output. For example, the third filtering process may obtain a focus statistical value corresponding to the low and medium frequency information in each frame of image based on the auxiliary filter to output a third focus statistical curve corresponding to the low and medium frequency information. The first focusing operation may then be performed based on the trend of the first, second, and third focusing statistical curves.
It can be understood that, in some examples, a fourth filtering process may be further performed on the at least two collected original images, and a fourth focusing statistical curve is output; and performing fifth filtering processing on the acquired at least two frames of original images, and outputting the number of the focusing statistical curves of the fifth focusing statistical curve, which is not specifically limited herein.
Therefore, in the first focusing operation process, the variation trend of a plurality of focusing statistical curves after filtering processing of different frequency bands can be referred to, and a more comprehensive and reliable reference basis is further provided for accurate focusing. The multiple focusing statistical curves are focused cooperatively, so that the focusing requirements under various complex scenes can be further met, the focusing efficiency and the focusing effect are further ensured, and the focusing reliability is improved.
In some embodiments, after the performing of the first focusing operation based on the variation trends of the first focusing statistical curve and the second focusing statistical curve, the photographing focusing method may further include the following steps:
displaying prompt information under the condition that the current shooting scene is the same as the shooting scene in which the first focusing operation is positioned;
receiving touch input of a user to prompt information;
and responding to the touch input, and executing a second focusing operation on the current shooting scene based on the focusing statistical curve when the first focusing operation is finished.
In the embodiment of the present application, it may be determined whether the current shooting scene is the same as the shooting scene in which the first focusing operation is performed. For example, it may be determined whether the current photographing scene is the same as the photographing scene in which the first focusing operation is performed according to an existing image processing algorithm. And at least two historical focusing operations can be acquired, and if the focusing statistical curves when the at least two historical focusing operations are finished are the same, the user can be considered to be in the same shooting scene all the time. The current photographing scene may be considered to be the same as the photographing scene in which the first focusing operation is performed.
In the case where the current photographing scene is the same as the photographing scene in which the first focusing operation is performed, the prompt information may be displayed. Touch input of a user to the prompt information can be received, and in response to the touch input, a second focusing operation is executed in the current shooting scene based on the focusing statistical curve when the first focusing operation is finished.
As shown in fig. 5, at this time, a preset "same scene" control 501 may be displayed on a related interface of the electronic device, and when a touch input to the "same scene" control 501 by a user is received, a focusing statistical curve at the end of a first focusing operation may be directly determined as a target focusing statistical curve of a second focusing operation, and the second focusing operation is executed in a current shooting scene according to the target focusing statistical curve.
Therefore, for the situation that the current shooting scene is the same as the shooting scene in which the first focusing operation is located, the focusing statistical curve at the end of the first focusing operation can be directly used as the target focusing statistical curve of the second focusing operation, the change trend of the first focusing statistical curve and the second focusing statistical curve does not need to be compared, the target focusing statistical curve is determined according to the comparison result, and the focusing speed can be further improved.
In order to facilitate understanding of the shooting focusing method provided by the above embodiment, the following describes the shooting focusing method with a specific scene embodiment. Fig. 6 is a flowchart illustrating a scene embodiment of a shooting focusing method according to an embodiment of the present application.
The application scenario of the scenario embodiment may be as follows: and focusing the shot picture information by adopting a contrast focusing mode.
The scenario embodiment may specifically include the following steps:
step 601, acquiring an original image. For example, the picture information of the focusing process searched by the focusing motor can be acquired, and at least two frames of original images can be generated according to the picture information.
Step 602, outputting a focusing statistic curve. For example, a first filtering process and a second filtering process may be performed on at least two frames of original images, and a first focus statistical curve and a second focus statistical curve may be output, where frequency bands of the first filtering process and the second filtering process are different.
Step 603, start the focus statistic curve switching. For example, the focusing statistical curve corresponding to the high-frequency information may be defaulted as the initial focusing statistical curve, at this time, the variation trends of the first focusing statistical curve and the second focusing statistical curve at the initial search position of the focusing motor may be compared to determine whether the initial focusing statistical curve needs to be switched, and if the variation trend of the focusing statistical curve corresponding to the low-frequency information is more significant, it may be considered that the initial focusing statistical curve needs to be switched, step 604 may be executed. If the variation trend of the focusing statistical curve corresponding to the high-frequency information is more obvious, it can be considered that the initial focusing statistical curve does not need to be switched, step 607 may be executed.
Step 604, accelerate focusing. For example, after the initial focusing statistical curve is switched, the focusing statistical curve corresponding to the low-frequency information may be determined as the target focusing statistical curve at this time, and at this time, the accelerated focusing stage is entered, so that the movement step length of the focusing motor may be increased. If the current slope of the second focusing statistical curve is smaller than or equal to the preset first threshold, the search position of the focusing motor is far away from the focusing point and the distance between the search position and the focusing point is far, and the first focusing operation can be executed according to the first step search movement. If the current slope of the second focusing statistical curve is greater than the preset first threshold, the search position of the focusing motor is far away from the focusing point and the distance between the search position and the focusing point is relatively short, and the first focusing operation can be executed according to the second step length search movement. Wherein the first step size is greater than the second step size.
Step 605, switching the focusing statistical curve in the determination process. For example, for each step of movement of the focus motor, the target focus statistical curve may be re-determined according to the current slopes of the first focus statistical curve and the second focus statistical curve.
Step 606, determine whether to switch back to the initial focusing statistical curve. For example, if the variation trend of the focusing statistical curve corresponding to the high frequency information is more obvious than the variation trend of the focusing statistical curve corresponding to the low frequency information along with the movement of the focusing motor, at this time, it may be considered to switch back to the initial focusing statistical curve, step 607 may be executed, and if the initial focusing statistical curve is not switched back, step 605 may be continuously executed.
Step 607, the handover is ended. For example, at this time, the target focusing statistical curve may be a focusing statistical curve corresponding to the high-frequency information, it may be considered that the position of the focusing motor is close to the focusing point, the motion step may be reduced, the focusing motor may search for movement according to the reduced motion step, and continue to perform the first focusing operation until the picture information is focused.
Step 608, determine whether to continue focusing. After the first focusing operation is finished, whether focusing is needed to be continued or not can be judged, if not, step 609 can be executed, and if yes, step 610 can be executed.
Step 609, finishing focusing, and shooting clear picture information at the moment.
At step 610, historical focus statistical curve counts. For example, at least two historical focusing operations may be obtained, and if the focusing statistical curves at the end of the at least two historical focusing operations are the same, the user may be considered to be in the same shooting scene all the time, step 611 may be performed.
Step 611, switch the initial focusing statistical curve. For example, if the current shooting scene is the same as the shooting scene in which the first focusing operation is performed, the initial focusing statistical curve may be switched from the focusing statistical curve corresponding to the default high-frequency information to the focusing statistical curve at the end of the first focusing operation, and then the second focusing operation may be directly performed according to the focusing statistical curve at the end of the first focusing operation without switching the focusing statistical curve for multiple times.
In the scene embodiment, in the first focusing operation process, the variation trends of the first focusing statistical curve and the second focusing statistical curve after filtering processing in different frequency bands can be referred to, so that the problem that the motor is difficult to search along the accurate direction due to the fact that the variation trend of the single focusing statistical curve is small in amplitude to affect the focusing efficiency and the focusing effect can be avoided, and the variation trends of the first focusing statistical curve and the second focusing statistical curve after filtering processing in different frequency bands provide a more comprehensive and reliable reference basis for accurate focusing. Therefore, the first focusing statistical curve and the second focusing statistical curve are focused cooperatively, the focusing requirements under various complex scenes can be met, the focusing efficiency and the focusing effect are ensured, and the focusing reliability is improved.
According to the shooting focusing method provided by the embodiment of the application, the executive main body can be a shooting focusing device. The method for executing shooting focusing by the shooting focusing device is taken as an example in the embodiment of the present application, and the shooting focusing device provided by the embodiment of the present application is described.
As shown in fig. 7, an apparatus 700 for focusing in shooting provided in an embodiment of the present application may include:
an obtaining module 701, configured to perform first filtering processing and second filtering processing on at least two acquired original images, and output a first focus statistical curve and a second focus statistical curve;
a first focusing module 702, configured to perform a first focusing operation based on a variation trend of the first focusing statistical curve and the second focusing statistical curve;
and the frequency bands of the first filtering processing and the second filtering processing are different.
In the embodiment of the application, the shooting focusing device can respectively perform first filtering processing and second filtering processing on at least two collected original images, and output a first focusing statistical curve and a second focusing statistical curve; executing a first focusing operation based on the variation trends of the first focusing statistical curve and the second focusing statistical curve; and the frequency bands of the first filtering processing and the second filtering processing are different. Therefore, in the first focusing operation process, the variation trends of the first focusing statistical curve and the second focusing statistical curve after the filtering processing of different frequency bands can be referred, so that the problems that the motor is difficult to search along the accurate direction and the focusing efficiency and the focusing effect are influenced due to the fact that the variation trend amplitude of the single focusing statistical curve is small can be solved, and the variation trends of the first focusing statistical curve and the second focusing statistical curve after the filtering processing of different frequency bands provide a more comprehensive and reliable reference basis for accurate focusing. Therefore, the first focusing statistical curve and the second focusing statistical curve are focused cooperatively, the focusing requirements under various complex scenes can be met, the focusing efficiency and the focusing effect are ensured, and the focusing reliability is improved.
In some embodiments, the first focus module 703 may include:
the determining unit is used for determining a target focusing statistical curve based on the variation trend of the first focusing statistical curve and the second focusing statistical curve;
and the focusing unit is used for executing a first focusing operation according to the target focusing statistical curve.
Therefore, a target focusing statistical curve which can provide more accurate reference for the first focusing operation can be determined from the first focusing statistical curve and the second focusing statistical curve based on the variation trend, so that the focusing requirements under various complex scenes can be met when the first focusing operation is executed according to the target focusing statistical curve, the focusing efficiency and the focusing effect are ensured, and the focusing reliability is improved.
In some embodiments, the determining unit may be further configured to:
determining the first focusing statistical curve as a target focusing statistical curve under the condition that the current slope of the first focusing statistical curve is greater than or equal to the current slope of the second focusing statistical curve;
and under the condition that the current slope of the first focusing statistical curve is smaller than the current slope of the second focusing statistical curve, determining the second focusing statistical curve as a target focusing statistical curve.
Therefore, the current slopes of the first focusing statistical curve and the second focusing statistical curve can be compared in real time according to the searching condition of the focusing motor, the target focusing statistical curve is determined, the target focusing statistical curve can be ensured to be in the first focusing statistical curve and the second focusing statistical curve, and the focusing statistical curve of the focusing condition of the focusing motor at the current searching position can be reflected most clearly and accurately, so that the focusing motor can determine the searching direction more accurately, rapid and accurate focusing is realized, and the focusing speed and the focusing effect are further improved.
In some embodiments, the photographing focusing apparatus 700 may further include:
the increasing module is used for increasing the movement step length of the focusing motor;
and the focusing unit is also used for controlling the focusing motor to move according to the increased movement step length according to the target focusing statistical curve so as to execute the first focusing operation.
Therefore, when the first focusing operation is executed, the focusing motor can be flexibly adjusted to the movement step length according to the actual searching position instead of searching according to the fixed preset step length, and the first focusing operation is executed according to the increased movement step length at the position far away from the focusing point, so that the focusing speed is effectively accelerated.
In some embodiments, the increasing module may be further to:
under the condition that the current slope of the second focusing statistical curve is smaller than or equal to a preset first threshold value and the current slope of the first focusing statistical curve is smaller than the current slope of the second focusing statistical curve, increasing the movement step length of the focusing motor to a first step length;
under the condition that the current slope of the second focusing statistical curve is larger than a first threshold value and the current slope of the first focusing statistical curve is smaller than the current slope of the second focusing statistical curve, increasing the movement step length of the focusing motor to a second step length;
wherein the first step size is larger than the second step size.
In this way, when the movement step length of the focusing motor is increased, the size range of the increased movement step length can be determined by considering the distance between the current searching position of the focusing motor and the focus point, when the distance between the searching position and the focus point is farther, the movement step length of the focusing motor can be increased to a larger first step length, and when the distance between the searching position and the focus point is closer, the movement step length of the focusing motor can be increased to a smaller second step length. Therefore, the overshoot phenomenon that the focus is missed due to the fact that the movement step length is large and the overshoot phenomenon that the focus is missed are improved while the focusing speed is accelerated, and therefore the focusing accuracy is effectively improved and the focusing effect is better.
In some embodiments, the photographing focusing apparatus 700 may further include:
a reduction module for reducing a movement step of the focus motor;
the focusing unit can be further used for controlling the focusing motor to move according to the reduced movement step length according to the target focusing statistical curve so as to execute the first focusing operation.
Therefore, when the first focusing operation is executed, the focusing motor can focus at the searching position close to the focusing point according to a smaller movement step length, and according to the principle of coarse adjustment and fine adjustment, the overshoot phenomenon that the focusing point is missed can be effectively avoided, so that the focusing accuracy is further improved, and the focusing effect is better.
In some embodiments, the photographing focusing apparatus 700 may further include:
the output module is used for carrying out third filtering processing on the acquired at least two frames of original images and outputting a third focusing statistical curve;
and the first focusing module is also used for executing a first focusing operation based on the variation trends of the first focusing statistical curve, the second focusing statistical curve and the third focusing statistical curve.
Therefore, in the first focusing operation process, the variation trend of a plurality of focusing statistical curves after filtering processing of different frequency bands can be referred to, and a more comprehensive and reliable reference basis is further provided for accurate focusing. The multiple focusing statistical curves are focused cooperatively, so that the focusing requirements under various complex scenes can be further met, the focusing efficiency and the focusing effect are further ensured, and the focusing reliability is improved.
In some embodiments, the photographing focusing apparatus 700 may further include:
the display module is used for displaying prompt information under the condition that the current shooting scene is the same as the shooting scene in which the first focusing operation is positioned;
the receiving module is used for receiving touch input of a user to the prompt information;
and the second focusing module is used for responding to the touch input and executing second focusing operation on the current shooting scene based on the focusing statistical curve when the first focusing operation is finished.
Therefore, for the situation that the current shooting scene is the same as the shooting scene in which the first focusing operation is located, the focusing statistical curve at the end of the first focusing operation can be directly used as the target focusing statistical curve of the second focusing operation, the change trend of the first focusing statistical curve and the second focusing statistical curve does not need to be compared, the target focusing statistical curve is determined according to the comparison result, and the focusing speed can be further improved.
The shooting focusing device in the embodiment of the present application may be an electronic device, or may be a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be a device other than a terminal. The electronic Device may be, for example, a Mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic Device, a Mobile Internet Device (MID), an Augmented Reality (AR)/Virtual Reality (VR) Device, a robot, a wearable Device, an ultra-Mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and may also be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The shooting focusing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The shooting focusing device provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to 6, and is not described herein again to avoid repetition.
Optionally, as shown in fig. 8, an electronic device 800 is further provided in this embodiment of the present application, and includes a processor 801 and a memory 802, where the memory 802 stores a program or an instruction that can be executed on the processor 801, and when the program or the instruction is executed by the processor 801, the steps of the shooting focusing method embodiment described above are implemented, and the same technical effects can be achieved, and are not described again here to avoid repetition.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 900 includes, but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910.
Those skilled in the art will appreciate that the electronic device 900 may further include a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 910 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system. The electronic device structure shown in fig. 9 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is not repeated here.
Among other things, the processor 910 may be configured to:
respectively carrying out first filtering processing and second filtering processing on at least two collected original images, and outputting a first focusing statistical curve and a second focusing statistical curve;
executing a first focusing operation based on the variation trends of the first focusing statistical curve and the second focusing statistical curve;
and the frequency bands of the first filtering processing and the second filtering processing are different.
In the embodiment of the application, the electronic device can respectively perform first filtering processing and second filtering processing on at least two collected original images, and output a first focus statistical curve and a second focus statistical curve; executing a first focusing operation based on the variation trends of the first focusing statistical curve and the second focusing statistical curve; and the frequency bands of the first filtering processing and the second filtering processing are different. Therefore, in the first focusing operation process, the variation trends of the first focusing statistical curve and the second focusing statistical curve after the filtering processing of different frequency bands can be referred, so that the problems that the motor is difficult to search along the accurate direction and the focusing efficiency and the focusing effect are influenced due to the fact that the variation trend amplitude of the single focusing statistical curve is small can be solved, and the variation trends of the first focusing statistical curve and the second focusing statistical curve after the filtering processing of different frequency bands provide a more comprehensive and reliable reference basis for accurate focusing. Therefore, the first focusing statistical curve and the second focusing statistical curve are focused cooperatively, the focusing requirements under various complex scenes can be met, the focusing efficiency and the focusing effect are ensured, and the focusing reliability is improved.
In some embodiments, processor 910 may also be configured to:
determining a target focusing statistical curve based on the variation trend of the first focusing statistical curve and the second focusing statistical curve;
and executing a first focusing operation according to the target focusing statistical curve.
Therefore, a target focusing statistical curve which can provide more accurate reference for the first focusing operation can be determined from the first focusing statistical curve and the second focusing statistical curve based on the variation trend, so that the focusing requirements under various complex scenes can be met when the first focusing operation is executed according to the target focusing statistical curve, the focusing efficiency and the focusing effect are ensured, and the focusing reliability is improved.
In some embodiments, processor 910 may also be configured to:
determining the first focusing statistical curve as a target focusing statistical curve under the condition that the current slope of the first focusing statistical curve is greater than or equal to the current slope of the second focusing statistical curve;
and under the condition that the current slope of the first focusing statistical curve is smaller than the current slope of the second focusing statistical curve, determining the second focusing statistical curve as a target focusing statistical curve.
Therefore, the current slopes of the first focusing statistical curve and the second focusing statistical curve can be compared in real time according to the searching condition of the focusing motor, the target focusing statistical curve is determined, the target focusing statistical curve can be ensured to be in the first focusing statistical curve and the second focusing statistical curve, and the focusing statistical curve of the focusing condition of the focusing motor at the current searching position can be reflected most clearly and accurately, so that the focusing motor can determine the searching direction more accurately, rapid and accurate focusing is realized, and the focusing speed and the focusing effect are further improved.
In some embodiments, processor 910 may also be configured to:
increasing the movement step length of the focusing motor;
and controlling the focusing motor to move according to the increased movement step length according to the target focusing statistical curve so as to execute a first focusing operation.
Therefore, when the first focusing operation is executed, the focusing motor can be flexibly adjusted to the movement step length according to the actual searching position instead of searching according to the fixed preset step length, and the first focusing operation is executed according to the increased movement step length at the position far away from the focusing point, so that the focusing speed is effectively accelerated.
In some embodiments, processor 910 may also be configured to:
under the condition that the current slope of the second focusing statistical curve is smaller than or equal to a preset first threshold value and the current slope of the first focusing statistical curve is smaller than the current slope of the second focusing statistical curve, increasing the movement step length of the focusing motor to a first step length;
under the condition that the current slope of the second focusing statistical curve is larger than a first threshold value and the current slope of the first focusing statistical curve is smaller than the current slope of the second focusing statistical curve, increasing the movement step length of the focusing motor to a second step length;
wherein the first step size is larger than the second step size.
Therefore, when the movement step length of the focusing motor is increased, the distance between the current searching position of the focusing motor and the focus point can be considered, the size range of the increased movement step length is determined, when the distance between the searching position and the focus point is farther, the movement step length of the focusing motor can be increased to a larger first step length, and when the distance between the searching position and the focus point is closer, the movement step length of the focusing motor can be increased to a smaller second step length. Therefore, the overshoot phenomenon that the focus is missed due to the fact that the movement step length is large and the overshoot phenomenon that the focus is missed are improved while the focusing speed is accelerated, and therefore the focusing accuracy is effectively improved and the focusing effect is better.
In some embodiments, processor 910 may also be configured to:
reducing the movement step length of the focusing motor;
and controlling the focusing motor to move according to the reduced movement step length according to the target focusing statistical curve so as to execute a first focusing operation.
Therefore, when the first focusing operation is executed, the focusing motor can focus at the searching position close to the focusing point according to a smaller movement step length, and according to the principle of coarse adjustment and fine adjustment, the overshoot phenomenon that the focusing point is missed can be effectively avoided, so that the focusing accuracy is further improved, and the focusing effect is better.
In some embodiments, processor 910 may also be configured to:
performing third filtering processing on the acquired at least two frames of original images, and outputting a third focusing statistical curve;
performing a first focusing operation based on the variation trends of the first and second focusing statistical curves, including:
and executing the first focusing operation based on the variation trends of the first focusing statistical curve, the second focusing statistical curve and the third focusing statistical curve.
Therefore, in the first focusing operation process, the variation trend of a plurality of focusing statistical curves after filtering processing of different frequency bands can be referred to, and a more comprehensive and reliable reference basis is further provided for accurate focusing. The multiple focusing statistical curves are focused cooperatively, so that the focusing requirements under various complex scenes can be further met, the focusing efficiency and the focusing effect are further ensured, and the focusing reliability is improved.
In some embodiments, the display unit 906 may be used to: displaying prompt information under the condition that the current shooting scene is the same as the shooting scene in which the first focusing operation is positioned;
a user input unit 907, which may be used to receive a touch input of the user on the prompt information;
wherein, the processor 910 is further configured to:
and responding to the touch input, and executing a second focusing operation on the current shooting scene based on the focusing statistical curve when the first focusing operation is finished.
Therefore, for the situation that the current shooting scene is the same as the shooting scene in which the first focusing operation is located, the focusing statistical curve at the end of the first focusing operation can be directly used as the target focusing statistical curve of the second focusing operation, the change trend of the first focusing statistical curve and the second focusing statistical curve does not need to be compared, the target focusing statistical curve is determined according to the comparison result, and the focusing speed can be further improved.
It should be understood that, in the embodiment of the present application, the input Unit 904 may include a Graphics Processing Unit (GPU) 9041 and a microphone 9042, and the Graphics Processing Unit 9041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. A touch panel 9071, also called a touch screen. The touch panel 9071 may include two parts, a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
The memory 909 may be used to store software programs as well as various data. The memory 909 may mainly include a first storage area storing a program or an instruction and a second storage area storing data, wherein the first storage area may store an operating system, an application program or an instruction (such as a sound playing function, an image playing function, and the like) required for at least one function, and the like. Further, the memory 909 may include volatile memory or nonvolatile memory, or the memory 909 may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM), a Static Random Access Memory (Static RAM, SRAM), a Dynamic Random Access Memory (Dynamic RAM, DRAM), a Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), a Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, ddr SDRAM), an Enhanced Synchronous SDRAM (ESDRAM), a Synchronous Link DRAM (SLDRAM), and a Direct bus RAM (DRRAM). The memory 909 in the embodiments of the subject application includes, but is not limited to, these and any other suitable types of memory.
Processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor, which primarily handles operations involving the operating system, user interface, and applications, and a modem processor, which primarily handles wireless communication signals, such as a baseband processor. It is to be appreciated that the modem processor described above may not be integrated into processor 910.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the shooting focusing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read only memory ROM, a random access memory RAM, a magnetic or optical disk, and the like.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the above shooting focusing method embodiment, and can achieve the same technical effect, and the details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
The present application provides a computer program product, where the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the processes of the above shooting focusing method embodiment, and can achieve the same technical effects, and in order to avoid repetition, details are not repeated here.
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. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
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 application may be embodied in the form of a computer 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, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A shooting focusing method is characterized by comprising the following steps:
respectively carrying out first filtering processing and second filtering processing on at least two collected original images, and outputting a first focusing statistical curve and a second focusing statistical curve;
executing a first focusing operation based on the variation trends of the first focusing statistical curve and the second focusing statistical curve;
wherein the frequency bands of the first filtering process and the second filtering process are different.
2. The method of claim 1, wherein performing a first focus operation based on the trend of the first focus statistical curve and the second focus statistical curve comprises:
determining a target focusing statistical curve based on the variation trend of the first focusing statistical curve and the second focusing statistical curve;
and executing a first focusing operation according to the target focusing statistical curve.
3. The method of claim 2, wherein determining a target focus statistical curve based on the trend of the first focus statistical curve and the second focus statistical curve comprises:
determining the first focus statistical curve as the target focus statistical curve when the current slope of the first focus statistical curve is greater than or equal to the current slope of the second focus statistical curve;
and under the condition that the current slope of the first focusing statistical curve is smaller than the current slope of the second focusing statistical curve, determining the second focusing statistical curve as the target focusing statistical curve.
4. The method of claim 3, wherein after determining the second focus statistical curve as the target focus statistical curve if the current slope of the first focus statistical curve is less than the current slope of the second focus statistical curve, the method further comprises:
increasing the movement step length of the focusing motor;
the executing the focusing operation according to the target focusing statistical curve comprises the following steps:
and controlling the focusing motor to move according to the increased movement step length according to the target focusing statistical curve so as to execute a first focusing operation.
5. The method of claim 4, wherein increasing the step size of the movement of the focus motor comprises:
increasing the movement step length of a focusing motor to a first step length under the condition that the current slope of the second focusing statistical curve is smaller than or equal to a preset first threshold value and the current slope of the first focusing statistical curve is smaller than the current slope of the second focusing statistical curve;
increasing the movement step length of the focusing motor to a second step length under the condition that the current slope of the second focusing statistical curve is greater than the first threshold value and the current slope of the first focusing statistical curve is less than the current slope of the second focusing statistical curve;
wherein the first step size is greater than the second step size.
6. The method of claim 3, wherein after determining the first focus statistical curve as the target focus statistical curve if the current slope of the first focus statistical curve is greater than or equal to the current slope of the second focus statistical curve, the method further comprises:
reducing the movement step length of the focusing motor;
the executing a first focusing operation according to the target focusing statistical curve comprises:
and controlling the focusing motor to move according to the reduced movement step length according to the target focusing statistical curve so as to execute a first focusing operation.
7. The method of claim 1, wherein before performing the first focus operation based on the trend of the first focus statistical curve and the second focus statistical curve, the method further comprises:
performing third filtering processing on the acquired at least two frames of original images, and outputting a third focusing statistical curve;
performing a first focusing operation based on the variation trends of the first and second focusing statistical curves, including:
and executing a first focusing operation based on the variation trends of the first focusing statistical curve, the second focusing statistical curve and the third focusing statistical curve.
8. The method of claim 1, wherein after performing a first focus operation based on the trend of the first focus statistical curve and the second focus statistical curve, the method further comprises:
displaying prompt information under the condition that the current shooting scene is the same as the shooting scene in which the first focusing operation is positioned;
receiving touch input of a user to the prompt information;
and responding to the touch input, and executing a second focusing operation on the current shooting scene based on the focusing statistical curve when the first focusing operation is finished.
9. A photographing focusing apparatus, comprising:
the acquisition module is used for respectively carrying out first filtering processing and second filtering processing on the acquired at least two frames of original images and outputting a first focusing statistical curve and a second focusing statistical curve;
the first focusing module is used for executing a first focusing operation based on the variation trend of the first focusing statistical curve and the second focusing statistical curve;
wherein the frequency bands of the first filtering process and the second filtering process are different.
10. An electronic device, characterized by comprising a processor and a memory, said memory storing a program or instructions executable on said processor, said program or instructions, when executed by said processor, implementing the steps of the shooting focusing method according to any one of claims 1 to 8.
CN202210396869.7A 2022-04-15 2022-04-15 Shooting focusing method and device and electronic equipment Pending CN114827461A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210396869.7A CN114827461A (en) 2022-04-15 2022-04-15 Shooting focusing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210396869.7A CN114827461A (en) 2022-04-15 2022-04-15 Shooting focusing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114827461A true CN114827461A (en) 2022-07-29

Family

ID=82535663

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210396869.7A Pending CN114827461A (en) 2022-04-15 2022-04-15 Shooting focusing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114827461A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06165017A (en) * 1992-11-18 1994-06-10 Canon Inc Automatic focus detector
KR20080015751A (en) * 2006-08-15 2008-02-20 후지필름 가부시키가이샤 Photographing apparatus and in-focus position searching method
CN102200674A (en) * 2010-03-23 2011-09-28 三星电子株式会社 Imaging apparatus performing auto focusing function with plurality of band pass filters and auto focusing method applied to the same
CN106686313A (en) * 2017-01-18 2017-05-17 广东欧珀移动通信有限公司 Controlling method, controlling device and electronic device thereof
CN107682611A (en) * 2017-11-03 2018-02-09 广东欧珀移动通信有限公司 Method, apparatus, computer-readable recording medium and the electronic equipment of focusing
CN108139564A (en) * 2015-09-30 2018-06-08 富士胶片株式会社 Focusing control apparatus, photographic device, focusing control method and focusing control program
CN113114947A (en) * 2021-04-20 2021-07-13 重庆紫光华山智安科技有限公司 Focusing adjustment method and device, electronic equipment and storage medium
WO2021217427A1 (en) * 2020-04-28 2021-11-04 深圳市大疆创新科技有限公司 Image processing method and apparatus, photographing device, movable platform, and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06165017A (en) * 1992-11-18 1994-06-10 Canon Inc Automatic focus detector
KR20080015751A (en) * 2006-08-15 2008-02-20 후지필름 가부시키가이샤 Photographing apparatus and in-focus position searching method
CN102200674A (en) * 2010-03-23 2011-09-28 三星电子株式会社 Imaging apparatus performing auto focusing function with plurality of band pass filters and auto focusing method applied to the same
CN108139564A (en) * 2015-09-30 2018-06-08 富士胶片株式会社 Focusing control apparatus, photographic device, focusing control method and focusing control program
CN106686313A (en) * 2017-01-18 2017-05-17 广东欧珀移动通信有限公司 Controlling method, controlling device and electronic device thereof
CN107682611A (en) * 2017-11-03 2018-02-09 广东欧珀移动通信有限公司 Method, apparatus, computer-readable recording medium and the electronic equipment of focusing
WO2021217427A1 (en) * 2020-04-28 2021-11-04 深圳市大疆创新科技有限公司 Image processing method and apparatus, photographing device, movable platform, and storage medium
CN113114947A (en) * 2021-04-20 2021-07-13 重庆紫光华山智安科技有限公司 Focusing adjustment method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JP2011508268A5 (en)
JP2011508268A (en) Method and apparatus with depth map generation
JP2012164002A (en) Imaging apparatus and imaging method
CN113099122A (en) Shooting method, shooting device, shooting equipment and storage medium
CN112738397A (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN112333382B (en) Shooting method and device and electronic equipment
CN112887609A (en) Shooting method, shooting device, electronic equipment and storage medium
CN112422798A (en) Photographing method and device, electronic equipment and storage medium
US8717491B2 (en) Auto focusing method, recording medium for recording the method, and auto focusing apparatus
CN111866378A (en) Image processing method, apparatus, device and medium
CN113747067B (en) Photographing method, photographing device, electronic equipment and storage medium
CN111405185A (en) Zoom control method and device for camera, electronic equipment and storage medium
CN113891018A (en) Shooting method and device and electronic equipment
CN111225144A (en) Video shooting method and device, electronic equipment and computer storage medium
CN115379118B (en) Camera switching method and device, electronic equipment and readable storage medium
CN114827461A (en) Shooting focusing method and device and electronic equipment
CN115439386A (en) Image fusion method and device, electronic equipment and storage medium
CN114286007A (en) Image processing circuit, image processing method, electronic device, and readable storage medium
CN114286004A (en) Focusing method, shooting device, electronic equipment and medium
CN113873147A (en) Video recording method and device and electronic equipment
CN114286011A (en) Focusing method and device
CN112367464A (en) Image output method and device and electronic equipment
CN112399092A (en) Shooting method and device and electronic equipment
CN113676657B (en) Time-delay shooting method and device, electronic equipment and storage medium
CN112565605B (en) Image display method and device and electronic equipment

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