WO2017107770A1 - Method and device for correcting zoom tracking curve - Google Patents
Method and device for correcting zoom tracking curve Download PDFInfo
- Publication number
- WO2017107770A1 WO2017107770A1 PCT/CN2016/108870 CN2016108870W WO2017107770A1 WO 2017107770 A1 WO2017107770 A1 WO 2017107770A1 CN 2016108870 W CN2016108870 W CN 2016108870W WO 2017107770 A1 WO2017107770 A1 WO 2017107770A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- zoom
- value
- focus
- focus position
- tracking curve
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/69—Control of means for changing angle of the field of view, e.g. optical zoom objectives or electronic zooming
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
Definitions
- the present application 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 synchronize the focus lens according to the position of the zoom lens. Change so that the image can be focused clearly.
- the lens manufacturer will provide a fixed ideal zoom tracking curve corresponding to the lens, which is convenient for the camera to realize zoom tracking and auto focus according to the zoom tracking curve.
- the zoom tracking curves of the four different focus distances are substantially coincident; when the zoom magnification becomes larger, different focus distances
- the zoom tracking curves are gradually separated, and the distances are getting larger and larger. Therefore, the zoom motor is switched from a small magnification to a large magnification, or from a large magnification to a small magnification.
- the rules for selecting the reference zoom tracking curve should be different accordingly. The selection accuracy of the reference zoom tracking curve is described.
- the processing is not distinguished for the two different zoom directions.
- the purpose of the present application 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 application provides a method for correcting a zoom tracking curve, which includes:
- the reference zoom curve is selected from the pre-stored zoom curves with different focus distances to drive the zoom motor and the focus motor according to the reference zoom curve.
- the correction of the reference zoom tracking curve is completed according to the obtained actual focus position values corresponding to the N collection points.
- the application also provides a calibration device for a zoom tracking curve, which includes:
- a reference curve selection module configured to select a reference zoom curve from the pre-stored at least two zoom tracking curves with different focus distances according to the zoom direction and the corresponding preset rule, according to the reference zoom curve Driving the zoom motor and the focus motor to rotate synchronously;
- a sampling module configured to select N collection points corresponding to different zoom magnification values on the reference zoom curve
- An actual value obtaining module configured to acquire, according to a preset auto-focusing algorithm, an actual focus position value when a focus estimation value of the N collection points reaches a maximum value at a corresponding zoom ratio value;
- a correction module configured to complete the correction of the reference zoom tracking curve according to the obtained actual focus position values corresponding to the N collection points.
- the present application also provides a computer program comprising computer readable code that, when executed on an electronic device, causes the electronic device to perform a method of correcting a zoom tracking curve of the sacred.
- the application also provides a computer readable medium in which the computer program described above is stored.
- the present application provides a method and apparatus for correcting a zoom tracking curve according to the current zoom
- the direction and the preset rule corresponding to the zoom direction, the reference zoom curve is selected from the pre-stored plurality of theoretical zoom curves, and N different zoom ratio values are selected on the theoretical reference zoom curve.
- 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, and the correction of the reference zoom tracking curve is completed. That is, the present application can select a reference zoom tracking curve by using a preset rule corresponding to the zoom direction for the current zoom direction, and obtain the actual focus position of the collection point by auto focus, and then obtain the actual of each lens itself by correction. Zooming the tracking curve to ensure that the actual reference zoom tracking curve that has been corrected is synchronized in the subsequent zoom and auto focus, ensuring 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 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.
- a 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 present application can correct the zoom tracking curve of the lens in different scenarios, and improve the accuracy and verification efficiency of the calibration result.
- FIG. 1 is a flowchart of a process of an embodiment of a zoom tracking curve correction method in an embodiment of the present application
- FIG. 2 is a schematic diagram of a theoretical zoom tracking curve preset in the embodiment of the present application.
- FIG. 3 is a schematic diagram of selecting a collection point on a zoom tracking curve in the embodiment of the present application.
- FIG. 4 is a structural block diagram of an embodiment of a zoom tracking curve correction apparatus in an embodiment of the present application.
- Figure 5 schematically shows a block diagram of an electronic device for performing the method according to the present application
- Figure 6 shows schematically a procedure for maintaining or carrying a method according to the present application.
- the storage unit of the code is not limited to the present application.
- the method described in the present application is a process of zooming and autofocusing when applied to a camera or a camera to capture an image.
- the method described in the present application 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 it is a flowchart of an embodiment of a method for correcting a zoom tracking curve according to the present application, which includes the steps of:
- 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 focus distances in the present scheme are 3 meters, 6 meters, 10 meters, and infinity respectively.
- the zoom tracking curve is taken as an example. 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.
- the distance is getting bigger and bigger. This shows that when the zoom motor position is at a small zoom factor value, the focus position of the motor does not change much as the distance of the object from the lens changes, but at a high zoom ratio, the object distance changes greatly, focusing.
- the motor position also has a large deviation. Therefore, in the lens zooming process, first select a reference zoom tracking curve that best matches the current focus distance.
- the at least two zoom tracking curves having different focus distances are input to the image pickup lens in advance and stored, 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 zoom motor is switched from a small magnification to a large magnification or a large magnification to a small magnification.
- the selection is selected.
- the rules of the reference zoom tracking curve should also be different to ensure the accuracy of the selection of the reference zoom tracking curve. Therefore, in this embodiment, it is also required to determine a selection rule of the corresponding reference zoom tracking curve according to the zoom direction of the current zoom motor.
- the focus motor when the zoom direction of the current zoom motor is a small magnification steering large magnification, the focus motor is driven to obtain a current zoom magnification value corresponding to the focus position in each zoom tracking curve. And the corresponding focus evaluation value, the zoom tracking curve at which the focus position having the largest focus evaluation value is determined is the reference zoom tracking curve.
- the focus evaluation value of each focus position is calculated based on the preset focus estimation value function.
- the zoom tracking curve at which the focus position at which the focus evaluation value is the largest is determined as the reference zoom tracking curve.
- the zoom direction of the current zoom motor is a large magnification to a small magnification
- the current focus position of the focus motor is acquired; and then the current zoom ratio value is acquired in each zoom tracking.
- the corresponding focus position in the curve determines that the zoom tracking curve whose focus position is closest to the current focus position is the reference zoom tracking curve.
- the zoom tracking curves of different focus distances are gradually separated, and the distance difference is larger and larger. That is, the same zoom magnification value has a large difference in the focus position corresponding to the zoom tracking curve of different focus distances. Therefore, in the zoom direction, the current focus motor position and the zoom motor position are obtained, and the current focus position value and current change are obtained. The multiplier value is then obtained by obtaining the current zoom magnification value in the corresponding focus position in each zoom tracking curve, and then comparing the focus position to the current focus position to determine the closest zoom point of the focus position to the current focus position.
- the tracking curve is the reference zoom tracking curve.
- the present application can select a reference zoom tracking curve by using a preset rule corresponding to the zoom direction for the current zoom direction, thereby ensuring the accuracy of the zoom tracking curve selection.
- the method further includes the following steps:
- the closest zoom tracking curve is selected as the reference zoom tracking curve in the foregoing steps. Further, 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 less acquisition points should be selected under a small zoom magnification value; conversely, at a large zoom ratio Under the value, the zoom tracking curves of different focus distances are gradually separated, so under the large zoom magnification value, more collection points are selected. That is, the collection points selected in different regions on the reference zoom curve
- the quantity is proportional to the value of the zoom ratio corresponding to the center position point of the current area.
- the interval Tx of the collection point may be set to an inversely proportional to the value of the magnification change of the center of the region, so that the processor in the lens obtains the interval value calculated by the algorithm.
- the embodiment is of course only exemplary, which is not limited in this application.
- the reference zoom tracking curve may be divided into different regions according to the magnitude of the zoom magnification value.
- the reference zoom tracking curve is divided into a small magnification region, a medium magnification region, and a large magnification region in the present application.
- 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 position values 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 to obtain the current focus position.
- a frame image of the time obtains 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 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 refers to the horizontal high-frequency component value
- y refers to the vertical high-frequency component value.
- the algorithm accumulates the high-frequency energy values of all the horizontal x and vertical y of the current frame image data obtained from the data image. Go to the focus 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 of the scene modes has a corresponding zoom magnification value, a light intensity value, a focus evaluation value function, a focus motor step size, and a focus. The judgment criteria for the end.
- the method of an embodiment of the present application further includes the following steps:
- the correction of the reference zoom tracking curve may be implemented not only by the N collection points, but also by the linear difference method and the correction of any two adjacent pole points. Distance, calculating an actual focus position value of the remaining points between the adjacent two collection points on the reference zoom tracking curve.
- the method of the present application it is also required to acquire a theoretical focus position value corresponding to any of the N collection points on the reference zoom tracking curve, and calculate the theoretical focus position value and the actual focus position value. Correcting the distance between the two, and then using the linear difference method and the corrected distance of any two adjacent acquisition points, calculating the actual focus position value of the remaining points between the adjacent two collection points on the reference zoom tracking curve .
- the actual focus position value Focus1 zoom[N] and the theoretical focus position value Focus2 zoom[N] corresponding to the N collection points are respectively acquired, 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 algorithm for calculating the corrected distance is:
- Focus zoom[N] Focus2 zoom[N] -Focus1 zoom[N] .
- any two adjacent collection points zoom [N] and zoom [N-1] may be selected from the N collection points, and the corresponding correction distances focus zoom [N] and focus zoom [N-1] may be calculated. ], the calculated correction distance Focus arbitrary zoom magnification corresponding to the zoom magnification value between the two adjacent points are collected:
- the theoretical focus position Focus2 zoom corresponding to the arbitrary zoom magnification value zoom between the adjacent collection points zoom [N] and zoom [N-1] is obtained, and then the zoom ratio is calculated.
- the actual focus position corresponding to the value zoom is Zoom1 zoom :
- 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 the actual situation.
- the corrected zoom tracking curve is corrected according to the acquired coordinates of at least N (variable magnification value, actual focus position value).
- the present application provides a method for correcting a zoom tracking curve, and selecting a reference variable from a plurality of pre-stored theoretical zoom tracking curves according to a current zoom direction and a preset rule corresponding to the zoom direction.
- the tracking curve is multiplied, and N collection points of different zoom magnification values are selected on the theoretical reference zoom tracking curve; and the focus estimation values of the zoom magnification values corresponding to the collected points are obtained according to the preset autofocus algorithm.
- the actual focus position value at the maximum is reached to complete the correction of the reference zoom tracking curve.
- the present application can select a reference zoom tracking curve by using a preset rule corresponding to the zoom direction for the current zoom direction, and obtain the actual focus position of the collection point by auto focus, and then obtain the actual of each lens itself by correction.
- the zoom tracking curve is used to ensure that the actual reference zoom tracking curve that has been corrected is synchronized in the subsequent zoom and auto focus, ensuring that the entire zoom process image can be focused clearly.
- the present application also provides a zoom tracking curve correction device.
- the reference curve selection module 11, the sampling module 12, the actual value acquisition module 13, and the correction module 14 are included.
- the device described in the present application is applied to a camera or a camera having a zooming and autofocus function.
- the device described in the present application 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.
- PMP portable multimedia player
- the embodiment of the present application exemplifies a specific embodiment thereof by using a digital camera as an example, but the embodiment does not constitute a limitation of the present application. The following specifically reveals the various modules. The specific function now.
- the reference curve selection module 11 is configured to select a reference zoom tracking curve from the pre-stored at least two zoom tracking curves with different focus distances according to the zoom direction and the corresponding preset rule, according to the reference variable
- the double tracking curve drives the zoom motor and the focus motor to rotate synchronously.
- 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 focus distances in the present scheme are 3 meters, 6 meters, 10 meters, and infinity respectively.
- the zoom tracking curve is taken as an example. 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.
- the distance is getting bigger and bigger. This shows that when the zoom motor position is at a small zoom factor value, the focus position of the motor does not change much as the distance of the object from the lens changes, but at a high zoom ratio, the object distance changes greatly, focusing.
- the motor position also has a large deviation. Therefore, in the lens zooming process, first select a reference zoom tracking curve that best matches the current focus distance.
- the at least two zoom tracking curves having different focus distances are input to the image pickup lens in advance and stored, 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 11 further needs to determine a selection rule of the corresponding reference zoom tracking curve according to the zoom direction of the current zoom motor.
- the reference curve selection module 11 further includes a first selection unit.
- the first selecting unit is configured to drive the focus motor to obtain a current zoom magnification value corresponding to a focus position in each zoom tracking curve when the zoom direction of the current zoom motor is a small magnification to a large magnification. Focusing on the evaluation value to determine the focus position where the focus evaluation value is the largest The zoom tracking curve is the reference zoom tracking curve.
- each focus is calculated based on the preset focus estimation value function.
- the focus evaluation value of the position so that the zooming curve in which the first selecting unit determines the focus position at which the focus evaluation value is the largest is the reference zoom tracking curve.
- the reference curve selection module further includes a second selection unit.
- the second selecting unit is configured to acquire a current focus position of the focus motor when the zoom direction of the current zoom motor is a large magnification to a small magnification; and then obtain a current zoom magnification value corresponding to each zoom tracking curve.
- the focus position, the zoom tracking curve that determines the closest focus position to the current focus position is the reference zoom tracking curve.
- the zoom tracking curves of different focus distances are gradually separated, and the distance difference is larger and larger. That is, the same zoom factor value has a large difference in the focus position corresponding to the zoom tracking curve of different focus distances, so in the zoom direction, the second selecting unit acquires the current focus motor position and the zoom motor position, and obtains the current Focusing the position value and the current zoom magnification value, and then obtaining the current zoom magnification value in the corresponding focus position in each zoom tracking curve, and the second selecting unit compares the focus position to the current focus position by comparing the focus position,
- the zoom tracking curve that determines the closest focus position to the current focus position is the reference zoom tracking curve.
- the reference curve selection module 11 of the present application can select the reference zoom tracking curve by using a preset rule corresponding to the zoom direction for the current zoom direction, thereby ensuring the accuracy of the zoom tracking curve selection. .
- sampling module 12 is configured to select N pairs on the reference zoom tracking curve. Should be at the collection point of different zoom ratio values.
- the sampling module 12 further needs 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 the sampling module 12 should select fewer acquisition points under a small zoom magnification value;
- the zoom tracking curves of different focus distances are gradually separated, so the sampling module 12 selects more collection points under the large zoom magnification value. That is, the number of collection points selected in different regions on the reference zoom tracking curve is proportional to the value of the zoom magnification corresponding to the central position point of the current region.
- the sampling module 12 may set an interval Tx of the collection point to an algorithm that is inversely proportional to the value of the magnification of the center of the region, so that the processor in the lens calculates according to the algorithm.
- the interval value is used to obtain a corresponding number of collection points.
- the sampling module 12 in the present application may divide the reference zoom tracking curve into different regions according to the magnitude of the zoom ratio value. For example, the reference zoom tracking curve is divided into a small magnification region, a medium magnification region, and a large magnification region in the present application.
- the sampling module 12 selects a first magnification threshold and a second magnification threshold on the reference zoom tracking curve, and when the magnification value is less than the first magnification threshold, the sampling module 12 determines that it is in a small magnification region; When the value is greater than the second magnification threshold, the sampling module 12 determines that it is in the large magnification region; the others are the medium magnification region.
- the actual value obtaining module 13 is configured to acquire, according to a preset auto-focusing algorithm, an actual focus position value when the focus estimation value of the N points of the N collection points reaches a maximum value under the corresponding zoom ratio value.
- the preset auto-focusing algorithm is a common climbing algorithm
- the actual value acquiring module 13 drives the focusing motor under the zoom factor value corresponding to the collecting point. Moving to different focus position values, and acquiring image data corresponding to the focus position value; the actual value acquisition module 13 based on the image data and a preset focus estimation value function, The focus position value at which the estimated 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 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 then the actual value acquisition module 13 calculates the frame image based on the preset focus estimation value function.
- Focus evaluation value 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 in the camera lens, and each of the scene modes has a corresponding zoom magnification value, a light intensity value, a focus evaluation value function, and a focus.
- the actual value obtaining module 13 compares the light intensity information, the gain, and the zoom magnification value of the current image data with the zoom ratio value, the gain, and the light intensity information value in the preset plurality of scene modes to select the best match.
- the scene mode acquires the focus motor step size, the focus evaluation value function, and the focus end judgment criterion in the scene mode.
- correction module 14 is configured to complete the correction of the reference zoom tracking curve according to the obtained actual focus position values corresponding to the N collection points.
- the correction module 14 may implement the correction of the reference zoom tracking curve not only by the N collection points, but also the linear difference method and any adjacent two.
- the correction distance of the poles 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 device of the present application further includes an actual value acquisition module and a second sampling unit.
- the actual value obtaining module is configured to acquire any one of the N collection points in a reference zoom tracking A corresponding theoretical focus position value on the curve, and a correction distance between the theoretical focus position value and the actual focus position value is calculated. And calculating, by the second sampling unit, the actual focus position of the remaining points between the adjacent two collection points on the reference zoom tracking curve by using the linear difference method and the corrected distance of any two adjacent collection points. value.
- the actual value obtaining module 13 and the theoretical value acquiring module respectively acquire the actual focus position value Focus1 zoom [N] and the theoretical focus position value Focus2 corresponding to the N collection points.
- zoom [N] and acquires the actual focusing module according to the zoom position value Focus1 [N] and the theoretical value obtained by the focus position of the zoom Focus2 are theoretical values corresponding to [N] calculated correction distance focus zoom [N], to obtain the N N correction distances corresponding to the collection points.
- the algorithm for calculating the corrected distance is:
- Focus zoom[N] Focus2 zoom[N] -Focus1 zoom[N] .
- the second sampling unit may select any two adjacent collection points zoom [N] and zoom [N-1] from the N collection points, and calculate a corresponding correction distance focus zoom [N] and Focus zoom [N-1], the calculated correction distance Focus arbitrary zoom magnification corresponding to the zoom magnification value between the two adjacent points are collected:
- the theoretical focus acquiring module acquires the theoretical focus position Focus2 zoom corresponding to the arbitrary zoom magnification value zoom between the adjacent collection points zoom [N] and zoom [N-1] , and then Calculating the actual focus position Focus1 zoom corresponding to the zoom ratio value zoom by the second sampling unit:
- Focus1 zoom focus zoom +Focus2 zoom
- the second sampling unit can obtain the actual focus position value of the remaining points between any two adjacent collection points, and the specific number of samples can be determined according to actual conditions.
- the correction module 14 performs correction on the existing reference zoom tracking curve according to the acquired coordinates of at least N (variable magnification value, actual focus position value).
- the present application provides a correction device for a zoom tracking curve, which is pre-stored by the reference curve selection module 11 according to the current zoom direction and the preset rule corresponding to the zoom direction.
- the selected reference zoom tracking curve is selected in the theoretical zoom tracking curve, and N sampling points of different zoom magnification values are selected by the sampling module 12 on the theoretical reference zoom curve; and then the preset auto focus algorithm is adopted.
- the actual value obtaining module 13 obtains the actual focus position value when the focus estimation value reaches the maximum under the zoom magnification value corresponding to the collected points, and then completes the correction of the reference zoom tracking curve by the correction module 14.
- the present application can select a reference zoom tracking curve by using a preset rule corresponding to the zoom direction for the current zoom direction, and obtain the actual focus position of the collection point by auto focus, and then obtain the actual of each lens itself by correction.
- the zoom tracking curve is used to ensure that the actual reference zoom tracking curve that has been corrected is synchronized in the subsequent zoom and auto focus, ensuring that the entire zoom process image can be focused clearly.
- the various component embodiments of the present application can 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 some or all of the functionality of some or all of the components of the correction device for the zoom tracking curve in accordance with embodiments of the present application may be implemented in practice using a microprocessor or digital signal processor (DSP). .
- DSP digital signal processor
- the application can 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 the present application 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. 5 illustrates a correction device that can implement a zoom tracking curve in accordance with the present application, such as a computer, mobile device, cell phone, PAD, portable multimedia player (PMP), TV, and the like.
- the electronic device conventionally includes a processor 510 and a computer program product or computer readable medium in the form of a memory 520.
- the memory 520 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
- Memory 520 has a memory space 530 for program code 531 for performing any of the method steps described above.
- storage space 530 for program code may include various program code 531 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 computer program products are typically portable or fixed as described with reference to Figure 6.
- the storage unit may have a storage section, a storage space, and the like arranged similarly to the storage 520 in the electronic device of FIG.
- the program code can be compressed, for example, in an appropriate form.
- the storage unit comprises computer readable code 531 'is a code readable by a processor, such as 510, which when executed by an electronic device causes the electronic device to perform each of the methods described above step.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
- Lens Barrels (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The present invention relates to the technical field of camera surveillance, and particularly relates to a method and device for correcting a zoom tracking curve. The method comprises: according to a zoom direction and corresponding preset rules thereof, selecting a reference zoom tracking curve from at least two pre-stored zoom tracking curves with different focus distances, thereby driving a zoom motor and a focus motor to rotate synchronously according to the reference zoom tracking curve; selecting N number of collection points corresponding to different zoom values on the reference zoom tracking curve; on the basis of a preset auto-focus algorithm, respectively obtaining an actual focus position value of any collection point from among the N number of collection points when a focus estimate value, at the corresponding zoom value, reaches a maximum value; according to the obtained actual focus position values corresponding to the N number of collection points, finishing correcting the reference zoom tracking curve.
Thus, the present application is able to obtain the actual zoom tracking curve of each lens, and ensure that the subsequent zoom and auto focus are carried out synchronously with the corrected actual reference zoom tracking curve, such that images are focused and clear throughout the entire zoom process.
Description
本申请要求在2015年12月23日提交中国专利局、申请号为201510982783.2、发明名称为“变倍跟踪曲线的校正方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201510982783.2, entitled "Correction Method and Apparatus for Zoom Tracking Curve", filed on December 23, 2015, the entire contents of which are incorporated herein by reference. In the application.
本申请涉及摄像监控技术领域,尤其涉及一种变倍跟踪曲线的校正方法和装置。The present application 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. 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 the zoom process, zoom tracking is required to synchronize the focus lens according to the position of the zoom lens. Change so that the image can be focused clearly.
通常,镜头厂商会提供对应于该镜头的固定理想变倍跟踪曲线,便于摄像机依据该变倍跟踪曲线实现变倍跟踪和自动聚焦。但是在选定理论的参考变倍跟踪曲线时,在变倍电机位置处于小的变倍倍率值时,四条不同聚焦距离的变倍跟踪曲线基本重合;当变倍倍率变大时,不同聚焦距离的变倍跟踪曲线逐渐分开,距离相差越来越大。因此变倍电机是从小倍率转向大倍率,还是从大倍率转向小倍率,两种情况下由于变倍跟踪曲线的不同,选定所述参考变倍跟踪曲线的规则也应该相应不同,才能保证所述参考变倍跟踪曲线的选取精度。但是现有技术中,在选定参考变倍跟踪曲线时没有针对该两种不同的变倍方向来区别处理。Usually, the lens manufacturer will provide a fixed ideal zoom tracking curve corresponding to the lens, which is convenient for the camera to realize zoom tracking and auto focus according to the zoom tracking curve. However, when the theoretical reference zoom tracking curve is selected, 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, different focus distances The zoom tracking curves are gradually separated, and the distances are getting larger and larger. Therefore, the zoom motor is switched from a small magnification to a large magnification, or from a large magnification to a small magnification. In both cases, due to the difference in the zoom tracking curve, the rules for selecting the reference zoom tracking curve should be different accordingly. The selection accuracy of the reference zoom tracking curve is described. However, in the prior art, when the reference zoom tracking curve is selected, the processing is not distinguished for the two different zoom directions.
而且,由于镜头的个体差异,在使用某个镜头时,需要对每个镜头的变倍、对焦的光学基准位置进行调整和确认,以得到最合适的变倍跟踪曲线,如果以该固定理想参考变倍跟踪曲线做变倍跟踪时,图像可能会存在不同程度的模糊。因此,在镜头变倍跟踪过程之前或之中,如果能根据每个镜头自身的实际变倍跟踪曲线同步运行,使得整个变倍过程图像都能聚焦清楚。因此如何得到每个镜头的实际变倍跟踪曲线是需要解决的技术问
题。Moreover, due to the individual differences of the lens, when using a certain lens, it is necessary to adjust and confirm the zooming of each lens and the optical reference position of the focus to obtain the most suitable zoom tracking curve, if the fixed ideal reference is used. When the zoom tracking curve is used for zoom tracking, the image may have different degrees of blur. Therefore, before or during the lens zoom tracking process, if the curve can be synchronized according to the actual zooming of each lens itself, the entire zoom process image can be focused clearly. So how to get the actual zoom tracking curve of each lens is a technical problem to be solved
question.
发明内容Summary of the invention
本申请的目的旨在解决上述至少一个问题,提供了一种变倍跟踪曲线的校正方法、及采用该方法的装置。The purpose of the present application 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 this goal, the present application adopts the following technical solutions:
本申请提供了一种变倍跟踪曲线的校正方法,其包括有:The application provides a method for correcting a zoom tracking curve, which includes:
根据变倍方向及其对应的预设规则,从预存的至少两条聚焦距离不同的变倍跟踪曲线中选定参考变倍跟踪曲线,以依据该参考变倍跟踪曲线驱动变倍电机和聚焦电机同步转动;According to the zoom direction and the corresponding preset rule, the reference zoom curve is selected from the pre-stored zoom curves with different focus distances to drive the zoom motor and the focus motor according to the reference zoom curve. Synchronous rotation
在参考变倍跟踪曲线上选定N个对应于不同变倍倍率值的采集点;Selecting N collection points corresponding to different zoom magnification values on the reference zoom tracking curve;
基于预设的自动聚焦算法,分别获取该N个采集点中任一采集点在对应变倍倍率值下聚焦估计值达到最大值时的实际聚焦位置值;Obtaining, according to a preset auto-focusing algorithm, an actual focus position value when the focus estimation value reaches a maximum value at a corresponding zoom magnification value of any one of the N collection points;
依据获取的所述N个采集点对应的实际聚焦位置值,完成该参考变倍跟踪曲线的校正。The correction of the reference zoom tracking curve is completed according to the obtained actual focus position values corresponding to the N collection points.
本申请还提供了一种变倍跟踪曲线的校正装置,其包括有:The application also provides a calibration device for a zoom tracking curve, which includes:
参考曲线选取模块,用于根据变倍方向及其对应的预设规则,从预存的至少两条聚焦距离不同的变倍跟踪曲线中选定参考变倍跟踪曲线,以依据该参考变倍跟踪曲线驱动变倍电机和聚焦电机同步转动;a reference curve selection module, configured to select a reference zoom curve from the pre-stored at least two zoom tracking curves with different focus distances according to the zoom direction and the corresponding preset rule, according to the reference zoom curve Driving the zoom motor and the focus motor to rotate synchronously;
取样模块,用于在参考变倍跟踪曲线上选定N个对应于不同变倍倍率值的采集点;a sampling module, configured to select N collection points corresponding to different zoom magnification values on the reference zoom curve;
实际值获取模块,用于基于预设的自动聚焦算法,分别获取该N个采集点中任一采集点在对应变倍倍率值下聚焦估计值达到最大值时的实际聚焦位置值;An actual value obtaining module, configured to acquire, according to a preset auto-focusing algorithm, an actual focus position value when a focus estimation value of the N collection points reaches a maximum value at a corresponding zoom ratio value;
校正模块,用于依据获取的所述N个采集点对应的实际聚焦位置值,完成该参考变倍跟踪曲线的校正。And a correction module, configured to complete the correction of the reference zoom tracking curve according to the obtained actual focus position values corresponding to the N collection points.
本申请还提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备上运行时,导致所述电子设备执行桑述的变倍跟踪曲线的校正方法。The present application also provides a computer program comprising computer readable code that, when executed on an electronic device, causes the electronic device to perform a method of correcting a zoom tracking curve of the sacred.
本申请还提供了一种计算机可读介质,其中存储了上述的计算机程序。The application also provides a computer readable medium in which the computer program described above is stored.
与现有技术相比,本申请具备如下优点:Compared with the prior art, the application has the following advantages:
1、本申请提供了一种变倍跟踪曲线的校正方法和装置,根据当前变倍
方向及该变倍方向对应的预设规则,从预存的多条理论变倍跟踪曲线中选定参考变倍跟踪曲线,并在理论的参考变倍跟踪曲线上选定N个不同变倍倍率值的采集点;再依据预设的自动聚焦算法,获取这些采集点对应的变倍倍率值下聚焦估计值达到最大时的实际聚焦位置值,来完成参考变倍跟踪曲线的校正。即本申请能针对于当前变倍方向,采用与该变倍方向对应的预设规则选取参考变倍跟踪曲线,而且通过自动聚焦获取采集点实际聚焦位置,进而通过校正得到每个镜头自身的实际变倍跟踪曲线,从而保证后续在变倍和自动聚焦时随着已经过校正的实际的参考变倍跟踪曲线同步运行,保证整个变倍过程图像都能聚焦清楚;1. The present application provides a method and apparatus for correcting a zoom tracking curve according to the current zoom
The direction and the preset rule corresponding to the zoom direction, the reference zoom curve is selected from the pre-stored plurality of theoretical zoom curves, and N different zoom ratio values are selected on the theoretical reference zoom curve. 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, and the correction of the reference zoom tracking curve is completed. That is, the present application can select a reference zoom tracking curve by using a preset rule corresponding to the zoom direction for the current zoom direction, and obtain the actual focus position of the collection point by auto focus, and then obtain the actual of each lens itself by correction. Zooming the tracking curve to ensure that the actual reference zoom tracking curve that has been corrected is synchronized in the subsequent zoom and auto focus, ensuring that the entire zoom process image can be focused clearly;
2、本申请中在获取实际聚焦位置值时,在采集点对应的变倍倍率值下驱动聚焦电机移动到不同的聚焦位置,并基于该聚焦位置所对应的图像数据及预设的聚焦估计值函数,将聚焦估计值最大时的聚焦位置值作为实际聚焦位置值,且该聚焦估计值函数与图像数据所对应的场景相关联。即本申请能在不同的场景中,对该镜头的变倍跟踪曲线进行校正,提高校验结果的精确度和校验效率。2. In the present application, when the actual focus position value is obtained, the focus motor is driven 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. A 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 present application can correct the zoom tracking curve of the lens in different scenarios, and improve the accuracy and verification efficiency of the calibration result.
本申请附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本申请的实践了解到。The aspects and advantages of the present invention will be set forth in part in the description which follows.
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those skilled in the art from a The drawings are only for the purpose of illustrating the preferred embodiments and are not intended to be limiting. Throughout the drawings, the same reference numerals are used to refer to the same parts. In the drawing:
图1是本申请实施例中变倍跟踪曲线校正方法的一个实施例的程序流程图;1 is a flowchart of a process of an embodiment of a zoom tracking curve correction method in an embodiment of the present application;
图2是本申请实施例中预先设定的理论变倍跟踪曲线的示意图;2 is a schematic diagram of a theoretical zoom tracking curve preset in the embodiment of the present application;
图3是本申请实施例中在变倍跟踪曲线上选取采集点的示意图;3 is a schematic diagram of selecting a collection point on a zoom tracking curve in the embodiment of the present application;
图4是本申请实施例中变倍跟踪曲线校正装置的一个实施例的结构框图;4 is a structural block diagram of an embodiment of a zoom tracking curve correction apparatus in an embodiment of the present application;
图5示意性地示出了用于执行根据本申请的方法的电子设备的框图;以及Figure 5 schematically shows a block diagram of an electronic device for performing the method according to the present application;
图6示意性地示出了用于保持或者携带实现根据本申请的方法的程序
代码的存储单元。Figure 6 shows schematically a procedure for maintaining or carrying a method according to the present application.
The storage unit of the code.
下面结合附图和示例性实施例对本申请作进一步地描述,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本申请,而不能解释为对本申请的限制。此外,如果已知技术的详细描述对于示出本申请的特征是不必要的,则将其省略。The present application is further described in the following with reference to the drawings and exemplary embodiments, which are illustrated in the accompanying drawings, in which the same or similar reference numerals are used to refer to the same or similar elements or elements having the same or similar functions. . The embodiments described below with reference to the accompanying drawings are intended to be illustrative only, and are not to be construed as limiting. Further, if a detailed description of a known technique is unnecessary for the features of the present application, it will be omitted.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本申请的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。The singular forms "a", "an", "the" It is to be understood that the phrase "comprise" or "an" 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 commonly understood by one of ordinary skill in the art to which this invention belongs, unless otherwise defined. 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 described in the present application is a process of zooming and autofocusing when applied to a camera or a camera to capture an image. Of course, the method described in the present application 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,为本申请变倍跟踪曲线校正方法的一个实施例的程序流程图,其包括步骤:Referring to FIG. 1 , it is a flowchart of an embodiment of a method for correcting a zoom tracking curve according to the present application, which includes the steps of:
S11,根据变倍方向及其对应的预设规则,从预存的至少两条聚焦距离不同的变倍跟踪曲线中选定参考变倍跟踪曲线,以依据该参考变倍跟踪曲线
驱动变倍电机和聚焦电机同步转动。S11, according to the zoom direction and the corresponding preset rule, select a reference zoom tracking curve from the pre-stored at least two zoom tracking curves with different focus distances, according to the reference zoom curve
The drive zoom motor and the focus motor rotate in synchronization.
需要说明的是,有必要对所述的变倍跟踪曲线进行先导性说明。不难理解,在镜头中预先输入有至少两条聚焦距离不同的变倍跟踪曲线,请参照附图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 focus distances in the present scheme are 3 meters, 6 meters, 10 meters, and infinity respectively. The zoom tracking curve is taken as an example. 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. The distance is getting bigger and bigger. This shows that when the zoom motor position is at a small zoom factor value, the focus position of the motor does not change much as the distance of the object from the lens changes, but at a high zoom ratio, the object distance changes greatly, focusing. The motor position also has a large deviation. Therefore, in the lens zooming process, first select a reference zoom tracking curve that best matches the current focus distance.
不难理解,所述至少两条聚焦距离不同的变倍跟踪曲线是预先输入到摄像镜头并存储,例如可以预先存储在存储介质中,其中所述存储介质可以是同步动态随机存取存储器(SDRAM)、多芯片封装(MCP)存储器或动态随机存取存储器(DRAM)。It is not difficult to understand that the at least two zoom tracking curves having different focus distances are input to the image pickup lens in advance and stored, 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).
具体的,参照前述参考变倍跟踪曲线的不同特点,不难知道,变倍电机是从小倍率转向大倍率,还是从大倍率转向小倍率,两种情况下由于变倍跟踪曲线的特点,选定所述参考变倍跟踪曲线的规则也应该相应不同,才能保证所述参考变倍跟踪曲线的选取精度。因此本实施例中,还需要根据当前变倍电机的变倍方向,来确定对应的参考变倍跟踪曲线的选取规则。Specifically, referring to the different characteristics of the aforementioned reference zoom tracking curve, it is not difficult to know whether the zoom motor is switched from a small magnification to a large magnification or a large magnification to a small magnification. In both cases, due to the characteristics of the zoom tracking curve, the selection is selected. The rules of the reference zoom tracking curve should also be different to ensure the accuracy of the selection of the reference zoom tracking curve. Therefore, in this embodiment, it is also required to determine a selection rule of the corresponding reference zoom tracking curve according to the zoom direction of the current zoom motor.
具体的,在本申请的一个实施例中,在当前变倍电机的变倍方向为小倍率转向大倍率时,驱动聚焦电机获取当前变倍倍率值在每条变倍跟踪曲线中对应的聚焦位置及对应的聚焦评价值,确定聚焦评价值最大的聚焦位置所在的变倍跟踪曲线为所述参考变倍跟踪曲线。Specifically, in an embodiment of the present application, when the zoom direction of the current zoom motor is a small magnification steering large magnification, the focus motor is driven to obtain a current zoom magnification value corresponding to the focus position in each zoom tracking curve. And the corresponding focus evaluation value, the zoom tracking curve at which the focus position having the largest focus evaluation value is determined is the reference zoom tracking curve.
不难理解,从附图1中可以看出,当变倍电机处于小倍率范围时,其对应的多条不同聚焦距离的变倍跟踪曲线基本重合,即同一变倍倍率值在不同聚焦距离的变倍跟踪曲线对应的聚焦位置几乎相同,因此在该变倍方向下,获取当前聚焦电机位置和变倍电机位置,得到当前聚焦位置值和当前变倍倍
率值,然后通过获取当前变倍倍率值在每条变倍跟踪曲线中对应的聚焦位置,但是在小倍率下无法比较聚焦位置与当前聚焦位置的相近程度,因此该方式无法获取参考变倍跟踪曲线。具体的,在本申请中,通过驱动聚焦电机获取当前变倍倍率值在每条变倍跟踪曲线中的聚焦位置后,基于预设的聚焦估计值函数,计算每个聚焦位置的聚焦评价值,确定聚焦评价值最大的聚焦位置所在的变倍跟踪曲线为所述参考变倍跟踪曲线。It is not difficult to understand that it can be seen from FIG. 1 that when the variable power motor is in the small magnification range, the corresponding multiple zoom tracking curves of different different focus distances substantially coincide, that is, the same zoom magnification value is at different focus distances. The focus position corresponding to the zoom tracking curve is almost the same, so in the zoom direction, the current focus motor position and the zoom motor position are obtained, and the current focus position value and the current zoom ratio are obtained.
The rate value is then obtained by acquiring the current zoom magnification value in the corresponding focus position in each zoom tracking curve, but at a small magnification, the focus position cannot be compared with the current focus position, so the method cannot obtain the reference zoom tracking. curve. Specifically, in the present application, after the focus motor is driven to obtain the focus position of the current zoom magnification value in each zoom tracking curve, the focus evaluation value of each focus position is calculated based on the preset focus estimation value function. The zoom tracking curve at which the focus position at which the focus evaluation value is the largest is determined as the reference zoom tracking curve.
具体的,在本申请的一个实施例中,在当前变倍电机的变倍方向为大倍率转向小倍率时,获取聚焦电机的当前聚焦位置;然后获取当前变倍倍率值在每条变倍跟踪曲线中对应的聚焦位置,确定聚焦位置与当前聚焦位置最接近的变倍跟踪曲线为所述参考变倍跟踪曲线。Specifically, in an embodiment of the present application, when the zoom direction of the current zoom motor is a large magnification to a small magnification, the current focus position of the focus motor is acquired; and then the current zoom ratio value is acquired in each zoom tracking. The corresponding focus position in the curve determines that the zoom tracking curve whose focus position is closest to the current focus position is the reference zoom tracking curve.
不难理解,从附图2中可以看出,当变倍电机处于大倍率范围时,不同聚焦距离的变倍跟踪曲线逐渐分开,距离相差越来越大。即同一变倍倍率值在不同聚焦距离的变倍跟踪曲线对应的聚焦位置相差较大,因此在该变倍方向下,获取当前聚焦电机位置和变倍电机位置,得到当前聚焦位置值和当前变倍倍率值,然后通过获取当前变倍倍率值在每条变倍跟踪曲线中对应的聚焦位置,再通过比较聚焦位置与当前聚焦位置的相近程度,确定聚焦位置与当前聚焦位置最接近的变倍跟踪曲线为所述参考变倍跟踪曲线。It is not difficult to understand that, as can be seen from FIG. 2, when the variable power motor is in the large magnification range, the zoom tracking curves of different focus distances are gradually separated, and the distance difference is larger and larger. That is, the same zoom magnification value has a large difference in the focus position corresponding to the zoom tracking curve of different focus distances. Therefore, in the zoom direction, the current focus motor position and the zoom motor position are obtained, and the current focus position value and current change are obtained. The multiplier value is then obtained by obtaining the current zoom magnification value in the corresponding focus position in each zoom tracking curve, and then comparing the focus position to the current focus position to determine the closest zoom point of the focus position to the current focus position. The tracking curve is the reference zoom tracking curve.
不难理解,本申请能针对于当前变倍方向,采用与该变倍方向对应的预设规则选取参考变倍跟踪曲线,从而保证了变倍跟踪曲线选取的精确度。It is not difficult to understand that the present application can select a reference zoom tracking curve by using a preset rule corresponding to the zoom direction for the current zoom direction, thereby ensuring the accuracy of the zoom tracking curve selection.
进一步的,请参见附图1,在本申请所述的方法中,还包括步骤:Further, referring to FIG. 1, in the method described in the present application, the method further includes the following steps:
S12,在参考变倍跟踪曲线上选定N个对应于不同变倍倍率值的采集点。S12, selecting N acquisition points corresponding to different zoom magnification values on the reference zoom tracking curve.
不难理解,前述步骤中选择了最接近的一条变倍跟踪曲线作为参考变倍跟踪曲线。进一步的,还需要在该参考变倍跟踪曲线上选定N个采集点,该N个采集点对应于不同的变倍倍率值。It is not difficult to understand that the closest zoom tracking curve is selected as the reference zoom tracking curve in the foregoing steps. Further, 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设定为与该区域中心的变倍倍率值成反比的算法,使得镜头中处理器依据该算法计算的间隔值,来获取对应一定数量的采集点。当然该实施例仅仅是示例性的,本申请对此不做限定。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 less acquisition points should be selected under a small zoom magnification value; conversely, at a large zoom ratio Under the value, the zoom tracking curves of different focus distances are gradually separated, so under the large zoom magnification value, more collection points are selected. That is, the collection points selected in different regions on the reference zoom curve
The quantity is proportional to the value of the zoom ratio corresponding to the center position point of the current area. For the specific sampling diagram, please refer to FIG. 3. For example, in an embodiment of the present application, the interval Tx of the collection point may be set to an inversely proportional to the value of the magnification change of the center of the region, so that the processor in the lens obtains the interval value calculated by the algorithm. Corresponding to a certain number of collection points. The embodiment is of course only exemplary, which is not limited in this application.
需要说明的是,本申请中可以根据所述变倍倍率值的大小将所述参考变倍跟踪曲线分为不同区域。例如,在本申请中将所述参考变倍跟踪曲线分为小倍率区域、中倍率区域和大倍率区域。通过在该参考变倍跟踪曲线上选定第一倍率阈值和第二倍率阈值,当倍率值小于第一倍率阈值时,确定其在小倍率区域;当倍率值大于第二倍率阈值时,确定其在大倍率区域;则其他的则为中倍率区域。It should be noted that, in the present application, the reference zoom tracking curve may be divided into different regions according to the magnitude of the zoom magnification value. For example, the reference zoom tracking curve is divided into a small magnification region, a medium magnification region, and a large magnification region in the present application. By selecting the first magnification threshold and the second magnification threshold on the reference zoom tracking curve, when the magnification value is less than the first magnification threshold, determining that it is in the small magnification region; when the magnification value is greater than the second magnification threshold, determining In the large rate area; the others are the medium rate area.
进一步的,请参见附图1,在本申请的一个实施例方法中,还包括步骤:Further, referring to FIG. 1, in an embodiment of the method, the method further includes the following steps:
S13,基于预设的自动聚焦算法,分别获取该N个采集点中任一采集点在对应变倍倍率值下聚焦估计值达到最大值时的实际聚焦位置值。S13. Acquire, according to a preset autofocus algorithm, an actual focus position value when the focus estimation value reaches a maximum value at the corresponding zoom magnification value of any one of the N collection points.
具体的,在本申请的一个实施例中,所述预设的自动聚焦算法即为常见的爬坡算法,在所述采集点对应的变倍倍率值下驱动聚焦电机移动到不同的聚焦位置值,并获取该聚焦位置值所对应的图像数据;基于该图像数据和预设的聚焦估计值函数,将聚焦估计值最大时的聚焦位置值作为实际聚焦位置值。Specifically, in an embodiment of the present application, the preset autofocus algorithm is a common climbing algorithm, and the focus motor is driven 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; 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 to obtain the current focus position. A frame image of the time, obtains 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 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 present application, the preset focus evaluation value function is:
所述x是指水平高频分量值,y是指垂直高频分量值,本算法是将数据图像所得的当前帧图像数据所有水平x和垂直y的高频能量值进行累加而得
到所述的聚焦估计值。The x refers to the horizontal high-frequency component value, and y refers to the vertical high-frequency component value. The algorithm accumulates the high-frequency energy values of all the horizontal x and vertical y of the current frame image data obtained from the data image.
Go to the focus 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 present application, a plurality of different scene modes are preset, and each of the scene modes has a corresponding zoom magnification value, a light intensity value, a focus evaluation value function, a focus motor step size, and a focus. The judgment criteria for the end. By acquiring the light intensity information, the gain, and the zoom magnification value of the current image data, comparing with the variable 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 Focus motor step size, focus evaluation value function, and focus end judgment criteria in mode.
进一步的,请参见附图1,本申请一个实施例的所述方法还包括步骤:Further, referring to FIG. 1, the method of an embodiment of the present application further includes the following steps:
S14,依据获取的所述N个采集点对应的实际聚焦位置值,完成该参考变倍跟踪曲线的校正。S14. Perform correction of the reference zoom tracking curve according to the obtained actual focus position values corresponding to the N collection points.
进一步的,为了提高该校正曲线的精确度,可以不仅仅只通过该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 collection points, but also by the linear difference method and the correction of any two adjacent pole points. Distance, calculating an actual focus position value of the remaining points between the adjacent two collection points on the reference zoom tracking curve.
例如,在本申请的方法中,还需要获取所述N个采集点中任一采集点在参考变倍跟踪曲线上对应的理论聚焦位置值,并计算所述理论聚焦位置值与实际聚焦位置值之间的校正距离,然后利用线性差值方法及任意相邻两个采集点的校正距离,计算所述参考变倍跟踪曲线上该相邻两个采集点之间的剩余点的实际聚焦位置值。For example, in the method of the present application, it is also required to acquire a theoretical focus position value corresponding to any of the N collection points on the reference zoom tracking curve, and calculate the theoretical focus position value and the actual focus position value. Correcting the distance between the two, and then using the linear difference method and the corrected distance of any two adjacent acquisition points, calculating the actual focus position value of the remaining points between the adjacent two collection points on the reference zoom tracking curve .
具体的,在本申请一个示例性实施例中,分别获取所述N个采集点对应的实际聚焦位置值Focus1zoom【N】和理论聚焦位置值Focus2zoom【N】,并依据该实际聚焦位置值Focus1zoom【N】和理论聚焦位置值Focus2zoom【N】计算对应的校正距离focuszoom【N】,即可得到该N个采集点对应的N个校正距离。例如,在本申请的一个实施例中,所述校正距离的计算算法是:Specifically, in an exemplary embodiment of the present application, the actual focus position value Focus1 zoom[N] and the theoretical focus position value Focus2 zoom[N] corresponding to the N collection points are respectively acquired, 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 one embodiment of the present application, the algorithm for calculating the corrected distance is:
focuszoom【N】=Focus2zoom【N】-Focus1zoom【N】。Focus zoom[N] =Focus2 zoom[N] -Focus1 zoom[N] .
进一步的,可以从N个采集点中选取任意两个相邻的采集点zoom[N]和zoom[N-1],并计算其对应的校正距离focuszoom【N】和focuszoom【N-1】,则该相邻
两个采集点之间的任意变倍倍率值zoom对应的校正距离focuszoom的计算方法是:Further, any two adjacent collection points zoom [N] and zoom [N-1] may be selected from the N collection points, and the corresponding correction distances focus zoom [N] and focus zoom [N-1] may be calculated. ], the calculated correction distance Focus arbitrary zoom magnification corresponding to the zoom magnification value between the two adjacent points are collected:
进一步的,依据参考变倍跟踪曲线,获取该相邻采集点zoom[N]和zoom[N-1]之间的任意变倍倍率值zoom对应的理论对焦位置Focus2zoom,再计算该变倍倍率值zoom对应的实际聚焦位置Focus1zoom:Further, according to the reference zoom tracking curve, the theoretical focus position Focus2 zoom corresponding to the arbitrary zoom magnification value zoom between the adjacent collection points zoom [N] and zoom [N-1] is obtained, and then the zoom ratio is calculated. The actual focus position corresponding to the value zoom is Zoom1 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 the actual situation. Of course, the more the number of samples, the corrected zoom tracking curve. The more precise. Further, the existing reference zoom tracking curve is corrected according to the acquired coordinates of at least N (variable magnification value, actual focus position value).
综上所述,本申请提供了一种变倍跟踪曲线的校正方法,根据当前变倍方向及该变倍方向对应的预设规则,从预存的多条理论变倍跟踪曲线中选定参考变倍跟踪曲线,并在理论的参考变倍跟踪曲线上选定N个不同变倍倍率值的采集点;再依据预设的自动聚焦算法,获取这些采集点对应的变倍倍率值下聚焦估计值达到最大时的实际聚焦位置值,来完成参考变倍跟踪曲线的校正。即本申请能针对于当前变倍方向,采用与该变倍方向对应的预设规则选取参考变倍跟踪曲线,而且通过自动聚焦获取采集点实际聚焦位置,进而通过校正得到每个镜头自身的实际变倍跟踪曲线,从而保证后续在变倍和自动聚焦时随着已经过校正的实际的参考变倍跟踪曲线同步运行,保证整个变倍过程图像都能聚焦清楚。In summary, the present application provides a method for correcting a zoom tracking curve, and selecting a reference variable from a plurality of pre-stored theoretical zoom tracking curves according to a current zoom direction and a preset rule corresponding to the zoom direction. The tracking curve is multiplied, and N collection points of different zoom magnification values are selected on the theoretical reference zoom tracking curve; and the focus estimation values of the zoom magnification values corresponding to the collected points are obtained according to the preset autofocus algorithm. The actual focus position value at the maximum is reached to complete the correction of the reference zoom tracking curve. That is, the present application can select a reference zoom tracking curve by using a preset rule corresponding to the zoom direction for the current zoom direction, and obtain the actual focus position of the collection point by auto focus, and then obtain the actual of each lens itself by correction. The zoom tracking curve is used to ensure that the actual reference zoom tracking curve that has been corrected is synchronized in the subsequent zoom and auto focus, ensuring that the entire zoom process image can be focused clearly.
基于计算机的模块化思维,本申请还提供了一种变倍跟踪曲线校正装置,请参见附图4,其包括有参考曲线选取模块11、取样模块12、实际值获取模块13和校正模块14。需要说明的是,本申请所述装置是应用于具备变倍、自动聚焦功能的相机或摄像机。当然,本申请所述装置也可应用于具有变倍、自动聚焦功能的手机、PAD、便携式多媒体播放器(PMP)、TV等设备。为方便说明,本申请实施例以数字摄像机为例来示例性说明其具体实施方式,但是该实施例并不能构成对本申请的限制。以下具体揭示各模块实
现的具体功能。Based on the modular thinking of the computer, the present application also provides a zoom tracking curve correction device. Referring to FIG. 4, the reference curve selection module 11, the sampling module 12, the actual value acquisition module 13, and the correction module 14 are included. It should be noted that the device described in the present application is applied to a camera or a camera having a zooming and autofocus function. Of course, the device described in the present application 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 application exemplifies a specific embodiment thereof by using a digital camera as an example, but the embodiment does not constitute a limitation of the present application. The following specifically reveals the various modules.
The specific function now.
所述参考曲线选取模块11,用于根据变倍方向及其对应的预设规则,从预存的至少两条聚焦距离不同的变倍跟踪曲线中选定参考变倍跟踪曲线,以依据该参考变倍跟踪曲线驱动变倍电机和聚焦电机同步转动。The reference curve selection module 11 is configured to select a reference zoom tracking curve from the pre-stored at least two zoom tracking curves with different focus distances according to the zoom direction and the corresponding preset rule, according to the reference variable The double tracking curve drives the zoom motor and the focus motor to rotate synchronously.
需要说明的是,有必要对所述的变倍跟踪曲线进行先导性说明。不难理解,在镜头中预先输入有至少两条聚焦距离不同的变倍跟踪曲线,请参照附图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 focus distances in the present scheme are 3 meters, 6 meters, 10 meters, and infinity respectively. The zoom tracking curve is taken as an example. 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. The distance is getting bigger and bigger. This shows that when the zoom motor position is at a small zoom factor value, the focus position of the motor does not change much as the distance of the object from the lens changes, but at a high zoom ratio, the object distance changes greatly, focusing. The motor position also has a large deviation. Therefore, in the lens zooming process, first select a reference zoom tracking curve that best matches the current focus distance.
不难理解,所述至少两条聚焦距离不同的变倍跟踪曲线是预先输入到摄像镜头并存储,例如可以预先存储在存储介质中,其中所述存储介质可以是同步动态随机存取存储器(SDRAM)、多芯片封装(MCP)存储器或动态随机存取存储器(DRAM)。It is not difficult to understand that the at least two zoom tracking curves having different focus distances are input to the image pickup lens in advance and stored, 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).
具体的,参照前述参考变倍跟踪曲线的不同特点,不难知道,变倍电机是从小倍率转向大倍率,还是从大倍率转向小倍率,两种情况下由于变倍跟踪曲线的特点,所述参考曲线选取模块11选定所述参考变倍跟踪曲线的规则也应该相应不同,才能保证所述参考变倍跟踪曲线的选取精度。因此本实施例中,所述参考曲线选取模块11还需要根据当前变倍电机的变倍方向,来确定对应的参考变倍跟踪曲线的选取规则。Specifically, referring to the different characteristics of the aforementioned reference zoom tracking curve, it is not difficult to know whether the variable power motor shifts from a small magnification to a large magnification or a large magnification to a small magnification. In both cases, due to the characteristics of the zoom tracking curve, The rules for selecting the reference zoom tracking curve by the reference curve selection module 11 should also be different, so as to ensure the selection precision of the reference zoom tracking curve. Therefore, in the embodiment, the reference curve selection module 11 further needs to determine a selection rule of the corresponding reference zoom tracking curve according to the zoom direction of the current zoom motor.
具体的,在本申请的一个实施例中,所述参考曲线选取模块11中还包括有第一选取单元。所述第一选取单元,用于在当前变倍电机的变倍方向为小倍率转向大倍率时,驱动聚焦电机获取当前变倍倍率值在每条变倍跟踪曲线中对应的聚焦位置及对应的聚焦评价值,确定聚焦评价值最大的聚焦位置
所在的变倍跟踪曲线为所述参考变倍跟踪曲线。Specifically, in an embodiment of the present application, the reference curve selection module 11 further includes a first selection unit. The first selecting unit is configured to drive the focus motor to obtain a current zoom magnification value corresponding to a focus position in each zoom tracking curve when the zoom direction of the current zoom motor is a small magnification to a large magnification. Focusing on the evaluation value to determine the focus position where the focus evaluation value is the largest
The zoom tracking curve is the reference zoom tracking curve.
不难理解,从附图2中可以看出,当变倍电机处于小倍率范围时,其对应的多条不同聚焦距离的变倍跟踪曲线基本重合,即同一变倍倍率值在不同聚焦距离的变倍跟踪曲线对应的聚焦位置几乎相同,因此在该变倍方向下,获取当前聚焦电机位置和变倍电机位置,得到当前聚焦位置值和当前变倍倍率值,然后通过获取当前变倍倍率值在每条变倍跟踪曲线中对应的聚焦位置,但是在小倍率下无法比较聚焦位置与当前聚焦位置的相近程度,因此该方式无法获取参考变倍跟踪曲线。具体的,在本申请中,所述第一选取单元通过驱动聚焦电机获取当前变倍倍率值在每条变倍跟踪曲线中的聚焦位置后,基于预设的聚焦估计值函数,计算每个聚焦位置的聚焦评价值,从而所述第一选取单元确定聚焦评价值最大的聚焦位置所在的变倍跟踪曲线为所述参考变倍跟踪曲线。It is not difficult to understand that, as can be seen from FIG. 2, when the variable power motor is in the small magnification range, the corresponding multiple zoom tracking curves of different different focus distances substantially coincide, that is, the same zoom magnification value is at different focus distances. The focus position corresponding to the zoom tracking curve is almost the same, so in the zoom direction, the current focus motor position and the zoom motor position are obtained, the current focus position value and the current zoom ratio value are obtained, and then the current zoom ratio value is obtained. The corresponding focus position in each zoom tracking curve, but at a small magnification, the focus position cannot be compared with the current focus position, so the reference zoom curve cannot be obtained in this way. Specifically, in the present application, after the first selecting unit obtains the focus position of the current zoom magnification value in each zoom tracking curve by driving the focus motor, each focus is calculated based on the preset focus estimation value function. The focus evaluation value of the position, so that the zooming curve in which the first selecting unit determines the focus position at which the focus evaluation value is the largest is the reference zoom tracking curve.
具体的,在本申请的一个实施例中,所述参考曲线选取模块中还包括有第二选取单元。所述第二选取单元,用于在当前变倍电机的变倍方向为大倍率转向小倍率时,获取聚焦电机的当前聚焦位置;然后获取当前变倍倍率值在每条变倍跟踪曲线中对应的聚焦位置,确定聚焦位置与当前聚焦位置最接近的变倍跟踪曲线为所述参考变倍跟踪曲线。Specifically, in an embodiment of the present application, the reference curve selection module further includes a second selection unit. The second selecting unit is configured to acquire a current focus position of the focus motor when the zoom direction of the current zoom motor is a large magnification to a small magnification; and then obtain a current zoom magnification value corresponding to each zoom tracking curve. The focus position, the zoom tracking curve that determines the closest focus position to the current focus position is the reference zoom tracking curve.
不难理解,从附图2中可以看出,当变倍电机处于大倍率范围时,不同聚焦距离的变倍跟踪曲线逐渐分开,距离相差越来越大。即同一变倍倍率值在不同聚焦距离的变倍跟踪曲线对应的聚焦位置相差较大,因此在该变倍方向下,所述第二选取单元获取当前聚焦电机位置和变倍电机位置,得到当前聚焦位置值和当前变倍倍率值,然后通过获取当前变倍倍率值在每条变倍跟踪曲线中对应的聚焦位置,所述第二选取单元再通过比较聚焦位置与当前聚焦位置的相近程度,确定聚焦位置与当前聚焦位置最接近的变倍跟踪曲线为所述参考变倍跟踪曲线。It is not difficult to understand that, as can be seen from FIG. 2, when the variable power motor is in the large magnification range, the zoom tracking curves of different focus distances are gradually separated, and the distance difference is larger and larger. That is, the same zoom factor value has a large difference in the focus position corresponding to the zoom tracking curve of different focus distances, so in the zoom direction, the second selecting unit acquires the current focus motor position and the zoom motor position, and obtains the current Focusing the position value and the current zoom magnification value, and then obtaining the current zoom magnification value in the corresponding focus position in each zoom tracking curve, and the second selecting unit compares the focus position to the current focus position by comparing the focus position, The zoom tracking curve that determines the closest focus position to the current focus position is the reference zoom tracking curve.
不难理解,本申请所述参考曲线选取模块11能针对于当前变倍方向,采用与该变倍方向对应的预设规则选取参考变倍跟踪曲线,从而保证了变倍跟踪曲线选取的精确度。It is not difficult to understand that the reference curve selection module 11 of the present application can select the reference zoom tracking curve by using a preset rule corresponding to the zoom direction for the current zoom direction, thereby ensuring the accuracy of the zoom tracking curve selection. .
进一步的,所述取样模块12,用于在参考变倍跟踪曲线上选定N个对
应于不同变倍倍率值的采集点。Further, the sampling module 12 is configured to select N pairs on the reference zoom tracking curve.
Should be at the collection point of different zoom ratio values.
不难理解,前述所述参考曲线选取模块11中选择了最接近的一条变倍跟踪曲线作为参考变倍跟踪曲线。进一步的,所述取样模块12还需要在该参考变倍跟踪曲线上选定N个采集点,该N个采集点对应于不同的变倍倍率值。It is not difficult to understand that the closest one of the reference curve selection modules 11 is selected as the reference zoom tracking curve. Further, the sampling module 12 further needs to select N collection points on the reference zoom tracking curve, and the N collection points correspond to different zoom magnification values.
不难理解,在小的变倍倍率值下,不同聚焦距离的变倍跟踪曲线重合度高,所述取样模块12应该在小的变倍倍率值下,选取较少的采集点;反之,在大的变倍倍率值下,不同聚焦距离的变倍跟踪曲线之间逐渐分开,因此所述取样模块12在大的变倍倍率值下,选择较多的采集点。即在参考变倍跟踪曲线上不同区域选取的采集点的数量,与当前区域的中心位置点对应的变倍倍率值成正比,具体的取样示意图请参见附图3。例如,在本申请的一个实施例中,所述取样模块12可以将采集点的间隔Tx设定为与该区域中心的变倍倍率值成反比的算法,使得镜头中处理器依据该算法计算的间隔值,来获取对应一定数量的采集点。当然该实施例仅仅是示例性的,本申请对此不做限定。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 12 should select fewer acquisition points under a small zoom magnification value; Under the large zoom ratio value, the zoom tracking curves of different focus distances are gradually separated, so the sampling module 12 selects more collection points under the large zoom magnification value. That is, the number of collection points selected in different regions on the reference zoom tracking curve is proportional to the value of the zoom magnification corresponding to the central position point of the current region. For a specific sampling diagram, please refer to FIG. For example, in an embodiment of the present application, the sampling module 12 may set an interval Tx of the collection point to an algorithm that is inversely proportional to the value of the magnification of the center of the region, so that the processor in the lens calculates according to the algorithm. The interval value is used to obtain a corresponding number of collection points. The embodiment is of course only exemplary, which is not limited in this application.
需要说明的是,本申请中所述取样模块12可以根据所述变倍倍率值的大小将所述参考变倍跟踪曲线分为不同区域。例如,在本申请中将所述参考变倍跟踪曲线分为小倍率区域、中倍率区域和大倍率区域。所述取样模块12通过在该参考变倍跟踪曲线上选定第一倍率阈值和第二倍率阈值,当倍率值小于第一倍率阈值时,所述取样模块12确定其在小倍率区域;当倍率值大于第二倍率阈值时,所述取样模块12确定其在大倍率区域;则其他的则为中倍率区域。It should be noted that the sampling module 12 in the present application may divide the reference zoom tracking curve into different regions according to the magnitude of the zoom ratio value. For example, the reference zoom tracking curve is divided into a small magnification region, a medium magnification region, and a large magnification region in the present application. The sampling module 12 selects a first magnification threshold and a second magnification threshold on the reference zoom tracking curve, and when the magnification value is less than the first magnification threshold, the sampling module 12 determines that it is in a small magnification region; When the value is greater than the second magnification threshold, the sampling module 12 determines that it is in the large magnification region; the others are the medium magnification region.
所述实际值获取模块13,用于基于预设的自动聚焦算法,分别获取该N个采集点中任一采集点在对应变倍倍率值下聚焦估计值达到最大值时的实际聚焦位置值。The actual value obtaining module 13 is configured to acquire, according to a preset auto-focusing algorithm, an actual focus position value when the focus estimation value of the N points of the N collection points reaches a maximum value under the corresponding zoom ratio value.
具体的,在本申请的一个实施例中,所述预设的自动聚焦算法即为常见的爬坡算法,所述实际值获取模块13在所述采集点对应的变倍倍率值下驱动聚焦电机移动到不同的聚焦位置值,并获取该聚焦位置值所对应的图像数据;所述实际值获取模块13基于该图像数据和预设的聚焦估计值函数,将
聚焦估计值最大时的聚焦位置值作为实际聚焦位置值。Specifically, in an embodiment of the present application, the preset auto-focusing algorithm is a common climbing algorithm, and the actual value acquiring module 13 drives the focusing motor under the zoom factor value corresponding to the collecting point. Moving to different focus position values, and acquiring image data corresponding to the focus position value; the actual value acquisition module 13 based on the image data and a preset focus estimation value function,
The focus position value at which the estimated value is maximum is taken as the actual focus position value.
具体的,所述实际值获取模块13在所述采集点对应的变倍倍率值下,驱动聚焦电机微调以改变镜头与所拍对象之间的距离,且基于一定的时间或可变步长停止该镜头,获取当前聚焦位置时的一帧图像,获取该图像数据沿着水平X和垂直Y的高频分量,然后所述实际值获取模块13基于预设的聚焦估计值函数,计算该帧图像的聚焦评估值。重复执行上述操作,直到所述实际值获取模块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 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 then the actual value acquisition module 13 calculates the frame image based on the preset focus estimation value function. Focus evaluation value. 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 present application, the preset focus evaluation value function is:
所述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 present application, a plurality of different scene modes are preset in the camera lens, and each of the scene modes has a corresponding zoom magnification value, a light intensity value, a focus evaluation value function, and a focus. Motor step size and criteria for judging the end of focus. The actual value obtaining module 13 compares the light intensity information, the gain, and the zoom magnification value of the current image data with the zoom ratio value, the gain, and the light intensity information value in the preset plurality of scene modes to select the best match. The scene mode acquires the focus motor step size, the focus evaluation value function, and the focus end judgment criterion in the scene mode.
进一步的,所述校正模块14,用于依据获取的所述N个采集点对应的实际聚焦位置值,完成该参考变倍跟踪曲线的校正。Further, the correction module 14 is configured to complete the correction of the reference zoom tracking curve according to the obtained actual focus position values corresponding to the N collection points.
进一步的,为了提高该校正曲线的精确度,所述校正模块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 collection points, but also the linear difference method and any adjacent two. The correction distance of the poles 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.
例如,在本申请的装置中还包括有实际值获取模块和第二取样单元。所述实际值获取模块,用于获取所述N个采集点中任一采集点在参考变倍跟踪
曲线上对应的理论聚焦位置值,并计算所述理论聚焦位置值与实际聚焦位置值之间的校正距离。然后通过所述第二取样单元利用线性差值方法及任意相邻两个采集点的校正距离,计算所述参考变倍跟踪曲线上该相邻两个采集点之间的剩余点的实际聚焦位置值。For example, the device of the present application further includes an actual value acquisition module and a second sampling unit. The actual value obtaining module is configured to acquire any one of the N collection points in a reference zoom tracking
A corresponding theoretical focus position value on the curve, and a correction distance between the theoretical focus position value and the actual focus position value is calculated. And calculating, by the second sampling unit, the actual focus position of the remaining points between the adjacent two collection points on the reference zoom tracking curve by using the linear difference method and the corrected distance of any two adjacent collection points. value.
具体的,在本申请一个示例性实施例中,所述实际值获取模块13和理论值获取模块分别获取所述N个采集点对应的实际聚焦位置值Focus1zoom【N】和理论聚焦位置值Focus2zoom【N】,并通过所述理论值获取模块依据该实际聚焦位置值Focus1zoom【N】和理论聚焦位置值Focus2zoom【N】计算对应的校正距离focuszoom【N】,即可得到该N个采集点对应的N个校正距离。例如,在本申请的一个实施例中,所述校正距离的计算算法是:Specifically, in an exemplary embodiment of the present application, the actual value obtaining module 13 and the theoretical value acquiring module respectively acquire the actual focus position value Focus1 zoom [N] and the theoretical focus position value Focus2 corresponding to the N collection points. zoom [N], and acquires the actual focusing module according to the zoom position value Focus1 [N] and the theoretical value obtained by the focus position of the zoom Focus2 are theoretical values corresponding to [N] calculated correction distance focus zoom [N], to obtain the N N correction distances corresponding to the collection points. For example, in one embodiment of the present application, the algorithm for calculating the corrected distance is:
focuszoom【N】=Focus2zoom【N】-Focus1zoom【N】。Focus zoom[N] =Focus2 zoom[N] -Focus1 zoom[N] .
进一步的,所述第二取样单元可以从N个采集点中选取任意两个相邻的采集点zoom[N]和zoom[N-1],并计算其对应的校正距离focuszoom【N】和focuszoom
【N-1】,则该相邻两个采集点之间的任意变倍倍率值zoom对应的校正距离focuszoom的计算方法是:Further, the second sampling unit may select any two adjacent collection points zoom [N] and zoom [N-1] from the N collection points, and calculate a corresponding correction distance focus zoom [N] and Focus zoom [N-1], the calculated correction distance Focus arbitrary zoom magnification corresponding to the zoom magnification value between the two adjacent points are collected:
进一步的,依据参考变倍跟踪曲线,通过理论值获取模块获取该相邻采集点zoom[N]和zoom[N-1]之间的任意变倍倍率值zoom对应的理论对焦位置Focus2zoom,再通过第二取样单元计算该变倍倍率值zoom对应的实际聚焦位置Focus1zoom:Further, according to the reference zoom tracking curve, the theoretical focus acquiring module acquires the theoretical focus position Focus2 zoom corresponding to the arbitrary zoom magnification value zoom between the adjacent collection points zoom [N] and zoom [N-1] , and then Calculating the actual focus position Focus1 zoom corresponding to the zoom ratio value zoom by the second sampling unit:
Focus1zoom=focuszoom+Focus2zoom
Focus1 zoom = focus zoom +Focus2 zoom
依据上述方法,所述第二取样单元即可以获取任意相邻两个采集点之间的剩余点的实际聚焦位置值,具体的取样数目可根据实际情况来定,当然,取样数目越多,校正得到的变倍跟踪曲线越精确。进一步的,所述校正模块14依据获取的至少N个(变倍倍率值,实际聚焦位置值)的坐标,对现存的参考变倍跟踪曲线实现校正。According to the above method, the second sampling unit can obtain the actual focus position value of the remaining points between any two adjacent collection points, and the specific number of samples can be determined according to actual conditions. Of course, the more the number of samples, the correction The more accurate the resulting zoom tracking curve is. Further, the correction module 14 performs correction on the existing reference zoom tracking curve according to the acquired coordinates of at least N (variable magnification value, actual focus position value).
综上所述,本申请提供了一种变倍跟踪曲线的校正装置,根据当前变倍方向及该变倍方向对应的预设规则,通过参考曲线选取模块11从预存的多
条理论变倍跟踪曲线中选定参考变倍跟踪曲线,并通过取样模块12在理论的参考变倍跟踪曲线上选定N个不同变倍倍率值的采集点;再依据预设的自动聚焦算法,实际值获取模块13获取这些采集点对应的变倍倍率值下聚焦估计值达到最大时的实际聚焦位置值,再通过校正模块14来完成参考变倍跟踪曲线的校正。即本申请能针对于当前变倍方向,采用与该变倍方向对应的预设规则选取参考变倍跟踪曲线,而且通过自动聚焦获取采集点实际聚焦位置,进而通过校正得到每个镜头自身的实际变倍跟踪曲线,从而保证后续在变倍和自动聚焦时随着已经过校正的实际的参考变倍跟踪曲线同步运行,保证整个变倍过程图像都能聚焦清楚。In summary, the present application provides a correction device for a zoom tracking curve, which is pre-stored by the reference curve selection module 11 according to the current zoom direction and the preset rule corresponding to the zoom direction.
The selected reference zoom tracking curve is selected in the theoretical zoom tracking curve, and N sampling points of different zoom magnification values are selected by the sampling module 12 on the theoretical reference zoom curve; and then the preset auto focus algorithm is adopted. The actual value obtaining module 13 obtains the actual focus position value when the focus estimation value reaches the maximum under the zoom magnification value corresponding to the collected points, and then completes the correction of the reference zoom tracking curve by the correction module 14. That is, the present application can select a reference zoom tracking curve by using a preset rule corresponding to the zoom direction for the current zoom direction, and obtain the actual focus position of the collection point by auto focus, and then obtain the actual of each lens itself by correction. The zoom tracking curve is used to ensure that the actual reference zoom tracking curve that has been corrected is synchronized in the subsequent zoom and auto focus, ensuring that the entire zoom process image can be focused clearly.
本申请的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本申请实施例的变倍跟踪曲线的校正装置中的一些或者全部部件的一些或者全部功能。本申请还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本申请的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present application can 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 some or all of the functionality of some or all of the components of the correction device for the zoom tracking curve in accordance with embodiments of the present application may be implemented in practice using a microprocessor or digital signal processor (DSP). . The application can 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 the present application 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.
例如,图5示出了可以实现根据本申请的变倍跟踪曲线的校正装置,例如电脑、移动设备、手机、PAD、便携式多媒体播放器(PMP)、TV等设备。该电子设备传统上包括处理器510和以存储器520形式的计算机程序产品或者计算机可读介质。存储器520可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器520具有用于执行上述方法中的任何方法步骤的程序代码531的存储空间530。例如,用于程序代码的存储空间530可以包括分别用于实现上面的方法中的各种步骤的各个程序代码531。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图6所述的便携式或者固定
存储单元。该存储单元可以具有与图5的电子设备中的存储器520类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码531’,即可以由例如诸如510之类的处理器读取的代码,这些代码当由电子设备运行时,导致该电子设备执行上面所描述的方法中的各个步骤。For example, FIG. 5 illustrates a correction device that can implement a zoom tracking curve in accordance with the present application, such as a computer, mobile device, cell phone, PAD, portable multimedia player (PMP), TV, and the like. The electronic device conventionally includes a processor 510 and a computer program product or computer readable medium in the form of a memory 520. The memory 520 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM. Memory 520 has a memory space 530 for program code 531 for performing any of the method steps described above. For example, storage space 530 for program code may include various program code 531 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 computer program products are typically portable or fixed as described with reference to Figure 6.
Storage unit. The storage unit may have a storage section, a storage space, and the like arranged similarly to the storage 520 in the electronic device of FIG. The program code can be compressed, for example, in an appropriate form. Typically, the storage unit comprises computer readable code 531 'is a code readable by a processor, such as 510, which when executed by an electronic device causes the electronic device to perform each of the methods described above step.
在此处所提供的说明书中,虽然说明了大量的具体细节。然而,能够理解,本申请的实施例可以在没有这些具体细节的情况下实践。在一些实施例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that the embodiments of the present application 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.
应该注意的是上述实施例对本申请进行说明而不是对本申请进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本申请可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-described embodiments are illustrative of the present application and are not intended to limit the scope of the application, 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" The application can 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 specification has been selected for the purpose of readability and teaching, and is not intended to be interpreted or limited. 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 present application is intended to be illustrative, and not restrictive, and the scope of the application is defined by the appended claims.
Claims (22)
- 一种变倍跟踪曲线的校正方法,其特征在于,包括有:A method for correcting a zoom tracking curve, comprising:根据变倍方向及其对应的预设规则,从预存的至少两条聚焦距离不同的变倍跟踪曲线中选定参考变倍跟踪曲线,以依据该参考变倍跟踪曲线驱动变倍电机和聚焦电机同步转动;According to the zoom direction and the corresponding preset rule, the reference zoom curve is selected from the pre-stored zoom curves with different focus distances to drive the zoom motor and the focus motor according to the reference zoom curve. Synchronous rotation在参考变倍跟踪曲线上选定N个对应于不同变倍倍率值的采集点;Selecting N collection points corresponding to different zoom magnification values on the reference zoom tracking curve;基于预设的自动聚焦算法,分别获取该N个采集点中任一采集点在对应变倍倍率值下聚焦估计值达到最大值时的实际聚焦位置值;Obtaining, according to a preset auto-focusing algorithm, an actual focus position value when the focus estimation value reaches a maximum value at a corresponding zoom magnification value of any one of the N collection points;依据获取的所述N个采集点对应的实际聚焦位置值,完成该参考变倍跟踪曲线的校正。The correction of the reference zoom tracking curve is completed according to the obtained actual focus position values corresponding to the N collection points.
- 根据权利要求1所述的方法,其特征在于,所述根据变倍方向及其对应的预设规则,从预存的至少两条聚焦距离不同的变倍跟踪曲线中选定参考变倍跟踪曲线的步骤中,包括:The method according to claim 1, wherein the selecting a reference zoom curve from the pre-stored at least two zoom tracking curves having different focus distances according to the zoom direction and its corresponding preset rule The steps include:当所述变倍方向为小倍率转向大倍率时,驱动聚焦电机获取当前变倍倍率值在每条变倍跟踪曲线中对应的聚焦位置及对应的聚焦评价值,确定聚焦评价值最大的聚焦位置所在的变倍跟踪曲线为所述参考变倍跟踪曲线。When the zoom direction is a small magnification to a large magnification, the focus motor is driven to obtain a corresponding focus position and a corresponding focus evaluation value of the current zoom magnification value in each zoom tracking curve, and the focus position with the largest focus evaluation value is determined. The zoom tracking curve is the reference zoom tracking curve.
- 根据权利要求1所述的方法,其特征在于,所述根据变倍方向及其对应的预设规则,从预存的至少两条聚焦距离不同的变倍跟踪曲线中选定参考变倍跟踪曲线的步骤中,包括:The method according to claim 1, wherein the selecting a reference zoom curve from the pre-stored at least two zoom tracking curves having different focus distances according to the zoom direction and its corresponding preset rule The steps include:当所述变倍方向为大倍率转向小倍率时,获取聚焦电机的当前聚焦位置;Obtaining a current focus position of the focus motor when the zoom direction is a large magnification to a small magnification;获取当前变倍倍率值在每条变倍跟踪曲线中对应的聚焦位置,确定聚焦位置与当前聚焦位置最接近的变倍跟踪曲线为所述参考变倍跟踪曲线。Obtaining a current zoom magnification value corresponding to a focus position in each zoom tracking curve, and determining a zoom tracking curve whose focus position is closest to the current focus position is the reference zoom tracking curve.
- 根据权利要求1所述的方法,其特征在于,所述在参考变倍跟踪曲线上选定N个对应于不同变倍倍率值的采集点的步骤中,包括:The method according to claim 1, wherein the step of selecting N collection points corresponding to different zoom magnification values on the reference zoom tracking curve comprises:在参考变倍跟踪曲线上不同区域选取的采集点的数量,与当前区域的中心位置点对应的变倍倍率值成正比。The number of collection points selected in different regions on the reference zoom tracking curve is proportional to the value of the zoom magnification corresponding to the center position point of the current region.
- 根据权利要求4所述的方法,其特征在于:根据所述变倍倍率值的大小将所述参考变倍跟踪曲线分为不同区域。The method according to claim 4, wherein the reference zoom tracking curve is divided into different regions according to the magnitude of the zoom factor value.
- 根据权利要求1所述的方法,其特征在于,还包括步骤:获取该N 个采集点中任一采集点在参考变倍跟踪曲线上对应的理论聚焦位置值,并计算所述理论聚焦位置值与实际聚焦位置值之间的校正距离。The method of claim 1 further comprising the step of: obtaining the N The theoretical focus position value corresponding to any of the collection points on the reference zoom curve is calculated, and the correction distance between the theoretical focus position value and the actual focus position value is calculated.
- 根据权利要求6所述的方法,其特征在于:所述校正距离为所述理论聚焦位置值与实际聚焦位置值之间的差值。The method of claim 6 wherein said corrected distance is a difference between said theoretical focus position value and an actual focus position value.
- 根据权利要求6所述的方法,其特征在于,还包括步骤:利用线性差值方法及任意相邻两个采集点的校正距离,计算所述参考变倍跟踪曲线上该相邻两个采集点之间的剩余点的实际聚焦位置值。The method according to claim 6, further comprising the step of: calculating the adjacent two collection points on the reference zoom tracking curve by using a linear difference method and a corrected distance of any two adjacent acquisition points The actual focus position value between the remaining points.
- 根据权利1所述的方法,其特征在于,所述基于预设的自动聚焦算法,分别获取该N个采集点中任一采集点在变倍倍率值下聚焦估计值达到最大值时的实际聚焦位置值的步骤中,还包括:The method according to claim 1, wherein the acquiring the actual focus when the focus estimation value reaches a maximum value at any of the N collection points based on the preset auto-focus algorithm The step of location value also includes:基于预设的爬坡算法,在该采集点对应的变倍倍率值下驱动聚焦电机移动到不同的聚焦位置值,并获取该聚焦位置值所对应的图像数据;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.
- 根据权利要求9所述的方法,其特征在于:所述预设的聚焦估计值函数与图像数据所对应的场景相关联,其中所述场景通过预设的场景识别算法来识别获得。The method according to claim 9, wherein the preset focus estimation function is associated with a scene corresponding to the image data, wherein the scene is identified by a preset scene recognition algorithm.
- 一种变倍跟踪曲线的校正装置,其特征在于,包括有:A calibration device for a zoom tracking curve, comprising:参考曲线选取模块,用于根据变倍方向及其对应的预设规则,从预存的至少两条聚焦距离不同的变倍跟踪曲线中选定参考变倍跟踪曲线,以依据该参考变倍跟踪曲线驱动变倍电机和聚焦电机同步转动;a reference curve selection module, configured to select a reference zoom curve from the pre-stored at least two zoom tracking curves with different focus distances according to the zoom direction and the corresponding preset rule, according to the reference zoom curve Driving the zoom motor and the focus motor to rotate synchronously;取样模块,用于在参考变倍跟踪曲线上选定N个对应于不同变倍倍率值的采集点;a sampling module, configured to select N collection points corresponding to different zoom magnification values on the reference zoom curve;实际值获取模块,用于基于预设的自动聚焦算法,分别获取该N个采集点中任一采集点在对应变倍倍率值下聚焦估计值达到最大值时的实际聚焦位置值;An actual value obtaining module, configured to acquire, according to a preset auto-focusing algorithm, an actual focus position value when a focus estimation value of the N collection points reaches a maximum value at a corresponding zoom ratio value;校正模块,用于依据获取的所述N个采集点对应的实际聚焦位置值,完成该参考变倍跟踪曲线的校正。And a correction module, configured to complete the correction of the reference zoom tracking curve according to the obtained actual focus position values corresponding to the N collection points.
- 根据权利要求11所述的装置,其特征在于:所述参考曲线选取模块中还包括有第一选取单元,The apparatus according to claim 11, wherein the reference curve selection module further comprises a first selection unit,所述第一选取单元,用于当所述变倍方向为小倍率转向大倍率时,驱动聚焦电机获取当前变倍倍率值在每条变倍跟踪曲线中对应的聚焦位置及 对应的聚焦评价值,确定聚焦评价值最大的聚焦位置所在的变倍跟踪曲线为所述参考变倍跟踪曲线。The first selecting unit is configured to drive the focus motor to obtain a current zoom magnification value corresponding to a focus position in each zoom tracking curve when the zoom direction is a small magnification to a large magnification Corresponding focus evaluation value, the zoom tracking curve at which the focus position where the focus evaluation value is the largest is determined as the reference zoom tracking curve.
- 根据权利要求11所述的装置,其特征在于:所述参考曲线选取模块中还包括有第二选取单元,The device according to claim 11, wherein the reference curve selection module further comprises a second selection unit.所述第二选取单元,用于当所述变倍方向为大倍率转向小倍率时,获取聚焦电机的当前聚焦位置;The second selecting unit is configured to acquire a current focus position of the focus motor when the zoom direction is a large magnification to a small magnification;获取当前变倍倍率值在每条变倍跟踪曲线中对应的聚焦位置,确定聚焦位置与当前聚焦位置最接近的变倍跟踪曲线为所述参考变倍跟踪曲线。Obtaining a current zoom magnification value corresponding to a focus position in each zoom tracking curve, and determining a zoom tracking curve whose focus position is closest to the current focus position is the reference zoom tracking curve.
- 根据权利要求11所述的装置,其特征在于:所述取样模块还用于在参考变倍跟踪曲线上不同区域选取的采集点的数量,与当前区域的中心位置点对应的变倍倍率值成正比。The apparatus according to claim 11, wherein the sampling module is further configured to use the number of collection points selected in different regions on the reference zoom tracking curve, and the zoom magnification value corresponding to the central position point of the current region is Just proportional.
- 根据权利要求14所述的装置,其特征在于:所述取样模块还用于根据所述变倍倍率值的大小将所述参考变倍跟踪曲线分为不同区域。The apparatus according to claim 14, wherein the sampling module is further configured to divide the reference zoom tracking curve into different regions according to the magnitude of the zoom factor value.
- 根据权利要求11所述的装置,其特征在于:还包括有理论值获取模块,The device according to claim 11, further comprising a theoretical value acquisition module,所述理论值获取模块,还用于获取该N个采集点中任一采集点在参考变倍跟踪曲线上对应的理论聚焦位置值,并计算所述理论聚焦位置值与实际聚焦位置值之间的校正距离。The theoretical value obtaining module is further configured to acquire a theoretical focus position value corresponding to any of the N collection points on the reference zoom tracking curve, and calculate between the theoretical focus position value and the actual focus position value. Correction distance.
- 根据权利要求16所述的装置,其特征在于:所述校正距离为所述理论聚焦位置值与实际聚焦位置值之间的差值。The apparatus according to claim 16, wherein said correction distance is a difference between said theoretical focus position value and an actual focus position value.
- 根据权利要求16所述的装置,其特征在于:还包括有第二取样单元,The device according to claim 16, further comprising a second sampling unit,所述第二取样单元,用于利用线性差值方法及任意相邻两个采集点的校正距离,计算所述参考变倍跟踪曲线上该相邻两个采集点之间的剩余点的实际聚焦位置值。The second sampling unit is configured to calculate a real focus of the remaining points between the adjacent two collection points on the reference zoom tracking curve by using a linear difference method and a correction distance of any two adjacent collection points Location value.
- 根据权利11所述的装置,其特征在于,所述实际值获取模块还用于:The device according to claim 11, wherein the actual value acquisition module is further configured to:基于预设的爬坡算法,在该采集点对应的变倍倍率值下驱动聚焦电机移动到不同的聚焦位置值,并获取该聚焦位置值所对应的图像数据;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.
- 根据权利要求19所述的装置,其特征在于:所述预设的聚焦估计 值函数与图像数据所对应的场景相关联,其中所述场景通过预设的场景识别算法来识别获得。The apparatus according to claim 19, wherein said predetermined focus estimate The value function is associated with a scene corresponding to the image data, wherein the scene is identified by a preset scene recognition algorithm.
- 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备上运行时,导致所述电子设备执行根据权利要求1-10中的任一个所述的变倍跟踪曲线的校正方法。A computer program comprising computer readable code causing the electronic device to perform correction of a zoom tracking curve according to any one of claims 1-10 when the computer readable code is run on an electronic device method.
- 一种计算机可读介质,其中存储了如权利要求21所述的计算机程序。 A computer readable medium storing the computer program of claim 21.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510982783.2 | 2015-12-23 | ||
CN201510982783.2A CN105554387A (en) | 2015-12-23 | 2015-12-23 | Zoom tracking curve correction method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017107770A1 true WO2017107770A1 (en) | 2017-06-29 |
Family
ID=55833305
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/108870 WO2017107770A1 (en) | 2015-12-23 | 2016-12-07 | Method and device for correcting zoom tracking curve |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105554387A (en) |
WO (1) | WO2017107770A1 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108924415A (en) * | 2018-06-27 | 2018-11-30 | 亿嘉和科技股份有限公司 | The method that consistency calibration is carried out to zoom camera individual focussing disparity |
CN110830710A (en) * | 2018-08-14 | 2020-02-21 | 高新兴科技集团股份有限公司 | Focusing method of super-long focal length lens |
CN112135055A (en) * | 2020-09-27 | 2020-12-25 | 苏州科达科技股份有限公司 | Zoom tracking method, device, equipment and storage medium |
CN114666504A (en) * | 2022-03-23 | 2022-06-24 | 普联技术有限公司 | Method and device for calibrating zoom tracking curve and electronic equipment |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105554387A (en) * | 2015-12-23 | 2016-05-04 | 北京奇虎科技有限公司 | Zoom tracking curve correction method and device |
CN106507102B (en) * | 2016-11-18 | 2018-09-18 | 浙江宇视科技有限公司 | A kind of lens correction method and device |
CN111629141B (en) * | 2019-02-27 | 2023-04-18 | 杭州海康威视数字技术股份有限公司 | Video camera |
CN116630204B (en) * | 2023-07-19 | 2023-09-26 | 南京佳格耕耘科技有限公司 | Remote sensing image online analysis processing system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102111551A (en) * | 2009-12-25 | 2011-06-29 | 佳能株式会社 | Image capturing apparatus and method of controlling same |
US20110305445A1 (en) * | 2010-06-11 | 2011-12-15 | Canon Kabushiki Kaisha | Image pickup apparatus and method for controlling image pickup apparatus |
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 |
CN105554387A (en) * | 2015-12-23 | 2016-05-04 | 北京奇虎科技有限公司 | Zoom tracking curve correction method and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5839786B2 (en) * | 2010-07-12 | 2016-01-06 | キヤノン株式会社 | Image pickup apparatus and tracking data adjustment method |
CN103475820B (en) * | 2013-09-23 | 2016-05-18 | 苏州科达科技股份有限公司 | PI method for correcting position and system in a kind of video camera |
-
2015
- 2015-12-23 CN CN201510982783.2A patent/CN105554387A/en active Pending
-
2016
- 2016-12-07 WO PCT/CN2016/108870 patent/WO2017107770A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102111551A (en) * | 2009-12-25 | 2011-06-29 | 佳能株式会社 | Image capturing apparatus and method of controlling same |
US20110305445A1 (en) * | 2010-06-11 | 2011-12-15 | Canon Kabushiki Kaisha | Image pickup apparatus and method for controlling image pickup apparatus |
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 |
CN105554387A (en) * | 2015-12-23 | 2016-05-04 | 北京奇虎科技有限公司 | Zoom tracking curve correction method and device |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108924415A (en) * | 2018-06-27 | 2018-11-30 | 亿嘉和科技股份有限公司 | The method that consistency calibration is carried out to zoom camera individual focussing disparity |
CN110830710A (en) * | 2018-08-14 | 2020-02-21 | 高新兴科技集团股份有限公司 | Focusing method of super-long focal length lens |
CN110830710B (en) * | 2018-08-14 | 2023-07-11 | 高新兴科技集团股份有限公司 | Focusing method of ultra-long focal lens |
CN112135055A (en) * | 2020-09-27 | 2020-12-25 | 苏州科达科技股份有限公司 | Zoom tracking method, device, equipment and storage medium |
CN114666504A (en) * | 2022-03-23 | 2022-06-24 | 普联技术有限公司 | Method and device for calibrating zoom tracking curve and electronic equipment |
CN114666504B (en) * | 2022-03-23 | 2024-03-26 | 普联技术有限公司 | Calibration method and device of zoom tracking curve and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN105554387A (en) | 2016-05-04 |
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 | |
US9986148B2 (en) | Image capturing terminal and image capturing method | |
CN102984530B (en) | Image processing system and Atomatic focusing method | |
US8947523B2 (en) | Image processing apparatus and associated methodology for blurring digital images | |
WO2017107841A1 (en) | Method and device for camera automatic focus control | |
WO2017107839A1 (en) | Method and device for camera rapid automatic focusing | |
US20170201673A1 (en) | Image capturing terminal and image capturing method | |
CN107395993B (en) | Full-automatic focusing method and system | |
US20170064184A1 (en) | Focusing system and method | |
CN105578048B (en) | A kind of quick focusing method and device, mobile terminal | |
US9967449B2 (en) | Camera system and auto focusing method thereof | |
WO2014153950A1 (en) | Quick automatic focusing method and image acquisition device | |
CN111932636B (en) | Calibration and image correction method and device for binocular camera, storage medium, terminal and intelligent equipment | |
US9794467B2 (en) | Focus adjustment apparatus, method for controlling focus adjustment apparatus, and storage medium | |
CN106226976A (en) | A kind of dual camera image pickup method, system and terminal | |
JP2008046351A (en) | Automatic focusing device and imaging apparatus | |
US20150249783A1 (en) | Information processing method and electronic device | |
US20180070005A1 (en) | Electronic device with multiple lenses and lens switching method | |
CN103472658B (en) | Atomatic focusing method | |
CN106154688B (en) | Automatic focusing method and device | |
CN103048766A (en) | Automatic focusing method and automatic focusing device | |
CN109698902B (en) | Synchronous focusing method and device | |
CN104980661A (en) | Method and apparatus for self-correcting camera lens | |
JP5873336B2 (en) | Focus adjustment device |
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: 16877581 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: 16877581 Country of ref document: EP Kind code of ref document: A1 |