CN1790095A - Automatic image focusing system and method - Google Patents

Automatic image focusing system and method Download PDF

Info

Publication number
CN1790095A
CN1790095A CN200410077634.3A CN200410077634A CN1790095A CN 1790095 A CN1790095 A CN 1790095A CN 200410077634 A CN200410077634 A CN 200410077634A CN 1790095 A CN1790095 A CN 1790095A
Authority
CN
China
Prior art keywords
image
focusing
axle
ccd
sharpness
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN200410077634.3A
Other languages
Chinese (zh)
Other versions
CN100357779C (en
Inventor
蒋理
张旨光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Original Assignee
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hongfujin Precision Industry Shenzhen Co Ltd, Hon Hai Precision Industry Co Ltd filed Critical Hongfujin Precision Industry Shenzhen Co Ltd
Priority to CNB2004100776343A priority Critical patent/CN100357779C/en
Publication of CN1790095A publication Critical patent/CN1790095A/en
Application granted granted Critical
Publication of CN100357779C publication Critical patent/CN100357779C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses an image self-focusing method and realization system, which comprises the following steps: providing user end computer with machine measurement and focusing control function for the detected object; supplying charge coupler and industrial optical lens to gather the continual image due to measuring the Z axle of machine; providing the image acquisition card to gain the continual image; supplying the control card to send order for controlling the Z axle motor to move within the named scale; sending the focusing order to the initiating system; obtaining the image of charge coupler; predisposing the obtained image; calculating the present image articulation; judging whether the Z axle reaches in the focusing scale or second focusing; calculating the focal point according to the articulation; driving Z axle motor to reach and output the position of focal point.

Description

影像自动对焦系统及方法Image autofocus system and method

【技术领域】【Technical field】

本发明涉及一种影像量测系统及方法,尤指一种影像量测过程中自动对焦的系统及方法。The present invention relates to an image measurement system and method, in particular to a system and method for auto-focusing during image measurement.

【背景技术】【Background technique】

办公室自动化(Office Automation,OA)在目前资料信息化的社会中已不可缺少,除了以计算机来作为大量资料的处理及储存外,通过光学扫描机(Scanner)来作为文件、表格及图象等资料的输入装置,因可有效提高资料输入处理的效率,故被大量地使用,而已成为计算机的标准配备之一。Office Automation (OA) is indispensable in the current information-based society. In addition to using computers to process and store large amounts of data, optical scanners (Scanners) are used as documents, forms and images. The input device is widely used because it can effectively improve the efficiency of data input processing, and has become one of the standard equipment of computers.

现有的光学扫描仪在扫描不同规格尺寸的原稿件时,由切换一组多镜头机构来达成,在不同尺寸时切换成不同倍率的镜头以对应之,方能使得焦距恰好投射于电荷耦合器件(Charged Coupled Device,CCD)上。虽然这些镜头采总光程相同,且以一相关配合位置的方式设置于多镜头机构上,使其能正确成像于电荷耦合器件上,然而,由于该镜头为复合镜片,其在研磨、加工的过程中难免会产生少许的误差,使各镜头清晰成像所需的总光程及聚焦长度或略有少许不同。所以,在镜头切换的过程中,其影像就无法精确成像于电荷耦合器件上,并且即使光学扫描仪仅有一个镜头,也常因镜头加工或安装上的误差而影响到镜头聚焦成像的精确度。When the existing optical scanners scan the originals of different sizes, it is achieved by switching a group of multi-lens mechanisms. When different sizes are switched to lenses with different magnifications to correspond to them, the focal length can be projected on the charge-coupled device. (Charged Coupled Device, CCD). Although these lenses adopt the same total optical path, and are arranged on the multi-lens mechanism in the mode of a relevant matching position, so that it can be correctly imaged on the charge-coupled device, yet, because the lens is a compound lens, it cannot There will inevitably be a small error in the process, and the total optical path and focal length required for clear imaging of each lens may be slightly different. Therefore, in the process of lens switching, its image cannot be accurately imaged on the charge-coupled device, and even if the optical scanner has only one lens, the accuracy of lens focus imaging is often affected by lens processing or installation errors .

中国国家知识产权局于1999年5月26日授权公告的公告号为CN2321022Y、发明名称为“自动对焦装置”的专利,该专利提供了一种自动对焦装置,设置于光学扫描机上,该装置包括:一可调整镜头位置的镜头定位调整单元、一可调整电荷耦合器件(CCD)位置的CCD定位调整单元、以及一可控制该镜头定位调整单元与CCD定位调整单元的动作的控制单元。当扫描机在开机使用时,可自动应镜头成像所需的光程及焦距长来作调整,将镜头及电荷耦合器件移动至适当位置,使镜头将目标精确地对焦、成像于电荷耦合器件上,而使光学扫描机的分辨率大幅提高。The China State Intellectual Property Office authorized the announcement on May 26, 1999 with the announcement number CN2321022Y and the patent titled "autofocus device". This patent provides an autofocus device that is installed on an optical scanning machine. The device includes A lens positioning adjustment unit capable of adjusting the position of the lens, a CCD positioning adjustment unit capable of adjusting the position of a charge-coupled device (CCD), and a control unit capable of controlling the actions of the lens positioning adjustment unit and the CCD positioning adjustment unit. When the scanner is turned on, it can automatically adjust the optical path and focal length required for lens imaging, and move the lens and charge-coupled device to an appropriate position, so that the lens can accurately focus and image the target on the charge-coupled device , so that the resolution of the optical scanning machine is greatly improved.

但上述发明只是基于硬件装置的调整而实现对焦,没有实现办公自动化的要求,故需提出一种系统及方法可以通过内嵌于计算机中的软件程序来对放置待测对象的影像量测机台进行控制,以达成自动对焦功能,使得对焦装置不但结构简单、成本低而且又能保证对焦精度。However, the above-mentioned invention is only based on the adjustment of hardware devices to achieve focusing, and does not meet the requirements of office automation. Therefore, it is necessary to propose a system and method that can use a software program embedded in a computer to perform image measurement on an object to be measured. The control is performed to achieve the automatic focusing function, so that the focusing device not only has a simple structure and low cost, but also can ensure focusing precision.

【发明内容】【Content of invention】

本发明的目的在于提供一种影像自动对焦系统。The object of the present invention is to provide an image auto-focus system.

本发明的另一目的在于提供一种影像自动对焦方法。Another object of the present invention is to provide an image auto-focus method.

本发明揭露一种影像自动对焦系统,该系统包括一放置待测对象的影像量测机台及一进行影像对焦的用户端计算机。所述量测机台Z轴上安装一电荷耦合器件(CCD),及于该CCD前方装一工业光学镜头,可通过工业光学镜头和CCD采集连续的影像。所述用户端计算机包括一影像撷取卡及一控制卡,所述影像撷取卡通过影像数据线与CCD相连,用于获取CCD及工业光学镜头采集的连续影像;所述控制卡通过另一条数据线与测量机台Z轴马达相连,用于向Z轴马达发送控制指令,以驱动Z轴马达在指定区域移动。所述连接Z轴马达与控制卡的数据线不同于连接影像撷取卡与CCD的数据线。The invention discloses an image auto-focus system, which includes an image measuring machine for placing an object to be measured and a client computer for image focusing. A charge-coupled device (CCD) is installed on the Z-axis of the measuring machine, and an industrial optical lens is installed in front of the CCD, and continuous images can be collected through the industrial optical lens and the CCD. The client computer includes an image capture card and a control card, the image capture card is connected to the CCD through the image data line, and is used to obtain continuous images collected by the CCD and the industrial optical lens; the control card passes through another The data line is connected to the Z-axis motor of the measuring machine, and is used to send control instructions to the Z-axis motor to drive the Z-axis motor to move in a designated area. The data line connecting the Z-axis motor and the control card is different from the data line connecting the image capture card and the CCD.

所述用户端计算机还包括如下功能模块:一输入/输出模块,用于通过影像撷取卡获取工业光学镜头和CCD采集的连续影像至用户端计算机进行分析处理,通过控制卡输出驱动Z轴马达在指定区域来回移动的指令,将焦点位置在用户端计算机的界面上输出;一参数设定模块,用于设定参数,包括设定图像的计算区域、设定是否要过滤、设定计算量;一计算模块,用于计算影像清晰度及通过清晰度的高低计算焦点;一数据临时储存模块,用于保存计算出的清晰度值和该清晰度值对应的机台Z轴位置;一判断模块,用于判断Z轴是否到达设定位置及判断是否为第二次对焦,若Z轴没有到达设定位置,则发出驱动Z轴马达继续移动的指令,通过控制卡传送该指令给Z轴马达使其移动。其中计算模块根据影像的像素值进行计算清晰度,其中像素值的处理方法是采用梯度法,清晰度评价函数为4领域灰度绝对值之和评价函数。The client computer also includes the following functional modules: an input/output module, which is used to obtain the continuous images collected by the industrial optical lens and CCD through the image capture card to the client computer for analysis and processing, and output and drive the Z-axis motor through the control card The command to move back and forth in the designated area outputs the focus position on the interface of the client computer; a parameter setting module is used to set parameters, including setting the calculation area of the image, setting whether to filter, and setting the amount of calculation ; a calculation module, used to calculate the image definition and calculate the focal point through the height of the definition; a data temporary storage module, used to save the calculated definition value and the Z-axis position of the machine corresponding to the definition value; a judgment The module is used to judge whether the Z-axis has reached the set position and whether it is the second focus. If the Z-axis has not reached the set position, it will issue a command to drive the Z-axis motor to continue moving, and send the command to the Z-axis through the control card The motor makes it move. The calculation module calculates the sharpness according to the pixel value of the image, and the pixel value is processed by the gradient method, and the sharpness evaluation function is the sum evaluation function of the absolute value of the gray scale in the four fields.

本发明还揭露一种影像自动对焦方法,该方法包括如下步骤:(a)提供一放置待测对象的测量机台及一控制对焦的用户端计算机;(b)于测量机台Z轴马达提供电荷耦合器件(CCD)及一工业光学镜头,以采集待测对象的连续影像;(c)于用户端计算机提供一影像撷取卡,以获取上述连续影像;(d)于用户端计算机提供一控制卡,以发送命令控制Z轴马达在指定范围内移动;(e)发送对焦命令,以初始化系统;(f)影像撷取卡获取CCD输出的连续影像;(g)预处理上述获取的连续影像;(h)根据影像的像素值及清晰度评价函数计算当前影像的清晰度;(i)判断Z轴是否到达设定位置,即对焦范围,如果Z轴没有到达设定位置,则驱动Z轴继续移动,获取当前影像并返回步骤g;(j)判断是否为第二次对焦,如果不是第二次对焦,则通过清晰度的高低重新指定开始位置,驱动Z轴回到上述重新指定的开始位置继续移动,并返回步骤g;(k)通过清晰度的高低计算焦点,且驱动Z轴马达到达焦点位置;(l)输出焦点位置,结束对焦。The present invention also discloses an image autofocus method, which includes the following steps: (a) providing a measuring machine for placing the object to be measured and a client computer for controlling focusing; (b) providing a Z-axis motor on the measuring machine A charge-coupled device (CCD) and an industrial optical lens are used to collect continuous images of the object to be measured; (c) an image capture card is provided in the client computer to obtain the above-mentioned continuous images; (d) a continuous image is provided in the client computer The control card is used to send commands to control the Z-axis motor to move within the specified range; (e) to send focus commands to initialize the system; (f) the image capture card to obtain continuous images output by the CCD; (g) to preprocess the above-mentioned obtained continuous images Image; (h) calculate the sharpness of the current image according to the pixel value of the image and the sharpness evaluation function; (i) judge whether the Z axis reaches the set position, that is, the focus range, if the Z axis does not reach the set position, then drive the Z The axis continues to move, acquire the current image and return to step g; (j) judge whether it is the second focus, if it is not the second focus, re-designate the starting position according to the level of definition, and drive the Z-axis back to the above-mentioned re-designated The starting position continues to move, and returns to step g; (k) calculates the focus according to the level of definition, and drives the Z-axis motor to reach the focus position; (l) outputs the focus position, and ends focusing.

所述预处理包括清空上一次计算的临时数据及过滤图像杂质。The preprocessing includes clearing the temporary data calculated last time and filtering image impurities.

本发明通过对量测机台进行控制,确定一个寻找区间,移动机台Z轴上下移动,以利用工业光学镜头和CCD采集连续的影像,同时进行动态分析影像,最终计算出焦点位置,且移动Z轴移动到焦点位置,得到清晰的图像。本发明结构简单,成本低,能保证精度。The present invention determines a search interval by controlling the measuring machine, moves the Z axis of the machine up and down, collects continuous images by using the industrial optical lens and CCD, and dynamically analyzes the images at the same time, finally calculates the focus position, and moves The Z axis moves to the focus position to get a clear image. The invention has simple structure, low cost and can ensure precision.

【附图说明】【Description of drawings】

图1为本发明影像自动对焦系统的硬件架构图。FIG. 1 is a hardware architecture diagram of the image auto-focus system of the present invention.

图2为本发明用户端计算机的功能模块图。Fig. 2 is a functional block diagram of the client computer of the present invention.

图3为本发明影像自动对焦方法流程图。FIG. 3 is a flow chart of the image auto-focusing method of the present invention.

【具体实施方式】【Detailed ways】

首先,对本发明所用到的术语解释如下:At first, the term used in the present invention is explained as follows:

CCD:Charged Coupled Device,电荷耦合装置或电荷耦合器件。CCD: Charged Coupled Device, charge coupled device or charge coupled device.

参阅图1所示,为本发明影像自动对焦系统的硬件架构图。该影像自动对焦系统包括一用户端计算机11及一放置物体的机台19。其中,机台19的Z轴上还有用于采集连续影像的装置CCD16,该CCD16装有工业光学镜头18,CCD16通过该工业光学镜头18将影像聚焦。所述用户端计算机11装有影像撷取卡12、控制卡13及一资料存储区20。其中CCD16通过一条影像数据线14与所述影像撷取卡12相连,CCD16通过该影像数据线14将从机台获取的影像电讯号传送到影像撷取卡12上;所述控制卡13通过另一条不同的控制信号数据线15与Z轴马达17相连,该控制信号数据线15传送控制指令驱动Z轴马达17在指定的区域来回移动;所述资料存储区20用于保存计算出的当前影像的清晰度值及该清晰度值所对应的机台Z轴位置。Referring to FIG. 1 , it is a hardware architecture diagram of the image auto-focus system of the present invention. The image auto-focus system includes a client computer 11 and a machine 19 for placing objects. Wherein, there is also a device CCD16 for collecting continuous images on the Z axis of the machine platform 19. The CCD16 is equipped with an industrial optical lens 18, and the CCD16 focuses the image through the industrial optical lens 18. The client computer 11 is equipped with an image capture card 12 , a control card 13 and a data storage area 20 . Wherein CCD16 links to each other with described image capture card 12 through an image data line 14, and CCD16 transmits the video signal obtained from machine platform to image capture card 12 through this image data line 14; Described control card 13 passes another A different control signal data line 15 is connected to the Z-axis motor 17, and the control signal data line 15 transmits control instructions to drive the Z-axis motor 17 to move back and forth in a designated area; the data storage area 20 is used to save the calculated current image The sharpness value and the Z-axis position of the machine corresponding to the sharpness value.

参阅图2所示,为本发明用户端计算机的功能模块图。该用户端计算机11包括一输入/输出模块111、一参数设定模块112、一计算模块113、一数据临时储存模块114及一判断模块115。输入/输出模块111用于通过影像撷取卡12获取工业光学镜头18和CCD采集的连续影像,并传送至用户端计算机11进行分析处理、通过控制卡13输出驱动Z轴马达在指定区域来回移动的指令及将焦点位置在用户端计算机11的接口上输出。参数设定模块112设定参数,包括设定图像的计算区域、设定是否要过滤、设定计算量,其中计算量越大,计算出的焦点越准确,速度越慢;反之焦点越不准确,速度越快。计算模块113用于计算影像清晰度及通过清晰度的高低计算焦点。数据临时储存模块114用于将计算出的清晰度值和该清晰度值对应的机台Z轴位置储存于数据存储区20中。判断模块115用于判断Z轴17是否到达设定位置及判断是否为第二次对焦,若Z轴没有到达设定位置,则发出驱动Z轴马达17继续移动的指令,通过控制卡13传送该指令给Z轴马达17使其移动。Referring to FIG. 2 , it is a functional block diagram of the client computer of the present invention. The client computer 11 includes an input/output module 111 , a parameter setting module 112 , a calculation module 113 , a data temporary storage module 114 and a judgment module 115 . The input/output module 111 is used to acquire the continuous images collected by the industrial optical lens 18 and CCD through the image capture card 12, and transmit them to the client computer 11 for analysis and processing, and output through the control card 13 to drive the Z-axis motor to move back and forth in the designated area command and output the focus position on the interface of the client computer 11. The parameter setting module 112 sets parameters, including setting the calculation area of the image, setting whether to filter, and setting the calculation amount. The larger the calculation amount, the more accurate the calculated focus and the slower the speed; otherwise, the less accurate the focus , the faster the speed. The calculating module 113 is used for calculating the image definition and calculating the focus according to the level of the definition. The data temporary storage module 114 is used to store the calculated sharpness value and the Z-axis position of the machine corresponding to the sharpness value in the data storage area 20 . The judging module 115 is used for judging whether the Z-axis 17 has reached the set position and whether it is the second focus. If the Z-axis does not reach the set position, an instruction to drive the Z-axis motor 17 to continue moving is issued, and the control card 13 transmits the instruction. The Z-axis motor 17 is commanded to move.

参阅图3所示,为本发明影像自动对焦方法流程图。首先,通过用户端计算机11发出对焦命令(步骤300)。初始化对焦系统,即设定一些参数及控制机台Z轴到达用户设定的一个位置,该位置是通过用户指定一个大概位置和指定的对焦距离计算得出的,所述设定参数指设定图像的计算区域、设定是否要过滤及设定计算量等,其中计算量越大,计算出的焦点越准确,速度越慢;反之焦点越不准确,速度越快(步骤S302)。驱动Z轴马达17在指定的区域来回移动,CCD16和工业光学镜头18采集Z轴马达17移动的连续影像,输入/输出模块111通过影像撷取卡12将CCD16传出的连续影像的数字图像电讯号输入到用户端计算机11中(步骤S304)。用户端计算机11对所获取的影像进行预处理,该预处理主要是清空上一次计算的临时数据和过虑图像杂质(步骤S306)。根据影像的像素值计算当前影像的清晰度,像素值的处理方法采用梯度法,即两相邻像素的梯度值越大,影像越尖锐,黑与白像素区别越明显,所用到的清晰度评价函数是4领域灰度差绝对值之和评价函数,如下所示:Referring to FIG. 3 , it is a flow chart of the image auto-focusing method of the present invention. First, a focus command is issued through the client computer 11 (step 300). Initialize the focus system, that is, set some parameters and control the Z-axis of the machine to reach a position set by the user. This position is calculated by specifying an approximate position and the specified focus distance by the user. The set parameters refer to the set Calculation area of the image, setting whether to filter and setting calculation amount, etc., wherein the larger the calculation amount, the more accurate the calculated focus and the slower the speed; otherwise, the less accurate the focus, the faster the speed (step S302). Drive the Z-axis motor 17 to move back and forth in the designated area, CCD16 and industrial optical lens 18 collect the continuous images moved by the Z-axis motor 17, and the input/output module 111 transmits the digital image telecommunications of the continuous images transmitted by the CCD16 through the image capture card 12 The number is input into the client computer 11 (step S304). The client computer 11 performs pre-processing on the acquired image, the pre-processing is mainly to clear the temporary data calculated last time and filter image impurities (step S306). The sharpness of the current image is calculated according to the pixel value of the image. The pixel value is processed by the gradient method, that is, the larger the gradient value of two adjacent pixels, the sharper the image, and the more obvious the difference between black and white pixels. The sharpness evaluation used The function is the sum evaluation function of the absolute value of the gray difference in the 4 fields, as shown below:

PP 11 == ΣΣ xx == 11 NN -- 22 ΣΣ ythe y == 11 NN -- 22 [[ || ff (( xx ,, ythe y )) -- ff (( xx -- 11 ,, ythe y )) || ++ || ff (( xx ,, ythe y )) -- ff (( xx ,, ythe y -- 11 )) || ++ || ff (( xx ,, ythe y )) -- ff (( xx ++ 11 ,, ythe y )) || ++ || ff (( xx ,, ythe y )) -- ff (( xx ,, ythe y ++ 11 )) || ]] ,,

并将所计算出的清晰度值和该值所对应的机台Z轴位置存入数据存储区20中(步骤S308)。判断Z轴是否到达设定位置,该设定位置是指对焦的范围(一个最高值、一个最低值),Z轴的移动范围是0~150(mm),一般设定对焦的范围为1~2(mm)(步骤S310)。如果没有到达设定位置,则驱动机台Z轴继续移动,同时又重新获取图像且返回步骤S306,再次进行计算;如果到达设定位置,则再判断是否为第二次对焦(步骤S312),如果不是第二次对焦,则通过清晰度的高低重新指定开始位置并驱动机台Z轴回到该开始位置,返回步骤S306重新计算获取图像再次进行计算;如果是第二次对焦,则通过清晰度的高低计算焦点,同时驱动Z轴到达焦点位置(步骤S314)。对焦结束,在用户端计算机11输出焦点位置(步骤S316)。And store the calculated sharpness value and the machine Z-axis position corresponding to the value in the data storage area 20 (step S308). Determine whether the Z-axis has reached the set position. The set position refers to the range of focus (a maximum value and a minimum value). The moving range of the Z-axis is 0-150 (mm). Generally, the focus range is set to 1- 2 (mm) (step S310). If the set position is not reached, the Z-axis of the drive machine continues to move, and at the same time, the image is acquired again and returns to step S306, and the calculation is performed again; if the set position is reached, then it is judged whether it is the second focus (step S312), If it is not the second time of focusing, redesignate the starting position according to the level of definition and drive the Z-axis of the machine back to the starting position, return to step S306 to recalculate and obtain the image and perform calculation again; The focus is calculated according to the height of the degree, and the Z axis is driven to reach the focus position at the same time (step S314). After the focusing is completed, the user terminal computer 11 outputs the focus position (step S316).

Claims (10)

1. image autofocus system, it comprises the user end computer that an image measuring machine and of placing object to be measured carries out the image focusing, it is characterized in that:
One charge-coupled device (CCD) is installed on the described measurement platform Z axle, and an industrial optical lens is adorned in this CCD the place ahead, can gather continuous image by industrial optical lens and CCD;
Described user end computer comprises a Frame Grabber and a control card, described Frame Grabber links to each other with CCD by the image data line, be used to obtain the continuous image of CCD and industrial optical lens collection, described control card links to each other with measurement board Z axle motor by another data line, be used for to Z axle motor sending controling instruction, move in the appointed area to drive Z axle motor.
2. image autofocus system as claimed in claim 1 is characterized in that, described connection Z axle motor is different from the data line that is connected Frame Grabber and CCD with the data line of control card.
3. image autofocus system as claimed in claim 1 is characterized in that, described user end computer comprises following functional module:
One input/output module, be used for obtaining continuous image to the user end computer that industrial optical lens and CCD gather and carry out analyzing and processing by Frame Grabber, drive the instruction that Z axle motor moves around in the appointed area by control card output, the focal position is exported on the interface of user end computer;
One parameter setting module is used for setup parameter, comprise the zoning of setting image, set whether to filter, the set-up and calculated amount;
One computing module, the height that is used to calculate image definition and pass through sharpness calculates focus;
The interim storage module of one data is used to preserve the board Z shaft position of the definition values that calculates and this definition values correspondence;
One judge module is used to judge whether the Z axle arrives desired location and judge whether to focusing for the second time, if the Z axle does not arrive desired location, then sends and drives Z axle motor and continue the instruction of moving, and transmits this instruction by control card and moves it to Z axle motor.
4. image autofocus system as claimed in claim 3, it is characterized in that, described computing module is according to the calculated for pixel values sharpness of image, and wherein the disposal route of pixel value is to adopt gradient method, and sharpness evaluation function is 4 field gray scale absolute value sum evaluation functions.
5. one kind is utilized the described system of claim 1 to carry out the image method of focusing automatically, it is characterized in that this method comprises the steps:
Send the focusing order, with initialization system;
Frame Grabber obtains the continuous image of CCD output;
The above-mentioned continuous image that obtains of pre-service;
The sharpness of calculating current image according to the pixel value and the sharpness evaluation function of image;
Judge whether the Z axle arrives desired location, i.e. focusing range;
Judge whether to be focusing for the second time;
Height by sharpness calculates focus, and drives Z axle motor arrival focal position;
Focusing is finished in the output focal position.
6. the image as claimed in claim 5 method of focusing automatically is characterized in that wherein the step initialization system also comprises the steps:
Set the zoning of image;
Whether set needs to filter;
The set-up and calculated amount;
Drive board Z axle and arrive initial position.
7. the image as claimed in claim 6 method of focusing automatically is characterized in that, described initial position is meant that driving the Z axle arrives predefined position, and this position is to specify the focusing of a Position Approximate and appointment from calculating by the user.
8. the image as claimed in claim 5 method of focusing automatically is characterized in that wherein the step of the above-mentioned continuous image that obtains of pre-service comprises:
Empty the last ephemeral data that calculates;
Filtering image impurity.
9. the image as claimed in claim 5 method of focusing automatically is characterized in that judge wherein whether the Z axle arrives desired location and also comprise step:
If the Z axle does not arrive desired location, then drive the Z axle and continue to move, obtain current image, and continue to handle the image that obtains again.
10. the image as claimed in claim 9 method of focusing automatically is characterized in that, wherein judges whether also to comprise step for focusing for the second time:
If not focusing for the second time, then reassign the starting position by the height of sharpness;
Driving Z axle is got back to above-mentioned starting position of reassigning and is continued to move;
Again obtain image and carry out focusing process.
CNB2004100776343A 2004-12-17 2004-12-17 Automatic image focusing system and method Expired - Fee Related CN100357779C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100776343A CN100357779C (en) 2004-12-17 2004-12-17 Automatic image focusing system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100776343A CN100357779C (en) 2004-12-17 2004-12-17 Automatic image focusing system and method

Publications (2)

Publication Number Publication Date
CN1790095A true CN1790095A (en) 2006-06-21
CN100357779C CN100357779C (en) 2007-12-26

Family

ID=36788067

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100776343A Expired - Fee Related CN100357779C (en) 2004-12-17 2004-12-17 Automatic image focusing system and method

Country Status (1)

Country Link
CN (1) CN100357779C (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464683B (en) * 2007-12-20 2011-01-05 鸿富锦精密工业(深圳)有限公司 Motor motion control system and method
CN101363719B (en) * 2007-08-09 2011-02-02 鸿富锦精密工业(深圳)有限公司 Laser focusing point-fetching system and method
CN101350888B (en) * 2007-07-20 2011-08-24 鸿富锦精密工业(深圳)有限公司 Image capture device and its automatic focusing method
CN102262331A (en) * 2010-05-25 2011-11-30 鸿富锦精密工业(深圳)有限公司 Image acquisition module and image acquisition method thereof
CN101762232B (en) * 2008-12-23 2012-01-25 鸿富锦精密工业(深圳)有限公司 Multi-surface focusing system and method
CN101498831B (en) * 2008-01-30 2012-03-14 冀瑜 Auxiliary automatic focusing system and method for optical imaging system
CN102759788A (en) * 2011-04-26 2012-10-31 鸿富锦精密工业(深圳)有限公司 Surface multi-point focusing system and surface multi-point focusing method
TWI459063B (en) * 2009-01-09 2014-11-01 Hon Hai Prec Ind Co Ltd System and method for focusing on multiple surface of an object
WO2015165209A1 (en) * 2014-04-28 2015-11-05 京东方科技集团股份有限公司 Wearable projection device, and focusing method and projecting method therefor
CN105357443A (en) * 2015-11-28 2016-02-24 绵阳少军信息科技有限公司 Integrated autonomous focusing vehicle-mounted photographing module for law enforcement vehicle and video recording system thereof
CN106031148A (en) * 2014-03-21 2016-10-12 华为技术有限公司 Imaging device, method for autofocus in imaging device and corresponding computer program
CN106506953A (en) * 2016-10-28 2017-03-15 山东鲁能智能技术有限公司 The substation equipment image acquisition method of servo is focused on and is exposed based on designated area
CN106527053A (en) * 2016-11-25 2017-03-22 天津津芯微电子科技有限公司 LDI automatic focusing control method and system
CN111031245A (en) * 2019-12-19 2020-04-17 苏州光测视界智能科技有限公司 Controller and control method for adjusting industrial camera lens
CN112284274A (en) * 2020-10-22 2021-01-29 西北工业大学 A method and system for detecting the aperture and socket diameter of mechanical connection holes
CN112532864A (en) * 2019-09-19 2021-03-19 上海锐瞻智能科技有限公司 Automatic focusing system and automatic focusing method
CN112839168A (en) * 2020-12-30 2021-05-25 凌云光技术股份有限公司 Method for automatically adjusting camera imaging resolution in AOI detection system
CN113070566A (en) * 2021-03-02 2021-07-06 苏州科韵激光科技有限公司 Automatic focus searching method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3403447B2 (en) * 1993-05-11 2003-05-06 オリンパス光学工業株式会社 microscope
JPH08122623A (en) * 1994-10-27 1996-05-17 Fuji Photo Film Co Ltd Autofocusing device
JP3462006B2 (en) * 1996-05-20 2003-11-05 株式会社ミツトヨ Auto focus device
CN2321022Y (en) * 1997-05-27 1999-05-26 力捷电脑股份有限公司 Automatic focusing device

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350888B (en) * 2007-07-20 2011-08-24 鸿富锦精密工业(深圳)有限公司 Image capture device and its automatic focusing method
CN101363719B (en) * 2007-08-09 2011-02-02 鸿富锦精密工业(深圳)有限公司 Laser focusing point-fetching system and method
CN101464683B (en) * 2007-12-20 2011-01-05 鸿富锦精密工业(深圳)有限公司 Motor motion control system and method
CN101498831B (en) * 2008-01-30 2012-03-14 冀瑜 Auxiliary automatic focusing system and method for optical imaging system
CN101762232B (en) * 2008-12-23 2012-01-25 鸿富锦精密工业(深圳)有限公司 Multi-surface focusing system and method
TWI459063B (en) * 2009-01-09 2014-11-01 Hon Hai Prec Ind Co Ltd System and method for focusing on multiple surface of an object
CN102262331A (en) * 2010-05-25 2011-11-30 鸿富锦精密工业(深圳)有限公司 Image acquisition module and image acquisition method thereof
CN102262331B (en) * 2010-05-25 2014-10-15 鸿富锦精密工业(深圳)有限公司 Image acquisition module and image acquisition method thereof
CN102759788A (en) * 2011-04-26 2012-10-31 鸿富锦精密工业(深圳)有限公司 Surface multi-point focusing system and surface multi-point focusing method
US10212331B2 (en) 2014-03-21 2019-02-19 Huawei Technologies Co., Ltd Imaging device and method for automatic focus in an imaging device as well as a corresponding computer program
CN106031148A (en) * 2014-03-21 2016-10-12 华为技术有限公司 Imaging device, method for autofocus in imaging device and corresponding computer program
CN106031148B (en) * 2014-03-21 2020-07-24 华为技术有限公司 Imaging device, method of auto-focusing in an imaging device and corresponding computer program
WO2015165209A1 (en) * 2014-04-28 2015-11-05 京东方科技集团股份有限公司 Wearable projection device, and focusing method and projecting method therefor
CN105357443A (en) * 2015-11-28 2016-02-24 绵阳少军信息科技有限公司 Integrated autonomous focusing vehicle-mounted photographing module for law enforcement vehicle and video recording system thereof
CN106506953A (en) * 2016-10-28 2017-03-15 山东鲁能智能技术有限公司 The substation equipment image acquisition method of servo is focused on and is exposed based on designated area
CN106527053A (en) * 2016-11-25 2017-03-22 天津津芯微电子科技有限公司 LDI automatic focusing control method and system
CN112532864A (en) * 2019-09-19 2021-03-19 上海锐瞻智能科技有限公司 Automatic focusing system and automatic focusing method
CN111031245A (en) * 2019-12-19 2020-04-17 苏州光测视界智能科技有限公司 Controller and control method for adjusting industrial camera lens
CN112284274A (en) * 2020-10-22 2021-01-29 西北工业大学 A method and system for detecting the aperture and socket diameter of mechanical connection holes
CN112839168A (en) * 2020-12-30 2021-05-25 凌云光技术股份有限公司 Method for automatically adjusting camera imaging resolution in AOI detection system
CN112839168B (en) * 2020-12-30 2022-08-02 凌云光技术股份有限公司 Method for automatically adjusting camera imaging resolution in AOI detection system
CN113070566A (en) * 2021-03-02 2021-07-06 苏州科韵激光科技有限公司 Automatic focus searching method and device
CN113070566B (en) * 2021-03-02 2022-05-27 苏州科韵激光科技有限公司 Automatic focus searching method and device

Also Published As

Publication number Publication date
CN100357779C (en) 2007-12-26

Similar Documents

Publication Publication Date Title
CN1790095A (en) Automatic image focusing system and method
CN107389687B (en) Appearance image acquisition device of electronic components and acquisition method thereof
US7747080B2 (en) System and method for scanning edges of a workpiece
CN101498831B (en) Auxiliary automatic focusing system and method for optical imaging system
US8648961B2 (en) Image capturing apparatus and image capturing method
CN101706609A (en) Image processing based fast automatic focusing method of microscope
CN107529011A (en) A kind of motorized zoom lenses control system and method
CN105527778A (en) Automatic focusing method for electric adjustable liquid lens
CN103063572A (en) Automatic on-line vision detecting and sorting system and sorting method
US6259473B1 (en) Section image obtaining apparatus and method of obtaining section image
CN112230345A (en) Optical fiber automatic coupling alignment device and method
CN100392403C (en) A method for automatically counting the number of white blood cells in blood microscopic images
CN115880296A (en) Machine vision-based prefabricated part quality detection method and device
US20070187571A1 (en) Autofocus control method, autofocus control apparatus and image processing apparatus
CN116182786B (en) Monocular vision ranging method, camera and medium
CN111031245A (en) Controller and control method for adjusting industrial camera lens
CN201667683U (en) Large focal variation ratio automatic focusing all-in-one video camera
CN101191719A (en) Image focus synthesis system and method
CN106154688A (en) A kind of method and device of auto-focusing
CN105530429B (en) A kind of autofocus and system
CN201732207U (en) Auto-focusing recognition system for microscope
JP2006145793A (en) Microscopic image pickup system
CN102883103A (en) Auto-focusing method and photographic device
US7339147B2 (en) System and method for automatic focusing of images
JP2004054262A (en) Optical element matching device using electronic camera

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20071226

Termination date: 20181217

CF01 Termination of patent right due to non-payment of annual fee