CN111273504B - Focusing processing method and device - Google Patents

Focusing processing method and device Download PDF

Info

Publication number
CN111273504B
CN111273504B CN202010226005.1A CN202010226005A CN111273504B CN 111273504 B CN111273504 B CN 111273504B CN 202010226005 A CN202010226005 A CN 202010226005A CN 111273504 B CN111273504 B CN 111273504B
Authority
CN
China
Prior art keywords
visible light
curve
determining
deviation
value
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
CN202010226005.1A
Other languages
Chinese (zh)
Other versions
CN111273504A (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 CN202010226005.1A priority Critical patent/CN111273504B/en
Publication of CN111273504A publication Critical patent/CN111273504A/en
Application granted granted Critical
Publication of CN111273504B publication Critical patent/CN111273504B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B13/00Viewfinders; Focusing aids for cameras; Means for focusing for cameras; Autofocus systems for cameras
    • G03B13/32Means for focusing
    • G03B13/34Power focusing
    • G03B13/36Autofocus systems
    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B17/00Details of cameras or camera bodies; Accessories therefor
    • G03B17/02Bodies
    • G03B17/12Bodies with means for supporting objectives, supplementary lenses, filters, masks, or turrets
    • G03B17/14Bodies with means for supporting objectives, supplementary lenses, filters, masks, or turrets interchangeably
    • 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

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The invention provides a focusing processing method and a device, wherein the method comprises the following steps: after detecting that monitoring equipment switches an optical filter, acquiring the gain of the monitoring equipment; under the condition that the gain is larger than a preset threshold value, acquiring the current visible light proportion; determining a target focusing value according to the current visible light proportion; the monitoring equipment is focused according to the target focusing value, the problem that in the related technology, the deviation value of the front and back two times is obtained only by switching the optical filter, and the monitoring equipment cannot adapt to various environments in practical application can be solved, the influence factors of the visible light proportion are taken into consideration, more accurate deviation can be obtained in the environments with different illumination conditions, and more accurate focusing is realized.

Description

Focusing processing method and device
Technical Field
The invention relates to the technical field of monitoring equipment, in particular to a focusing processing method and device.
Background
The filters are switched due to changes in the scene light used by the monitoring device. The sun plate in the filter cuts off the infrared light, and the night plate transmits the infrared light. Because the refractive indexes of the light rays in different frequency bands are different, and the refractive indexes of the day piece and the night piece are different, the imaging position of the lens after switching can be changed. However, under the condition of high gain, a large amount of noise of the image interferes with the stability of the automatic focusing statistical operator, so that the automatic focusing fails with high probability, and in order to solve the problem, a focusing strategy needs to be adjusted to enable the picture to be clear again.
In the related art, a method for automatic focusing after switching an optical filter in a camera moving state is provided, which includes:
s1, judging the current state of the camera, and if the current state is a motion state, adopting automatic focusing;
s2, calculating a target focus value;
and S3, driving the focusing camera to reach the appointed position according to the target focusing value.
Further, in step S1, the normal focusing method is used when the state is determined to be the static state, and only in the moving state, the autofocus is performed by calculating the target focus value.
Further, in step S2, the method for calculating the target focus value is as follows: switching the optical filter under each multiplying power, automatically focusing again for clarity, acquiring the difference value of the focusing values of the previous time and the next time, and recording the difference value; fitting the recorded data with a curve, wherein the abscissa is the current lens magnification curl, and the ordinate is the deviation value offset of the focus after switching and filtering; the curve is converted into the formula f (x), and the target focus value tarfocus + f (curl).
In the above scheme, because the refractive indexes of the light rays with different frequencies are different, if most of the light sources are visible light, the imaging position of the object is more biased to the imaging position formed by the visible light. On the contrary, if the infrared light occupies most of the infrared light, the imaging position of the object is more inclined to the imaging position formed by the infrared light. The deviation values of the two times before and after are obtained only by switching the optical filter, and the method cannot adapt to various environments necessarily in practical application. Only the environment of the light source used in calibration can be adapted.
Aiming at the problem that the prior art can not adapt to various environments in practical application because the deviation value of the two times before and after is obtained only by switching the optical filter, a solution is not provided.
Disclosure of Invention
The embodiment of the invention provides a focusing processing method and a focusing processing device, which are used for at least solving the problem that in the prior art, the deviation value of the front time and the rear time is obtained only by switching an optical filter, so that the focusing processing method and the focusing processing device cannot adapt to various environments in practical application.
According to an embodiment of the present invention, there is provided a focus processing method including:
after detecting that the monitoring equipment switches the optical filter, acquiring the gain of the monitoring equipment;
under the condition that the gain is larger than a preset threshold value, acquiring the current visible light proportion;
determining a target focusing value according to the current visible light proportion;
and carrying out focusing processing on the monitoring equipment according to the target focusing value.
Optionally, determining the target focus value according to the current visible light proportion includes:
and determining the target focusing value corresponding to the current visible light proportion according to the predetermined deviation curve of each multiplying power under different visible light proportions.
Optionally, determining the target focus value corresponding to the current visible light proportion according to a predetermined deviation curve of each magnification at different visible light proportions includes:
determining a first curve and a second curve adjacent to the current visible light proportion from the deviation curves;
determining a first distance between the current visible light proportion and the first curve, and a second distance between the current visible light proportion and the second curve;
determining a first deviation value corresponding to the current visible light ratio on the first curve and a second deviation value corresponding to the current visible light ratio on the second curve under the current magnification;
determining a target deviation value according to the first distance, the second distance, the first deviation value and the second deviation value;
and determining the sum of the current focus value and the target deviation value as the target focus value.
Optionally, the method further comprises:
determining a target deviation value from the first distance, the second distance, the first deviation value, and the second deviation value by:
Y=Y2+(Y1-Y2)*D2/(D1+D2) Wherein Y is the target deviation value, Y1Is the first deviation value, Y2Is the second deviation value, D1Is the first distance, D2Is the second distance.
Optionally, before determining the target focus value according to the current visible light ratio, the method further comprises:
adjusting the visible light proportion of the monitoring equipment, and determining a plurality of scenes;
and determining deviation curves of each multiplying power under different visible light proportions under the plurality of scenes.
Optionally, in the multiple scenes, determining the deviation curve of each magnification at the different visible light ratios includes:
filtering infrared light by using the sun sheet of the optical filter in the plurality of scenes, focusing at each magnification to obtain a focus value corresponding to each magnification under the sun sheet, and fitting a curve of the sun sheet;
focusing at each magnification by using the night film of the optical filter in the plurality of scenes to obtain a focus value corresponding to each magnification under the night film, and fitting a curve of the night film;
and determining the deviation curve of each multiplying power under different visible light proportions according to the curve of the daily piece and the curve of the night piece.
Optionally, determining the deviation curve of each magnification under different visible light proportions according to the curve of the daily piece and the curve of the night piece comprises:
and respectively subtracting the curve of the night film under the corresponding scene from the curve of each scene in the curves of the day films to obtain the deviation curves under the visible light proportions.
According to another embodiment of the present invention, there is also provided a focus processing apparatus including:
the first acquisition module is used for acquiring the gain of the monitoring equipment after detecting that the optical filter is switched by the monitoring equipment;
the second acquisition module is used for acquiring the current visible light proportion under the condition that the gain is greater than a preset threshold value;
the first determining module is used for determining a target focusing value according to the current visible light proportion;
and the focusing module is used for carrying out focusing processing on the monitoring equipment according to the target focusing value.
Optionally, the determining module is further used for
And determining the target focusing value corresponding to the current visible light proportion according to the predetermined deviation curve of each multiplying power under different visible light proportions.
Optionally, the first determining module includes:
a first determining submodule for determining a first curve and a second curve adjacent to the current visible light proportion from the deviation curves;
the second determining submodule is used for determining a first distance between the current visible light proportion and the first curve and a second distance between the current visible light proportion and the second curve;
the third determining submodule is used for determining a first deviation value corresponding to the current visible light proportion on the first curve and a second deviation value corresponding to the current visible light proportion on the second curve under the current multiplying power;
a fourth determining submodule, configured to determine a target deviation value according to the first distance, the second distance, the first deviation value, and the second deviation value;
and the fifth determining submodule is used for determining the sum of the current focusing value and the target deviation value as the target focusing value.
Optionally, the fourth determining submodule is further used for
Determining a target deviation value from the first distance, the second distance, the first deviation value, and the second deviation value by:
Y=Y2+(Y1-Y2)*D2/(D1+D2) Wherein Y is the target deviation value, Y1Is the first deviation value, Y2Is the second deviation value, D1Is the first distance, D2Is the second distance.
Optionally, the apparatus further comprises:
the adjusting module is used for adjusting the visible light proportion of the monitoring equipment and determining a plurality of scenes;
and the second determining module is used for determining a deviation curve of each multiplying power under different visible light proportions under the plurality of scenes.
Optionally, the second determining module includes:
the first fitting submodule is used for filtering infrared light by using the sun sheet of the optical filter in the plurality of scenes, focusing the infrared light at each multiplying power to obtain a focus value corresponding to each multiplying power under the sun sheet, and fitting a curve of the sun sheet;
the second fitting submodule is used for focusing under each multiplying power by using the night piece of the optical filter under the multiple scenes to obtain a focus value corresponding to each multiplying power under the night piece, and fitting a curve of the night piece;
and the sixth determining submodule is used for determining the deviation curve of each multiplying power under different visible light proportions according to the curve of the daily piece and the curve of the night piece.
Optionally, the sixth determining submodule is further configured to
And respectively subtracting the curve of the night film under the corresponding scene from the curve of each scene in the curves of the day films to obtain the deviation curves under the visible light proportions.
According to a further embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above-described method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, after the optical filter switching of the monitoring equipment is detected, the gain of the monitoring equipment is obtained; under the condition that the gain is larger than a preset threshold value, acquiring the current visible light proportion; determining a target focusing value according to the current visible light proportion; the monitoring equipment is focused according to the target focusing value, the problem that in the related technology, the deviation value of the front and back two times is obtained only by switching the optical filter, and the monitoring equipment cannot adapt to various environments in practical application can be solved, the influence factors of the visible light proportion are taken into consideration, more accurate deviation can be obtained in the environments with different illumination conditions, and more accurate focusing is realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a focusing processing method according to an embodiment of the present invention;
fig. 2 is a flowchart of a focusing processing method according to an embodiment of the present invention;
FIG. 3 is a schematic illustration of a focus curve for various visible light ratios of a night piece according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of a deviation curve for various visible light ratios according to an embodiment of the present invention;
FIG. 5 is a flow diagram of a focus adjustment process when monitoring device operation according to an embodiment of the present invention;
FIG. 6 is a schematic illustration of target offset value determination according to an embodiment of the present invention;
fig. 7 is a block diagram of a focus processing apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking a mobile terminal as an example, fig. 1 is a hardware structure block diagram of a mobile terminal of a focusing processing method according to an embodiment of the present invention, and as shown in fig. 1, a mobile terminal 10 may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, and optionally, the mobile terminal may further include a transmission device 106 for a communication function and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal 10 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 the message receiving method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The 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 instances, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 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 device 106 is used for receiving or transmitting 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 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a focusing processing method operating in the mobile terminal or the network architecture is provided, and fig. 2 is a flowchart of the focusing processing method according to the embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, after detecting that the monitoring equipment switches the optical filter, acquiring the gain of the monitoring equipment;
the gain can be directly read from the sensor, and the brightness of the shot picture can be increased through the gain.
Step S204, acquiring the current visible light proportion under the condition that the gain is greater than a preset threshold value;
the preset threshold may be preset, and may be 60%, 65%, 70%, and the like of the maximum gain, that is, whether the gain is a high gain is determined by the preset threshold, and the specific value is not limited to the embodiment of the present invention.
Step S206, determining a target focusing value according to the current visible light proportion;
further, in step S206, the target focus value corresponding to the current visible light ratio may be determined according to a predetermined deviation curve of each magnification ratio under different visible light ratios.
Specifically, the method may include:
s21, determining a first curve and a second curve adjacent to the current visible light proportion from the deviation curves;
s22, determining a first distance between the current visible light proportion and the first curve and a second distance between the current visible light proportion and the second curve;
s23, determining a first deviation value corresponding to the current visible light ratio on the first curve and a second deviation value corresponding to the current visible light ratio on the second curve under the current magnification;
s24, determining a target deviation value according to the first distance, the second distance, the first deviation value and the second deviation value;
specifically, the target deviation value may be determined by:
Y=Y2+(Y1-Y2)*D2/(D1+D2) Wherein Y is the target deviation value, Y1Is the first deviation value, Y2Is the second deviation value, D1Is the first distance, D2Is the second distance.
And S25, determining the sum of the current focusing value and the target deviation value as the target focusing value.
And step S208, carrying out focusing processing on the monitoring equipment according to the target focusing value, specifically, driving the monitoring equipment to arrive according to the target focusing value. The position is designated.
Through the steps S202 to S208, after detecting that the monitoring device switches the optical filter, obtaining the gain of the monitoring device; under the condition that the gain is larger than a preset threshold value, acquiring the current visible light proportion; determining a target focusing value according to the current visible light proportion; the monitoring equipment is focused according to the target focusing value, the problem that in the related technology, the deviation value of the front and back two times is obtained only by switching the optical filter, and the monitoring equipment cannot adapt to various environments in practical application can be solved, the influence factors of the visible light proportion are taken into consideration, more accurate deviation can be obtained in the environments with different illumination conditions, and more accurate focusing is realized.
In the embodiment of the invention, before the target focusing value is determined according to the current visible light ratio, the visible light ratio of the monitoring equipment is adjusted to determine a plurality of scenes; and determining deviation curves of each multiplying power under different visible light proportions under the plurality of scenes.
Further, the deviation curve described above may be determined by: filtering infrared light by using the sun sheet of the optical filter in the plurality of scenes, focusing at each magnification to obtain a focus value corresponding to each magnification under the sun sheet, and fitting a curve of the sun sheet; focusing at each magnification by using the night film of the optical filter in the plurality of scenes to obtain a focus value corresponding to each magnification under the night film, and fitting a curve of the night film; and determining the deviation curve of each multiplying power under different visible light proportions according to the curve of the daily piece and the curve of the night piece. Specifically, the curve in each scene in the curve of the day film is subtracted from the curve in the corresponding scene in the curve of the night film, so as to obtain the deviation curve in each visible light ratio.
The following describes the embodiments of the present invention in detail, taking 6 scenes as examples.
Under the laboratory environment, six scenes of 100%, 80%, 60%, 40%, 20% and 0% are obtained by adjusting the visible light proportion of the laboratory environment. Fig. 3 is a schematic diagram of a focusing curve of a night vision according to each visible light ratio, as shown in fig. 3, the night vision automatically focuses under each scene at each magnification to obtain a focus value corresponding to each magnification under 6 scenes. 6 curves were fitted. And filtering infrared light by using a sun sheet, and automatically focusing under each multiplying power to obtain a focus value corresponding to each multiplying power under the sun sheet. The curve of the daily plate was fitted.
Fig. 4 is a schematic diagram of deviation curves at various visible light ratios according to an embodiment of the present invention, and as shown in fig. 4, curves at 6 scenes of a night vision are subtracted from curves at a day vision to obtain deviation values at each magnification in 6 scenes.
Fig. 5 is a flowchart of a focusing process when the monitoring apparatus operates according to an embodiment of the present invention, as shown in fig. 5, including:
step S501, detecting that the monitoring equipment switches the optical filter;
step S502, judging whether the gain is high or not, if not, executing step S503, and if yes, executing step S504;
in step S503, autofocus, i.e. in case of not high gain, the risk of autofocus failure is not significant, and autofocus may be initiated.
Step S504, acquiring the current visible light proportion;
step S505, find two adjacent upper and lower curves in the deviation table according to the current visible light ratio, fig. 6 is a schematic diagram of determining the target deviation value according to the embodiment of the present invention, as shown in fig. 6, if the current ratio is 45%, then the two adjacent curves are 40% and 60%.
Step S506, calculating the difference between ratiodiDiffUp and ratiodiDiffDown between the upper and lower curves, wherein the ratio difference between the curves at the current ratio and the lower curve is ratiodiDiffDown, and the ratio difference between the curves at the upper distance is ratiodiDiffUp (corresponding to D above respectively)1、D2);
Step S507, according to the current multiplying power, searching the offset value offsetUp and offsetDown corresponding to the upper and lower curves, wherein the current lower curve corresponds to the multiplying powerThe offset value is offsetDown, and the offset value is offsetUp (corresponding to Y mentioned above respectively) under the magnification corresponding to the upper curve1、Y2);
Step S508 is to obtain a target offset value by linear interpolation according to the distance between the current point and the upper and lower curves, and then obtain the target offset value by linear interpolation, where offset is offset down + (offset up-offset down) × ratiodidiffdown/(ratiodidiffup + ratiodidiffdown), and the target offset value offset (corresponding to Y described above).
Step S509, calculating a target focus value, where the focus value is tarFocus + offset, where curFocus is a current focus value;
in step S510, the motor is driven to the target focus value, and the focusing operation is ended.
According to the embodiment of the invention, more accurate offset value calculation under various environments is realized by introducing the visible light proportion. The deviant values under different multiplying powers in 6 environments are obtained by simulating the environments with 6 visible light proportions in a laboratory environment. In actual use, the current visible light ratio is obtained, and then, in the 6 preset offset values, the offset value corresponding to the current visible light ratio is calculated through interpolation. By this method, the influence factor of the visible light proportion can be taken into account, and more accurate offset can be obtained in the environment with different illumination conditions.
Example 2
According to another embodiment of the present invention, there is also provided a focus adjustment processing apparatus, and fig. 7 is a block diagram of the focus adjustment processing apparatus according to the embodiment of the present invention, as shown in fig. 7, including:
the first acquisition module is used for acquiring the gain of the monitoring equipment after detecting that the optical filter is switched by the monitoring equipment;
the second acquisition module is used for acquiring the current visible light proportion under the condition that the gain is greater than a preset threshold value;
the first determining module is used for determining a target focusing value according to the current visible light proportion;
and the focusing module is used for carrying out focusing processing on the monitoring equipment according to the target focusing value.
Optionally, the determining module is further used for
And determining the target focusing value corresponding to the current visible light proportion according to the predetermined deviation curve of each multiplying power under different visible light proportions.
Optionally, the first determining module includes:
a first determining submodule for determining a first curve and a second curve adjacent to the current visible light proportion from the deviation curves;
the second determining submodule is used for determining a first distance between the current visible light proportion and the first curve and a second distance between the current visible light proportion and the second curve;
the third determining submodule is used for determining a first deviation value corresponding to the current visible light proportion on the first curve and a second deviation value corresponding to the current visible light proportion on the second curve under the current multiplying power;
a fourth determining submodule, configured to determine a target deviation value according to the first distance, the second distance, the first deviation value, and the second deviation value;
and the fifth determining submodule is used for determining the sum of the current focusing value and the target deviation value as the target focusing value.
Optionally, the fourth determining submodule is further used for
Determining a target deviation value from the first distance, the second distance, the first deviation value, and the second deviation value by:
Y=Y2+(Y1-Y2)*D2/(D1+D2) Wherein Y is the target deviation value, Y1Is the first deviation value, Y2Is the second deviation value, D1Is the first distance, D2Is the second distance.
Optionally, the apparatus further comprises:
the adjusting module is used for adjusting the visible light proportion of the monitoring equipment and determining a plurality of scenes;
and the second determining module is used for determining a deviation curve of each multiplying power under different visible light proportions under the plurality of scenes.
Optionally, the second determining module includes:
the first fitting submodule is used for filtering infrared light by using the sun sheet of the optical filter in the plurality of scenes, focusing the infrared light at each multiplying power to obtain a focus value corresponding to each multiplying power under the sun sheet, and fitting a curve of the sun sheet;
the second fitting submodule is used for focusing under each multiplying power by using the night piece of the optical filter under the multiple scenes to obtain a focus value corresponding to each multiplying power under the night piece, and fitting a curve of the night piece;
and the sixth determining submodule is used for determining the deviation curve of each multiplying power under different visible light proportions according to the curve of the daily piece and the curve of the night piece.
Optionally, the sixth determining submodule is further used for
And respectively subtracting the curve of the night film under the corresponding scene from the curve of each scene in the curves of the day films to obtain the deviation curves under the visible light proportions.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, after detecting that the optical filter is switched by the monitoring equipment, acquiring the gain of the monitoring equipment;
s2, acquiring the current visible light proportion under the condition that the gain is greater than a preset threshold value;
s3, determining a target focusing value according to the current visible light proportion;
and S4, performing focusing processing on the monitoring equipment according to the target focusing value.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Example 4
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, after detecting that the optical filter is switched by the monitoring equipment, acquiring the gain of the monitoring equipment;
s2, acquiring the current visible light proportion under the condition that the gain is greater than a preset threshold value;
s3, determining a target focusing value according to the current visible light proportion;
and S4, performing focusing processing on the monitoring equipment according to the target focusing value.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones 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 a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A focus processing method, characterized by comprising:
after detecting that the monitoring equipment switches the optical filter, acquiring the gain of the monitoring equipment;
under the condition that the gain is larger than a preset threshold value, acquiring the current visible light proportion;
adjusting the visible light proportion of the monitoring equipment, and determining a plurality of scenes; determining a deviation curve for each magnification at different visible light ratios under the plurality of scenes, comprising: filtering infrared light by using the sun sheet of the optical filter in the plurality of scenes, focusing at each magnification to obtain a focus value corresponding to each magnification under the sun sheet, and fitting a curve of the sun sheet; focusing at each magnification by using the night film of the optical filter in the plurality of scenes to obtain a focus value corresponding to each magnification under the night film, and fitting a curve of the night film; respectively subtracting the curve of the night film under the corresponding scene from the curve of each scene in the curves of the day films to obtain deviation curves under the visible light proportions;
determining a target focusing value according to the current visible light proportion, comprising: determining the target focusing value corresponding to the current visible light proportion according to the deviation curve of each multiplying power under different predetermined visible light proportions;
and carrying out focusing processing on the monitoring equipment according to the target focusing value.
2. The method of claim 1, wherein determining the target focus value corresponding to the current visible light scale according to a predetermined deviation curve for each magnification at different visible light scales comprises:
determining a first curve and a second curve adjacent to the current visible light proportion from the deviation curves;
determining a first distance between the current visible light proportion and the first curve, and a second distance between the current visible light proportion and the second curve;
determining a first deviation value corresponding to the current visible light ratio on the first curve and a second deviation value corresponding to the current visible light ratio on the second curve under the current magnification;
determining a target deviation value according to the first distance, the second distance, the first deviation value and the second deviation value;
and determining the sum of the current focus value and the target deviation value as the target focus value.
3. The method of claim 2, further comprising:
determining a target deviation value from the first distance, the second distance, the first deviation value, and the second deviation value by:
Y=Y2+(Y1-Y2)*D2/(D1+D2) Wherein Y is the target deviation value, Y1Is the first deviation value, Y2Is the second deviation value, D1Is the firstA distance, D2Is the second distance.
4. A focus adjustment processing apparatus, characterized by comprising:
the first acquisition module is used for acquiring the gain of the monitoring equipment after detecting that the optical filter is switched by the monitoring equipment;
the second acquisition module is used for acquiring the current visible light proportion under the condition that the gain is greater than a preset threshold value;
the first determining module is used for determining a target focus value according to the current visible light proportion, and comprises: determining the target focusing value corresponding to the current visible light proportion according to a predetermined deviation curve of each multiplying power under different visible light proportions;
the focusing module is used for carrying out focusing processing on the monitoring equipment according to the target focusing value;
the device further comprises:
the adjusting module is used for adjusting the visible light proportion of the monitoring equipment and determining a plurality of scenes;
a second determining module, configured to determine a deviation curve of each magnification under different visible light proportions in the multiple scenes, including: filtering infrared light by using the sun sheet of the optical filter in the plurality of scenes, focusing at each magnification to obtain a focus value corresponding to each magnification under the sun sheet, and fitting a curve of the sun sheet; focusing at each magnification by using the night film of the optical filter in the plurality of scenes to obtain a focus value corresponding to each magnification under the night film, and fitting a curve of the night film; and respectively subtracting the curve of the night film under the corresponding scene from the curve of each scene in the curves of the day films to obtain the deviation curves under the visible light proportions.
5. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 3 when executed.
6. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 3.
CN202010226005.1A 2020-03-26 2020-03-26 Focusing processing method and device Active CN111273504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010226005.1A CN111273504B (en) 2020-03-26 2020-03-26 Focusing processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010226005.1A CN111273504B (en) 2020-03-26 2020-03-26 Focusing processing method and device

Publications (2)

Publication Number Publication Date
CN111273504A CN111273504A (en) 2020-06-12
CN111273504B true CN111273504B (en) 2022-05-03

Family

ID=70999749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010226005.1A Active CN111273504B (en) 2020-03-26 2020-03-26 Focusing processing method and device

Country Status (1)

Country Link
CN (1) CN111273504B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112235506B (en) * 2020-10-09 2022-08-16 浙江大华技术股份有限公司 Camera focusing processing method, device, storage medium and electronic device
CN112911153B (en) * 2021-02-01 2023-03-24 浙江大华技术股份有限公司 Focusing processing method and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5859413A (en) * 1981-10-06 1983-04-08 Olympus Optical Co Ltd Autofocusing method
JPS6286318A (en) * 1985-10-11 1987-04-20 Minolta Camera Co Ltd Focus position detector
DE602007000971D1 (en) * 2006-01-20 2009-06-10 Fluke Corp Camera with image mixing of visible light and infrared light
JP5404122B2 (en) * 2009-03-26 2014-01-29 オリンパス株式会社 Focus position adjusting device and camera
JP5759120B2 (en) * 2010-07-21 2015-08-05 キヤノン株式会社 Imaging device
CN102269855A (en) * 2011-01-17 2011-12-07 深圳市保千里电子有限公司 Infrared induction switch zooming lens and imaging and monitoring method thereof
JP6320105B2 (en) * 2014-03-25 2018-05-09 キヤノン株式会社 Imaging apparatus and control method thereof
CN109831619A (en) * 2018-12-24 2019-05-31 天津天地伟业信息系统集成有限公司 A method of it is focused automatically after switching optical filter under camera motion state

Also Published As

Publication number Publication date
CN111273504A (en) 2020-06-12

Similar Documents

Publication Publication Date Title
US10880493B2 (en) Imaging device, method and system of providing fill light, and movable object
US8115859B2 (en) Method for controlling auto-exposure
CN111273504B (en) Focusing processing method and device
US7848629B2 (en) Auto-focus system and auto-focus method thereof
US8103159B2 (en) Flashing control method for a digital camera
US20210075954A1 (en) All-in-focus implementation
CN102445817A (en) Interchangeable lens, camera body and camera system
CN113099102A (en) Focusing method, focusing device, storage medium and electronic device
CN111722355A (en) Method and device for focusing thermal imaging lens based on temperature compensation
CN105611182B (en) Brightness compensation method and device
CN105578062A (en) Light metering mode selection method and image acquisition device utilizing same
CN102685207A (en) Intelligent photographic method based on cloud service and cloud service equipment
CN105516507A (en) Information processing method and electronic equipment
CN105338333A (en) Image white balance control method and electronic equipment
US9674496B2 (en) Method for selecting metering mode and image capturing device thereof
CN112383718A (en) Image exposure method and device and electronic equipment
CN111263078B (en) Method and device for determining image pickup mode, storage medium and electronic device
CN102135659B (en) Focus detection apparatus and focus detection method
CN109587392B (en) Method and device for adjusting monitoring equipment, storage medium and electronic device
CN110264402B (en) Image fusion method, image fusion device, storage medium and electronic device
CN105847706A (en) Method and device for dynamically adjusting exposure
EP3971642B1 (en) Intermediate accessory apparatus, image pickup apparatus, image pickup system, processing method, and program
CN105430290A (en) Water ripple pre-elimination method and photographing device
JP6758964B2 (en) Control device, image pickup device, control method, program, and storage medium
CN112672008B (en) Lens adjusting method and 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