CN114374800B - Focusing processing method and device, storage medium and electronic device - Google Patents

Focusing processing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN114374800B
CN114374800B CN202210043533.2A CN202210043533A CN114374800B CN 114374800 B CN114374800 B CN 114374800B CN 202210043533 A CN202210043533 A CN 202210043533A CN 114374800 B CN114374800 B CN 114374800B
Authority
CN
China
Prior art keywords
target
image capturing
target angle
capturing apparatus
angle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210043533.2A
Other languages
Chinese (zh)
Other versions
CN114374800A (en
Inventor
李准
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202210043533.2A priority Critical patent/CN114374800B/en
Publication of CN114374800A publication Critical patent/CN114374800A/en
Application granted granted Critical
Publication of CN114374800B publication Critical patent/CN114374800B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • 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
    • H04N23/673Focus control based on electronic image sensor signals based on contrast or high frequency components of image signals, e.g. hill climbing method
    • 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
    • H04N23/675Focus control based on electronic image sensor signals comprising setting of focusing regions

Abstract

The embodiment of the invention provides a focusing processing method, a focusing processing device, a storage medium and an electronic device, wherein the method comprises the following steps: determining a first target angle and a second target angle of the target image capturing apparatus under the condition that the target image capturing apparatus rotates, wherein the first target angle is used for indicating the angle change of the target image capturing apparatus on a first reference plane relative to the angle change before rotation, and the second target angle is used for indicating the angle change of the target image capturing apparatus on a second reference plane relative to the angle change before rotation; in a case where it is determined that the first target angle and the second target angle satisfy the first preset condition, it is determined that the focusing operation is not performed on the target image capturing apparatus. The invention solves the problem of poor user experience caused by long shooting time due to frequent automatic focusing of the image pickup equipment in the related technology, and achieves the effect of improving the user experience.

Description

Focusing processing method and device, storage medium and electronic device
Technical Field
The embodiment of the invention relates to the technical field of monitoring, in particular to a focusing processing method and device, a storage medium and an electronic device.
Background
Currently, the monitoring technology is widely applied to various fields, such as road traffic, fire protection, safe production, an electric power system, public safety management and the like, and plays an important role in production, life and social security, so that the popularity of the image capturing device in the market is higher and higher, for example, a camera head and the like, manual focusing is usually required to lock a shooting object, and with the continuous improvement of the performance of the image capturing device, many image capturing devices can automatically focus on a real focus after aiming at the shooting object, but can also cause that the image capturing device frequently performs automatic focusing in some scenes, for example, the image capturing device can horizontally and vertically rotate a certain angle to a monitoring scene in application scenes such as multi-scene monitoring, tracking target objects and the like, and an automatic focusing function is triggered to enable images of the monitoring scene to be clear, and when the rotation operation of the cloud head is frequent, the shooting time can be longer due to repeated automatic focusing triggering, so that the using experience is affected.
Aiming at the problem that the shooting time is long due to frequent automatic focusing of the image pickup device in the related art, so that the use experience of a user is poor, no effective solution is proposed at present.
Disclosure of Invention
The embodiment of the invention provides a focusing processing method, a focusing processing device, a storage medium and an electronic device, which are used for at least solving the problem that the use experience of a user is poor due to long shooting time caused by frequent automatic focusing of image pickup equipment in the related technology.
According to an embodiment of the present invention, there is provided a focusing processing method including: determining a first target angle and a second target angle of the target image capturing apparatus when the target image capturing apparatus rotates, wherein the first target angle is used for indicating the angle change of the target image capturing apparatus on a first reference plane relative to the angle change before rotation, and the second target angle is used for indicating the angle change of the target image capturing apparatus on a second reference plane relative to the angle change before rotation; in a case where it is determined that the first target angle and the second target angle satisfy a first preset condition, it is determined that a focusing operation is not performed on the target image capturing apparatus.
In one exemplary embodiment, in a case where it is determined that the first target angle and the second target angle satisfy a first preset condition, determining that a focusing operation is not performed on the target image capturing apparatus includes: in a case where it is determined that the first target angle and the second target angle satisfy a first sub-target condition, determining that a focusing operation is not performed on the target image capturing apparatus, wherein the first preset condition includes the first sub-target condition including: the first target angle is less than or equal to a first threshold and the second target angle is less than or equal to a second threshold.
In one exemplary embodiment, in a case where it is determined that the first target angle and the second target angle satisfy a first preset condition, determining that a focusing operation is not performed on the target image capturing apparatus includes: calculating a current image sharpness parameter of the target image capturing apparatus in a case where it is determined that the first target angle and the second target angle satisfy a second sub-target condition, wherein the first preset condition includes the second sub-target condition, and the second sub-target condition includes one of: the first target angle is greater than a first threshold and less than or equal to a third threshold, and the second target angle is less than or equal to a fourth threshold; alternatively, the second target angle is greater than a second threshold and less than or equal to the fourth threshold, and the first target angle is less than or equal to the third threshold; and under the condition that the current image definition parameter and the initial image definition parameter meet a second preset condition, determining that focusing operation is not executed on the target image capturing device, wherein the initial image definition parameter is used for indicating the image definition of the target image capturing device before rotation.
In one exemplary embodiment, after calculating the current image sharpness parameter of the target image capturing apparatus, the method further includes: and determining to perform a focusing operation on the target image capturing apparatus in a case where it is determined that the current image sharpness parameter and the initial image sharpness parameter do not satisfy the second preset condition.
In an exemplary embodiment, the second preset condition includes: a ratio of a minimum value between the current image sharpness parameter and the initial image sharpness parameter to a maximum value between the current image sharpness parameter and the initial image sharpness parameter is greater than or equal to a fifth threshold.
In an exemplary embodiment, the method further comprises: in a case where it is determined that the first target angle and the second target angle satisfy a third preset condition, it is determined to perform a focusing operation on the target image capturing apparatus.
In one exemplary embodiment, in a case where it is determined that the first target angle and the second target angle satisfy a third preset condition, determining to perform a focusing operation on the target image capturing apparatus includes: determining to perform a focusing operation on the target image capturing apparatus in a case where it is determined that the first target angle is greater than a third threshold; and/or determining to perform a focusing operation on the target image capturing apparatus in a case where it is determined that the second target angle is greater than a fourth threshold.
According to another embodiment of the present invention, there is also provided a focusing processing device including: a first determining module, configured to determine, in a case where a target image capturing apparatus rotates, a first target angle and a second target angle of the target image capturing apparatus, where the first target angle is used to indicate an angular change of the target image capturing apparatus on a first reference plane relative to before rotation, and the first target angle is used to indicate an angular change of the target image capturing apparatus on a second reference plane relative to before rotation; and a second determining module configured to determine not to perform a focusing operation on the target image capturing apparatus, if it is determined that the first target angle and the second target angle satisfy a first preset condition.
According to a further embodiment of the invention, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the invention, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the invention, after the target image pickup device rotates, the angle change of the target image pickup device on the first reference plane and the second reference plane is determined, the angle change is respectively corresponding to the first target angle and the second target angle, and when the first target angle and the second target angle are determined to meet the first preset condition, the focus operation is determined not to be executed on the target image pickup device. The object is achieved that the focusing operation is not performed on the target image capturing apparatus when the rotation angle of the target image capturing apparatus satisfies the first preset condition. The problem of poor user experience caused by frequent automatic focusing in the related art is avoided, so that the problem of poor user experience caused by long shooting time caused by frequent automatic focusing of the image pickup equipment in the related art is solved, and the effect of improving the user experience is achieved.
Drawings
FIG. 1 is a block diagram of a mobile terminal hardware architecture of a focus processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of processing focusing according to an embodiment of the present invention;
FIG. 3 is a flow chart of a focus processing method according to an embodiment of the invention;
fig. 4 is a block diagram of a focused processing apparatus according to an embodiment of the invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the operation on a mobile terminal as an example, fig. 1 is a block diagram of a mobile terminal hardware structure of a focusing processing method according to an embodiment of the present invention. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a focused processing method in the embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
In this embodiment, a focusing processing method is provided, fig. 2 is a flowchart of a focusing processing method according to an embodiment of the present invention, and as shown in fig. 2, the flowchart includes the following steps:
step S202, in the case where the target image capturing apparatus rotates, determining a first target angle and a second target angle of the target image capturing apparatus, where the first target angle is used to indicate an angular change of the target image capturing apparatus on a first reference plane relative to before rotation, and the second target angle is used to indicate an angular change of the target image capturing apparatus on a second reference plane relative to before rotation;
in step S204, in a case where it is determined that the first target angle and the second target angle satisfy a first preset condition, it is determined that a focusing operation is not performed on the target image capturing apparatus.
Through the steps, after the target image capturing device rotates, the angle changes of the target image capturing device on the first reference plane and the second reference plane are determined to be respectively corresponding to the first target angle and the second target angle, and when the first target angle and the second target angle are determined to meet the first preset condition, it is determined that focusing operation is not executed on the target image capturing device. The object is achieved that the focusing operation is not performed on the target image capturing apparatus when the rotation angle of the target image capturing apparatus satisfies the first preset condition. The problem of poor user experience caused by frequent automatic focusing in the related art is avoided, so that the problem of poor user experience caused by long shooting time caused by frequent automatic focusing of the image pickup equipment in the related art is solved, and the effect of improving the user experience is achieved.
The main execution body of the steps may be a controller, a processor, a controller integrated in the image capturing apparatus, a processor with man-machine interaction capability configured on a storage device, a processing apparatus or a processing unit with similar processing capability, or the like, but is not limited thereto. The following description will be made taking the controller performing the above operation as an example (only an exemplary description, and other devices or modules may be used to perform the above operation in actual operation).
In the above-described embodiment, in the case where the rotation of the target image capturing apparatus, which may be an image capturing apparatus such as a video camera, a still camera, a video camera, a gun camera, or a dome camera, is performed, the image capturing apparatus may be rotated due to the pan/tilt control in practical use, for example, the image capturing apparatus is set to perform monitoring on a large target area, and the monitoring range of the still image capturing apparatus is limited, so that the image capturing apparatus may be set to be rotated at a predetermined period to expand the monitoring range, for example, the rotation in the horizontal direction, or the rotation in the vertical direction in practical use, and may be rotated due to an artificial factor, the first target angle is used to indicate an angular change of the target image capturing apparatus relative to the rotation before the rotation on a first reference plane, and the second target angle is used to indicate an angular change of the target image capturing apparatus relative to the rotation before the rotation on a second reference plane, for example, the first reference plane is a horizontal plane or a plane parallel to the ground, that is, a lens of the image capturing apparatus is rotated in a horizontal direction, the second reference plane is a vertical plane or a plane perpendicular to the ground or a plane perpendicular to the horizontal plane and also perpendicular to a focal plane of the image capturing apparatus, for example, a monitoring area of the image capturing apparatus is moved up or down on the basis of an initial monitoring area, and of course, the first reference plane may also represent a rotation angle of the vertical plane, and the second reference plane represents a rotation angle of the horizontal plane; when it is determined that the first target angle and the second target angle satisfy the first preset condition, it is determined that the focusing operation is not performed on the target image capturing apparatus, for example, when the first target angle is less than 1 ° (or 3 ° or other angles) and the second target angle is less than 1 ° (or 2 ° or other angles), that is, when the rotation angle is small. The problem that the image pickup equipment in the related art is easy to focus frequently is avoided, so that the problem that the use experience of a user is poor due to long shooting time caused by frequent automatic focusing of the image pickup equipment in the related art is solved, and the effect of improving the use experience of the user is achieved.
In an alternative embodiment, in a case where it is determined that the first target angle and the second target angle satisfy a first preset condition, determining that the focusing operation is not performed on the target image capturing apparatus includes: in a case where it is determined that the first target angle and the second target angle satisfy a first sub-target condition, determining that a focusing operation is not performed on the target image capturing apparatus, wherein the first preset condition includes the first sub-target condition including: the first target angle is less than or equal to a first threshold and the second target angle is less than or equal to a second threshold. In this embodiment, the first sub-target condition may include: the first target angle is less than or equal to a first threshold value and the second target angle is less than or equal to a second threshold value, i.e., the first target angle and the second target angle are both small, e.g., the first threshold value is 1 ° (or 3 ° or other angles), the second threshold value is 1 ° (or 2 ° or other angles), and the first threshold value and the second threshold value may be the same or different; in practical applications, the first threshold and the second threshold are not fixed, and are related to the image capturing apparatus itself, and may be adjusted according to the magnification of the image capturing apparatus, for example, for a minimum magnification camera, the first threshold may be 5 ° or other angles, and for a maximum magnification camera, the first threshold may be 1 ° or other angles, and similarly, the second threshold may be adjustable. With the present embodiment, the object of determining whether to perform a focusing operation on the target image capturing apparatus based on whether the first target angle and the second target angle satisfy the first sub-target condition is achieved.
In an alternative embodiment, in a case where it is determined that the first target angle and the second target angle satisfy a first preset condition, determining that the focusing operation is not performed on the target image capturing apparatus includes: calculating a current image sharpness parameter of the target image capturing apparatus in a case where it is determined that the first target angle and the second target angle satisfy a second sub-target condition, wherein the first preset condition includes the second sub-target condition, and the second sub-target condition includes one of: the first target angle is greater than a first threshold and less than or equal to a third threshold, and the second target angle is less than or equal to a fourth threshold; alternatively, the second target angle is greater than a second threshold and less than or equal to the fourth threshold, and the first target angle is less than or equal to the third threshold; and under the condition that the current image definition parameter and the initial image definition parameter meet a second preset condition, determining that focusing operation is not executed on the target image capturing device, wherein the initial image definition parameter is used for indicating the image definition of the target image capturing device before rotation. In this embodiment, the second sub-target condition may include: the first target angle is greater than the first threshold and less than or equal to the third threshold, and the second target angle is less than or equal to the fourth threshold, which may be the same as or different from the third threshold, e.g., 1 DEG < first target angle < 3 DEG, and the second target angle < 4 DEG; alternatively, the second sub-target condition includes: the second target angle is greater than the second threshold and less than or equal to the fourth threshold, and the first target angle is less than or equal to the third threshold, again, the fourth threshold may be the same as or different from the third threshold, e.g., 2 ° < second target angle no more than 4 °, and the first target angle no more than 3 °; in practical applications, the third threshold and the fourth threshold are not fixed, and are related to the image capturing apparatus, and can be adjusted according to the magnification of the image capturing apparatus, for example, for a minimum magnification camera, the third threshold may be 10 ° or other angles, for a maximum magnification camera, the third threshold may be 3 ° or other angles, and similarly, the fourth threshold may be adjustable; in the case where it is determined that the second sub-target condition is satisfied, a current image definition, or resolution, or image definition evaluation value of the target image capturing apparatus is calculated, for example, the current image definition is calculated to be S1, and the initial image definition of the image before rotation is S0, in the case where it is determined that the current image definition parameter and the initial image definition parameter satisfy the second preset condition, it is determined that the focusing operation is not performed on the target image capturing apparatus, for example, in the case where the ratio of S1 to S0 is within a preset range, for example, the ratio is within [0.9,1.1] or other range, or the ratio between the minimum value and the maximum value between S1 and S0 is greater than 90% or 95% or other value, or the like, that is, the difference between the current image definition parameter and the initial image definition parameter is small or relatively close; through the present embodiment, when the first target angle and the second target angle satisfy the above second sub-target condition, that is, when the rotation angle of the image capturing apparatus on the first reference plane is slightly larger (i.e., greater than the first threshold) but not exceeding the third threshold and the rotation angle of the image capturing apparatus on the second reference plane is not exceeding the fourth threshold, or when the rotation angle of the image capturing apparatus on the second reference plane is slightly larger (i.e., greater than the second threshold) but not exceeding the fourth threshold and the rotation angle of the image capturing apparatus on the first reference plane is not exceeding the third threshold, the magnitude relation between the current image sharpness parameter and the initial image sharpness parameter needs to be further determined, if the second preset condition is satisfied between the two, then no focusing operation needs to be performed on the target image capturing apparatus.
In an alternative embodiment, after calculating the current image sharpness parameter of the target camera device, the method further comprises: and determining to perform a focusing operation on the target image capturing apparatus in a case where it is determined that the current image sharpness parameter and the initial image sharpness parameter do not satisfy the second preset condition. In this embodiment, when it is determined that the current image sharpness parameter and the initial image sharpness parameter do not satisfy the second preset condition, it is determined that a focusing operation is performed on the target image capturing apparatus, for example, the calculated current image sharpness parameter is S1, and the initial image sharpness parameter of the image before rotation is S0, and if S1/S0 is less than 0.9 or greater than 1.1, or alternatively, the ratio between the minimum value and the maximum value of S1 and S0 is less than 90% or 95% or other values, or the like, at this time, it may be determined that a focusing process is performed on the target image capturing apparatus. Through the embodiment, only when the first target angle and the second target angle do not meet the first preset condition and the current image definition parameter and the initial image definition parameter do not meet the second preset condition, the focusing operation of the target image capturing device is triggered, so that the focusing times are reduced, and the service life of the image capturing device is prolonged.
In an alternative embodiment, the second preset condition includes: a ratio of a minimum value between the current image sharpness parameter and the initial image sharpness parameter to a maximum value between the current image sharpness parameter and the initial image sharpness parameter is greater than or equal to a fifth threshold. For example, the current image sharpness parameter is S1, the initial image sharpness parameter of the image before rotation is S0, the minimum value between the current image sharpness parameter and the initial image sharpness parameter is min (S1, S2), the maximum value between the current image sharpness parameter and the initial image sharpness parameter is max (S1, S2), and the second preset condition may be that min (S1, S2)/max (S1, S2) is greater than or equal to a fifth threshold, for example, the fifth threshold is 90%, or 95%, or other values, that is, in a case where the current image sharpness parameter and the initial image sharpness parameter are relatively close, the target image capturing apparatus may not be triggered to perform the focusing operation.
In an alternative embodiment, the method further comprises: in a case where it is determined that the first target angle and the second target angle satisfy a third preset condition, it is determined to perform a focusing operation on the target image capturing apparatus. In this embodiment, when the first target angle and the second target angle satisfy a third preset condition, it is determined that the focusing operation is performed on the target image capturing apparatus, and the third preset condition may be that both the first target angle and the second target angle are greater than a certain threshold, or one of the first target angle and the second target angle is greater than a certain threshold, for example, when the first target angle is greater than a third threshold (e.g., 3 ° or 5 ° or other angles), and/or when the second target angle is greater than a fourth threshold (e.g., 3 ° or 4 ° or other angles), where the third threshold and the fourth threshold may be the same, or may be different, and when either one of the first target angle and the second target angle is greater than a certain threshold (respectively corresponding to the third threshold and the fourth threshold), that is, when the rotation angle of the target image capturing apparatus is greater, it is determined that the focusing operation is performed on the target image capturing apparatus. With the present embodiment, in the case where it is determined that the rotation angle of the image pickup apparatus is greater than a certain threshold, the focusing process is performed on the image pickup apparatus.
In an optional embodiment, in a case where it is determined that the first target angle and the second target angle satisfy a third preset condition, determining to perform a focusing operation on the target image capturing apparatus includes: determining to perform a focusing operation on the target image capturing apparatus in a case where it is determined that the first target angle is greater than a third threshold; and/or determining to perform a focusing operation on the target image capturing apparatus in a case where it is determined that the second target angle is greater than a fourth threshold. In the present embodiment, when the condition one is satisfied: i.e. the first target angle is greater than the third threshold value, and/or when condition two is satisfied: i.e. the second target angle is larger than the fourth threshold, the focusing operation is performed on the target image capturing apparatus, and in practical application, the third threshold and the fourth threshold are not fixed, and related to the image capturing apparatus itself, and may be adjusted according to the magnification of the image capturing apparatus, for example, for a minimum magnification camera, the third threshold may be 10 ° or other angles, and for a maximum magnification camera, the third threshold may be 3 ° or other angles, and similarly, the fourth threshold may be adjustable; that is, in the case where either one of the condition one and the condition two is satisfied, a focusing operation is performed on the target image capturing apparatus.
It will be apparent that the embodiments described above are merely some, but not all, embodiments of the invention. The present invention will be specifically described with reference to the following examples.
Fig. 3 is a flowchart of a focusing processing method according to an embodiment of the present invention, as shown in fig. 3, the flowchart includes the steps of:
step S302, recording the horizontal and vertical initial angles before the rotation of the camera, and the current image definition evaluation value FV1 (corresponding to the initial image definition parameters);
step S304, the camera starts to rotate, and calculates the accumulated rotation angle (corresponding to the first target angle and the second target angle) in the horizontal and vertical directions after the rotation stops, wherein the accumulated rotation angle is the difference between the rotation stop angle and the initial angle of the camera; in the step, the horizontal direction and the vertical direction respectively correspond to the first reference plane and the second reference plane;
step S306, judging whether the cumulative rotation angle is smaller than or equal to a first threshold value, specifically, judging whether the horizontal cumulative rotation angle is smaller than or equal to panTh1 (corresponding to the first threshold value in the first sub-target condition), and judging whether the vertical cumulative rotation angle is smaller than or equal to tilTTh1 (corresponding to the second threshold value in the first sub-target condition);
if the determination result in the step S306 is yes, that is, the horizontal cumulative rotation angle α is less than or equal to panTh1, and the vertical cumulative rotation angle β is less than or equal to tilth 1, then it is determined that autofocus is not triggered, and the step S304 is continued to be executed;
if the result of the step S306 is no, step S308 is performed;
step S308, further judging whether the accumulated rotation angle satisfies the following condition (1) or (2) if the judgment result of the step S306 is NO;
condition (1): panTh1 is more than or equal to alpha and less than or equal to panTh2, and beta is more than or equal to tiltTh2;
condition (2): tiltTh1 is more than or equal to beta and less than or equal to tiltTh2, and alpha is more than or equal to panTh2;
wherein panTh2 is a horizontal second threshold (panTh 2 corresponds to a third threshold in the second sub-target condition), and tiltTh2 is a vertical second threshold (tiltTh 2 corresponds to a fourth threshold in the second sub-target condition);
step S310 of calculating a current image sharpness evaluation value FV2 (corresponding to the current image sharpness parameter) when the determination result in the step S308 is yes, that is, when at least one of the conditions (1) or (2) is satisfied;
if the determination result in the step S308 is no, that is, if the condition (1) or (2) is not satisfied, the step S314 is executed, where the cumulative rotation angle satisfies at least one of the conditions α > panTh2 and β > tilth 2;
step S312, judging whether FV1 and FV2 satisfy a predetermined condition, specifically, judging whether min (FV 1, FV 2)/max (FV 1, FV 2) > fvTh is satisfied;
wherein min (FV 1, FV 2) and max (FV 1, FV 2) are the minimum and maximum values, respectively, of FV1, FV2, fvh is the image sharpness change threshold (corresponding to the fifth threshold described above);
if the result of the determination in step S312 is yes, determining that autofocus is not triggered, and continuing to wait for step S304 to be executed;
if the result of the determination in step S312 is no, step S314 is executed;
step S314, the auto-focus function of the camera is triggered, and step S302 is performed after the auto-focus is completed.
In the embodiment of the invention, the change condition of the rotation angle of the camera and the image definition evaluation value is combined, so that the focusing times can be reduced under the condition of ensuring the focusing accuracy, and the problem of poor use experience caused by repeated triggering focusing when the camera rotates in the related technology can be avoided; the embodiment of the invention adopts the automatic focusing triggering strategy of the grading processing, and can reduce the frequent focusing times of the camera equipment, thereby achieving the effect of improving the use experience of users.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
In this embodiment, there is further provided a focusing processing device, and fig. 4 is a block diagram of a focusing processing device according to an embodiment of the present invention, as shown in fig. 4, including:
a first determining module 402, configured to determine, in a case where a target image capturing apparatus rotates, a first target angle and a second target angle of the target image capturing apparatus, where the first target angle is used to indicate an angular change of the target image capturing apparatus on a first reference plane relative to before rotation, and the first target angle is used to indicate an angular change of the target image capturing apparatus on a second reference plane relative to before rotation;
a second determining module 404, configured to determine not to perform a focusing operation on the target image capturing apparatus if it is determined that the first target angle and the second target angle satisfy a first preset condition.
In an alternative embodiment, the second determining module 404 includes: a first determining unit configured to determine that a focusing operation is not performed on the target image capturing apparatus in a case where it is determined that the first target angle and the second target angle satisfy a first sub-target condition, wherein the first preset condition includes the first sub-target condition including: the first target angle is less than or equal to a first threshold and the second target angle is less than or equal to a second threshold.
In an alternative embodiment, the second determining module 404 includes: a calculating unit configured to calculate a current image sharpness parameter of the target image capturing apparatus, in a case where it is determined that the first target angle and the second target angle satisfy a second sub-target condition, wherein the first preset condition includes the second sub-target condition, and the second sub-target condition includes one of: the first target angle is greater than a first threshold and less than or equal to a third threshold, and the second target angle is less than or equal to a fourth threshold; alternatively, the second target angle is greater than a second threshold and less than or equal to the fourth threshold, and the first target angle is less than or equal to the third threshold; and a second determining unit configured to determine that a focusing operation is not performed on the target image capturing apparatus if it is determined that the current image sharpness parameter and an initial image sharpness parameter satisfy a second preset condition, where the initial image sharpness parameter is used to indicate an image sharpness of the target image capturing apparatus before rotation.
In an alternative embodiment, the apparatus further comprises: and a third determining module configured to determine, after calculating a current image sharpness parameter of the target image capturing apparatus, to perform a focusing operation on the target image capturing apparatus, and if it is determined that the current image sharpness parameter and the initial image sharpness parameter do not satisfy the second preset condition.
In an alternative embodiment, the second preset condition includes: a ratio of a minimum value between the current image sharpness parameter and the initial image sharpness parameter to a maximum value between the current image sharpness parameter and the initial image sharpness parameter is greater than or equal to a fifth threshold.
In an alternative embodiment, the apparatus further comprises: a fourth determining module, configured to determine to perform a focusing operation on the target image capturing apparatus if it is determined that the first target angle and the second target angle satisfy a third preset condition.
In an alternative embodiment, the fourth determining module includes: a third determination unit configured to determine to perform a focusing operation on the target image capturing apparatus, in a case where it is determined that the first target angle is larger than a third threshold; and/or a fourth determination unit configured to determine to perform a focusing operation on the target image capturing apparatus, in a case where it is determined that the second target angle is greater than a fourth threshold.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the present invention also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method of focusing, comprising:
determining a first target angle and a second target angle of the target image capturing apparatus when the target image capturing apparatus rotates, wherein the first target angle is used for indicating the angle change of the target image capturing apparatus on a first reference plane relative to the angle change before rotation, and the second target angle is used for indicating the angle change of the target image capturing apparatus on a second reference plane relative to the angle change before rotation;
determining not to perform a focusing operation on the target image capturing apparatus in a case where it is determined that the first target angle and the second target angle satisfy a first preset condition;
wherein, in a case where it is determined that the first target angle and the second target angle satisfy a first preset condition, determining that the focus operation is not performed on the target image capturing apparatus includes:
calculating a current image sharpness parameter of the target image capturing apparatus in a case where it is determined that the first target angle and the second target angle satisfy a second sub-target condition, wherein the first preset condition includes the second sub-target condition, and the second sub-target condition includes one of: the first target angle is greater than a first threshold and less than or equal to a third threshold, and the second target angle is less than or equal to a fourth threshold; alternatively, the second target angle is greater than a second threshold and less than or equal to the fourth threshold, and the first target angle is less than or equal to the third threshold;
determining not to perform focusing operation on the target image capturing device under the condition that the current image definition parameter and an initial image definition parameter meet a second preset condition, wherein the initial image definition parameter is used for indicating the image definition of the target image capturing device before rotation;
wherein the second preset condition includes: a ratio of a minimum value between the current image sharpness parameter and the initial image sharpness parameter to a maximum value between the current image sharpness parameter and the initial image sharpness parameter is greater than or equal to a fifth threshold.
2. The method according to claim 1, wherein determining that a focusing operation is not performed on the target image capturing apparatus in a case where it is determined that the first target angle and the second target angle satisfy a first preset condition comprises:
in a case where it is determined that the first target angle and the second target angle satisfy a first sub-target condition, determining that a focusing operation is not performed on the target image capturing apparatus, wherein the first preset condition includes the first sub-target condition including: the first target angle is less than or equal to a first threshold and the second target angle is less than or equal to a second threshold.
3. The method according to claim 1, wherein after calculating the current image sharpness parameter of the target camera device, the method further comprises:
and determining to perform a focusing operation on the target image capturing apparatus in a case where it is determined that the current image sharpness parameter and the initial image sharpness parameter do not satisfy the second preset condition.
4. The method according to claim 1, wherein the method further comprises:
in a case where it is determined that the first target angle and the second target angle satisfy a third preset condition, it is determined to perform a focusing operation on the target image capturing apparatus.
5. The method according to claim 4, wherein, in the case where it is determined that the first target angle and the second target angle satisfy a third preset condition, determining to perform a focusing operation on the target image capturing apparatus includes:
determining to perform a focusing operation on the target image capturing apparatus in a case where it is determined that the first target angle is greater than a third threshold; and/or
In a case where it is determined that the second target angle is larger than a fourth threshold, it is determined that a focusing operation is performed on the target image capturing apparatus.
6. A focused processing apparatus, comprising:
a first determining module, configured to determine, in a case where a target image capturing apparatus rotates, a first target angle and a second target angle of the target image capturing apparatus, where the first target angle is used to indicate an angular change of the target image capturing apparatus on a first reference plane relative to before rotation, and the first target angle is used to indicate an angular change of the target image capturing apparatus on a second reference plane relative to before rotation;
a second determining module configured to determine that a focusing operation is not performed on the target image capturing apparatus, in a case where it is determined that the first target angle and the second target angle satisfy a first preset condition;
wherein the second determining module includes: a calculating unit configured to calculate a current image sharpness parameter of the target image capturing apparatus, in a case where it is determined that the first target angle and the second target angle satisfy a second sub-target condition, wherein the first preset condition includes the second sub-target condition, and the second sub-target condition includes one of: the first target angle is greater than a first threshold and less than or equal to a third threshold, and the second target angle is less than or equal to a fourth threshold; alternatively, the second target angle is greater than a second threshold and less than or equal to the fourth threshold, and the first target angle is less than or equal to the third threshold; a second determining unit configured to determine that a focusing operation is not performed on the target image capturing apparatus if it is determined that the current image sharpness parameter and an initial image sharpness parameter satisfy a second preset condition, where the initial image sharpness parameter is used to indicate an image sharpness of the target image capturing apparatus before rotation;
wherein the second preset condition includes: a ratio of a minimum value between the current image sharpness parameter and the initial image sharpness parameter to a maximum value between the current image sharpness parameter and the initial image sharpness parameter is greater than or equal to a fifth threshold.
7. A computer readable storage medium, characterized in that a computer program is stored in the computer readable storage medium, wherein the computer program, when being executed by a processor, implements the steps of the method according to any of the claims 1 to 5.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 5 when the computer program is executed.
CN202210043533.2A 2022-01-14 2022-01-14 Focusing processing method and device, storage medium and electronic device Active CN114374800B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210043533.2A CN114374800B (en) 2022-01-14 2022-01-14 Focusing processing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210043533.2A CN114374800B (en) 2022-01-14 2022-01-14 Focusing processing method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN114374800A CN114374800A (en) 2022-04-19
CN114374800B true CN114374800B (en) 2023-07-14

Family

ID=81144838

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210043533.2A Active CN114374800B (en) 2022-01-14 2022-01-14 Focusing processing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN114374800B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105635555A (en) * 2014-11-07 2016-06-01 青岛海尔智能技术研发有限公司 Camera focusing control method, image pick-up device and wearable intelligent terminal
CN106292727A (en) * 2015-05-22 2017-01-04 浙江大华技术股份有限公司 A kind of method and device being controlled cloud platform rotation by keyboard of network rocking bar
CN111272148A (en) * 2020-01-20 2020-06-12 江苏方天电力技术有限公司 Unmanned aerial vehicle autonomous inspection self-adaptive imaging quality optimization method for power transmission line
CN112449117A (en) * 2021-01-28 2021-03-05 浙江华创视讯科技有限公司 Focusing step length determining method and device, storage medium and electronic device
CN112653835A (en) * 2020-12-14 2021-04-13 浙江大华技术股份有限公司 Method and device for judging focusing state and storage medium
CN113473010A (en) * 2021-06-29 2021-10-01 浙江大华技术股份有限公司 Snapshot method and device, storage medium and electronic device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004048555A (en) * 2002-07-15 2004-02-12 Fuji Xerox Co Ltd Calculation instrument of position and orientation of camera
CN100508599C (en) * 2007-04-24 2009-07-01 北京中星微电子有限公司 Automatically tracking and controlling method and control device in the video monitoring
CN113572947B (en) * 2020-04-29 2023-03-24 浙江大华技术股份有限公司 Image sensor adjusting method and device, storage medium and electronic device
CN111698428B (en) * 2020-06-23 2021-07-16 广东小天才科技有限公司 Document shooting method and device, electronic equipment and storage medium
CN113452912B (en) * 2021-06-25 2022-12-27 山东新一代信息产业技术研究院有限公司 Pan-tilt camera control method, device, equipment and medium for inspection robot

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105635555A (en) * 2014-11-07 2016-06-01 青岛海尔智能技术研发有限公司 Camera focusing control method, image pick-up device and wearable intelligent terminal
CN106292727A (en) * 2015-05-22 2017-01-04 浙江大华技术股份有限公司 A kind of method and device being controlled cloud platform rotation by keyboard of network rocking bar
CN111272148A (en) * 2020-01-20 2020-06-12 江苏方天电力技术有限公司 Unmanned aerial vehicle autonomous inspection self-adaptive imaging quality optimization method for power transmission line
CN112653835A (en) * 2020-12-14 2021-04-13 浙江大华技术股份有限公司 Method and device for judging focusing state and storage medium
CN112449117A (en) * 2021-01-28 2021-03-05 浙江华创视讯科技有限公司 Focusing step length determining method and device, storage medium and electronic device
CN113473010A (en) * 2021-06-29 2021-10-01 浙江大华技术股份有限公司 Snapshot method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN114374800A (en) 2022-04-19

Similar Documents

Publication Publication Date Title
CN109922251B (en) Method, device and system for quick snapshot
CN110278383B (en) Focusing method, focusing device, electronic equipment and storage medium
CN108377345B (en) Exposure parameter value determination method and device, multi-view camera and storage medium
US9692960B2 (en) Method and system for enabling camera of mobile terminal to automatically adapt camera parameters according to scene motion
US20200267309A1 (en) Focusing method and device, and readable storage medium
CN113473010B (en) Snapshot method and device, storage medium and electronic device
CN105578026A (en) Photographing method and user terminal
CN104125405A (en) Image interest area extraction method based on eyeball tracking and automatic focus system
CN104994274A (en) Rapid photographing method based on mobile terminal and mobile terminal
CN104853094A (en) Photographing method and device
CN111862620A (en) Image fusion processing method and device
CN105072348A (en) Method, device and terminal for quickly focusing on face
CN111800521A (en) Front-end equipment control method and device
CN110392207B (en) Method and device for triggering focusing of camera equipment
CN114374800B (en) Focusing processing method and device, storage medium and electronic device
CN112352417A (en) Focusing method of shooting device, system and storage medium
CN112449117B (en) Focusing step length determining method and device, storage medium and electronic device
CN114363522A (en) Photographing method and related device
CN110264402B (en) Image fusion method, image fusion device, storage medium and electronic device
CN113992863B (en) Automatic exposure method, device, electronic equipment and computer readable storage medium
CN113225473A (en) Method, apparatus, device and medium for auto-focusing
CN111726512A (en) Area focusing method, device, equipment and storage medium
WO2021022989A1 (en) Calibration parameter obtaining method and apparatus, processor, and electronic device
CN115690224A (en) External parameter calibration method for radar and camera, electronic device and storage medium
CN114422776A (en) Detection method and device for camera equipment, storage medium and electronic device

Legal Events

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