WO2017107842A1 - Zoom tracking curve calibration method and device - Google Patents

Zoom tracking curve calibration method and device Download PDF

Info

Publication number
WO2017107842A1
WO2017107842A1 PCT/CN2016/110133 CN2016110133W WO2017107842A1 WO 2017107842 A1 WO2017107842 A1 WO 2017107842A1 CN 2016110133 W CN2016110133 W CN 2016110133W WO 2017107842 A1 WO2017107842 A1 WO 2017107842A1
Authority
WO
WIPO (PCT)
Prior art keywords
zoom
value
tracking curve
zoom tracking
focus
Prior art date
Application number
PCT/CN2016/110133
Other languages
French (fr)
Chinese (zh)
Inventor
林铁楠
Original Assignee
北京奇虎科技有限公司
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 北京奇虎科技有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2017107842A1 publication Critical patent/WO2017107842A1/en

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
    • 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

Definitions

  • the present invention relates to the field of camera monitoring technology, and in particular, to a method and apparatus for correcting a zoom tracking curve.
  • the existing integrated camera has the functions of zooming and auto focusing, and has a compact structure, convenient use and wide monitoring range, and has been widely used in the field of video surveillance.
  • the zoom lens and the focus lens are separately moved and driven by the zoom motor and the focus motor respectively.
  • zoom tracking is required to make the focus lens change synchronously according to the position of the zoom lens, thereby making the image Ability to focus clearly.
  • the lens manufacturer will provide a fixed ideal zoom tracking curve corresponding to the lens, which is convenient for the camera to achieve zoom tracking and auto focus according to the zoom tracking curve.
  • the fixed ideal zoom tracking curve is used.
  • the image may have varying degrees of blur. Therefore, before or during the lens zoom tracking process, if the actual zoom tracking curve of each lens itself can be synchronized, the image of the entire zoom process can be focused clearly. So how to get the actual zoom tracking curve of each lens is a technical problem that needs to be solved.
  • An object of the present invention is to solve at least the above problems, and to provide a method for correcting a zoom tracking curve and an apparatus using the same.
  • the embodiment of the present invention adopts the following technical solutions:
  • Embodiments of the present invention provide a method for correcting a zoom tracking curve, which includes:
  • N acquisition points are selected on the reference zoom tracking curve, and the N collection points correspond to different zoom magnification values
  • an embodiment of the present invention further provides a calibration apparatus for a zoom tracking curve, including:
  • a sampling module configured to select N collection points on the reference zoom tracking curve, the N collection points corresponding to different zoom magnification values
  • a theoretical value obtaining module configured to acquire a theoretical focus position value corresponding to a sampling point of the N collection points on the reference zoom tracking curve
  • An actual value obtaining module configured to acquire, according to a preset autofocus algorithm, an actual focus position value when a focus estimation value reaches a maximum under a zoom magnification value corresponding to the collection point;
  • a correction module configured to repeatedly invoke the foregoing modules to perform corresponding operations, respectively acquiring the N collection point pairs The actual focus position value and the theoretical focus position value, and the corresponding correction distance of the reference zoom tracking curve at the N acquisition points, to complete the correction of the reference zoom tracking curve.
  • a computer program comprising computer readable code, when the computer readable code is run on a terminal device, causing the terminal device to perform any of the zoom tracking described above The correction method of the curve.
  • a computer readable medium storing a computer program for performing a correction method of any one of the above-described zoom tracking curves.
  • the embodiment of the invention has the following advantages:
  • Embodiments of the present invention provide a method and apparatus for correcting a zoom tracking curve, which acquires theoretical focus position values corresponding to the collection points by selecting N collection points of different zoom magnification values on a theoretical reference zoom tracking curve; According to the preset auto-focus algorithm, the actual focus position value when the focus estimation value reaches the maximum under the zoom magnification value corresponding to the collected points is obtained, based on the actual focus position value and the theoretical focus position value, and the correction distance between the two. , to complete the correction of the reference zoom tracking curve. That is, the embodiment of the present invention can obtain the actual zoom tracking curve of each lens itself, thereby ensuring that the actual reference zoom tracking curve that has been corrected is synchronously operated during zooming and auto focusing, so that the entire zoom process image can be focused clearly. .
  • FIG. 1 is a flowchart of a process of an embodiment of a zoom tracking curve correction method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a theoretical zoom tracking curve preset in an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of selecting a collection point on a zoom tracking curve in an embodiment of the present invention.
  • FIG. 4 is a flowchart of a process of an embodiment of a zoom tracking curve correction method according to an embodiment of the present invention
  • FIG. 5 is a structural block diagram of an embodiment of a zoom tracking curve correcting apparatus according to an embodiment of the present invention.
  • FIG. 6 is a structural block diagram of a reference curve selection module in an embodiment of a zoom tracking curve correction device according to an embodiment of the present invention
  • FIG. 7 is a block diagram of a terminal device for performing a method according to an embodiment of the present invention.
  • FIG. 8 is a memory unit of an embodiment of the present invention for holding or carrying program code that implements a method in accordance with an embodiment of the present invention.
  • the method in the embodiment of the present invention is a process of zooming and autofocusing when an image is taken by a camera or a camera.
  • the method according to the embodiment of the present invention can also be applied to a mobile phone with a zoom, auto focus function, a PAD, a portable multimedia player (PMP), a TV, and the like.
  • FIG. 1 is a flowchart of a process of a zoom tracking curve correction method according to an embodiment of the present invention, which includes the following steps:
  • N collection points are selected on the reference zoom tracking curve, and the N collection points correspond to different zoom magnification values.
  • zoom tracking curve it is necessary to provide a pilot description of the zoom tracking curve. It is not difficult to understand that at least two zoom tracking curves having different focus distances are input in advance in the lens, please refer to FIG. 2.
  • the horizontal axis represents the zoom magnification value
  • the vertical axis represents the focus position value.
  • the zoom distances of 3 m, 6 m, 10 m, and infinity are selected in the present scheme.
  • the tracking curve is taken as an example to illustrate.
  • the method before step S11, further includes the step of: selecting a reference zoom tracking from the pre-stored at least two zoom tracking curves having different focus distances based on the preset first rule. curve.
  • the zoom tracking curves having different at least two different focusing distances are input to the imaging lens and stored in advance, for example, may be stored in advance in a storage medium, wherein the storage medium may be a synchronous dynamic random access memory (SDRAM). Multi-chip package (MCP) memory or dynamic random access memory (DRAM).
  • SDRAM synchronous dynamic random access memory
  • MCP Multi-chip package
  • DRAM dynamic random access memory
  • the initial zoom magnification value and the initial focus focus position value obtained when starting zooming are matched with the plurality of zoom tracking curves, and the closest one of the zooms is selected.
  • the trace curve is used as a reference zoom tracking curve. Referring to FIG. 4, the selected reference zoom tracking curve specifically includes the following steps:
  • the initial zoom magnification value is different from the pre-stored plurality of pieces according to the initial zoom magnification value.
  • this embodiment is applicable when the magnification value of the lens is greater than a certain value, that is, when the zoom tracking curves of different focus distances are distinct, the embodiment is suitable for zooming from a small zoom magnification value to a large zoom magnification value.
  • the current zoom magnification value is less than a certain value, that is, when the zoom tracking curves of different focus distances are more coincident under the current zoom magnification value, it is necessary to select several initial values to compare.
  • the reference zoom tracking curve is selected, it is also required to select N collection points on the reference zoom tracking curve, and the N collection points correspond to different zoom magnification values.
  • the zoom tracking curve of different focus distances has a high degree of coincidence, and fewer acquisition points should be selected at a small zoom magnification value; conversely, at a large zoom magnification value, different The zoom tracking curves of the focus distance are gradually separated, so that at a large zoom magnification value, more collection points are selected. That is, the number of collection points selected at different positions on the reference zoom tracking curve is proportional to the zoom odds value corresponding to the current position, and the specific sampling schematic is shown in FIG. 3.
  • the interval Tx of the collection point may be set to an inversely proportional to the zoom magnification value, so that the processor in the lens obtains the corresponding N according to the interval value calculated by the algorithm.
  • Collection points The embodiment is of course only exemplary, which is not limited by the embodiment of the present invention.
  • the method further includes the following steps:
  • the reference tracking curve selected in the foregoing step may be synchronously acquired to obtain a focus position value corresponding to a certain collection point, and the focus position value is used as the theoretical focus position value.
  • the method further includes the following steps:
  • the preset autofocus algorithm is a common climbing algorithm, and the focus motor is driven to move to different focus positions under the zoom magnification value corresponding to the collection point. And acquiring image data corresponding to the focus position value; and using the focus position value when the focus estimation value is maximum as the actual focus position value based on the image data and the preset focus estimation value function.
  • the focus motor is finely adjusted to change the distance between the lens and the captured object, and the lens is stopped based on a certain time or variable step size to obtain the current focus position.
  • One frame image is obtained by acquiring high frequency components of the image data along the horizontal X and the vertical Y, and calculating a focus evaluation value of the frame image based on a preset focus estimation value function. The above operation is repeatedly performed until the focus position value at which the focus evaluation value is maximum is obtained, which is the actual focus position value.
  • the preset focus evaluation value function is:
  • the x is a horizontal high-frequency component value
  • y is a vertical high-frequency component value.
  • the algorithm accumulates all the horizontal x and vertical y high-frequency energy values of the current frame image data obtained from the data image to obtain the Focus on the estimate.
  • the preset focus estimation function is associated with a scene in which the captured object is located, wherein the scene is identified by a preset scene recognition algorithm.
  • a plurality of different scene modes are preset, and each scene mode has a corresponding zoom magnification value, a light intensity value, a focus evaluation value function, a focus motor step size, and The criterion for the conclusion of the focus.
  • the method of an embodiment of the present invention further includes the following steps:
  • step S12 and step S13 are repeatedly performed, respectively acquiring the actual focus position value Focus1 zoom[N] and the theoretical focus position value Focus2 zoom[N] corresponding to the N collection points, and according to the actual focus position value.
  • Focus1 zoom [N] and the theoretical focus position value Focus2 zoom [N] calculate the corresponding correction distance focus zoom [N] , then the N correction distances corresponding to the N collection points can be obtained.
  • the calculation algorithm of the corrected distance is:
  • Focus zoom[N] Focus2 zoom[N] -Focus1 zoom[N] .
  • the correction of the reference zoom tracking curve may be implemented not only by the N acquisition points, but also by the linear difference method and the correction of any two adjacent acquisition points. Distance, an actual focus position value of a remaining point between the adjacent two acquisition points on the reference zoom tracking curve is calculated.
  • one embodiment of the embodiment of the present invention can be selected from N acquisition points of any adjacent two acquisition points Zoom [N] and zoom [N-1], and calculating the corresponding correction distance focus zoom Focus and zoom [N] [N-1], the calculated correction distance Focus adjacent arbitrary zoom ratio zoom zoom correspondence between the two collection points are:
  • Focus1 zoom focus zoom +Focus2 zoom
  • the actual focus position value of the remaining points between any two adjacent collection points can be obtained, and the specific number of samples can be determined according to actual conditions.
  • the more the number of samples the more the corrected zoom tracking curve is obtained. accurate.
  • the existing reference zoom tracking curve is corrected according to the acquired coordinates of at least N (zoom magnification value, actual focus position value).
  • the embodiment of the present invention provides a method for correcting a zoom tracking curve, which acquires theoretical focus corresponding to the collected points by selecting N collection points of different zoom magnification values on a theoretical reference zoom tracking curve.
  • Position value according to the preset autofocus algorithm, the actual focus position value when the focus estimation value reaches the maximum under the zoom magnification value corresponding to the collected points is obtained, based on the actual focus position value and the theoretical focus position value, and between the two Correct the distance to complete the correction of the reference zoom tracking curve. That is, the embodiment of the present invention can obtain the actual zoom tracking curve of each lens itself, thereby ensuring that the actual reference zoom tracking curve that has been corrected is synchronously operated during zooming and auto focusing, so that the entire zoom process image can be focused clearly. .
  • the focus motor when the actual focus position value is obtained, the focus motor is driven to move to a different focus position under the zoom magnification value corresponding to the collection point, and based on the image data corresponding to the focus position and the preset focus estimation value function.
  • the focus position value when the focus evaluation value is maximum is taken as the actual focus position value, and the focus estimation value function is associated with the scene corresponding to the image data. That is, the embodiment of the present invention can correct the zoom tracking curve of the lens in different scenarios, and improve the accuracy and verification efficiency of the calibration result.
  • the embodiment of the present invention further provides a zoom tracking curve correction device.
  • the sample module 11 the theoretical value acquisition module 12 , the actual value acquisition module 13 , and the correction module 14 are provided. .
  • the device according to the embodiment of the present invention is applied to a camera or a camera having a zooming and autofocus function.
  • the device according to the embodiment of the present invention can also be applied to a mobile phone with a zoom, auto focus function, a PAD, a portable multimedia player (PMP), a TV, and the like.
  • the embodiment of the present invention is exemplified by a digital camera as an example, but the embodiment does not constitute a limitation on the embodiment of the present invention.
  • the specific functions implemented by each module are specifically disclosed below.
  • the sampling module 11 is configured to select N collection points on the reference zoom tracking curve, the N collection points corresponding to different zoom magnification values.
  • zoom tracking curve it is necessary to provide a pilot description of the zoom tracking curve. It is not difficult to understand that at least two zoom tracking curves with different focus distances are input in advance in the lens. Please refer to FIG. 2. For convenience of description, the focus distances in this solution are 3 meters, 6 meters, 10 meters and infinity respectively.
  • the zoom tracking curve is illustrated as an example. In the coordinate system described in FIG. 2, the horizontal axis represents the zoom magnification value, and the vertical axis represents the focus position value.
  • the embodiment of the present invention further includes a reference curve selection module 10.
  • the reference curve selection module 10 is configured to: before the sampling module 11 performs the selection of N collection points on the reference zoom tracking curve, based on the preset first rule, from the pre-stored at least two zoom distances with different zoom distances The reference zoom tracking curve is selected in the tracking curve.
  • the embodiment of the present invention further includes a curve storage module, configured to input at least two focus distances before the reference curve selection module 10 selects the reference zoom tracking curve from the pre-stored zoom tracking curves having different focus distances. Different zoom tracking curves are stored.
  • the zoom tracking curves having different at least two different focusing distances are input to the imaging lens and stored in advance, for example, may be stored in advance in a storage medium, wherein the storage medium may be a synchronous dynamic random access memory (SDRAM). Multi-chip package (MCP) memory or dynamic random access memory (DRAM).
  • SDRAM synchronous dynamic random access memory
  • MCP Multi-chip package
  • DRAM dynamic random access memory
  • the reference curve selection module 10 may select an initial zoom magnification value and an initial focus focus position value obtained when starting zooming, and the plurality of zoom tracking curves.
  • the closest zoom tracking curve is used as the reference zoom tracking curve.
  • the reference curve selection module 10 further includes an initial value acquisition unit 101, a focus value acquisition unit 102, and a curve acquisition unit 103.
  • the initial value acquiring unit 101 is configured to acquire a current zoom motor position and a focus motor position when zooming is started, thereby obtaining an initial zoom magnification value and an initial focus position value;
  • the focus value obtaining unit 102 is configured to obtain, on each zoom tracking curve, a focus position value corresponding to the initial zoom magnification value
  • the curve obtaining unit 103 is configured to select a zoom tracking curve whose focus position value is closest to the initial focus position value as the reference zoom tracking curve.
  • the initial value acquiring unit 101 acquires the current zoom motor position and the position of the focus motor, and obtains a corresponding initial zoom magnification value and an initial value focus position value; then the focus value is obtained.
  • the unit 102 acquires a corresponding focus position value from the pre-stored zoom tracking curves of the plurality of different focus distances according to the initial zoom magnification value; then the curve acquisition unit 103 compares the initial focus position value with the obtained plurality of focus position values, and selects The zoom tracking curve corresponding to the closest focus position value is used as the reference zoom tracking curve.
  • this embodiment is applicable when the magnification value of the lens is greater than a certain value, that is, when the zoom tracking curves of different focus distances are distinct, the embodiment is suitable for zooming from a small zoom magnification value to a large zoom magnification value.
  • the initial value acquisition unit 101 is also required to select a plurality of initial values for comparison.
  • the sampling module 11 is further required to select N collection points on the reference zoom tracking curve, and the N collection points correspond to different Zoom magnification value.
  • the zoom tracking curve of different focus distances has a high degree of coincidence, and the sampling module 11 should select fewer acquisition points under a small zoom magnification value; otherwise, a large zoom.
  • the zoom tracking curves of different focus distances are gradually separated between each other, so at a large zoom magnification value, the sampling module 11 selects more collection points. That is, the number of collection points selected by the sampling module 11 at different positions on the reference zoom tracking curve is proportional to the zoom odds value corresponding to the current position.
  • FIG. 3 For a specific sampling diagram, please refer to FIG. 3.
  • the interval Tx at which the sampling module 11 acquires the acquisition point may be set to an inversely proportional to the zoom magnification value, so that the sampling module 11 calculates the interval according to the algorithm. Value to get the corresponding N collection points.
  • the embodiment is of course only exemplary, which is not limited by the embodiment of the present invention.
  • the theoretical value obtaining module 12 is configured to acquire a corresponding theory of a collection point of the N collection points on a reference tracking curve. Focus position value.
  • the theoretical value obtaining module 12 can synchronously follow the selected reference tracking curve in the reference curve selection module 11 to obtain a focus position value corresponding to a certain collection point, and use the focus position value as the theoretical focus position. value.
  • the actual value obtaining module 13 is configured to acquire an actual focus position value when the focus estimation value reaches a maximum under the zoom magnification value corresponding to the collection point based on the preset auto focus algorithm.
  • the preset auto-focusing algorithm is a common climbing algorithm
  • the actual value acquiring module 13 drives the focusing at a zoom magnification value corresponding to the collected point.
  • the motor moves to different focus position values, and acquires image data corresponding to the focus position value; based on the image data and the preset focus estimation value function, the focus position value when the focus estimation value is maximum is taken as the actual focus position value.
  • the actual value obtaining module 13 drives the focus motor to finely adjust the distance between the lens and the captured object under the zoom magnification value corresponding to the collection point, and stops the time based on a certain time or variable step size.
  • the lens acquires a frame image of the current focus position, acquires high frequency components of the image data along the horizontal X and the vertical Y, and calculates a focus evaluation value of the frame image based on a preset focus estimation value function.
  • the above operation is repeatedly performed until the actual value acquisition module 13 acquires the focus position value when the focus evaluation value is maximum, and the focus position value is the actual focus position value.
  • the preset focus evaluation value function is:
  • the x is a horizontal high-frequency component value
  • y is a vertical high-frequency component value.
  • the algorithm accumulates all the horizontal x and vertical y high-frequency energy values of the current frame image data obtained from the data image to obtain the Focus on the estimate.
  • the preset focus estimation function is associated with a scene in which the captured object is located, wherein the scene is identified by a preset scene recognition algorithm.
  • a plurality of different scene modes are preset, and each scene mode has a corresponding zoom magnification value, a light intensity value, a focus evaluation value function, a focus motor step size, and The criterion for the conclusion of the focus.
  • the actual value obtaining module 13 compares the zoom intensity value, the gain, and the light intensity information value in the preset plurality of scene modes by acquiring the light intensity information, the gain, and the zoom magnification value of the current image data, and selects the most matching scene.
  • the mode acquires a focus motor step size, a focus evaluation value function, and a focus end judgment criterion in the scene mode.
  • a correction module 14 is further included.
  • the correction module 14 is configured to repeatedly invoke the foregoing modules to perform corresponding operations, respectively acquiring actual focus position values and theoretical focus position values corresponding to the N collection points, and the reference zoom tracking curves are in the N collections. The corresponding correction distance is clicked to complete the correction of the reference zoom tracking curve.
  • the correction module 14 repeatedly invokes the foregoing theoretical value acquisition module 12 and the actual value acquisition module 13 to acquire the actual focus position values corresponding to the N collection points, Focus1 zoom [N] and the theoretical focus position value Focus2 zoom. [N] , according to the actual focus position value Focus1 zoom [N] and the theoretical focus position value Focus2 zoom [N] calculate the corresponding correction distance focus zoom [N] , the N correction distances corresponding to the N collection points can be obtained.
  • the calculation algorithm of the corrected distance is:
  • Focus zoom[N] Focus2 zoom[N] -Focus1 zoom[N] .
  • the correction module 14 may implement the correction of the reference zoom tracking curve not only by the N acquisition points, but also the linear difference method and any adjacent two.
  • the corrected distance of the collected points is calculated, and the actual focus position value of the remaining points between the adjacent two collection points on the reference zoom tracking curve is calculated.
  • the correction module 14 may select any two adjacent collection points zoom [N] and zoom [N-1] from the N collection points, and calculate the corresponding zoom correction distance Focus Focus and zoom [N] [N-1], corresponding to the adjacent zoom Focus correction distance calculated zoom ratio zoom any point between the two values is acquired:
  • the correction module 14 acquires a theoretical focus position Focus2 zoom corresponding to an arbitrary zoom magnification value zoom between the adjacent collection points zoom [N] and zoom [N-1] according to the reference zoom tracking curve, and then calculates the The zoom focus value zoom corresponds to the actual focus position Focus1 zoom :
  • Focus1 zoom focus zoom +Focus2 zoom
  • the correction module 14 can obtain the actual focus position values of a plurality of remaining points between any two adjacent collection points, and the specific number of samples can be determined according to actual conditions. The more the number of samples, the more accurate the corrected zoom tracking curve. Further, the existing reference zoom tracking curve is corrected according to the acquired coordinates of at least N (zoom magnification value, actual focus position value).
  • the embodiment of the present invention provides a calibration apparatus for a zoom tracking curve, which selects N collection points of different zoom magnification values on a theoretical reference zoom tracking curve by the sampling module 11 and obtains a module by a theoretical value. 12: acquiring the theoretical focus position value corresponding to the collection points; the actual value acquisition module 13 further acquires the actual focus position value when the focus estimation value reaches the maximum under the zoom magnification value corresponding to the collection points according to the preset auto focus algorithm, and finally passes The correction module 14 completes the correction of the reference zoom tracking curve based on the actual focus position value and the theoretical focus position value, and the corrected distance between the two.
  • the embodiment of the present invention can obtain the actual zoom tracking curve of each lens itself, thereby ensuring that the actual reference zoom tracking curve that has been corrected is the same in the subsequent zooming and autofocusing.
  • the step is run so that the entire zoom process image can be focused clearly.
  • the focus motor when the actual focus position value is obtained, the focus motor is driven to move to a different focus position under the zoom magnification value corresponding to the collection point, and based on the image data corresponding to the focus position and the preset focus estimation value function.
  • the focus position value when the focus evaluation value is maximum is taken as the actual focus position value, and the focus estimation value function is associated with the scene corresponding to the image data. That is, the embodiment of the present invention can correct the zoom tracking curve of the lens in different scenarios, and improve the accuracy and verification efficiency of the calibration result.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • Embodiments of embodiments of the invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of an asynchronous login device in accordance with an embodiment of the present invention.
  • Embodiments of the invention may also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing an embodiment of the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • FIG. 7 illustrates a terminal device that can implement a method of correcting a zoom tracking curve according to an embodiment of the present invention.
  • the terminal device conventionally includes a processor 710 and a computer program product or computer readable medium in the form of a memory 720.
  • Memory 720 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • Memory 720 has a memory space 730 for program code 731 for performing any of the method steps described above.
  • storage space 730 for program code may include various program code 731 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • Such computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such a computer program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have a storage section, a storage space, and the like arranged similarly to the storage 720 in the terminal device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes computer readable code 731', i.e., code readable by a processor, such as 710, that when executed by the terminal device causes the terminal device to perform each of the methods described above step.

Landscapes

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

Abstract

The invention relates to the technical field of monitoring, especially relates to a calibration method and device of a zoom tracking curve. The method comprises: selecting N collection points on a reference zoom tracking curve, wherein the N collection points correspond to different zooming ratio values; obtaining the corresponding theoretical focusing location value of a certain collection point in the N collection points on the reference zoom tracking curve; on the basis of a preset automatic focusing algorithm, obtaining an actual focusing location value at a zooming ratio value corresponding to the collection point when the focusing estimation value becomes the maximum; repeatedly executing the above steps, and respectively obtaining the actual focusing location values and the theoretical focusing location values corresponding to the N collection points, thus finishing the calibration of the reference zoom tracking curve. The own actual zoom tracking curve of each lens can be obtained and its synchronous operation with the calibrated actual reference zooming tracking curve in the follow-up zooming and automatic focusing processes can be ensured such that the image is focused clearly in the whole zooming process.

Description

变焦跟踪曲线的校正方法和装置Method and device for correcting zoom tracking curve 【技术领域】[Technical Field]
本发明涉及摄像监控技术领域,尤其涉及一种变焦跟踪曲线的校正方法和装置。The present invention relates to the field of camera monitoring technology, and in particular, to a method and apparatus for correcting a zoom tracking curve.
【背景技术】【Background technique】
现有的一体化摄像机具有变焦、自动聚焦的功能,其结构小巧、使用方便、监控范围广,已广泛应用于视频监控领域。在一体化摄像机镜头中变焦镜片和聚焦镜片是分开移动的,分别由变焦电机和聚焦电机驱动,在变焦过程中,需要进行变焦跟踪,使聚焦镜片根据变焦镜片的位置而同步变化,从而使图像能够聚焦清楚。The existing integrated camera has the functions of zooming and auto focusing, and has a compact structure, convenient use and wide monitoring range, and has been widely used in the field of video surveillance. In the integrated camera lens, the zoom lens and the focus lens are separately moved and driven by the zoom motor and the focus motor respectively. During zooming, zoom tracking is required to make the focus lens change synchronously according to the position of the zoom lens, thereby making the image Ability to focus clearly.
通常,镜头厂商会提供对应于该镜头的固定理想变焦跟踪曲线,便于摄像机依据该变焦跟踪曲线实现变焦跟踪和自动聚焦。但是,由于镜头的个体差异,在使用某个镜头时,需要对每个镜头的变焦、对焦的光学基准位置进行调整和确认,以得到最合适的变焦跟踪曲线,如果以该固定理想变焦跟踪曲线做变焦跟踪时,图像可能会存在不同程度的模糊。因此,在镜头变焦跟踪过程之前或之中,如果能根据每个镜头自身的实际变焦跟踪曲线同步运行,使得整个变焦过程图像都能聚焦清楚。因此如何得到每个镜头的实际变焦跟踪曲线是需要解决的技术问题。Usually, the lens manufacturer will provide a fixed ideal zoom tracking curve corresponding to the lens, which is convenient for the camera to achieve zoom tracking and auto focus according to the zoom tracking curve. However, due to the individual differences of the lens, when using a certain lens, it is necessary to adjust and confirm the optical reference position of each lens for zooming and focusing to obtain the most suitable zoom tracking curve, if the fixed ideal zoom tracking curve is used. When doing zoom tracking, the image may have varying degrees of blur. Therefore, before or during the lens zoom tracking process, if the actual zoom tracking curve of each lens itself can be synchronized, the image of the entire zoom process can be focused clearly. So how to get the actual zoom tracking curve of each lens is a technical problem that needs to be solved.
【发明内容】[Summary of the Invention]
本发明的目的旨在解决上述至少一个问题,提供了一种变焦跟踪曲线的校正方法、及采用该方法的装置。An object of the present invention is to solve at least the above problems, and to provide a method for correcting a zoom tracking curve and an apparatus using the same.
为实现该目的,本发明实施例采用如下技术方案:To achieve the object, the embodiment of the present invention adopts the following technical solutions:
本发明实施例提供了一种变焦跟踪曲线的校正方法,其包括有:Embodiments of the present invention provide a method for correcting a zoom tracking curve, which includes:
在参考变焦跟踪曲线上选定N个采集点,该N个采集点对应于不同的变焦倍率值;N acquisition points are selected on the reference zoom tracking curve, and the N collection points correspond to different zoom magnification values;
获取该N个采集点中某一采集点在参考变焦跟踪曲线上对应的理论聚焦位置值;Obtaining a theoretical focus position value corresponding to a sampling point of the N collection points on the reference zoom tracking curve;
基于预设的自动聚焦算法,获取在该采集点对应的变焦倍率值下聚焦估计值达到最大时的实际聚焦位置值;Obtaining an actual focus position value when the focus estimation value reaches a maximum at a zoom magnification value corresponding to the collection point based on a preset auto focus algorithm;
重复执行上述步骤,分别获取所述N个采集点对应的实际聚焦位置值和理论聚焦位置值、及该参考变焦跟踪曲线在所述N个采集点上对应的校正距离,以完成参考变焦跟踪曲线的校正。Repeating the above steps, respectively acquiring actual focus position values and theoretical focus position values corresponding to the N collection points, and corresponding correction distances of the reference zoom tracking curves on the N collection points, to complete the reference zoom tracking curve. Correction.
依据本发明实施例的另外一个方面,本发明实施例还提供了一种变焦跟踪曲线的校正装置,其包括有:According to another aspect of the embodiments of the present invention, an embodiment of the present invention further provides a calibration apparatus for a zoom tracking curve, including:
取样模块,用于在参考变焦跟踪曲线上选定N个采集点,该N个采集点对应于不同的变焦倍率值;a sampling module, configured to select N collection points on the reference zoom tracking curve, the N collection points corresponding to different zoom magnification values;
理论值获取模块,用于获取该N个采集点中某一采集点在参考变焦跟踪曲线上对应的理论聚焦位置值;a theoretical value obtaining module, configured to acquire a theoretical focus position value corresponding to a sampling point of the N collection points on the reference zoom tracking curve;
实际值获取模块,用于基于预设的自动聚焦算法,获取在该采集点对应的变焦倍率值下聚焦估计值达到最大时的实际聚焦位置值;An actual value obtaining module, configured to acquire, according to a preset autofocus algorithm, an actual focus position value when a focus estimation value reaches a maximum under a zoom magnification value corresponding to the collection point;
校正模块,用于重复调用上述各模块执行对应的操作,分别获取所述N个采集点对 应的实际聚焦位置值和理论聚焦位置值、及该参考变焦跟踪曲线在所述N个采集点上对应的校正距离,以完成参考变焦跟踪曲线的校正。a correction module, configured to repeatedly invoke the foregoing modules to perform corresponding operations, respectively acquiring the N collection point pairs The actual focus position value and the theoretical focus position value, and the corresponding correction distance of the reference zoom tracking curve at the N acquisition points, to complete the correction of the reference zoom tracking curve.
根据本发明实施例的又一个方面,提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在终端设备上运行时,导致所述终端设备执行上述的任一个变焦跟踪曲线的校正方法。According to still another aspect of an embodiment of the present invention, a computer program is provided, comprising computer readable code, when the computer readable code is run on a terminal device, causing the terminal device to perform any of the zoom tracking described above The correction method of the curve.
根据本发明实施例的再一个方面,提供了一种计算机可读介质,其中存储了执行上述的任一个变焦跟踪曲线的校正方法的计算机程序。According to still another aspect of an embodiment of the present invention, there is provided a computer readable medium storing a computer program for performing a correction method of any one of the above-described zoom tracking curves.
与现有技术相比,本发明实施例具备如下优点:Compared with the prior art, the embodiment of the invention has the following advantages:
本发明实施例提供了一种变焦跟踪曲线的校正方法和装置,其通过在理论的参考变焦跟踪曲线上选定N个不同变焦倍率值的采集点,获取这些采集点对应的理论聚焦位置值;再依据预设的自动聚焦算法,获取这些采集点对应的变焦倍率值下聚焦估计值达到最大时的实际聚焦位置值,基于实际聚焦位置值与理论聚焦位置值、及两者之间的校正距离,来完成参考变焦跟踪曲线的校正。即本发明实施例能获取每个镜头自身的实际变焦跟踪曲线,从而保证后续在变焦和自动聚焦时随着已经过校正的实际的参考变焦跟踪曲线同步运行,使得整个变焦过程图像都能聚焦清楚。Embodiments of the present invention provide a method and apparatus for correcting a zoom tracking curve, which acquires theoretical focus position values corresponding to the collection points by selecting N collection points of different zoom magnification values on a theoretical reference zoom tracking curve; According to the preset auto-focus algorithm, the actual focus position value when the focus estimation value reaches the maximum under the zoom magnification value corresponding to the collected points is obtained, based on the actual focus position value and the theoretical focus position value, and the correction distance between the two. , to complete the correction of the reference zoom tracking curve. That is, the embodiment of the present invention can obtain the actual zoom tracking curve of each lens itself, thereby ensuring that the actual reference zoom tracking curve that has been corrected is synchronously operated during zooming and auto focusing, so that the entire zoom process image can be focused clearly. .
本发明实施例附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本发明实施例的实践了解到。The additional aspects and advantages of the embodiments of the present invention will be set forth in part in the description in the description.
【附图说明】[Description of the Drawings]
本发明实施例上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the embodiments of the present invention will become apparent and readily understood from
图1是本发明实施例中变焦跟踪曲线校正方法的一个实施例的程序流程图;1 is a flowchart of a process of an embodiment of a zoom tracking curve correction method according to an embodiment of the present invention;
图2是本发明实施例中预先设定的理论变焦跟踪曲线的示意图;2 is a schematic diagram of a theoretical zoom tracking curve preset in an embodiment of the present invention;
图3是本发明实施例中在变焦跟踪曲线上选取采集点的示意图;3 is a schematic diagram of selecting a collection point on a zoom tracking curve in an embodiment of the present invention;
图4是本发明实施例中变焦跟踪曲线校正方法的一个实施例的程序流程图;4 is a flowchart of a process of an embodiment of a zoom tracking curve correction method according to an embodiment of the present invention;
图5是本发明实施例中变焦跟踪曲线校正装置的一个实施例的结构框图;FIG. 5 is a structural block diagram of an embodiment of a zoom tracking curve correcting apparatus according to an embodiment of the present invention; FIG.
图6是本发明实施例中变焦跟踪曲线校正装置的一个实施例中参考曲线选取模块的结构框图;6 is a structural block diagram of a reference curve selection module in an embodiment of a zoom tracking curve correction device according to an embodiment of the present invention;
图7是本发明实施例用于执行根据本发明实施例的方法的终端设备的框图;FIG. 7 is a block diagram of a terminal device for performing a method according to an embodiment of the present invention;
图8是本发明实施例用于保持或者携带实现根据本发明实施例的方法的程序代码的存储单元。8 is a memory unit of an embodiment of the present invention for holding or carrying program code that implements a method in accordance with an embodiment of the present invention.
【具体实施方式】【detailed description】
下面结合附图和示例性实施例对本发明实施例作进一步地描述,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明实施例,而不能解释为对本发明实施例的限制。此外,如果已知技术的详细描述对于示出本发明实施例的特征是不必要的,则将其省略。The embodiments of the present invention are further described in the following with reference to the drawings and the exemplary embodiments, which are illustrated in the accompanying drawings, in which the same or the Components. The embodiments described below with reference to the accompanying drawings are intended to be illustrative of the embodiments of the invention. Further, if a detailed description of a known technique is unnecessary for the features of the embodiments of the present invention, it will be omitted.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、 “所述”和“该”也可包括复数形式。应该进一步理解的是,本发明实施例的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。Those skilled in the art will understand that the singular forms "a", "an", "The" and "the" may also include the plural. It is to be understood that the phrase "comprise" or "an" Features, integers, steps, operations, components, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element. Further, "connected" or "coupled" as used herein may include either a wireless connection or a wireless coupling. The phrase "and/or" used herein includes all or any one and all combinations of one or more of the associated listed.
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明实施例所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。Those skilled in the art will appreciate that all terms (including technical and scientific terms) used herein have the same meaning as the ordinary meaning of the ordinary It should also be understood that terms such as those defined in a general dictionary should be understood to have meaning consistent with the meaning in the context of the prior art, and will not be idealized or excessive unless specifically defined as here. The formal meaning is explained.
需要说明的是,本发明实施例所述方法是应用于相机或摄像机拍摄图像时变焦、自动聚焦的过程。当然,本发明实施例所述方法也可应用于具有变焦、自动聚焦功能的手机、PAD、便携式多媒体播放器(PMP)、TV等设备。It should be noted that the method in the embodiment of the present invention is a process of zooming and autofocusing when an image is taken by a camera or a camera. Of course, the method according to the embodiment of the present invention can also be applied to a mobile phone with a zoom, auto focus function, a PAD, a portable multimedia player (PMP), a TV, and the like.
参见附图1,为本发明实施例变焦跟踪曲线校正方法的一个实施例的程序流程图,其包括步骤:1 is a flowchart of a process of a zoom tracking curve correction method according to an embodiment of the present invention, which includes the following steps:
S11,在参考变焦跟踪曲线上选定N个采集点,该N个采集点对应于不同的变焦倍率值。S11, N collection points are selected on the reference zoom tracking curve, and the N collection points correspond to different zoom magnification values.
需要说明的是,有必要对所述的变焦跟踪曲线进行先导性说明。不难理解,在镜头中预先输入有至少两条聚焦距离不同的变焦跟踪曲线,请参照附图2。其中在图2所述的坐标系中,横轴代表变焦倍率值,纵轴代表聚焦位置值,为便于说明,本方案中选用聚焦距离分别为3米、6米、10米和无穷远的变焦跟踪曲线为例来说明。从中可以看出,在变焦电机位置处于小的变焦倍率值时,四条不同聚焦距离的变焦跟踪曲线基本重合;当变焦倍率变大时,不同聚焦距离的变焦跟踪曲线逐渐分开,距离相差越来越大。这说明,在变焦电机位置处于小的变焦倍率值时,随着物体离镜头距离的变化,电机聚焦位置变化不大,但在高变焦倍率下,物距一旦发生大的变化,聚焦电机位置也随之发生较大偏差。因此在镜头变焦过程中,首先要选定一条与当前聚焦距离最匹配的参考变焦跟踪曲线。It should be noted that it is necessary to provide a pilot description of the zoom tracking curve. It is not difficult to understand that at least two zoom tracking curves having different focus distances are input in advance in the lens, please refer to FIG. 2. In the coordinate system described in FIG. 2, the horizontal axis represents the zoom magnification value, and the vertical axis represents the focus position value. For convenience of explanation, the zoom distances of 3 m, 6 m, 10 m, and infinity are selected in the present scheme. The tracking curve is taken as an example to illustrate. It can be seen that when the zoom motor position is at a small zoom magnification value, the zoom tracking curves of the four different focus distances are substantially coincident; when the zoom magnification becomes larger, the zoom tracking curves of different focus distances are gradually separated, and the distance difference is more and more different. Big. This shows that when the zoom motor position is at a small zoom magnification value, the focus position of the motor does not change much as the distance of the object from the lens changes, but at high zoom magnification, once the object distance changes greatly, the position of the focus motor also A large deviation follows. Therefore, during zooming of the lens, first select a reference zoom tracking curve that best matches the current focus distance.
具体的,在本发明实施例的一个实施例中,在步骤S11之前,还包括步骤:基于预设的第一规则,从预存的至少两条聚焦距离不同的变焦跟踪曲线中选定参考变焦跟踪曲线。不难理解,所述至少两条聚焦距离不同的变焦跟踪曲线是预先输入到摄像镜头并存储,例如可以预先存储在存储介质中,其中所述存储介质可以是同步动态随机存取存储器(SDRAM)、多芯片封装(MCP)存储器或动态随机存取存储器(DRAM)。Specifically, in an embodiment of the present invention, before step S11, the method further includes the step of: selecting a reference zoom tracking from the pre-stored at least two zoom tracking curves having different focus distances based on the preset first rule. curve. It is not difficult to understand that the zoom tracking curves having different at least two different focusing distances are input to the imaging lens and stored in advance, for example, may be stored in advance in a storage medium, wherein the storage medium may be a synchronous dynamic random access memory (SDRAM). Multi-chip package (MCP) memory or dynamic random access memory (DRAM).
具体的,本发明实施例的一个实施例中,可以通过将开始变焦时获取的初始变焦倍率值、初值聚焦位置值与该多条变焦跟踪曲线进行匹配,选择其中最接近的一条变焦跟 踪曲线作为参考变焦跟踪曲线。请参见附图4,所述选定参考变焦跟踪曲线具体包括以下步骤:Specifically, in an embodiment of the embodiment of the present invention, the initial zoom magnification value and the initial focus focus position value obtained when starting zooming are matched with the plurality of zoom tracking curves, and the closest one of the zooms is selected. The trace curve is used as a reference zoom tracking curve. Referring to FIG. 4, the selected reference zoom tracking curve specifically includes the following steps:
S101,当开始变焦时,获取当前变焦电机位置及聚焦电机位置,从而得到初始变焦倍率值和初始聚焦位置值;S101, when zooming is started, acquiring a current zoom motor position and a focus motor position, thereby obtaining an initial zoom magnification value and an initial focus position value;
S102,在每条变焦跟踪曲线上获取该初始变焦倍率值所对应的聚焦位置值;S102. Acquire, on each zoom tracking curve, a focus position value corresponding to the initial zoom magnification value.
S103,选取聚焦位置值与初始聚焦位置值最接近的一条变焦跟踪曲线作为参考变焦跟踪曲线。S103. Select a zoom tracking curve whose focus position value is closest to the initial focus position value as the reference zoom tracking curve.
具体的,在摄像镜头变焦过程中,获取当前变焦电机位置及聚焦电机的位置,即可得到对应的初始变焦倍率值和初值聚焦位置值;然后依据该初始变焦倍率值从预存的多条不同聚焦距离的变焦跟踪曲线中获取对应的聚焦位置值;然后对比初始聚焦位置值与获得的多个聚焦位置值,选取最接近的聚焦位置值对应的变焦跟踪曲线作为所述的参考变焦跟踪曲线。当然,该实施例对于镜头所处的倍率值大于一定值,即不同聚焦距离的变焦跟踪曲线分开明显时,比较适用;但是该实施例对从小的变焦倍率值向大的变焦倍率值的变倍方向下,且当前的变焦倍率值小于一定值,即不同聚焦距离的变焦跟踪曲线在当前变焦倍率值下较为重合时,还需要多选取几个初始值来比较。Specifically, during the zooming process of the camera lens, obtaining the current zoom motor position and the position of the focus motor, the corresponding initial zoom magnification value and the initial value focus position value are obtained; and then the initial zoom magnification value is different from the pre-stored plurality of pieces according to the initial zoom magnification value. Obtaining a corresponding focus position value in the zoom tracking curve of the focus distance; then comparing the initial focus position value with the obtained plurality of focus position values, and selecting a zoom tracking curve corresponding to the closest focus position value as the reference zoom tracking curve. Of course, this embodiment is applicable when the magnification value of the lens is greater than a certain value, that is, when the zoom tracking curves of different focus distances are distinct, the embodiment is suitable for zooming from a small zoom magnification value to a large zoom magnification value. In the direction, and the current zoom magnification value is less than a certain value, that is, when the zoom tracking curves of different focus distances are more coincident under the current zoom magnification value, it is necessary to select several initial values to compare.
进一步的,在选定了参考变焦跟踪曲线后,还需要在该参考变焦跟踪曲线上选定N个采集点,该N个采集点对应于不同的变焦倍率值。Further, after the reference zoom tracking curve is selected, it is also required to select N collection points on the reference zoom tracking curve, and the N collection points correspond to different zoom magnification values.
不难理解,在小的变焦倍率值下,不同聚焦距离的变焦跟踪曲线重合度高,应该在小的变焦倍率值下,选取较少的采集点;反之,在大的变焦倍率值下,不同聚焦距离的变焦跟踪曲线之间逐渐分开,因此在大的变焦倍率值下,选择较多的采集点。即在参考变焦跟踪曲线上不同位置选取的采集点的数量,与当前位置对应的变焦赔率值成正比,具体的取样示意图请参见附图3。例如,在本发明实施例的一个实施例中,可以将采集点的间隔Tx设定为与变焦倍率值成反比的算法,使得镜头中处理器依据该算法计算的间隔值,来获取对应的N个采集点。当然该实施例仅仅是示例性的,本发明实施例对此不做限定。It is not difficult to understand that under a small zoom magnification value, the zoom tracking curve of different focus distances has a high degree of coincidence, and fewer acquisition points should be selected at a small zoom magnification value; conversely, at a large zoom magnification value, different The zoom tracking curves of the focus distance are gradually separated, so that at a large zoom magnification value, more collection points are selected. That is, the number of collection points selected at different positions on the reference zoom tracking curve is proportional to the zoom odds value corresponding to the current position, and the specific sampling schematic is shown in FIG. 3. For example, in an embodiment of the present invention, the interval Tx of the collection point may be set to an inversely proportional to the zoom magnification value, so that the processor in the lens obtains the corresponding N according to the interval value calculated by the algorithm. Collection points. The embodiment is of course only exemplary, which is not limited by the embodiment of the present invention.
进一步的,请参见附图1,在本发明实施例的一个实施例方法中,还包括步骤:Further, referring to FIG. 1, in an embodiment of the method of the present invention, the method further includes the following steps:
S12,获取该N个采集点中某一采集点在参考跟踪曲线上对应的理论聚焦位置值。S12. Acquire a theoretical focus position value corresponding to a sampling point of the N collection points.
具体的,可以同步跟随前述步骤中选定的参考跟踪曲线,获取某一采集点对应的聚焦位置值,将该聚焦位置值作为所述的理论聚焦位置值。Specifically, the reference tracking curve selected in the foregoing step may be synchronously acquired to obtain a focus position value corresponding to a certain collection point, and the focus position value is used as the theoretical focus position value.
进一步的,请参见附图1,在本发明实施例的一个实施例方法中,还包括步骤:Further, referring to FIG. 1, in an embodiment of the method of the present invention, the method further includes the following steps:
S13,基于预设的自动聚焦算法,获取在该采集点对应的变焦倍率值下聚焦估计值达到最大时的实际聚焦位置值。S13. Acquire an actual focus position value when the focus estimation value reaches a maximum under the zoom magnification value corresponding to the collection point, based on a preset autofocus algorithm.
具体的,在本发明实施例的一个实施例中,所述预设的自动聚焦算法即为常见的爬坡算法,在所述采集点对应的变焦倍率值下驱动聚焦电机移动到不同的聚焦位置值,并获取该聚焦位置值所对应的图像数据;基于该图像数据和预设的聚焦估计值函数,将聚焦估计值最大时的聚焦位置值作为实际聚焦位置值。 Specifically, in an embodiment of the embodiment of the present invention, the preset autofocus algorithm is a common climbing algorithm, and the focus motor is driven to move to different focus positions under the zoom magnification value corresponding to the collection point. And acquiring image data corresponding to the focus position value; and using the focus position value when the focus estimation value is maximum as the actual focus position value based on the image data and the preset focus estimation value function.
具体的,在所述采集点对应的变焦倍率值下,驱动聚焦电机微调以改变镜头与所拍对象之间的距离,且基于一定的时间或可变步长停止该镜头,获取当前聚焦位置时的一帧图像,获取该图像数据沿着水平X和垂直Y的高频分量,并基于预设的聚焦估计值函数,计算该帧图像的的聚焦评估值。重复执行上述操作,直到获取聚焦评估值最大时的聚焦位置值,该聚焦位置值即为所述的实际聚焦位置值。例如,在本发明实施例的一个实施例中,所述预设的聚焦评估值函数为:Specifically, under the zoom magnification value corresponding to the collection point, the focus motor is finely adjusted to change the distance between the lens and the captured object, and the lens is stopped based on a certain time or variable step size to obtain the current focus position. One frame image is obtained by acquiring high frequency components of the image data along the horizontal X and the vertical Y, and calculating a focus evaluation value of the frame image based on a preset focus estimation value function. The above operation is repeatedly performed until the focus position value at which the focus evaluation value is maximum is obtained, which is the actual focus position value. For example, in an embodiment of the embodiment of the present invention, the preset focus evaluation value function is:
Figure PCTCN2016110133-appb-000001
Figure PCTCN2016110133-appb-000001
所述x是指水平高频分量值,y是指垂直高频分量值,本算法是将数据图像所得的当前帧图像数据所有水平x和垂直y的高频能量值进行累加而得到所述的聚焦估计值。The x is a horizontal high-frequency component value, and y is a vertical high-frequency component value. The algorithm accumulates all the horizontal x and vertical y high-frequency energy values of the current frame image data obtained from the data image to obtain the Focus on the estimate.
需要说明的是,所述预设的聚焦估计值函数与所拍摄对象所处的场景相关联,其中所述场景通过预设的场景识别算法来识别获取。具体的,在本发明实施例的一个实施例中,预先设置有多种不同的场景模式,每种场景模式下具有对应的变焦倍率值、光强值、聚焦评估值函数、聚焦电机步长以及聚焦结束的判断准则。通过获取当前图像数据的光强信息、增益及变焦倍率值,与预设的多个场景模式中变焦倍率值、增益及光强信息值进行对比,选择最匹配的场景模式,获取该场景模式下的聚焦电机步长、聚焦评估值函数和聚焦结束判断准则。It should be noted that the preset focus estimation function is associated with a scene in which the captured object is located, wherein the scene is identified by a preset scene recognition algorithm. Specifically, in an embodiment of the embodiment of the present invention, a plurality of different scene modes are preset, and each scene mode has a corresponding zoom magnification value, a light intensity value, a focus evaluation value function, a focus motor step size, and The criterion for the conclusion of the focus. By acquiring the light intensity information, the gain, and the zoom magnification value of the current image data, comparing with the zoom magnification value, the gain, and the light intensity information value in the preset plurality of scene modes, selecting the most matching scene mode, and acquiring the scene mode The focus motor step size, the focus evaluation value function, and the focus end judgment criterion.
进一步的,请参见附图1,本发明实施例一个实施例的所述方法还包括步骤:Further, referring to FIG. 1, the method of an embodiment of the present invention further includes the following steps:
S14,重复执行上述步骤,分别获取所述N个采集点对应的实际聚焦位置值和理论聚焦位置值、及该参考变焦跟踪曲线在所述N个采集点上对应的校正距离,以完成参考变焦跟踪曲线的校正。S14, repeating the foregoing steps, respectively acquiring actual focus position values and theoretical focus position values corresponding to the N collection points, and corresponding correction distances of the reference zoom tracking curves on the N collection points, to complete the reference zoom Tracking curve correction.
具体的,重复执行前述的步骤S12和步骤S13,分别获取所述N个采集点对应的实际聚焦位置值Focus1zoom【N】和理论聚焦位置值Focus2zoom【N】,并依据该实际聚焦位置值Focus1zoom【N】和理论聚焦位置值Focus2zoom【N】计算对应的校正距离focuszoom【N】,即可得到该N个采集点对应的N个校正距离。例如,在本发明实施例的一个实施例中,所述校正距离的计算算法是:Specifically, the foregoing step S12 and step S13 are repeatedly performed, respectively acquiring the actual focus position value Focus1 zoom[N] and the theoretical focus position value Focus2 zoom[N] corresponding to the N collection points, and according to the actual focus position value. Focus1 zoom [N] and the theoretical focus position value Focus2 zoom [N] calculate the corresponding correction distance focus zoom [N] , then the N correction distances corresponding to the N collection points can be obtained. For example, in an embodiment of the embodiment of the present invention, the calculation algorithm of the corrected distance is:
focuszoom【N】=Focus2zoom【N】-Focus1zoom【N】Focus zoom[N] =Focus2 zoom[N] -Focus1 zoom[N] .
进一步的,为了提高该校正曲线的精确度,可以不仅仅只通过该N个才采集点来实现该参考变焦跟踪曲线的校正,还可以利用线性差值方法及任意相邻两个采集点的校正距离,计算所述参考变焦跟踪曲线上该相邻两个采集点之间的剩余点的实际聚焦位置值。Further, in order to improve the accuracy of the calibration curve, the correction of the reference zoom tracking curve may be implemented not only by the N acquisition points, but also by the linear difference method and the correction of any two adjacent acquisition points. Distance, an actual focus position value of a remaining point between the adjacent two acquisition points on the reference zoom tracking curve is calculated.
例如,在本发明实施例的一个实施例中,可以从N个采集点中选取任意两个相邻的采集点zoom[N]和zoom[N-1],并计算其对应的校正距离focuszoom【N】和focuszoom【N-1】,则该相邻两个采集点之间的任意变焦倍率值zoom对应的校正距离focuszoom的计算方法是:For example, one embodiment of the embodiment of the present invention, can be selected from N acquisition points of any adjacent two acquisition points Zoom [N] and zoom [N-1], and calculating the corresponding correction distance focus zoom Focus and zoom [N] [N-1], the calculated correction distance Focus adjacent arbitrary zoom ratio zoom zoom correspondence between the two collection points are:
Figure PCTCN2016110133-appb-000002
Figure PCTCN2016110133-appb-000002
进一步的,依据参考变焦跟踪曲线,获取该相邻采集点zoom[N]和zoom[N-1]之间的任意变焦倍率值zoom对应的理论对焦位置Focus2zoom,再计算该变焦倍率值zoom对应的实际聚焦位置Focus1zoomFurther, according to the reference zoom tracking curve, a theoretical focus position Focus2 zoom corresponding to an arbitrary zoom magnification value zoom between the adjacent collection points zoom [N] and zoom [N-1] is obtained, and then the zoom magnification value zoom is calculated. The actual focus position of Focus1 zoom :
Focus1zoom=focuszoom+Focus2zoom Focus1 zoom = focus zoom +Focus2 zoom
依据上述方法,即可以获取任意相邻两个采集点之间的剩余点的实际聚焦位置值,具体的取样数目可根据实际情况来定,当然,取样数目越多,校正得到的变焦跟踪曲线越精确。进一步的,依据获取的至少N个(变焦倍率值,实际聚焦位置值)的坐标,对现存的参考变焦跟踪曲线实现校正。According to the above method, the actual focus position value of the remaining points between any two adjacent collection points can be obtained, and the specific number of samples can be determined according to actual conditions. Of course, the more the number of samples, the more the corrected zoom tracking curve is obtained. accurate. Further, the existing reference zoom tracking curve is corrected according to the acquired coordinates of at least N (zoom magnification value, actual focus position value).
综上所述,本发明实施例提供了一种变焦跟踪曲线的校正方法,其通过在理论的参考变焦跟踪曲线上选定N个不同变焦倍率值的采集点,获取这些采集点对应的理论聚焦位置值;再依据预设的自动聚焦算法,获取这些采集点对应的变焦倍率值下聚焦估计值达到最大时的实际聚焦位置值,基于实际聚焦位置值与理论聚焦位置值、及两者之间的校正距离,来完成参考变焦跟踪曲线的校正。即本发明实施例能获取每个镜头自身的实际变焦跟踪曲线,从而保证后续在变焦和自动聚焦时随着已经过校正的实际的参考变焦跟踪曲线同步运行,使得整个变焦过程图像都能聚焦清楚。本发明实施例中在获取实际聚焦位置值时,在采集点对应的变焦倍率值下驱动聚焦电机移动到不同的聚焦位置,并基于该聚焦位置所对应的图像数据及预设的聚焦估计值函数,将聚焦估计值最大时的聚焦位置值作为实际聚焦位置值,且该聚焦估计值函数与图像数据所对应的场景相关联。即本发明实施例能在不同的场景中,对该镜头的变焦跟踪曲线进行校正,提高校验结果的精确度和校验效率。In summary, the embodiment of the present invention provides a method for correcting a zoom tracking curve, which acquires theoretical focus corresponding to the collected points by selecting N collection points of different zoom magnification values on a theoretical reference zoom tracking curve. Position value; according to the preset autofocus algorithm, the actual focus position value when the focus estimation value reaches the maximum under the zoom magnification value corresponding to the collected points is obtained, based on the actual focus position value and the theoretical focus position value, and between the two Correct the distance to complete the correction of the reference zoom tracking curve. That is, the embodiment of the present invention can obtain the actual zoom tracking curve of each lens itself, thereby ensuring that the actual reference zoom tracking curve that has been corrected is synchronously operated during zooming and auto focusing, so that the entire zoom process image can be focused clearly. . In the embodiment of the present invention, when the actual focus position value is obtained, the focus motor is driven to move to a different focus position under the zoom magnification value corresponding to the collection point, and based on the image data corresponding to the focus position and the preset focus estimation value function. The focus position value when the focus evaluation value is maximum is taken as the actual focus position value, and the focus estimation value function is associated with the scene corresponding to the image data. That is, the embodiment of the present invention can correct the zoom tracking curve of the lens in different scenarios, and improve the accuracy and verification efficiency of the calibration result.
基于计算机的模块化思维,本发明实施例还提供了一种变焦跟踪曲线校正装置,请参见附图5,其包括有取样模块11、理论值获取模块12、实际值获取模块13和校正模块14。需要说明的是,本发明实施例所述装置是应用于具备变焦、自动聚焦功能的相机或摄像机。当然,本发明实施例所述装置也可应用于具有变焦、自动聚焦功能的手机、PAD、便携式多媒体播放器(PMP)、TV等设备。为方便说明,本发明实施例实施例以数字摄像机为例来示例性说明其具体实施方式,但是该实施例并不能构成对本发明实施例的限制。以下具体揭示各模块实现的具体功能。The embodiment of the present invention further provides a zoom tracking curve correction device. Referring to FIG. 5 , the sample module 11 , the theoretical value acquisition module 12 , the actual value acquisition module 13 , and the correction module 14 are provided. . It should be noted that the device according to the embodiment of the present invention is applied to a camera or a camera having a zooming and autofocus function. Of course, the device according to the embodiment of the present invention can also be applied to a mobile phone with a zoom, auto focus function, a PAD, a portable multimedia player (PMP), a TV, and the like. For convenience of description, the embodiment of the present invention is exemplified by a digital camera as an example, but the embodiment does not constitute a limitation on the embodiment of the present invention. The specific functions implemented by each module are specifically disclosed below.
所述取样模块11,用于在参考变焦跟踪曲线上选定N个采集点,该N个采集点对应于不同的变焦倍率值。The sampling module 11 is configured to select N collection points on the reference zoom tracking curve, the N collection points corresponding to different zoom magnification values.
需要说明的是,有必要对所述的变焦跟踪曲线进行先导性说明。不难理解,在镜头中预先输入有至少两条聚焦距离不同的变焦跟踪曲线,请参照附图2,为便于说明,本方案中选用聚焦距离分别为3米、6米、10米和无穷远的变焦跟踪曲线为例来说明。其中在图2所述的坐标系中,横轴代表变焦倍率值,纵轴代表聚焦位置值。从中可以看出,在变焦电机位置处于小的变焦倍率值时,四条不同聚焦距离的变焦跟踪曲线基本重合;当变焦倍率变大时,不同聚焦距离的变焦跟踪曲线逐渐分开,距离相差越来越大。这说明,在变焦电机位置处于小的变焦倍率值时,随着物体离镜头距离的变化,电机聚焦位 置变化不大,但在高变焦倍率下,物距一旦发生大的变化,聚焦电机位置也随之发生较大偏差。因此在镜头变焦过程中,首先要选定一条与当前聚焦距离最匹配的参考变焦跟踪曲线。It should be noted that it is necessary to provide a pilot description of the zoom tracking curve. It is not difficult to understand that at least two zoom tracking curves with different focus distances are input in advance in the lens. Please refer to FIG. 2. For convenience of description, the focus distances in this solution are 3 meters, 6 meters, 10 meters and infinity respectively. The zoom tracking curve is illustrated as an example. In the coordinate system described in FIG. 2, the horizontal axis represents the zoom magnification value, and the vertical axis represents the focus position value. It can be seen that when the zoom motor position is at a small zoom magnification value, the zoom tracking curves of the four different focus distances are substantially coincident; when the zoom magnification becomes larger, the zoom tracking curves of different focus distances are gradually separated, and the distance difference is more and more different. Big. This shows that when the zoom motor position is at a small zoom magnification value, the motor focus position as the distance of the object from the lens changes. The change is not large, but at high zoom magnification, once the object distance changes greatly, the position of the focus motor also greatly deviates. Therefore, during zooming of the lens, first select a reference zoom tracking curve that best matches the current focus distance.
具体的,在本发明实施例的一个实施例中,本发明实施例还包括有参考曲线选取模块10。所述参考曲线选取模块10,用于在所述取样模块11执行在参考变焦跟踪曲线上选定N个采集点之前,基于预设的第一规则,从预存的至少两条聚焦距离不同的变焦跟踪曲线中选定参考变焦跟踪曲线。进一步的,本发明实施例还包括有曲线存储模块,用于在参考曲线选取模块10从预存的至少两条聚焦距离不同的变焦跟踪曲线中选定参考变焦跟踪曲线之前,输入至少两条聚焦距离不同的变焦跟踪曲线并存储。不难理解,所述至少两条聚焦距离不同的变焦跟踪曲线是预先输入到摄像镜头并存储,例如可以预先存储在存储介质中,其中所述存储介质可以是同步动态随机存取存储器(SDRAM)、多芯片封装(MCP)存储器或动态随机存取存储器(DRAM)。Specifically, in an embodiment of the embodiment of the present invention, the embodiment of the present invention further includes a reference curve selection module 10. The reference curve selection module 10 is configured to: before the sampling module 11 performs the selection of N collection points on the reference zoom tracking curve, based on the preset first rule, from the pre-stored at least two zoom distances with different zoom distances The reference zoom tracking curve is selected in the tracking curve. Further, the embodiment of the present invention further includes a curve storage module, configured to input at least two focus distances before the reference curve selection module 10 selects the reference zoom tracking curve from the pre-stored zoom tracking curves having different focus distances. Different zoom tracking curves are stored. It is not difficult to understand that the zoom tracking curves having different at least two different focusing distances are input to the imaging lens and stored in advance, for example, may be stored in advance in a storage medium, wherein the storage medium may be a synchronous dynamic random access memory (SDRAM). Multi-chip package (MCP) memory or dynamic random access memory (DRAM).
具体的,本发明实施例的一个实施例中,所述参考曲线选取模块10可以通过将开始变焦时获取的初始变焦倍率值、初值聚焦位置值与该多条变焦跟踪曲线进行匹配,选择其中最接近的一条变焦跟踪曲线作为参考变焦跟踪曲线。请参见附图6,所述参考曲线选取模块10中还包括初始值获取单元101、聚焦值获取单元102和曲线获取单元103。所述初始值获取单元101,用于当开始变焦时,获取当前变焦电机位置及聚焦电机位置,从而得到初始变焦倍率值和初始聚焦位置值;Specifically, in an embodiment of the embodiment of the present invention, the reference curve selection module 10 may select an initial zoom magnification value and an initial focus focus position value obtained when starting zooming, and the plurality of zoom tracking curves. The closest zoom tracking curve is used as the reference zoom tracking curve. Referring to FIG. 6, the reference curve selection module 10 further includes an initial value acquisition unit 101, a focus value acquisition unit 102, and a curve acquisition unit 103. The initial value acquiring unit 101 is configured to acquire a current zoom motor position and a focus motor position when zooming is started, thereby obtaining an initial zoom magnification value and an initial focus position value;
所述聚焦值获取单元102,用于在每条变焦跟踪曲线上获取该初始变焦倍率值所对应的聚焦位置值;The focus value obtaining unit 102 is configured to obtain, on each zoom tracking curve, a focus position value corresponding to the initial zoom magnification value;
所述曲线获取单元103,用于选取聚焦位置值与初始聚焦位置值最接近的一条变焦跟踪曲线作为参考变焦跟踪曲线。The curve obtaining unit 103 is configured to select a zoom tracking curve whose focus position value is closest to the initial focus position value as the reference zoom tracking curve.
具体的,在摄像镜头变焦过程中,所述初始值获取单元101获取当前变焦电机位置及聚焦电机的位置,即可得到对应的初始变焦倍率值和初值聚焦位置值;然后所述聚焦值获取单元102依据该初始变焦倍率值从预存的多条不同聚焦距离的变焦跟踪曲线中获取对应的聚焦位置值;然后所述曲线获取单元103对比初始聚焦位置值与获得的多个聚焦位置值,选取最接近的聚焦位置值对应的变焦跟踪曲线作为所述的参考变焦跟踪曲线。当然,该实施例对于镜头所处的倍率值大于一定值,即不同聚焦距离的变焦跟踪曲线分开明显时,比较适用;但是该实施例对从小的变焦倍率值向大的变焦倍率值的变倍方向下,且当前的变焦倍率值小于一定值,即不同聚焦距离的变焦跟踪曲线在当前变焦倍率值下较为重合时,还需要所述初始值获取单元101多选取几个初始值来比较。Specifically, during the zooming of the image capturing lens, the initial value acquiring unit 101 acquires the current zoom motor position and the position of the focus motor, and obtains a corresponding initial zoom magnification value and an initial value focus position value; then the focus value is obtained. The unit 102 acquires a corresponding focus position value from the pre-stored zoom tracking curves of the plurality of different focus distances according to the initial zoom magnification value; then the curve acquisition unit 103 compares the initial focus position value with the obtained plurality of focus position values, and selects The zoom tracking curve corresponding to the closest focus position value is used as the reference zoom tracking curve. Of course, this embodiment is applicable when the magnification value of the lens is greater than a certain value, that is, when the zoom tracking curves of different focus distances are distinct, the embodiment is suitable for zooming from a small zoom magnification value to a large zoom magnification value. In the direction, and the current zoom magnification value is less than a certain value, that is, when the zoom tracking curves of different focus distances are more coincident under the current zoom magnification value, the initial value acquisition unit 101 is also required to select a plurality of initial values for comparison.
进一步的,在所述参考曲线选取模块10选定了参考变焦跟踪曲线后,还需要所述取样模块11在该参考变焦跟踪曲线上选定N个采集点,该N个采集点对应于不同的变焦倍率值。Further, after the reference curve selection module 10 selects the reference zoom tracking curve, the sampling module 11 is further required to select N collection points on the reference zoom tracking curve, and the N collection points correspond to different Zoom magnification value.
不难理解,在小的变焦倍率值下,不同聚焦距离的变焦跟踪曲线重合度高,所述取样模块11应该在小的变焦倍率值下,选取较少的采集点;反之,在大的变焦倍率值下, 不同聚焦距离的变焦跟踪曲线之间逐渐分开,因此在大的变焦倍率值下,所述取样模块11选择较多的采集点。即所述取样模块11在参考变焦跟踪曲线上不同位置选取的采集点的数量,与当前位置对应的变焦赔率值成正比,具体的取样示意图请参见附图3。例如,在本发明实施例的一个实施例中,可以将所述取样模块11获取采集点的间隔Tx设定为与变焦倍率值成反比的算法,使得所述取样模块11依据该算法计算的间隔值,来获取对应的N个采集点。当然该实施例仅仅是示例性的,本发明实施例对此不做限定。It is not difficult to understand that under a small zoom magnification value, the zoom tracking curve of different focus distances has a high degree of coincidence, and the sampling module 11 should select fewer acquisition points under a small zoom magnification value; otherwise, a large zoom. Under the magnification value, The zoom tracking curves of different focus distances are gradually separated between each other, so at a large zoom magnification value, the sampling module 11 selects more collection points. That is, the number of collection points selected by the sampling module 11 at different positions on the reference zoom tracking curve is proportional to the zoom odds value corresponding to the current position. For a specific sampling diagram, please refer to FIG. 3. For example, in an embodiment of the present invention, the interval Tx at which the sampling module 11 acquires the acquisition point may be set to an inversely proportional to the zoom magnification value, so that the sampling module 11 calculates the interval according to the algorithm. Value to get the corresponding N collection points. The embodiment is of course only exemplary, which is not limited by the embodiment of the present invention.
进一步的,请参见附图5,在本发明实施例装置的一个实施例中,所述理论值获取模块12,用于获取该N个采集点中某一采集点在参考跟踪曲线上对应的理论聚焦位置值。Further, referring to FIG. 5, in an embodiment of the apparatus of the embodiment of the present invention, the theoretical value obtaining module 12 is configured to acquire a corresponding theory of a collection point of the N collection points on a reference tracking curve. Focus position value.
具体的,所述理论值获取模块12可以同步跟随前述参考曲线选取模块11中选定的参考跟踪曲线,获取某一采集点对应的聚焦位置值,将该聚焦位置值作为所述的理论聚焦位置值。Specifically, the theoretical value obtaining module 12 can synchronously follow the selected reference tracking curve in the reference curve selection module 11 to obtain a focus position value corresponding to a certain collection point, and use the focus position value as the theoretical focus position. value.
进一步的,请参见附图5,在本发明实施例装置的一个实施例中,Further, referring to FIG. 5, in an embodiment of the apparatus of the embodiment of the present invention,
所述实际值获取模块13,用于基于预设的自动聚焦算法,获取在该采集点对应的变焦倍率值下聚焦估计值达到最大时的实际聚焦位置值。The actual value obtaining module 13 is configured to acquire an actual focus position value when the focus estimation value reaches a maximum under the zoom magnification value corresponding to the collection point based on the preset auto focus algorithm.
具体的,在本发明实施例的一个实施例中,所述预设的自动聚焦算法即为常见的爬坡算法,所述实际值获取模块13在所述采集点对应的变焦倍率值下驱动聚焦电机移动到不同的聚焦位置值,并获取该聚焦位置值所对应的图像数据;基于该图像数据和预设的聚焦估计值函数,将聚焦估计值最大时的聚焦位置值作为实际聚焦位置值。Specifically, in an embodiment of the embodiment of the present invention, the preset auto-focusing algorithm is a common climbing algorithm, and the actual value acquiring module 13 drives the focusing at a zoom magnification value corresponding to the collected point. The motor moves to different focus position values, and acquires image data corresponding to the focus position value; based on the image data and the preset focus estimation value function, the focus position value when the focus estimation value is maximum is taken as the actual focus position value.
具体的,所述实际值获取模块13在所述采集点对应的变焦倍率值下,驱动聚焦电机微调以改变镜头与所拍对象之间的距离,且基于一定的时间或可变步长停止该镜头,获取当前聚焦位置时的一帧图像,获取该图像数据沿着水平X和垂直Y的高频分量,并基于预设的聚焦估计值函数,计算该帧图像的的聚焦评估值。重复执行上述操作,直到所述实际值获取模块13获取聚焦评估值最大时的聚焦位置值,该聚焦位置值即为所述的实际聚焦位置值。例如,在本发明实施例的一个实施例中,所述预设的聚焦评估值函数为:Specifically, the actual value obtaining module 13 drives the focus motor to finely adjust the distance between the lens and the captured object under the zoom magnification value corresponding to the collection point, and stops the time based on a certain time or variable step size. The lens acquires a frame image of the current focus position, acquires high frequency components of the image data along the horizontal X and the vertical Y, and calculates a focus evaluation value of the frame image based on a preset focus estimation value function. The above operation is repeatedly performed until the actual value acquisition module 13 acquires the focus position value when the focus evaluation value is maximum, and the focus position value is the actual focus position value. For example, in an embodiment of the embodiment of the present invention, the preset focus evaluation value function is:
Figure PCTCN2016110133-appb-000003
Figure PCTCN2016110133-appb-000003
所述x是指水平高频分量值,y是指垂直高频分量值,本算法是将数据图像所得的当前帧图像数据所有水平x和垂直y的高频能量值进行累加而得到所述的聚焦估计值。The x is a horizontal high-frequency component value, and y is a vertical high-frequency component value. The algorithm accumulates all the horizontal x and vertical y high-frequency energy values of the current frame image data obtained from the data image to obtain the Focus on the estimate.
需要说明的是,所述预设的聚焦估计值函数与所拍摄对象所处的场景相关联,其中所述场景通过预设的场景识别算法来识别获取。具体的,在本发明实施例的一个实施例中,预先设置有多种不同的场景模式,每种场景模式下具有对应的变焦倍率值、光强值、聚焦评估值函数、聚焦电机步长以及聚焦结束的判断准则。所述实际值获取模块13通过获取当前图像数据的光强信息、增益及变焦倍率值,与预设的多个场景模式中变焦倍率值、增益及光强信息值进行对比,选择最匹配的场景模式,获取该场景模式下的聚焦电机步长、聚焦评估值函数和聚焦结束判断准则。 It should be noted that the preset focus estimation function is associated with a scene in which the captured object is located, wherein the scene is identified by a preset scene recognition algorithm. Specifically, in an embodiment of the embodiment of the present invention, a plurality of different scene modes are preset, and each scene mode has a corresponding zoom magnification value, a light intensity value, a focus evaluation value function, a focus motor step size, and The criterion for the conclusion of the focus. The actual value obtaining module 13 compares the zoom intensity value, the gain, and the light intensity information value in the preset plurality of scene modes by acquiring the light intensity information, the gain, and the zoom magnification value of the current image data, and selects the most matching scene. The mode acquires a focus motor step size, a focus evaluation value function, and a focus end judgment criterion in the scene mode.
进一步的,请参见附图5,本发明实施例装置的一个实施例中,还包括有校正模块14。所述校正模块14,用于重复调用上述各模块执行对应的操作,分别获取所述N个采集点对应的实际聚焦位置值和理论聚焦位置值、及该参考变焦跟踪曲线在所述N个采集点上对应的校正距离,以完成参考变焦跟踪曲线的校正。Further, referring to FIG. 5, in an embodiment of the apparatus of the embodiment of the present invention, a correction module 14 is further included. The correction module 14 is configured to repeatedly invoke the foregoing modules to perform corresponding operations, respectively acquiring actual focus position values and theoretical focus position values corresponding to the N collection points, and the reference zoom tracking curves are in the N collections. The corresponding correction distance is clicked to complete the correction of the reference zoom tracking curve.
具体的,所述校正模块14重复调用前述的理论值获取模块12和实际值获取模块13,分别获取所述N个采集点对应的实际聚焦位置值Focus1zoom【N】和理论聚焦位置值Focus2zoom【N】,依据该实际聚焦位置值Focus1zoom【N】和理论聚焦位置值Focus2zoom【N】计算对应校正距离focuszoom【N】,即可得到该N个采集点对应的N个校正距离。例如,在本发明实施例的一个实施例中,所述校正距离的计算算法是:Specifically, the correction module 14 repeatedly invokes the foregoing theoretical value acquisition module 12 and the actual value acquisition module 13 to acquire the actual focus position values corresponding to the N collection points, Focus1 zoom [N] and the theoretical focus position value Focus2 zoom. [N] , according to the actual focus position value Focus1 zoom [N] and the theoretical focus position value Focus2 zoom [N] calculate the corresponding correction distance focus zoom [N] , the N correction distances corresponding to the N collection points can be obtained. For example, in an embodiment of the embodiment of the present invention, the calculation algorithm of the corrected distance is:
focuszoom【N】=Focus2zoom【N】-Focus1zoom【N】Focus zoom[N] =Focus2 zoom[N] -Focus1 zoom[N] .
进一步的,为了提高该校正曲线的精确度,所述校正模块14可以不仅仅只通过该N个才采集点来实现该参考变焦跟踪曲线的校正,还可以利用线性差值方法及任意相邻两个采集点的校正距离,计算所述参考变焦跟踪曲线上该相邻两个采集点之间的剩余点的实际聚焦位置值。Further, in order to improve the accuracy of the calibration curve, the correction module 14 may implement the correction of the reference zoom tracking curve not only by the N acquisition points, but also the linear difference method and any adjacent two. The corrected distance of the collected points is calculated, and the actual focus position value of the remaining points between the adjacent two collection points on the reference zoom tracking curve is calculated.
例如,在本发明实施例的一个实施例中,所述校正模块14可以从N个采集点中选取任意两个相邻的采集点zoom[N]和zoom[N-1],并计算其对应的校正距离focuszoom【N】和focuszoom【N-1】,则该相邻两个采集点之间的任意变焦倍率值zoom对应的校正距离focuszoom的计算方法是:For example, in an embodiment of the embodiment of the present invention, the correction module 14 may select any two adjacent collection points zoom [N] and zoom [N-1] from the N collection points, and calculate the corresponding zoom correction distance Focus Focus and zoom [N] [N-1], corresponding to the adjacent zoom Focus correction distance calculated zoom ratio zoom any point between the two values is acquired:
Figure PCTCN2016110133-appb-000004
Figure PCTCN2016110133-appb-000004
进一步的,所述校正模块14依据参考变焦跟踪曲线,获取该相邻采集点zoom[N]和zoom[N-1]之间的任意变焦倍率值zoom对应的理论对焦位置Focus2zoom,再计算该变焦倍率值zoom对应的实际聚焦位置Focus1zoomFurther, the correction module 14 acquires a theoretical focus position Focus2 zoom corresponding to an arbitrary zoom magnification value zoom between the adjacent collection points zoom [N] and zoom [N-1] according to the reference zoom tracking curve, and then calculates the The zoom focus value zoom corresponds to the actual focus position Focus1 zoom :
Focus1zoom=focuszoom+Focus2zoom Focus1 zoom = focus zoom +Focus2 zoom
依据上述实施例所述实施方式,所述校正模块14即可以获取任意相邻两个采集点之间的若干个剩余点的实际聚焦位置值,具体的取样数目可根据实际情况来定,当然,取样数目越多,校正得到的变焦跟踪曲线越精确。进一步的,依据获取的至少N个(变焦倍率值,实际聚焦位置值)的坐标,对现存的参考变焦跟踪曲线实现校正。According to the embodiment described in the foregoing embodiment, the correction module 14 can obtain the actual focus position values of a plurality of remaining points between any two adjacent collection points, and the specific number of samples can be determined according to actual conditions. The more the number of samples, the more accurate the corrected zoom tracking curve. Further, the existing reference zoom tracking curve is corrected according to the acquired coordinates of at least N (zoom magnification value, actual focus position value).
综上所述,本发明实施例提供了一种变焦跟踪曲线的校正装置,其通过取样模块11在理论的参考变焦跟踪曲线上选定N个不同变焦倍率值的采集点,通过理论值获取模块12获取这些采集点对应的理论聚焦位置值;实际值获取模块13再依据预设的自动聚焦算法,获取这些采集点对应的变焦倍率值下聚焦估计值达到最大时的实际聚焦位置值,最后通过校正模块14基于实际聚焦位置值与理论聚焦位置值、及两者之间的校正距离,来完成参考变焦跟踪曲线的校正。即本发明实施例能获取每个镜头自身的实际变焦跟踪曲线,从而保证后续在变焦和自动聚焦时随着已经过校正的实际的参考变焦跟踪曲线同 步运行,使得整个变焦过程图像都能聚焦清楚。In summary, the embodiment of the present invention provides a calibration apparatus for a zoom tracking curve, which selects N collection points of different zoom magnification values on a theoretical reference zoom tracking curve by the sampling module 11 and obtains a module by a theoretical value. 12: acquiring the theoretical focus position value corresponding to the collection points; the actual value acquisition module 13 further acquires the actual focus position value when the focus estimation value reaches the maximum under the zoom magnification value corresponding to the collection points according to the preset auto focus algorithm, and finally passes The correction module 14 completes the correction of the reference zoom tracking curve based on the actual focus position value and the theoretical focus position value, and the corrected distance between the two. That is, the embodiment of the present invention can obtain the actual zoom tracking curve of each lens itself, thereby ensuring that the actual reference zoom tracking curve that has been corrected is the same in the subsequent zooming and autofocusing. The step is run so that the entire zoom process image can be focused clearly.
本发明实施例中在获取实际聚焦位置值时,在采集点对应的变焦倍率值下驱动聚焦电机移动到不同的聚焦位置,并基于该聚焦位置所对应的图像数据及预设的聚焦估计值函数,将聚焦估计值最大时的聚焦位置值作为实际聚焦位置值,且该聚焦估计值函数与图像数据所对应的场景相关联。即本发明实施例能在不同的场景中,对该镜头的变焦跟踪曲线进行校正,提高校验结果的精确度和校验效率。In the embodiment of the present invention, when the actual focus position value is obtained, the focus motor is driven to move to a different focus position under the zoom magnification value corresponding to the collection point, and based on the image data corresponding to the focus position and the preset focus estimation value function. The focus position value when the focus evaluation value is maximum is taken as the actual focus position value, and the focus estimation value function is associated with the scene corresponding to the image data. That is, the embodiment of the present invention can correct the zoom tracking curve of the lens in different scenarios, and improve the accuracy and verification efficiency of the calibration result.
在此处所提供的说明书中,虽然说明了大量的具体细节。然而,能够理解,本发明实施例的实施例可以在没有这些具体细节的情况下实践。在一些实施例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that the embodiments of the invention may be practiced without these specific details. In some embodiments, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of the specification.
虽然上面已经示出了本发明实施例的一些示例性实施例,但是本领域的技术人员将理解,在不脱离本发明实施例的原理或精神的情况下,可以对这些示例性实施例做出改变,本发明实施例的范围由权利要求及其等同物限定。While some of the exemplary embodiments of the present invention have been shown in the foregoing embodiments of the embodiments of the invention The scope of the embodiments of the invention is defined by the claims and their equivalents.
对于装置实施方式而言,由于其与方法实施方式基本相似,所以描述的比较简单,相关之处参见方法实施方式的部分说明即可。For the device implementation, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明实施例也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明实施例的内容,并且上面对特定语言所做的描述是为了披露本发明实施例的最佳实施方式。The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general purpose systems can also be used with the teaching based on the teachings herein. The structure required to construct such a system is apparent from the above description. Moreover, embodiments of the invention are not directed to any particular programming language. It is to be understood that the description of the embodiments of the invention herein described herein may be
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明实施例的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that the embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of the description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明实施例的示例性实施例的描述中,本发明实施例的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明实施例要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明实施例的单独实施例。Similarly, in order to simplify the present disclosure and to help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the embodiments of the present invention, various features of the embodiments of the present invention are sometimes grouped together A single embodiment, figure, or description thereof. However, the method disclosed is not to be interpreted as reflecting the intention that the claimed embodiments of the invention are claimed. Rather, as the following claims reflect, inventive aspects reside in less than all features of the single embodiments disclosed herein. Therefore, the claims following the specific embodiments are hereby explicitly incorporated into the specific embodiments, and each of the claims as a separate embodiment of the embodiments of the invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。 Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components. In addition to such features and/or at least some of the processes or units being mutually exclusive, any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined. Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明实施例的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Moreover, those skilled in the art will appreciate that, although some embodiments described herein include certain features that are included in other embodiments and not in other features, combinations of features of the different embodiments are implied in the embodiments of the invention. Different embodiments are formed within the scope of the invention. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
本发明实施例的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例实施例的异步登录设备中的一些或者全部部件的一些或者全部功能。本发明实施例还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明实施例的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of embodiments of the invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components of an asynchronous login device in accordance with an embodiment of the present invention. Embodiments of the invention may also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such a program implementing an embodiment of the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
例如,图7示出了可以实现根据本发明实施例的一种变焦跟踪曲线的校正方法的终端设备。该终端设备传统上包括处理器710和以存储器720形式的计算机程序产品或者计算机可读介质。存储器720可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器720具有用于执行上述方法中的任何方法步骤的程序代码731的存储空间730。例如,用于程序代码的存储空间730可以包括分别用于实现上面的方法中的各种步骤的各个程序代码731。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图8所述的便携式或者固定存储单元。该存储单元可以具有与图7的终端设备中的存储器720类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码731’,即可以由例如诸如710之类的处理器读取的代码,这些代码当由终端设备运行时,导致该终端设备执行上面所描述的方法中的各个步骤。For example, FIG. 7 illustrates a terminal device that can implement a method of correcting a zoom tracking curve according to an embodiment of the present invention. The terminal device conventionally includes a processor 710 and a computer program product or computer readable medium in the form of a memory 720. Memory 720 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Memory 720 has a memory space 730 for program code 731 for performing any of the method steps described above. For example, storage space 730 for program code may include various program code 731 for implementing various steps in the above methods, respectively. The program code can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such a computer program product is typically a portable or fixed storage unit as described with reference to FIG. The storage unit may have a storage section, a storage space, and the like arranged similarly to the storage 720 in the terminal device of FIG. The program code can be compressed, for example, in an appropriate form. Typically, the storage unit includes computer readable code 731', i.e., code readable by a processor, such as 710, that when executed by the terminal device causes the terminal device to perform each of the methods described above step.
应该注意的是上述实施例对本发明实施例进行说明而不是对本发明实施例进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明实施例可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-described embodiments are illustrative of the embodiments of the present invention and are not intended to limit the embodiments of the present invention, and those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as a limitation. The word "comprising" does not exclude the presence of the elements or steps that are not recited in the claims. The word "a" or "an" Embodiments of the invention may be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same hardware item. The use of the words first, second, and third does not indicate any order. These words can be interpreted as names.
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明实施例的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明实施例的范围,对本发明实施例所做的公开是说明性的,而非限制性的,本发明实施例的范围由所附权利要求书限定。 In addition, it should be noted that the language used in the present specification has been selected for the purpose of reading and teaching, and is not intended to be construed as limiting or limiting the subject matter of the embodiments of the present invention. Therefore, many modifications and changes will be apparent to those skilled in the art without departing from the scope of the invention. The disclosure of the embodiments of the present invention is intended to be illustrative and not restrictive, and the scope of the embodiments of the invention is defined by the appended claims.

Claims (12)

  1. 一种变焦跟踪曲线的校正方法,其特征在于,包括有:A method for correcting a zoom tracking curve, comprising:
    在参考变焦跟踪曲线上选定N个采集点,该N个采集点对应于不同的变焦倍率值;N acquisition points are selected on the reference zoom tracking curve, and the N collection points correspond to different zoom magnification values;
    获取该N个采集点中某一采集点在参考变焦跟踪曲线上对应的理论聚焦位置值;Obtaining a theoretical focus position value corresponding to a sampling point of the N collection points on the reference zoom tracking curve;
    基于预设的自动聚焦算法,获取在该采集点对应的变焦倍率值下聚焦估计值达到最大时的实际聚焦位置值;Obtaining an actual focus position value when the focus estimation value reaches a maximum at a zoom magnification value corresponding to the collection point based on a preset auto focus algorithm;
    重复执行上述步骤,分别获取所述N个采集点对应的实际聚焦位置值和理论聚焦位置值、及该参考变焦跟踪曲线在所述N个采集点上对应的校正距离,以完成参考变焦跟踪曲线的校正。Repeating the above steps, respectively acquiring actual focus position values and theoretical focus position values corresponding to the N collection points, and corresponding correction distances of the reference zoom tracking curves on the N collection points, to complete the reference zoom tracking curve. Correction.
  2. 根据权利要求1所述的方法,其特征在于:在所述参考变焦跟踪曲线上不同位置选取的采集点的数量,与当前位置对应的变焦倍率值成正比。The method according to claim 1, wherein the number of collection points selected at different positions on the reference zoom tracking curve is proportional to the zoom magnification value corresponding to the current position.
  3. 根据权利要求1所述的方法,其特征在于:所述校正距离为所述理论聚焦位置值与实际聚焦位置值之间的差值。The method of claim 1 wherein said corrected distance is a difference between said theoretical focus position value and an actual focus position value.
  4. 根据权利要求1所述的方法,其特征在于,所述分别获取所述N个采集点对应的实际聚焦位置值和理论聚焦位置值、及该参考变焦跟踪曲线在所述N个采集点上对应的校正距离的步骤中,还包括:The method according to claim 1, wherein the acquiring the actual focus position value and the theoretical focus position value corresponding to the N collection points respectively, and the reference zoom tracking curve corresponding to the N collection points The steps of correcting the distance also include:
    利用线性差值方法及任意相邻两个采集点的校正距离,计算所述参考变焦跟踪曲线上该相邻两个采集点之间的剩余点的实际聚焦位置值。Using the linear difference method and the corrected distance of any two adjacent acquisition points, the actual focus position value of the remaining points between the adjacent two collection points on the reference zoom tracking curve is calculated.
  5. 根据权利要求1所述的方法,其特征在于,所述在参考变焦跟踪曲线上选定N个采集点,该N个采集点对应于不同的变焦倍率值的步骤之前,还包括:The method according to claim 1, wherein the step of selecting N acquisition points on the reference zoom tracking curve, the N acquisition points corresponding to different zoom magnification values, further comprising:
    基于预设的第一规则,从预存的至少两条聚焦距离不同的变焦跟踪曲线中选定参考变焦跟踪曲线。Based on the first rule of the preset, the reference zoom tracking curve is selected from the pre-stored zoom tracking curves of at least two different focus distances.
  6. 根据权利要5所述的方法,其特征在于,所述基于预设的第一规则,从预存的至少两条聚焦距离不同的变焦跟踪曲线中选定参考变焦跟踪曲线的步骤之前,还包括:The method according to claim 5, wherein the step of selecting the reference zoom tracking curve from the pre-stored zoom tracking curves having different focus distances according to the preset first rule further comprises:
    输入至少两条聚焦距离不同的变焦跟踪曲线并存储。Enter at least two zoom tracking curves with different focus distances and store them.
  7. 根据权利5所述的方法,其特征在于,所述基于预设的第一规则,从预存的至少两条聚焦距离不同的变焦跟踪曲线中选定参考变焦跟踪曲线的步骤中,还包括:The method of claim 5, wherein the step of selecting a reference zoom tracking curve from the pre-stored at least two zoom tracking curves having different focus distances according to the preset first rule further comprises:
    将开始变焦时获取的初始变焦倍率值、初始聚焦位置值与变焦跟踪曲线进行匹配,选择最接近的一条变焦跟踪曲线作为参考变焦跟踪曲线。The initial zoom magnification value, the initial focus position value acquired at the start of zooming, and the zoom tracking curve are matched, and the closest one zoom tracking curve is selected as the reference zoom tracking curve.
  8. 根据权利要求7所述的方法,其特征在于,所述将开始变焦时获取的初始变焦倍率值、初始聚焦位置值与变焦跟踪曲线进行匹配,选择最接近的一条变焦跟踪曲线作为参考变焦跟踪曲线的步骤中,还包括:The method according to claim 7, wherein the initial zoom magnification value, the initial focus position value acquired at the start of zooming, and the zoom tracking curve are matched, and the closest zoom tracking curve is selected as the reference zoom tracking curve. The steps also include:
    当开始变焦时,获取当前变焦电机位置及聚焦电机位置,从而得到初始变焦倍率值和初始聚焦位置值;When the zooming is started, the current zoom motor position and the focus motor position are acquired, thereby obtaining an initial zoom magnification value and an initial focus position value;
    在每条变焦跟踪曲线上获取该初始变焦倍率值所对应的聚焦位置值;Obtaining a focus position value corresponding to the initial zoom magnification value on each zoom tracking curve;
    选取聚焦位置值与初始聚焦位置值最接近的一条变焦跟踪曲线作为参考变焦跟踪曲 线。Select a zoom tracking curve whose focus position value is closest to the initial focus position value as the reference zoom track line.
  9. 根据权利要求1所述的方法,其特征在于,所述基于预设的自动聚焦算法,获取在该采集点对应的变焦倍率值下聚焦估计值达到最大时的实际聚焦位置值的步骤中,还包括:The method according to claim 1, wherein in the step of acquiring an actual focus position value when the focus estimation value reaches a maximum under the zoom magnification value corresponding to the collection point based on the preset auto focus algorithm, include:
    基于预设的爬坡算法,在该采集点对应的变焦倍率值下驱动聚焦电机移动到不同的聚焦位置值,并获取该聚焦位置值所对应的图像数据;And driving the focus motor to move to different focus position values under the zoom magnification value corresponding to the collection point, and acquiring image data corresponding to the focus position value;
    基于该图像数据和预设的聚焦估计值函数,将聚焦估计值最大时的聚焦位置值作为实际聚焦位置值。Based on the image data and the preset focus estimation value function, the focus position value at which the focus evaluation value is maximum is taken as the actual focus position value.
  10. 一种变焦跟踪曲线的校正装置,其特征在于,包括有:A calibration device for a zoom tracking curve, comprising:
    取样模块,用于在参考变焦跟踪曲线上选定N个采集点,该N个采集点对应于不同的变焦倍率值;a sampling module, configured to select N collection points on the reference zoom tracking curve, the N collection points corresponding to different zoom magnification values;
    理论值获取模块,用于获取该N个采集点中某一采集点在参考变焦跟踪曲线上对应的理论聚焦位置值;a theoretical value obtaining module, configured to acquire a theoretical focus position value corresponding to a sampling point of the N collection points on the reference zoom tracking curve;
    实际值获取模块,用于基于预设的自动聚焦算法,获取在该采集点对应的变焦倍率值下聚焦估计值达到最大时的实际聚焦位置值;An actual value obtaining module, configured to acquire, according to a preset autofocus algorithm, an actual focus position value when a focus estimation value reaches a maximum under a zoom magnification value corresponding to the collection point;
    校正模块,用于重复调用上述各模块执行对应的操作,分别获取所述N个采集点对应的实际聚焦位置值和理论聚焦位置值、及该参考变焦跟踪曲线在所述N个采集点上对应的校正距离,以完成参考变焦跟踪曲线的校正。a correction module, configured to repeatedly invoke the foregoing modules to perform corresponding operations, respectively acquiring an actual focus position value and a theoretical focus position value corresponding to the N collection points, and correspondingly the reference zoom tracking curve on the N collection points Correct the distance to complete the correction of the reference zoom tracking curve.
  11. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在终端设备上运行时,导致所述终端设备执行根据权利要求1-9中的任一个所述的变焦跟踪曲线的校正方法。A computer program comprising computer readable code causing the terminal device to perform a correction method of a zoom tracking curve according to any one of claims 1-9 when the computer readable code is run on a terminal device .
  12. 一种计算机可读介质,其中存储了如权利要求11所述的计算机程序。 A computer readable medium storing the computer program of claim 11.
PCT/CN2016/110133 2015-12-23 2016-12-15 Zoom tracking curve calibration method and device WO2017107842A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510981884.8 2015-12-23
CN201510981884.8A CN105611159A (en) 2015-12-23 2015-12-23 Calibration method and device of zooming tracking curve

Publications (1)

Publication Number Publication Date
WO2017107842A1 true WO2017107842A1 (en) 2017-06-29

Family

ID=55990672

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/110133 WO2017107842A1 (en) 2015-12-23 2016-12-15 Zoom tracking curve calibration method and device

Country Status (2)

Country Link
CN (1) CN105611159A (en)
WO (1) WO2017107842A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115802161A (en) * 2023-02-09 2023-03-14 杭州星犀科技有限公司 Focusing method, system, terminal and medium based on self-learning
CN116147689A (en) * 2023-04-14 2023-05-23 四川中科友成科技有限公司 Off-target delay test method and device for outfield tracker

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105611159A (en) * 2015-12-23 2016-05-25 北京奇虎科技有限公司 Calibration method and device of zooming tracking curve
CN106341598A (en) * 2016-09-14 2017-01-18 北京环境特性研究所 Optical-lens automatic focusing system and method thereof
CN106657787A (en) * 2016-12-28 2017-05-10 天津天地伟业生产力促进有限公司 Fast correction method for zoom tracking curve
CN107071243B (en) * 2017-03-09 2019-12-27 成都西纬科技有限公司 Camera focusing calibration system and focusing calibration method
CN107462967B (en) * 2017-08-23 2020-04-10 深圳市明日实业有限责任公司 Focusing method and system for laser ranging
CN107529011B (en) * 2017-08-23 2018-07-10 珠海安联锐视科技股份有限公司 A kind of motorized zoom lens control method
JP6565072B2 (en) 2017-10-30 2019-08-28 エスゼット ディージェイアイ テクノロジー カンパニー リミテッドSz Dji Technology Co.,Ltd Control device, lens device, flying object, control method, and program
JP6696092B2 (en) * 2018-07-13 2020-05-20 エスゼット ディージェイアイ テクノロジー カンパニー リミテッドSz Dji Technology Co.,Ltd Control device, moving body, control method, and program
CN109525779B (en) * 2018-12-19 2020-11-03 杭州晨安科技股份有限公司 Quick correction and verification method for zoom tracking curve
CN110121068B (en) * 2019-04-02 2020-06-23 浙江大华技术股份有限公司 Point selection method and device of zoom following curve and storage medium
CN111866371B (en) * 2020-06-15 2021-10-15 普联技术有限公司 Method and device for calibrating zoom tracking curve and computer-readable storage medium
CN112135055B (en) * 2020-09-27 2022-03-15 苏州科达科技股份有限公司 Zoom tracking method, device, equipment and storage medium
CN114900606B (en) * 2022-03-31 2024-01-05 浙江华创视讯科技有限公司 Calibration method and device for zoom tracking curve, electronic device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060290805A1 (en) * 2005-06-27 2006-12-28 Asia Optical Co., Inc. Auto focus method and electronic device using the same
CN103546692A (en) * 2013-11-04 2014-01-29 苏州科达科技股份有限公司 Method and system achieving integrated camera automatic focusing
CN103747179A (en) * 2014-01-02 2014-04-23 深圳英飞拓科技股份有限公司 Zooming tracking method and system based on focusing evaluation value feedback regulation
CN103929588A (en) * 2014-03-21 2014-07-16 金三立视频科技(深圳)有限公司 Rapid and automatic focusing method and system for camera zoom
CN104301611A (en) * 2014-10-14 2015-01-21 浙江宇视科技有限公司 Method and device for correcting zoom tracking curve
CN104980661A (en) * 2015-07-10 2015-10-14 武汉烽火众智数字技术有限责任公司 Method and apparatus for self-correcting camera lens
CN105611159A (en) * 2015-12-23 2016-05-25 北京奇虎科技有限公司 Calibration method and device of zooming tracking curve

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5839786B2 (en) * 2010-07-12 2016-01-06 キヤノン株式会社 Image pickup apparatus and tracking data adjustment method
JP6366295B2 (en) * 2014-02-21 2018-08-01 キヤノン株式会社 Optical apparatus and control method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060290805A1 (en) * 2005-06-27 2006-12-28 Asia Optical Co., Inc. Auto focus method and electronic device using the same
CN103546692A (en) * 2013-11-04 2014-01-29 苏州科达科技股份有限公司 Method and system achieving integrated camera automatic focusing
CN103747179A (en) * 2014-01-02 2014-04-23 深圳英飞拓科技股份有限公司 Zooming tracking method and system based on focusing evaluation value feedback regulation
CN103929588A (en) * 2014-03-21 2014-07-16 金三立视频科技(深圳)有限公司 Rapid and automatic focusing method and system for camera zoom
CN104301611A (en) * 2014-10-14 2015-01-21 浙江宇视科技有限公司 Method and device for correcting zoom tracking curve
CN104980661A (en) * 2015-07-10 2015-10-14 武汉烽火众智数字技术有限责任公司 Method and apparatus for self-correcting camera lens
CN105611159A (en) * 2015-12-23 2016-05-25 北京奇虎科技有限公司 Calibration method and device of zooming tracking curve

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115802161A (en) * 2023-02-09 2023-03-14 杭州星犀科技有限公司 Focusing method, system, terminal and medium based on self-learning
CN116147689A (en) * 2023-04-14 2023-05-23 四川中科友成科技有限公司 Off-target delay test method and device for outfield tracker
CN116147689B (en) * 2023-04-14 2023-07-14 四川中科友成科技有限公司 Off-target delay test method and device for outfield tracker

Also Published As

Publication number Publication date
CN105611159A (en) 2016-05-25

Similar Documents

Publication Publication Date Title
WO2017107842A1 (en) Zoom tracking curve calibration method and device
WO2017107770A1 (en) Method and device for correcting zoom tracking curve
US9749614B2 (en) Image capturing system obtaining scene depth information and focusing method thereof
US9998650B2 (en) Image processing apparatus and image pickup apparatus for adding blur in an image according to depth map
US9986148B2 (en) Image capturing terminal and image capturing method
WO2017107839A1 (en) Method and device for camera rapid automatic focusing
WO2017107841A1 (en) Method and device for camera automatic focus control
CN102984530B (en) Image processing system and Atomatic focusing method
WO2015180509A1 (en) Image capturing terminal and image capturing method
US20170064184A1 (en) Focusing system and method
TWI538512B (en) Method for adjusting focus position and electronic apparatus
US9967449B2 (en) Camera system and auto focusing method thereof
CN105578048B (en) A kind of quick focusing method and device, mobile terminal
CN106896622B (en) Bearing calibration based on multiple spurs from auto-focusing
CN106226976B (en) A kind of dual camera image pickup method, system and terminal
WO2017107840A1 (en) Automatic focus control method and apparatus
CN111932636B (en) Calibration and image correction method and device for binocular camera, storage medium, terminal and intelligent equipment
RU2389050C1 (en) Automatic focusing method
TW201350955A (en) Method of auto-focus
CN103472658A (en) Auto-focusing method
KR20180046624A (en) Dual camera module manufacturing method and apparatus for acquisiting correction-data so as to synthesizing image and dual camera module manufactured by this
US20130335620A1 (en) Focus position searching method
CN109698902B (en) Synchronous focusing method and device
US20160142616A1 (en) Direction aware autofocus
CN104980661A (en) Method and apparatus for self-correcting camera lens

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16877653

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16877653

Country of ref document: EP

Kind code of ref document: A1