CN101943839A - Integrated automatic focusing camera device and definition evaluation method - Google Patents

Integrated automatic focusing camera device and definition evaluation method Download PDF

Info

Publication number
CN101943839A
CN101943839A CN 201010220392 CN201010220392A CN101943839A CN 101943839 A CN101943839 A CN 101943839A CN 201010220392 CN201010220392 CN 201010220392 CN 201010220392 A CN201010220392 A CN 201010220392A CN 101943839 A CN101943839 A CN 101943839A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
image
evaluation function
frequency domain
function
unit
Prior art date
Application number
CN 201010220392
Other languages
Chinese (zh)
Other versions
CN101943839B (en )
Inventor
刘云海
贾晨阳
Original Assignee
浙江大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date

Links

Abstract

The invention discloses an integrated automatic focusing camera device and a definition evaluation method. The reliable evaluation of the focusing definition is guaranteed by taking the high-frequency component of an image signal as a feature estimation value of the focusing definition and by adopting a spatial domain and frequency domain combined algorithm method. The automatic focusing device realizes the calculation of the definition evaluation value and the control over the back and forth movement of an optical focusing lens by controlling a stepper motor, makes an image formed at a most definite focusing position by adopting a spatial domain and frequency domain multi-feature climbing search strategy and ensures quick focusing by adopting a digital signal processor for acceleration. By combining a communication interface and a control protocol, an integrated camera device is realized.

Description

一体化的自动聚焦摄像机装置及清晰度评价方法 Integrated automatic focusing camera device and clarity Evaluation Method

技术领域 FIELD

[0001] 本发明涉及一种一体化的电子摄像机以及应用于该电子摄像机的自动聚焦技术, 尤其涉及一种一体化的自动聚焦摄像机装置及清晰度评价方法。 [0001] The present invention relates to an integrated and applied to the electronic camera electronic camera autofocus technique, and particularly to an integrated auto-focus camera apparatus and a method for evaluation of resolution.

背景技术 Background technique

[0002] 传统的自动聚焦技术分为主动式和被动式两种,主动式自动聚焦利用红外线或超声波来测量摄像机与物体之间的距离,从而调整焦距位置;被动式则是通过被动接受外界物体的光线,通过相关电子检测的方式调整焦距位置。 [0002] The conventional autofocus technique is divided into two kinds of active and passive, active autofocus using infrared rays or ultrasonic waves to measure the distance between the camera and the object, thereby adjusting the focus position; it is a passive receiving light through passive external objects , adjust the focus position detected by the associated electronic manner.

[0003] 随着数字图像处理技术的发展,越来越多的自动聚焦装置依赖于图像处理算法, 而不是主动式的测距方式。 [0003] With the development of digital image processing technology, more and more auto-focus devices rely on image processing algorithms, rather than the active way ranging. 图像处理理论认为,镜头的聚焦系统等价于一个低通滤波器,滤波器的截止频率由当前像距与镜头焦距决定。 The image processing theory, the focusing lens system is equivalent to a low pass filter with a cutoff frequency of the filter is determined by the current image distance and lens focal length. 因此,通过提取图像的高频分量就能对当前图像的清晰度进行判断。 Thus, the current can be determined by the sharpness of the image to extract a high frequency component of the image. 与普通相机的自动聚焦相比,摄像机,尤其是视频监控用摄像机对聚焦速度和精度要求更高,这是由于场景变化复杂,光学变倍速度快,如果对焦速度慢或精度低,则摄取的视频图像的视觉效果差或大多是模糊图像,应用于视频监控中具有很大局限性。 Compared with the ordinary autofocus camera, video camera, especially a video camera for monitoring the focus speed and accuracy requirements are higher, due to the complexity of a scene change, the optical zooming speed is fast, if the focus is slow or low precision, the uptake visual effects video images are mostly poor or blurred images used in video surveillance has great limitations.

[0004] 根据图像清晰度度量的被动聚焦算法,其性能主要由以下几个参数进行评测: [0004] The focus algorithm passive image sharpness metric, the performance evaluation mainly composed of the following parameters:

[0005] 1、准确度,即算法得出的清晰度峰值位置必须在实际的聚焦位置或附近。 [0005] 1, accuracy, i.e., the algorithm must be obtained in the actual definition of the peak position at or near the focus position.

[0006] 2、单峰范围,即算法得出的清晰度曲线必须在尽可能大的范围内呈单峰特性。 [0006] 2, singlet range, i.e., the algorithm must be obtained unimodal curve sharpness characteristics in a range as large as possible.

[0007] 3、普适性,即算法必须在大部分环境中表现良好,而不是仅仅适用于几种特定场 [0007] 3, universality, that is, the algorithm must perform well in most environments, not just apply to several specific field

I=IO I = IO

[0008] 4、峰值陡峭程度,即清晰度曲线需要在聚焦区域附近陡峭上升或下降,以精确定位聚焦位置。 [0008] 4, the peak steepness, i.e. clarity for curves steeply rising or falling in the near focus region, the focus position to pinpoint.

[0009] 5、算法复杂度,算法复杂度必须适应实时性的需求。 [0009] 5, algorithm complexity, the complexity of the algorithm must be adapted to the needs of real-time. 发明内容 SUMMARY

[0010] 本发明的目的在于针对现有技术的不足,提供一种一体化的自动聚焦摄像机装置及清晰度评价方法。 [0010] The object of the present invention is to deficiencies of the prior art, there is provided an autofocus camera device and a method for evaluating a sharpness integrated.

[0011] 本发明的目的是通过以下技术方案来实现的: [0011] The object of the present invention is achieved by the following technical solution:

[0012] 一种一体化的自动聚焦摄像机装置,它包括:可变倍的光学变焦镜头单元、CXD图像传感器单元、电机驱动单元、摄像机信号处理单元、DSP图像处理单元和通信单元。 [0012] an integrated auto-focus camera apparatus comprising: an optical variable magnification zoom lens unit, the image sensor unit CXD, motor drive unit, the camera signal processing unit, the DSP image processing unit and a communication unit. 其中, 所述可变倍的光学变焦镜头单元、CCD图像传感器单元、摄像机信号处理单元、DSP图像处理单元、电机驱动单元依次串连、电机驱动单元和可变倍的光学变焦镜头单元相连,摄像机信号处理单元和DSP图像处理单元分别与通信单元相连。 Wherein said optical magnification zoom lens unit, the CCD image sensor unit, a camera signal processing unit, the DSP image processing unit, a motor drive unit successively in series, connected to the motor driving unit and an optical magnification zoom lens unit, the camera the signal processing unit DSP and the image processing unit are respectively connected to the communication unit.

[0013] 一种上述一体化的自动聚焦摄像机装置的自动聚焦方法,包括以下步骤: [0013] A method of the above-described autofocus integrated auto-focus camera apparatus, comprising the steps of:

[0014] (1)选择合适的清晰度评价区域:首先在不受邻接区域干扰的前提下选择适当的搜索区域大小,然后根据当前图像的清晰区域选择搜索区域的位置。 [0014] (1) Select the appropriate resolution evaluation area: Select the appropriate size of the search area in a region adjacent to the premise without interference, and then select the location area based on the current search area image sharp.

4[0015] (2)选择合适的清晰度评价函数:首先通过频域评价函数、空间域评价函数、及频域和空域相结合的最优评价函数作为清晰度评价函数,然后基于DSP对算法进行优化。 4 [0015] (2) Select the appropriate sharpness function: firstly optimal evaluation function evaluation function, the evaluation function of the spatial domain and spatial frequency domain and the frequency domain as a combination of sharpness function, and DSP-based algorithm optimize.

[0016] 本发明的有益效果是:本发明以图像信号的高频分量为聚焦清晰度的特征估计值,采用了空域和频域相结合的计算方法确保对聚焦清晰度的可靠评价。 [0016] Advantageous effects of the invention are: In the present invention, the high frequency component of the image signal of the focus sharpness characteristic estimation value, the calculation method using the spatial frequency domain and the combination ensures reliable assessment of focus sharpness. 自动聚焦装置除实现清晰度评价值计算之外,通过对步进电机的控制实现光学聚焦透镜的前后移动控制, 采用空域和频域多特征的爬山搜索策略,使成像处在聚焦最清晰位置,实现摄像机的一体化成像功能。 Autofocus device other than to achieve the sharpness evaluation value calculation, by implementing the optical control of the stepping motor control movement of the focus lens back and forth, using multiple spatial and frequency domain features climbing search strategy, so that the clearest image in the focus position, integration imaging function of the camera. 与现有的自动聚焦摄像机相比,能够在满足实时性能的前提下,实现更加稳定的聚焦。 Compared with the existing auto-focus camera, able to meet the real-time performance under the premise, to achieve a more stable focus.

附图说明 BRIEF DESCRIPTION

[0017] 图1是本发明装置的框图; [0017] FIG. 1 is a block diagram of an apparatus according to the present invention;

[0018] 图2是搜索框过小时的清晰度曲线图; [0018] FIG. 2 is a graph showing the definition of the search block is too small;

[0019] 图3是邻接区域对搜索区域的影响示意图; [0019] FIG. 3 is a diagram showing the effect of adjoining regions of the search area;

[0020] 图4是搜索框过大时的清晰度曲线图; [0020] FIG. 4 is a graph showing the resolution is too large when the search box;

[0021] 图5是高通滤波器的截面图; [0021] FIG. 5 is a sectional view of a high-pass filter;

[0022] 图6是算法优化前后的计算复杂度对比图; [0022] FIG. 6 is a comparison of the computational complexity of the algorithm of FIG before and after optimization;

[0023] 图7是本算法采用的最优清晰度曲线图。 [0023] FIG. 7 is a graph showing the optimum sharpness of the present algorithm.

[0024] 图8是dsp图像处理单元的电路图 [0024] FIG. 8 is a circuit diagram of an image processing unit dsp

具体实施方式 detailed description

[0025] 如图1所示,本发明一体化的自动聚焦摄像机装置包括可变倍的光学变焦镜头单元、CXD图像传感器单元、电机驱动单元、摄像机信号处理单元、DSP图像处理单元和通信单元,其中,可变倍的光学变焦镜头单元、CCD图像传感器单元、摄像机信号处理单元、DSP图像处理单元、电机驱动单元依次串连、电机驱动单元和可变倍的光学变焦镜头单元相连,摄像机信号处理单元和DSP图像处理单元分别与通信单元相连。 [0025] As shown in FIG. 1, the present invention is the integration of an autofocus video camera apparatus includes an optical zoom lens magnification change unit may, CXD image sensor unit, a motor drive unit, the camera signal processing unit, the DSP image processing unit and the communication unit, wherein the variable magnification optical zoom lens unit, the CCD image sensor unit, a camera signal processing unit, the DSP image processing unit, a motor drive unit successively in series, connected to the motor driving unit and an optical magnification zoom lens unit, the camera signal processing an image processing unit and the DSP unit are connected to the communication unit. 通信单元负责与上位机通 Communication with the host computer through the unit is responsible for

[0026] 可变倍的光学变焦镜头单元、CCD图像传感器单元和电机驱动单元组成成像部分, 其中可变倍的光学变焦镜头单元和电机驱动单元可购买舜宇光学科技(集团)有限公司的LMlO镜头实现,CXD图像传感器单元可采用索尼公司的4103-227套片组实现。 [0026] The variable magnification optical zoom lens unit, the CCD image sensor and the motor driving units imaging portion, wherein the zoom optical zoom lens unit and the motor driving unit may later Sunny Optical Technology (Group) Co., Ltd. LMlO lens to achieve, CXD image sensor unit may employ Sony 4103-227 slice group set implementation.

[0027] 可变倍的光学变焦镜头单元包括聚焦透镜组和用于驱动透镜组的步进电机。 [0027] The variable magnification optical zoom lens unit includes a focus lens group and a stepping motor driving the lens group. 同时,还包括其他部件,例如,用于阻止红外入射光的红外滤镜,用于改变入射光量的可调节光圈和用于驱动红外滤镜和可调光圈的驱动电路。 It also includes other components, e.g., for preventing incident infrared IR filter, for changing the amount of incident light, and can adjust the iris driving circuit for driving the infrared filter and an adjustable aperture.

[0028] 电机驱动单元用于控制步进电机驱动聚焦透镜组的移动,光圈的调节,曝光时间的调节等。 [0028] The motor driving unit for controlling the stepping motor to drive the focusing movement, the lens group for adjusting the iris of the settling time of exposure or the like.

[0029] CCD图像传感器单元将拍摄对象由镜头单元传至感光元件并将其转化成以像素为单位的电子信号,并输出该视频信号。 [0029] CCD image sensor by a lens unit subject to the photosensitive member unit and converted into electrical signals in units of pixels, and outputs the video signal. 与CMOS成像原理不同,CCD成像时各个像素均在同一时间曝光,时间相关性更强。 Different from the CMOS imaging principle, when a CCD imager in which each pixel at the same exposure time, the time correlation is stronger.

[0030] 摄像机信号处理单元用于将CXD传感器传出的电子信号做进一步处理,改善图像质量。 [0030] The camera signal processing unit for the outgoing electron CXD sensor signal for further processing, improve image quality. 包括对电子信号进行采样放大处理,通过A/D转化将其转化至数字信号,对数字信号进行矫正、自动白平衡等改善其图像质量,处理完后将其按照数字图像的输出格式进行输出。 Including electronic amplification processing signal is sampled by A / D converter to convert it into a digital signal, the digital signal is corrected, the automatic white balance to improve the picture quality, which is output after processing according to the output format of a digital image. 此单元可采用索尼公司的4103-227套片组实现 This unit can be Sony's chip set group achieved 4103-227

[0031] DSP图像处理单元负责自动聚焦(AF)算法的实现。 [0031] DSP unit is responsible for processing the image to achieve an autofocus (AF) algorithm. 首先,装置用于分析聚焦算法所必需的图像清晰度。 First, the apparatus for analyzing image sharpness focus algorithm necessary. 清晰度是由当前图像的高频分量以及对比度决定的,如果当前图像高频分量占整个图像能量的比例越多且对比度越高,则图像越接近聚焦区域,反之则图像越远离聚焦区域。 Resolution is determined by the current high-frequency component image and the contrast, the more high-frequency component if the current image of the total image energy, and the higher the contrast ratio, the image closer to the focus area, otherwise the image is farther from the focusing region. 同时,DSP模块通过对图像清晰度的对比,确定聚焦镜片移动的方向,并将该信号传递给电机驱动模块进行控制。 Meanwhile, DSP blocks, by comparison of the sharpness of the image, determining a focus lens movement direction, and passes a control signal to the motor drive module. 此单元的原理图如图8所示。 Diagram for this unit is shown in Fig.

[0032] 其中,Ul可以采用ADI公司的Blackfin系列dsp芯片,U2为摄像机信号处理单元,可采用索尼公司的4103-227套片组实现,U3可采用SIPEX公司的SP3220EEA芯片。 [0032] wherein, Ul can be employed ADI's Blackfin series dsp chips, U2 is the camera signal processing unit, can be Sony's chip set 4103-227 achieved group, U3 employed SIPEX's SP3220EEA chip. Ul 的PPICLK连接至U2的CLK,Ul的PPID0-7依次连接到U2的DATEO-7,Ul的SCL与SDA分别连接至U2的SCL与SDA。 The PPICLK Ul U2 is connected to the CLK, Ul U2 is in turn connected to the PPID0-7 DATEO-7, Ul is connected to the SCL and SDA and SCL U2 is SDA. Ul的UART_TX与UART_RX分别连接至U3的DIN和ROUT端口。 The UART_TX UART_RX Ul and DIN are connected to the port ROUT and U3. 电阻Rl —头接3. 3V,一头接至Ul的SCL脚,电阻R2 —头接3. 3V,一头接至Ul的SDA脚, 电容Cl分别连接U3的Cl-脚和Cl+脚,电容C2分别连接U3的C2-脚与C2+脚,电容C3 分别连接地线与V+脚,电容C4分别连接地线与V-脚。 Resistors Rl - head-to 3. 3V, one connected to the SCL pin Ul, resistor R2 - bonding head 3. 3V, an SDA pin connected to Ul, a capacitor Cl connected Cl- Cl + feet and feet U3, a capacitor C2, respectively, U3 is connected to the pin C2- C2 + pin, capacitor C3 are connected to ground and the V + pin, capacitor C4 are connected to ground and the foot V-.

[0033] 具有以上设备配置的摄像机,能够将外界景物形成清晰的视频信号,并将其输出至外接的显示屏或储存介质中。 [0033] with a camera arranged above the device, it can be formed outside the scene definition video signal, and outputs it to an external display or storage medium.

[0034] 本发明的自动聚焦方法,包括以下步骤 [0034] The auto-focusing method of the present invention, comprises the steps of

[0035] 1、选择合适的清晰度评价区域,包括:(1)在不受邻接区域干扰的前提下选择适当的搜索区域大小,(2)根据当前图像的清晰区域选择搜索区域的位置。 [0035] 1, select the appropriate sharpness evaluation area, comprising: (1) select the appropriate size of the search area in a region adjacent to the premise without interference, and (2) selecting the position of the current search area clear area of ​​the image.

[0036] 2、选择合适的清晰度评价函数,包括:(1)通过频域评价函数、空间域评价函数、 及频域和空域相结合的最优评价函数作为清晰度评价函数,(2)基于DSP对算法进行优化。 [0036] 2, select the appropriate sharpness function, comprising: (1) frequency domain evaluation function, the evaluation function is optimal spatial domain evaluation function, and combined frequency and spatial resolution as the evaluation function, (2) DSP-based algorithms for optimization.

[0037] 1、选择合适的清晰度评价区域 [0037] 1, select the appropriate sharpness evaluation area

[0038] 清晰度评价区域的选择会直接影响到聚焦算法的计算复杂度以及聚焦精度。 [0038] select the resolution evaluation area will directly affect the computational complexity of the algorithm and the focusing accuracy of focus. 一方面,聚焦区域大小的选择直接影响到聚焦算法的计算复杂度,加快聚焦速度。 In one aspect, the size of the selected focus area directly affects the computational complexity of the algorithm is the focus, accelerate the focusing speed. 另一方面,通过一定算法挑选出感兴趣的区域进行聚焦,剔除背景部分,能够有效的改善清晰度曲线的单峰性能,提高聚焦精度。 On the other hand, through a certain algorithm selected focus region of interest, excluding the background portion, can effectively improve the performance of a unimodal curve sharpness, improved focusing accuracy.

[0039] 本发明提供了一种确定清晰度评价区域大小和位置的方法。 [0039] The present invention provides a method of determining the sharpness evaluation region size and position.

[0040] 1.1在不受邻接区域干扰的前提下选择适当的搜索区域大小 [0040] 1.1 Select the appropriate size of the search area in the region adjacent to the premise without interference

[0041] 搜索区域过大或过小都会破坏聚焦曲线的单峰性。 [0041] The search area is too large or too small will destroy the focus curve of a single peak. 图3是说明在散焦状态下,图像会发生模糊,图像边界会有一定程度上的扩张。 FIG 3 illustrates in a defocused state, the image blur occurs, expansion of the image boundary have a certain degree. 图2若选取的评价区域太小,图像会由于区域附近扩张图像的干扰而使清晰度曲线丧失单峰性。 FIG 2 when the selected evaluation area is too small, the expansion due to the interference image is an image of the vicinity of the curve sharpness loss unimodal. 图4说明了评价区域过大,则会因为混入了过多不同深度的景物而使清晰度曲线单峰性变差。 Figure 4 illustrates the evaluation area is too large, because too much mixed in different depths of the scene unimodal resolution deteriorates. 因此,评价区域的上限与下限必须满足上述2个条件。 Thus, upper and lower limits of the evaluation area must satisfy the two conditions. 通过对上述2个条件的测试,本发明取原图像的MXN作为评价区域的大小。 By testing of the two conditions, the present invention is taken as the size of the original image MXN evaluation area. 其中,M,N取图像行数和列数的1/3至1/2。 Wherein, M, and N is the number of rows and columns of the image 1/3 to 1/2.

[0042] 1.2根据当前图像的清晰区域选择搜索区域的位置。 [0042] 1.2 to select the current position of the search area of ​​the clear area of ​​the image.

[0043] 评价区域的位置直接影响聚焦的精度。 Position of [0043] the evaluation area directly affects the accuracy of focusing. 本发明采用图像梯度方法判断评价区域的位置。 The method of the present invention is determined using a position evaluation image gradient regions. 具体的,通过式(1)求得当前图像水平和垂直梯度,由式(2)求得当前像素点的梯度大小,在预设的N个区域分别求得区域内梯度大小之和作为判断每个区域清晰度大小的判据,将清晰度最大的区域作为聚焦搜索区域。 Specifically, by the formula (1) obtained by the current horizontal and vertical gradient image by the formula (2) to obtain the gradient magnitude of the current pixel, the gradient magnitude is obtained in the region of each of the N regions and a preset determination as per local definition of a criterion of the size, the greatest area as a sharpness focus search area. [0045] [0045]

Figure CN101943839AD00071

[0046] 其中为(x,y)点的梯度值,GxGy分别为xy方向的方向梯度值。 Direction a gradient value [0046] is where (x, y) value of the point of the gradient, GxGy xy direction, respectively. ▽ f为的大 ▽ f is large

[0047] 2选择合适的清晰度评价函数 [0047] 2 to select the appropriate sharpness function

[0048] 2. 1通过频域评价函数、空间域评价函数、及频域和空域相结合的最优评价函数作为清晰度评价函数 [0048] 2.1 by optimally evaluation function evaluation function in the frequency domain, spatial domain evaluation function, and combined frequency and spatial resolution as a function of the evaluation

[0049] 图像清晰度由当前图像的高频分量以及对比度决定。 [0049] The image sharpness, and contrast is determined by the high-frequency component of the current image.

[0050] 以下是本发明提出的基于频域滤波的清晰度的测试方式: [0050] The following is based on the definition of the frequency domain filter test mode proposed by the invention:

[0051] 2. 1. 1通过式(3)采用2维傅立叶变换将图像信号由空域转换至频域。 [0051] 2. 1.1 by the formula (3) using the two-dimensional Fourier transform of the image signal converted by the spatial domain to the frequency domain.

Figure CN101943839AD00072

[0053] 其中χ,y代表了图像的坐标位置。 [0053] wherein χ, y represents the coordinate position of the image. f (X,y)为图像的灰度函数,丽代表图像的宽禾口高。 f (X, y) is a function of the gray image, the representative aspect Wo Li mouth image.

[0054] 2. 1. 2通过一个理想高通滤波器提取图像高频分量(图5),由式(4)计算得出高频分量在整幅图像中的百分比作为清晰度的评价函数。 [0054] 2. 1. 2 extracts a high frequency component image (FIG. 5) over a high-pass filter, is calculated by the formula (4) yield the percentage of high-frequency components of the entire image as an evaluation function definition.

Figure CN101943839AD00073

其中P为整个搜索框,Q为搜索框中截至频率以内的像素点的集合。 Wherein P is the entire search box, Q is the set of pixels as of the frequency within the search box. F(u,v)为频 F (u, v) is the frequency

2. 1.3计算图像梯度大小作为图像的清晰度评价函数。 2. 1.3 gradient magnitude image is calculated as a function of the evaluation of the image sharpness.

Figure CN101943839AD00074

其中g(x,y)为(χ,y)的灰度值。 Where g (x, y) is the gradation value (χ, y) of.

2. 1. 4将两种评价函数结合起来,得到一种最优评价函数: Def(t) = Def_Gra(t)* α +Def_Fre(t)*(1-α); 2. Both 1.4 combination evaluation function, the evaluation function to obtain an optimal: Def (t) = Def_Gra (t) * α + Def_Fre (t) * (1-α);

其中Def_Gra(t)为图像梯度评估函数,Def_Fre (t)为图像频域评估函数, Wherein Def_Gra (t) is the image gradient evaluation function, Def_Fre (t) of frequency domain image evaluation function,

Figure CN101943839AD00075

如图7所示,最终评价函数有良好的峰值陡峭度和单峰范围,易于实现基于爬山法的聚焦搜索算法。 As shown in FIG. 7, the final evaluation function with good peak steepness and the range of a single peak, easy to implement climbing method based on the focus search algorithms.

[0065] 2. 2基于DSP的对算法进行优化。 [0065] 2.2 optimized for DSP algorithms.

[0066] 由于频域滤波法计算复杂度很高,而且其复杂度随着清晰度评价区域的增加而快速增加,因此不能满足实时性的要求。 [0066] Since the frequency domain filtering of high computational complexity, and its complexity increases as the sharpness evaluation area increases rapidly, and therefore can not meet the real-time requirements.

[0067] 以下是本发明用以优化频域滤波的方法: [0067] The following method is used to optimize the frequency domain filter of the present invention:

[0068] 2. 2. 1利用式(5)将2维DFT转化为2次1维DFT的叠加,再利用快速傅立叶变 [0068] 2. 2.1 using the formula (5) is converted to the two-dimensional DFT DFT-dimensional superposition of a secondary reuse Fast Fourier Transform

[0055] [0055]

Figure CN101943839AD00076

[0056] [0056]

域函数。 Domain function.

[0057] [0057]

[0058] [0058]

[0059] [0059]

[0060] [0061] [0062] [0060] [0061] [0062]

[0063] [0063]

[0064] [0064]

[0044] [0044]

Figure CN101943839AD00081

[0072] 其中x、y为图像空间域坐标,U、ν为图像频域坐标,M、N为图像的宽和高 [0072] wherein x, y coordinates of the image spatial domain, U, ν is the frequency domain coordinates of the image, M, N is the width and height of the image

[0073] 2.2.2将2行实数FFT合并为一行复数FFT,将计算量减小一半。 [0073] 2.2.2 2-line real FFT line combining the complex FFT, the calculation amount is reduced by half. 具体如下: details as follows:

Figure CN101943839AD00082

[0075] 先将2个实序列合成为一个复序列: [0075] The first two real sequences synthesized as a complex sequence:

[ [

Figure CN101943839AD00083
Figure CN101943839AD00084

能量之和 Energies and

计算出w(k)后根据(6) (7)两式可计算出X1GOX2GO 2. 2. 3利用帕塞瓦尔定律减少FFT计算数目 After calculating w (k) in accordance with (6) (7) calculates two formulas to calculate the number of FFT X1GOX2GO 2. 2. 3 reduced using Parseval's Law

根据帕塞瓦尔定理(式(8)),图像信号在空间域的能量恒等于频域各个频率分量 According to Parseval's theorem (formula (8)), the image signal in the spatial domain is identically equal to the energy of each frequency components in the frequency domain

Figure CN101943839AD00085

[0089] 因此,可由式(9)推出清晰度评价函数的值并减小近一半FFT计算量。 [0089] Thus, by the introduction of formula (9) and the value of the sharpness evaluation function calculation amount is reduced nearly half of the FFT.

[0090] [0090]

Figure CN101943839AD00086

[0093] 其中PP为整个搜索框,Q为搜索框中截至频率以内的像素点的集合。 [0093] PP for the entire search box where, Q is the set of pixels as of the frequency within the search box. x、y为图像空间域坐标,U、ν为图像频域坐标。 x, y coordinates of the image spatial domain, U, ν is the frequency domain image coordinates.

[0094] 图6表明了优化后的算法复杂度有明显的降低。 [0094] FIG. 6 shows the complexity of the optimization algorithm is significantly reduced.

[0095] 下面以索尼公司的4103 CCD套片为例具体列出本发明自动聚焦的方法。 [0095] In the following Sony's Case 4103 CCD chip set autofocusing method of the invention specifically listed.

[0096] 1.首先确认清晰度评价区域的大小,由于套片输出的数字信号分辨率为704X576,根据步骤1. 1的原则,我们把清晰度评价区域大小定为256X 128。 [0096] 1. Make sure that the size of the evaluation area definition, since the digital signal output from the chip set with a resolution of 704X576, according to the principle of step 1.1, we evaluated the sharpness area size as 256X 128. 把整幅图片均分为9块,每块大小为256 X 128 (允许重叠),对每块根据(4)式计算其清晰度,以清晰度最大的区域作为最终的搜索区域。 The entire picture was divided into nine blocks, each block size is 256 X 128 (allowed to overlap), calculated for each block (4) which definition, the greatest area as the final resolution search area.

[0097] 2.为了满足实时性要求,按照方法2. 2的步骤对评价函数进行优化。 [0097] 2. In order to meet real-time requirements, in accordance with method step 2.2 is to optimize the merit function. 优化后的最优评价函数为标准,通过爬山法进行搜索以确定准确聚焦位置。 Optimal evaluation function is optimized standard search by climbing method to determine the exact focus position.

[0098] 以上为本发明的优选实施例,并不用于限制本发明。 Preferred [0098] embodiment of the above embodiments of the present invention, not intended to limit the present invention. 对从事该领域的技术人员来说,本发明可以有更改或变换,但是在本发明的精神和原则之内,任何更改或变换均应在本发明的保护范围之内。 Engaged in the skill in the art, the present invention can be changed or transformed, but in the spirit and principle of the present invention, any change or transformation should be within the scope of the present invention.

Claims (4)

  1. 一种一体化的自动聚焦摄像机装置,其特征在于,它包括:可变倍的光学变焦镜头单元、CCD图像传感器单元、电机驱动单元、摄像机信号处理单元、DSP图像处理单元和通信单元。 An integrated auto-focus camera apparatus, characterized in that it comprises: a variable magnification optical zoom lens unit, the CCD image sensor unit, a motor drive unit, the camera signal processing unit, the DSP image processing unit and a communication unit. 其中,所述可变倍的光学变焦镜头单元、CCD图像传感器单元、摄像机信号处理单元、DSP图像处理单元、电机驱动单元依次串连、电机驱动单元和可变倍的光学变焦镜头单元相连,摄像机信号处理单元和DSP图像处理单元分别与通信单元相连。 Wherein said optical magnification zoom lens unit, the CCD image sensor unit, a camera signal processing unit, the DSP image processing unit, a motor drive unit successively in series, connected to the motor driving unit and an optical magnification zoom lens unit, the camera the signal processing unit DSP and the image processing unit are respectively connected to the communication unit.
  2. 2. 一种应用权利要求1所述一体化的自动聚焦摄像机装置的自动聚焦方法,其特征在于,包括以下步骤:(1)选择合适的清晰度评价区域:首先在不受邻接区域干扰的前提下选择适当的搜索区域大小,然后根据当前图像的清晰区域选择搜索区域的位置。 First, the premise of interference from adjacent regions: the auto-focusing method of an integrated auto-focus camera apparatus 2. A use as claimed in claim, characterized in that it comprises the steps of: (1) select the appropriate sharpness evaluation area select the appropriate size of the search area, the search and select the location area based on the current image of the clear area. (2)选择合适的清晰度评价函数:首先通过频域评价函数、空间域评价函数、及频域和空域相结合的最优评价函数作为清晰度评价函数,然后基于DSP对算法进行优化。 (2) Select the appropriate sharpness function: firstly optimal evaluation function evaluation function, the evaluation function of the spatial domain and spatial frequency domain and the frequency domain as a combination of sharpness function, and DSP-based optimization algorithm.
  3. 3.根据权利要求2所述自动聚焦方法,其特征在于,所述通过频域评价函数、空间域评价函数、及频域和空域相结合的最优评价函数作为清晰度评价函数具体如下:(A)通过下式采用2维傅立叶变换将图像信号由空域转换至频域: 3. The auto-focusing method according to claim 2, characterized in that, as a sharpness function as described below optimum evaluation function in the frequency domain by the evaluation function, the evaluation function of the spatial domain, and the frequency and spatial combination :( A) converts the image signal to the frequency domain by the following formula using a two-dimensional spatial Fourier transform:
    Figure CN101943839AC00021
    其中x,y代表了图像的坐标位置。 Wherein x, y represents the coordinate position of the image. f(x,y)为图像的灰度函数,丽代表图像的宽和高。 f (x, y) is a function of the gray image, the width and height of the image representative of Korea. (B)通过一个理想高通滤波器提取图像高频分量,由下式计算得出高频分量在整幅图像中的百分比作为清晰度的评价函数: (B) the extracted image frequency component passing over a high-pass filter, is given by the high frequency component is calculated in percentage of the entire image as an evaluation function definition:
    Figure CN101943839AC00022
    其中,P为整个搜索框,Q为搜索框中截至频率以内的像素点的集合。 Wherein, P is the entire search box, Q is the set of pixels as of the frequency within the search box. F(u,ν)为频域函数。 F (u, ν) into a frequency domain function. (C)计算图像梯度大小作为图像的清晰度评价函数: (C) calculated as the gradient magnitude image sharpness of the image evaluation function:
    Figure CN101943839AC00023
    其中,g(x,y)为(χ,y)的灰度值。 Wherein, g (x, y) is the gradation value (χ, y) of. (D)将两种评价函数结合起来,得到一种最优评价函数: Def(t) = Def_Gra(t)* α +Def_Fre(t)*(1-α);其中,Def_Gra(t)为图像梯度评估函数,Def_Fre (t)为图像频域评估函数, (D) combine the two kinds of evaluation function, the evaluation function to obtain an optimal: Def (t) = Def_Gra (t) * α + Def_Fre (t) * (1-α); wherein, Def_Gra (t) of the image gradient evaluation function, Def_Fre (t) of frequency domain image evaluation function,
    Figure CN101943839AC00024
  4. 4.根据权利要求2所述自动聚焦方法,其特征在于,所述基于DSP对算法进行优化具体为:(a)利用下式将2维DFT转化为2次1维DFT的叠加,再利用快速傅立叶变换FFT代替 4. The auto-focusing method according to claim 2, characterized in that said DSP algorithm is optimized based specifically: (a) using the following formula into the two-dimensional DFT DFT-dimensional superposition of a secondary, rapid reuse Fourier transform (FFT) instead of
    Figure CN101943839AC00025
    Figure CN101943839AC00031
    其中,二 力f ,x、y为图像空间域坐标,U、ν为图像频域坐标,M、 Wherein two force f, x, y coordinates of the image spatial domain, U, ν is the frequency domain coordinates of the image, M,
    Figure CN101943839AC00032
    N为图像的宽和高。 N is the width and height of the image. (b)将2行实数FFT合并为一行复数FFT,将计算量减小一半。 (B) the 2 rows real FFT line combining the complex FFT, the calculation amount is reduced by half. 具体如下: 令X1 (η)和χ2 (η)为N 点实序列,其DFT 为DFT (X1 (n)) = X1 (k) DFT (χ2 (η)) = X2 (k)。 As follows: Let X1 (η) and χ2 (η) is an N-point real sequence, which is a DFT DFT (X1 (n)) = X1 (k) DFT (χ2 (η)) = X2 (k). 先将2个实序列合成为一个复序列:w (n) = X1 (n)+jx2 (η)则Re [w (η) ] = X1 (η),Im [w (η) ] = χ2 (η) DFT(X^n)) = Z)Fr(Re[w(«)])=^{DFT[w{ri)] + DFT[w («)]} = ^-[W{k) + W\Nk)NRN{k)] = \w{k)N+W\Nk)N]RN{k)fl 0<k<N其中W(k)为w(n)的频域函数,〜W = I ^同理DiTO2 O)) 二DFT(lm[w(n)]) = j:[W{k)NW\Nk)N']RN(k) (7)计算出w(k)后根据(6) (7)两式可计算出X1GOX2GO(C)利用帕塞瓦尔定律减少FFT计算数目:根据帕塞瓦尔定理,图像信号在空间域的能量恒等于频域各个频率分量能量之和:NI ^ ι N-\ΣΜ ,M=O iV A=O因此,可由下式推出清晰度评价函数的值并减小近一半FFT计算量。 First two real sequences synthesized as a complex sequence: w (n) = X1 (n) + jx2 (η) is Re [w (η)] = X1 (η), Im [w (η)] = χ2 ( η) DFT (X ^ n)) = Z) Fr (Re [w ( «)]) = ^ {DFT [w {ri)] + DFT [w («)]} = ^ - [W {k) + W \ Nk) NRN {k)] = \ w {k) N + W \ Nk) N] RN {k) fl 0 <k <N where W (k) of w (n) in the frequency domain function, ~W = I ^ Similarly DiTO2 O)) two DFT (lm [w (n)]) = j: [W {k) NW \ Nk) N '] RN (k) (7) calculated by w (k) in accordance with the (6) (7) formula to calculate the two X1GOX2GO (C) using a reduced number of Parseval's Law calculation FFT: according to Parseval's theorem, the image signal in the spatial domain is identically equal to the energy in the frequency domain and the energies of respective frequency components: NI ^ ι N- \ ΣΜ, M = O iV a = O Thus, value can be derived as follows sharpness evaluation function and reducing the amount of nearly half of the FFT calculation. Definition = ^ F(u,vf / ^(u,v)^P&(u,v)eQ / (a,v)e 尸Σ nu,vf j Σ Hu,vf(u,v)eQ / (UiV)^P=1- XF(M,v)2/ν2Σ|/Μ2 ,(u,v)eQ / n=0其中,PP为整个搜索框,Q为搜索框中截至频率以内的像素点的集合。X、y为图像空间域坐标,U、ν为图像频域坐标。 Definition = ^ F (u, vf / ^ (u, v) ^ P & (u, v) eQ / (a, v) e corpse Σ nu, vf j Σ Hu, vf (u, v) eQ / (UiV) ^ P = 1- XF (M, v) 2 / ν2Σ | / Μ2, (u, v) eQ / n = 0 where, PP for the entire search box, Q is the set of pixels as of the frequency within the search box. X, y coordinates of the image spatial domain, U, ν is the frequency domain image coordinates.
CN 201010220392 2010-07-06 2010-07-06 Automatic focusing method for integrated automatic focusing camera device CN101943839B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010220392 CN101943839B (en) 2010-07-06 2010-07-06 Automatic focusing method for integrated automatic focusing camera device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010220392 CN101943839B (en) 2010-07-06 2010-07-06 Automatic focusing method for integrated automatic focusing camera device

Publications (2)

Publication Number Publication Date
CN101943839A true true CN101943839A (en) 2011-01-12
CN101943839B CN101943839B (en) 2012-09-05

Family

ID=43435900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010220392 CN101943839B (en) 2010-07-06 2010-07-06 Automatic focusing method for integrated automatic focusing camera device

Country Status (1)

Country Link
CN (1) CN101943839B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102253569A (en) * 2011-01-17 2011-11-23 深圳市保千里电子有限公司 Method and device for focusing camera
CN102780847A (en) * 2012-08-14 2012-11-14 北京汉邦高科数字技术股份有限公司 Camera automatic focusing control method focused on moving target
CN102883103A (en) * 2012-08-13 2013-01-16 深圳市先河系统技术有限公司 Auto-focusing method and photographic device
CN102968800A (en) * 2012-12-14 2013-03-13 宁波江丰生物信息技术有限公司 Image definition evaluation method
CN103338356A (en) * 2013-06-24 2013-10-02 武汉烽火众智数字技术有限责任公司 Remote automatic back focus adjustment device and method for gun-shaped network camera
CN103345756A (en) * 2013-07-19 2013-10-09 浙江农林大学 Automatic focusing method, device and electronic equipment of microscope in urinary sediment analyzer
CN103473776A (en) * 2013-09-17 2013-12-25 深圳市华因康高通量生物技术研究院 Method and system for comparing image definition and automatic focusing control method
CN103856717A (en) * 2014-03-06 2014-06-11 浙江宇视科技有限公司 Camera focusing control method and device
CN104102069A (en) * 2013-04-11 2014-10-15 展讯通信(上海)有限公司 Focusing method and device of imaging system, and imaging system
CN104937411A (en) * 2012-09-24 2015-09-23 布里格姆女子医院有限公司 Portal and method for management of dialysis therapy
CN105227810A (en) * 2015-06-01 2016-01-06 西北大学 BIBAVR algorithm based automatic focusing helmet camera
CN105354817A (en) * 2015-09-25 2016-02-24 济南中维世纪科技有限公司 Noise image automatic focusing method
CN105527778A (en) * 2016-01-16 2016-04-27 上海大学 Automatic focusing method for electric adjustable liquid lens

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6311019B1 (en) * 1999-03-08 2001-10-30 Olympus Optical Co., Ltd. Automatic focus adjusting system capable of adjusting focus of moving subject
CN101477291A (en) * 2008-12-17 2009-07-08 杭州海康威视数字技术股份有限公司 Fast automatic focusing method and camera thereof
CN101494737A (en) * 2009-03-09 2009-07-29 杭州海康威视数字技术股份有限公司 Integrated camera device and self-adapting automatic focus method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6311019B1 (en) * 1999-03-08 2001-10-30 Olympus Optical Co., Ltd. Automatic focus adjusting system capable of adjusting focus of moving subject
CN101477291A (en) * 2008-12-17 2009-07-08 杭州海康威视数字技术股份有限公司 Fast automatic focusing method and camera thereof
CN101494737A (en) * 2009-03-09 2009-07-29 杭州海康威视数字技术股份有限公司 Integrated camera device and self-adapting automatic focus method

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102253569B (en) 2011-01-17 2012-11-14 深圳市保千里电子有限公司 Method and device for focusing camera
CN102253569A (en) * 2011-01-17 2011-11-23 深圳市保千里电子有限公司 Method and device for focusing camera
CN102883103A (en) * 2012-08-13 2013-01-16 深圳市先河系统技术有限公司 Auto-focusing method and photographic device
CN102883103B (en) * 2012-08-13 2015-06-17 深圳市先河系统技术有限公司 Auto-focusing method and photographic device
CN102780847A (en) * 2012-08-14 2012-11-14 北京汉邦高科数字技术股份有限公司 Camera automatic focusing control method focused on moving target
CN104937411A (en) * 2012-09-24 2015-09-23 布里格姆女子医院有限公司 Portal and method for management of dialysis therapy
CN102968800A (en) * 2012-12-14 2013-03-13 宁波江丰生物信息技术有限公司 Image definition evaluation method
CN102968800B (en) * 2012-12-14 2016-01-20 宁波江丰生物信息技术有限公司 Evaluation method of image sharpness
CN104102069B (en) * 2013-04-11 2017-03-15 展讯通信(上海)有限公司 Focusing method and apparatus of an imaging system, the imaging system
CN104102069A (en) * 2013-04-11 2014-10-15 展讯通信(上海)有限公司 Focusing method and device of imaging system, and imaging system
CN103338356A (en) * 2013-06-24 2013-10-02 武汉烽火众智数字技术有限责任公司 Remote automatic back focus adjustment device and method for gun-shaped network camera
CN103345756B (en) * 2013-07-19 2016-08-10 浙江农林大学 Autofocus method for a microscope urine sediment analyzer, device and electronic equipment
CN103345756A (en) * 2013-07-19 2013-10-09 浙江农林大学 Automatic focusing method, device and electronic equipment of microscope in urinary sediment analyzer
CN103473776A (en) * 2013-09-17 2013-12-25 深圳市华因康高通量生物技术研究院 Method and system for comparing image definition and automatic focusing control method
CN103473776B (en) * 2013-09-17 2016-05-25 深圳市华因康高通量生物技术研究院 A method of comparison of image sharpness, autofocus control system and method
CN103856717B (en) * 2014-03-06 2017-04-19 浙江宇视科技有限公司 A camera focus control method and apparatus
CN103856717A (en) * 2014-03-06 2014-06-11 浙江宇视科技有限公司 Camera focusing control method and device
CN105227810A (en) * 2015-06-01 2016-01-06 西北大学 BIBAVR algorithm based automatic focusing helmet camera
CN105354817A (en) * 2015-09-25 2016-02-24 济南中维世纪科技有限公司 Noise image automatic focusing method
CN105527778A (en) * 2016-01-16 2016-04-27 上海大学 Automatic focusing method for electric adjustable liquid lens

Also Published As

Publication number Publication date Type
CN101943839B (en) 2012-09-05 grant

Similar Documents

Publication Publication Date Title
WO2013171954A1 (en) Imaging device, semiconductor integrated circuit and imaging method
US20160165212A1 (en) System and Methods for Calibration of an Array Camera
US20080079839A1 (en) Multi-focal camera apparatus and methods and mediums for generating focus-free image and autofocus image using the multi-focal camera apparatus
US20080063294A1 (en) System and Method for High Performance Image Processing
US20070189750A1 (en) Method of and apparatus for simultaneously capturing and generating multiple blurred images
US20140198188A1 (en) Image processing device, method and recording medium, stereoscopic image capture device, portable electronic apparatus, printer, and stereoscopic image player device
US20110267507A1 (en) Range measurement using a zoom camera
US7260270B2 (en) Image creating device and image creating method
US20120293706A1 (en) Image pickup device, digital photographing apparatus using the image pickup device, auto-focusing method, and computer-readable medium for performing the auto-focusing method
JP2007103590A (en) Image pick-up device, focus detector and image pick-up system
US20120026297A1 (en) Imaging apparatus and imaging method
JP2008289122A (en) Method of evaluating imaged image
JP2010128820A (en) Apparatus, method and program for processing three-dimensional image, and three-dimensional imaging apparatus
US20110007176A1 (en) Image processing apparatus and image processing method
JP2006140594A (en) Digital camera
JP2013029656A (en) Image pickup apparatus
CN102075679A (en) Method and device for acquiring image
US20090245688A1 (en) Adaptive image acquisition for multiframe reconstruction
CN101272511A (en) Method and device for acquiring image depth information and image pixel information
CN102053339A (en) The method of autofocus
US20140002606A1 (en) Enhanced image processing with lens motion
US20120147150A1 (en) Electronic equipment
US20110037888A1 (en) Image sensor and focus detection apparatus
JP2009141390A (en) Image sensor and imaging apparatus
US20140009634A1 (en) Image processing device and image processing system

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C14 Grant of patent or utility model
EXPY Termination of patent right or utility model