WO2017045304A1 - 采用ccd光敏器件的成像光斑计算方法 - Google Patents
采用ccd光敏器件的成像光斑计算方法 Download PDFInfo
- Publication number
- WO2017045304A1 WO2017045304A1 PCT/CN2015/099554 CN2015099554W WO2017045304A1 WO 2017045304 A1 WO2017045304 A1 WO 2017045304A1 CN 2015099554 W CN2015099554 W CN 2015099554W WO 2017045304 A1 WO2017045304 A1 WO 2017045304A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- spot
- secth
- center
- pixel
- ccd
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/24—Aligning, centring, orientation detection or correction of the image
Definitions
- the invention relates to a method for calculating an imaging spot position using a CCD photosensitive device, and particularly to a method for estimating a spot position when an CCD photosensitive device is overexposed for a laser scanning vision system, which can improve the overexposure of the visual system.
- the condition and angle of the surface of the object are generally stable, and the exposure time can be automatically adjusted to make the CCD photosensitive device work in its normal range. Inside. At this time, the position of the spot is calculated, and the weighted center of gravity can be used as the center of the spot.
- the surface characteristics and angles of the workpiece sometimes vary greatly, especially at the surface of workpieces such as aluminum alloys, copper alloys, and machined steel.
- the reflectivity is very strong, and the CCD line sensor photosensor device is overexposed at this time, and the exposure time cannot be adjusted in time even if the automatic exposure control is performed.
- the prior art does not specifically handle this abnormal exposure situation. If the same spot center algorithm as the normal exposure is used, the accuracy of the measurement results will have a large error.
- the technical problem to be solved by the present invention is to provide a spot imaging method using a CCD photosensitive device in view of the above-mentioned shortcomings of the prior art, which ensures laser scanning It is very important that the vision system obtains high-precision measurement results in a large dynamic range environment.
- a spot imaging method for a CCD photosensitive device comprising the steps of:
- the CCD photosensor senses an optical signal obtained by optically transforming a spot to obtain an electrical signal, and an array of signals is digitized to form a data frame;
- the position of the rightmost end greater than SECTH and the position of the leftmost end greater than SECTH are respectively searched to the left and right, respectively, and are respectively recorded as D and C, starting from C.
- the estimated position of the spot imaging is obtained based on le.
- it further comprises: if MAX is smaller than SAT, k pixel positions are selected as the range of laser spot imaging before and after the maximum position, and a linear weighted center of gravity algorithm is used to obtain the center of the spot position, where k is greater than or A positive integer equal to 1.
- the formula for determining the center of the spot position using a linear weighted center of gravity algorithm is:
- N is the pixel coordinate of the center of the spot, and has the sub-pixel precision
- Ni is the pixel coordinate
- B(Ni) is the gray value of the pixel at Ni
- the line CCD pixel number i is 1 to n.
- it further comprises: if the number of pixels larger than the threshold SECTH is less than the preset value W, k pixel positions are selected as the range of laser spot imaging before and after the maximum position, and the algorithm of the linear weighted center of gravity algorithm is used to obtain Take the center of the spot position, where k is a positive integer greater than or equal to 1.
- the formula for determining the center of the spot position using the algorithm of the linear weighted center of gravity algorithm is:
- N is the pixel coordinate of the center of the spot, and has the sub-pixel precision
- Ni is the pixel coordinate
- B(Ni) is the gray value of the pixel at Ni
- the line CCD pixel number i is 1 to n.
- the predetermined thresholds SAT, SECTH and W are determined experimentally.
- k is determined based on an estimated range of laser spot sizes within the detection range of the visual sensor.
- the main object of the present invention is to provide a CCD for calculating laser triangulation.
- the method of calculating the laser spot center of the line sensor is overexposed. This method is very important to ensure that the laser scanning vision system obtains high-precision measurement results in a large dynamic range environment.
- FIG. 1 is a schematic view showing the structure of a spot imaging measuring device for a CCD photosensitive device in laser scanning triangulation.
- FIG. 2 is a schematic block diagram of a photosensor driving control circuit of a CCD photosensitive device in the present application.
- FIG. 3 is a hardware block diagram of signal acquisition and processing of a CCD photosensitive device in the present application.
- Figure 4 is a schematic diagram of the signal when the laser spot is properly exposed to the CCD photosensor.
- Figure 5 is a schematic diagram of signals when the laser spot is overexposed in the CCD photosensor.
- Figure 6 is a plot of the signal position of the CCD imaging spot and the width of the saturation signal during overexposure.
- Figure 7 is a graph showing the relationship between the width of the spot and the actual signal position increment during overexposure.
- the reference numerals of the above figures are: 1, semiconductor laser; 2, emission mirror; 3, scanning mirror; 4, scanning motor; 5, receiving mirror; 6, receiving mirror; 7, imaging assembly; CCD photosensor.
- the invention discloses a method for calculating an imaging spot position using a CCD photosensitive device, which comprises the following steps:
- the CCD photosensor senses an optical signal obtained by optically transforming a spot to obtain an electrical signal, and an array of signals is digitized to form a data frame;
- the position of the right end larger than SECTH and the position of the leftmost end larger than SECTH are respectively recorded as D and C, taking k/2 pixel points from the C as the starting point, and the least squares fitting is done together with the C point, and the straight line is obtained.
- For the parameter of the line take k/2 pixel points to the left with D as the starting point, and do the least squares fitting with D point to find the parameters of the right straight line;
- the actual position of the spot imaging is obtained based on le.
- Fig. 1 shows a spot imaging measuring device of a CCD photosensitive device in laser triangulation.
- the laser beam emitted from the semiconductor laser 1 passes through the emission mirror 2 to the scanning mirror 3, and the scanning mirror 3 is driven by the scanning motor 4 to perform a wobbling scan.
- the laser spot irradiated on the object passes through the receiving mirror 5, and then passes through the receiving mirror 6 and the imaging unit 7 to reach the CCD photosensor 8 to form a laser spot signal.
- the scanning mirror 3 and the receiving mirror 4 are synchronized, that is, they are mounted on the same scanning axis and are coplanar.
- FIG. 2 is a block diagram of a driving and signal buffering circuit of a CCD photosensitive device.
- An object (laser spot) is imaged by a CCD sensor to form an electronic signal, and the output thereof is a CCD video signal.
- Figure 3 is a hardware block diagram of signal acquisition and processing of a CCD photosensor.
- One or more frames of the CCD video signal are filtered, amplified, and A/D converted and stored in the frame memory, which is processed by the MCU.
- Figure 4 is a schematic diagram of the signal when the laser spot is properly exposed to the CCD photosensor.
- a linear weighting algorithm for obtaining the center of gravity of the spot or a nonlinear weighting algorithm based on the laser Gaussian distribution model may be employed.
- Figure 5 is a schematic diagram of signals when the laser spot is overexposed in the CCD photosensor. At this time, if the same algorithm as the appropriate exposure is taken, the position of the spot signal will have a large error, and the overexposure will be more serious, and the error will be larger. However, there is a lack of a reasonable processing method and means in the prior art that can solve the problem that the CCD photosensitive device is overexposed.
- Le indicates the width of the saturation signal at the time of overexposure
- h indicates the center position of the actual spot
- the width from point m to point h is le.
- the easiest way to get Le here is to set a threshold SECTH and then calculate the number of pixels that exceed SECTH around the maximum as the saturation length Le.
- the accuracy of this method is not high enough to match the results calculated when the exposure is appropriate.
- we straight-line fitting the transition regions on both sides of the saturated signal to obtain the straight line equations of the two trapezoidal sides shown in Fig. 6.
- the start and end positions of the saturated signal are m point and n point, and the pixel distance between the two points is Le.
- the position of the actual spot is determined.
- the actual location of the spot is obtained in this way.
- the position of the spot is measured.
- the algorithm uses a linear weighting algorithm to obtain the center of gravity of the spot. For more accuracy, the average of multiple measurements can be taken.
- the change in exposure is achieved by adjusting the exposure time and the power of the laser.
- FIG. 7 is a relationship between Le and le corresponding to the model of FIG. 6 actually measured at the time of typical overexposure. It can be seen that this relationship is linear. We can use this to find the parameters of this linear relationship.
- the straight line on both sides of the trapezoid is first fitted according to the model of Fig. 6, and the width of the saturated pixel is calculated, and then the actual spot position is calculated according to the relationship of Fig. 7.
- the actual experimental results show that the spot position thus obtained has little error with the actual spot position. Consider two indicators here: maximum error and standard deviation.
- the processing algorithm for obtaining the center position of the imaging spot will be described below. It is assumed here that the signal of the linear CCD sensor has been A/D converted, for example, a frame of 2048 pixel 8-bit samples, which has been stored in the dual port frame memory.
- a spot imaging method employing a CCD photosensor includes the following steps:
- the CCD photosensitive device senses an optical signal obtained by optically transforming a spot to obtain an electrical signal to obtain a frame signal, and an array of signals is digitized to form a data frame;
- the SAT takes 210;
- the position of the rightmost end greater than SECTH and the position of the leftmost end greater than SECTH are respectively searched to the left and right, respectively, and are respectively recorded as D and C, starting from C.
- the actual position of the spot imaging is obtained based on le.
- k pixel positions are selected as the range of laser spot imaging before and after the maximum position, and the center of the spot position is obtained by a linear weighted center of gravity algorithm, where k is a positive integer greater than or equal to 1.
- N is the pixel coordinate of the center of the spot, and has the sub-pixel precision
- Ni is the pixel coordinate
- B(Ni) is the gray value of the pixel at Ni
- the line CCD pixel number i is 1 to n.
- k pixel positions are selected as the range of laser spot imaging before and after the maximum position, and the algorithm of the linear weighted center of gravity algorithm is also used to obtain the center of the spot position.
- k is a positive integer greater than or equal to one.
- N is the pixel coordinate of the center of the spot, and has the sub-pixel precision
- Ni is the pixel coordinate
- B(Ni) is the gray value of the pixel at Ni
- the line CCD pixel number i is 1 to n.
- the preset thresholds SAT, SECTH, and W are determined experimentally.
- k is determined based on the estimated range of the laser spot size of the CCD sensor based on the detection range of the laser sensor.
- the value of MAX at saturated exposure can be known.
- the SAT is determined to be smaller than the MAX value at saturation exposure.
- the MAX at saturation exposure is 230, and the SAT is MAX-20. This causes the SAT to overexpose the upper end of the trapezoid, but not the maximum.
- the SAT is primarily used to determine if the state of the CCD sensor is saturated or critical to saturation exposure.
- SECTH is mainly used to initially estimate the overexposure width. As shown in Figure 5, it should be smaller than other overexposure values. As can be seen from Figure 5, the values at other overexposed pixels are 190-210, so take 180 here.
- W indicates a critical overexposure state, at which time the difference between the formula for normal exposure and the result for overexposure is small. So intuitively, the saturated exposure width of less than three pixels is at a critical state. This threshold can also be compared at this point by comparing the overexposure algorithm with the normal exposure algorithm.
- the processing method of the system is roughly as follows:
- N is the pixel coordinate of the center of the spot, and has the sub-pixel precision
- Ni is the pixel coordinate
- B(Ni) is the gray value of the pixel at Ni
- the linear CCD pixel number i is 1-n. So far the algorithm ends.
- the value of q pixel positions taken around P on the center of P is compared with the second set threshold SECTH. If the number of pixels larger than the threshold SECTH is less than the preset value W, it means that it is near the saturation threshold, and goes to the third step, otherwise it continues to the next step.
- SECTH and W can be determined experimentally. In practice, we used 8-bit A/D, SECTH takes 180; W takes 3.
- the fitted straight line is fitted by least squares method, which is briefly described as follows:
- the present application can solve the problem of low accuracy of the calculation result of the spot center when the CCD linear array photosensor device is overexposed in the laser triangulation.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Geometry (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Length Measuring Devices By Optical Means (AREA)
- Studio Devices (AREA)
Abstract
一种采用CCD线阵光敏器件的光斑成像方法,包括以下步骤:对光学信号进行感测得到电信号;求取一帧中灰度最大值的位置P点,以及P点的灰度值MAX;比较MAX与预设的过度曝光阈值SAT;如果MAX小于SAT,求取光斑位置的中心;如果MAX大于或等于SAT,以P点为中心在P左右各取q个像素位置的值与预设的阈值SECTH比较;如果大于阈值SECTH的像素小于预设值W,求取光斑位置的中心;如果大于阈值SECTH的像素个数大于或等于预设值W,搜索最右端的大于SECTH的位置和最左端大于SECTH的位置;以设定的阈值SECTH代入经过拟合的直线,求取饱和信号的起始点m,终点n以及它们之间的距离Le从而得到光斑成像的估计位置。
Description
本发明涉及一种采用CCD光敏器件的成像光斑位置计算方法,及尤其涉一种用于激光扫描视觉***的CCD光敏器件过度曝光时的光斑位置的估算方法,其可以提高视觉***在过度曝光情况下的精度。
在普通的三角法激光测距传感器使用CCD线阵光敏器件的应用中,物体表面的状况和角度一般都是稳定的,这时可以自动调整曝光时间以使的CCD光敏器件工作在其正常的范围内。这时计算光斑位置就可以采用加权取光强重心作为光斑中心的技术。
当应用基于三角法的激光扫描视觉***对工件或物体进行扫描时,工件表面的特性及角度有时变化很大,特别是像铝合金、铜合金、机械加工过的钢等工件的表面某个角度反射性很强,此时就会出现CCD线阵光敏器器件曝光过度的情况,即使自动曝光控制也不能及时调整曝光时间。现有的技术都没有对这种非正常曝光的情形做特殊的处理。如果采用和正常曝光同样的光斑中心算法,测量结果的精度就会出现较大的误差。
发明内容
为了克服现有技术的上述缺陷,本发明所要解决的技术问题是提供鉴于上述现有技术的缺失,本发明的主要目的在于提供一种采用CCD光敏器件的光斑成像方法,此方法对保证激光扫描视觉***在很大动态范围的环境下获取高精度的测量结果有着非常重要的意义。
为达到上述目的,本发明的技术方案是:
一种CCD光敏器件的光斑成像方法,它包括以下步骤:
CCD光敏器件对由光斑经过光学变换得到的光学信号进行感测得到电信号,一个阵列的信号数字化之后形成一个数据帧;
从帧开始向帧尾方向,求取一帧中灰度最大值的位置P点,以及P点的灰度值MAX;
比较MAX与预设的过度曝光阈值SAT;
如果MAX大于或等于SAT,以P点为中心在P左右各取q个像素位置的值与预设的阈
值SECTH比较;
如果大于阈值SECTH的像素个数大于或等于预设值W,以P为中心分别向左右搜索最右端的大于SECTH的位置和最左端大于SECTH的位置,分别记为D和C,以C为起点向左取k/2像素点,和C点一起做最小二乘直线拟合,求得左边直线的参数,以D为起点向左取k/2像素点,和D点一起做最小二乘直线拟合,求得右边直线的参数;
以设定的阈值SECTH代入经过拟合的直线,求取饱和信号的起始点m,终点n以及他们之间的距离Le;
基于Le求取得到le;
基于le得到光斑成像的估计位置。
优选地,它还包括:如果MAX小于SAT,在最大值位置前后各选取k个像素位置作为激光光斑成像的范围,采用线性加权求重心的算法来求取光斑位置的中心,其中k为大于或等于1的正整数。
优选地,采用线性加权求重心的算法来求取光斑位置的中心的公式为:
优选地,它还包括:如果大于阈值SECTH的像素个数少于预设值W,在最大值位置前后各选取k个像素位置作为激光光斑成像的范围,采用线性加权求重心算法的算法来求取光斑位置的中心,其中k为大于或等于1的正整数。
优选地,采用线性加权求重心算法的算法来求取光斑位置的中心的公式为:
优选地,所述预设的阈值SAT、SECTH和W由实验确定。
优选地,k依据视觉传感器检测范围内的激光光斑在CCD敏感器成像大小的估计范围确定。
鉴于上述现有技术的缺失,本发明的主要目的在于提供一种计算激光三角测量中的CCD
线阵光敏器曝光过度情况下成像的激光光斑中心计算方法,此方法对保证激光扫描视觉***在很大动态范围的环境下获取高精度的测量结果有着非常重要的意义。
在此描述的附图仅用于解释目的,而不意图以任何方式来限制本发明公开的范围。另外,图中的各部件的形状和比例尺寸等仅为示意性的,用于帮助对本发明的理解,并不是具体限定本发明各部件的形状和比例尺寸。本领域的技术人员在本发明的教导下,可以根据具体情况选择各种可能的形状和比例尺寸来实施本发明。
图1为激光扫描三角测量中CCD光敏器件的光斑成像测量装置的结构示意图。
图2为本申请中CCD光敏器件的光敏器驱动控制电路原理框图。
图3为本申请中CCD光敏器件信号采集和处理硬件框图。
图4为当激光光斑在CCD光敏器件曝光适当时的信号示意图。
图5为当激光光斑在CCD光敏器件曝光过度时的信号示意图。
图6为过度曝光时CCD成像光斑的信号位置与饱和信号的宽度模型。
图7为过度曝光时光斑的宽度与实际信号位置增量之间的关系。
以上附图的附图标记为:1、半导体激光器;2、发射反光镜;3、扫描转镜;4、扫描电机;5、接收转镜;6、接收反光镜;7、成像组件;8、CCD光敏器件。
结合附图和本发明具体实施方式的描述,能够更加清楚地了解本发明的细节。但是,在此描述的本发明的具体实施方式,仅用于解释本发明的目的,而不能以任何方式理解成是对本发明的限制。在本发明的教导下,技术人员可以构想基于本发明的任意可能的变形,这些都应被视为属于本发明的范围。
本发明公开了一种采用CCD光敏器件的成像光斑位置计算方法方法,它包括以下步骤:
CCD光敏器件对由光斑经过光学变换得到的光学信号进行感测得到电信号,一个阵列的信号数字化之后形成一个数据帧;
从帧开始向帧尾方向,求取一帧中灰度最大值的位置P点,以及P点的灰度值MAX;
比较MAX与预设的过度曝光阈值SAT;
如果MAX大于或等于SAT,以P点为中心在P左右各取q个像素位置的值与预设的阈值SECTH比较;
如果大于阈值SECTH的像素个数大于或等于预设值W,以P为中心分别向左右搜索最
右端的大于SECTH的位置和最左端大于SECTH的位置,分别记为D和C,以C为起点向左取k/2像素点,和C点一起做最小二乘直线拟合,求得直线左边直线的参数,以D为起点向左取k/2像素点,和D点一起做最小二乘直线拟合,求得右边直线的参数;
以设定的阈值SECTH代入经过拟合的直线,求取饱和信号的起始点m,终点n以及他们之间的距离Le。
基于Le求取得到le;
基于le得到光斑成像的实际位置。
图1示出了激光三角测量中CCD光敏器件的光斑成像测量装置。半导体激光器1所发射的激光束经过发射反光镜2到达扫描转镜3,扫描转镜3由扫描电机4带动做摆动扫描。照射在物体上的激光光斑经过接收转镜5,再经过接收反光镜6和成像组件7到达CCD光敏器件8形成激光光斑的信号。其中扫描转镜3和接收转镜4是同步的,也就是它们是安装在同一个扫描轴上而且是同平面的。
图2为CCD光敏器件的驱动和信号缓冲电路的框图,物体(激光光斑)在CCD敏感器成像形成电子信号,其输出为CCD视频信号。图3为CCD光敏器件信号采集和处理的硬件框图。一帧或多帧CCD视频信号经过滤波、放大和A/D转换后储存在帧存储器里,由MCU对其进行处理。
图4为当激光光斑在CCD光敏器件曝光适当时的信号示意图。为求取亚像素级的光斑成像的位置,可以采用求取光斑重心的线性加权算法或基于激光高斯分布模型的非线性加权算法。
图5为当激光光斑在CCD光敏器件曝光过度时的信号示意图。此时如果采取和曝光适当时一样的算法的话,结果光斑信号位置的会有较大的误差,曝光过度越严重,误差越大。而现有技术中缺少能够解决当CCD光敏器件曝光过度情况下的合理处理方法和手段。
在经过发明人多次反复观察、实验、研究,由图5我们可以观察到曝光过度时,激光光斑的成像像一个梯形。我们可以依此建立一个简化模型如图6并且由实际实验来确定激光光斑的准确位置与过度曝光的这个梯形的宽度之间的关系。
图6中,Le表示过度曝光时的饱和信号的宽度,h表示实际光斑中心位置,m点到h点的宽度为le。
这里获得Le最简单的方法是设定一个阈值SECTH,然后计算在最大值周围超过SECTH的像素的数量,把它作为饱和长度Le。但是这种方法的精度不高,不能与曝光适当时计算的结果相匹配。为了得到比较精确的饱和信号宽度Le,我们对饱和信号两侧的过渡区域进行直线拟合得到图6所示的两个梯形边的直线方程。然后把设定的阈值SECTH带入直线方程中,求
得饱和信号的开始和结束的位置m点和n点,这两点之间的像素距离就是Le。
实际光斑的位置确定之后,则le的位置也就确定了。光斑实际的位置是这么获得的。在曝光适当时,对光斑位置进行测量,作为实际的光斑成像的位置,算法采用求取光斑重心的线性加权算法。为了更准确,可以取多次测量的平均值。
曝光量的变化时通过调整曝光时间和激光器的功率来实现的。
经过发明人反复研究得知,图7为典型的过度曝光时实际测量的对应于图6模型的Le和le的关系。可以看出,这个关系是符合线性关系的。我们可以以此求出这个线性关系的参数。当视觉测量中有过度曝光时,按照图6的模型先拟合梯形两边的直线,计算出饱和像素的宽度,然后按照图7的关系算出实际的光斑位置。实际实验结果表明,这样求出的光斑位置与实际的光斑位置误差很小。这里考虑两个指标:最大误差和标准偏差。从信号刚开始饱和到饱和宽度为70个像素的范围内,其最大误差为1.0像素,标准偏差为0.3像素。这个结果虽然比正常曝光时的测量误差大,但是却是在过度曝光情况下,满足了基本的测量精度要求。
下面叙述求取成像光斑中心位置的处理算法。这里假设线阵CCD敏感器的信号已经经过A/D转换,例如一帧2048个像素8位采样值,已经存储在双口帧存储器中。
在一个实施方式中,采用CCD光敏器件的光斑成像方法包括以下步骤:
CCD光敏器件对由光斑经过光学变换得到的光学信号进行感测得到电信号得到帧信号,一个阵列的信号数字化之后形成一个数据帧;
从帧开始向帧尾方向,求取一帧中灰度最大值的位置P点,以及P点的灰度值MAX;
比较MAX与预设的过度曝光阈值SAT,在本实施方式中,SAT取210;
如果MAX大于或等于SAT,以P点为中心在P左右各取q个像素位置的值与预设的阈值SECTH比较;
如果大于阈值SECTH的像素个数大于或等于预设值W,以P为中心分别向左右搜索最右端的大于SECTH的位置和最左端大于SECTH的位置,分别记为D和C,以C为起点向左取k/2像素点,和C点一起做最小二乘直线拟合,求得左边直线的参数,以D为起点向右取k/2像素点,和D点一起做最小二乘直线拟合,求得右边直线的参数,k可以依据视觉传感器检测范围内的激光光斑在CCD敏感器成像大小的估计范围来选取,在本实施方式中k=9,SECTH=180,W=3;
以设定的阈值SECTH代入经过拟合的直线,求取饱和信号的起始点m,终点n以及他们之间的距离Le;
基于Le求取得到le;
基于le得到光斑成像的实际位置。
如果MAX小于SAT,在最大值位置前后各选取k个像素位置作为激光光斑成像的范围,采用线性加权求重心的算法来求取光斑位置的中心,其中k为大于或等于1的正整数。
采用线性加权求重心的算法来求取光斑位置的中心的公式为:
如果大于阈值SECTH的像素个数少于预设值W,在最大值位置前后各选取k个像素位置作为激光光斑成像的范围,同样采用线性加权求重心算法的算法来求取光斑位置的中心,其中k为大于或等于1的正整数。
采用线性加权求重心算法的算法来求取光斑位置的中心的公式为:
在上述实施方式中,所述预设的阈值SAT、SECTH和W由实验确定。k依据视觉传感器检测范围内的激光光斑在CCD敏感器成像大小的估计范围确定。
例如,在经过多次试验后,可得知饱和曝光时的MAX值。SAT的确定是比饱和曝光时的MAX值小一点即可。比如饱和曝光时的MAX是230,取SAT为MAX-20。这样使得SAT在过度曝光梯形的上端,但不是最大值。SAT主要是用来判断CCD敏感器的状态是不是饱和曝光,或临界于饱和曝光。
SECTH主要是用来初步估计过度曝光宽度。如图5所示,应该比其他过度曝光值小一点。由图5可以看到,其他过度曝光像素处的值190-210,所以这里取180。
W表示临界过度曝光状态,这时候用正常曝光的公式计算和用过度曝光的结果差别很小。所以直观的观察,小于三个像素的饱和曝光宽度处于临界状态。这个临界值也可以比较在这一点用过度曝光算法和正常曝光算法比较来验证。
具体地,该***的处理方法大致如下:
1.从帧开始向帧尾方向,求取一帧中灰度最大值的位置,记为P点的灰度值MAX,这里最大值为MAX。
2.比较MAX与事先设定的过度曝光阈值SAT,如果MAX小于SAT,那么可以确定CCD敏感器是适当曝光,则到第3步,否则到第5步。这里SAT可以容易地由实验确定,我们取210。
3.在最大值位置前后各选取k个像素位置作为激光光斑成像的范围。这里k选取依据视觉传感器检测范围内的激光光斑在CCD敏感器成像大小的估计范围。实际中我们取k=9。
4.采用线性加权求重心的算法来求取光斑位置的中心。公式如下:
其中,N为求取的光斑中心的像素坐标,具有亚像素的精度;Ni为像素坐标;B(Ni)为像素在Ni处的灰度值,线阵CCD像素序号i为1-n。至此算法结束。
5.以P为中心在P左右各取q个像素位置的值与第二个设定的阈值SECTH比较。如果大于阈值SECTH的像素个数小于预设值W,则说明处于饱和临界附近,去到第3步,不然继续下一步。这里SECTH和W可以由实验确定。实际中,我们使用了8位的A/D,SECTH取180;W取3。
6.以P为中心分别向左右搜索最右端的大于SECTH的位置和最左端大于SECTH的位置,分别记为D和C。以C为起点向左取k/2像素点,和C点一起做最小二乘直线拟合,求得左边直线的参数;同样,以D为起点向左取k/2像素点,和D点一起做最小二乘直线拟合,求得右边直线的参数。
7.以前述建模时的阈值SECTH代入第6步的左右拟合直线方程,可以求得对应于图6中的m和n点的位置。拟合直线采用最小二乘法拟合,简述如下:直线模型是线性函数模型。我们采用的是最简单的线性式y=b0+b1t,写成矩阵式,为
直接给出该式的参数解:
对应于我们的应用,左边有5个点,所以n=5。以像素点的坐标为变量t,像素灰度值作为y,将这5个值(ti,yi),其中i=1至5的正整数。带入什么上面的式中就可以得到b0和b1的值。这样直线的方程由y=b0–b1t就确定了。这样将SECTH以y的值代入,就可以得到对应于SECTH的t值,这就是沿着像素方向的位置值。这样图6中m点就确定了。与此相似,可以得到图6中n点的值。求取图6中两个点m,n以及他们之间的距离,对应于图6中的Le。
8.依前述在图7建立的线性关系将Le代入则可求取对应与图6中的le。光斑成像的实际位置就是m点位置加上le。至此算法结束。
综上所述,本申请可以解决激光三角测量中CCD线阵光敏器器件曝光过度时的光斑中心计算结果精度低的问题。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
上述实施例只为说明本发明的技术构思及特点,其目的在于让熟悉此项技术的人士能够了解本发明的内容并据以实施,并不能以此限制本发明的保护范围。凡根据本发明精神实质所作的等效变化或修饰,都应涵盖在本发明的保护范围之内。
Claims (7)
- 一种CCD光敏器件的光斑成像方法,其特征在于,它包括以下步骤:CCD光敏器件对由光斑经过光学变换得到的光学信号进行感测得到电信号,一个阵列的信号数字化之后形成一个数据帧;从帧开始向帧尾方向,求取一帧中灰度最大值的位置P点,以及P点的灰度值MAX;比较MAX与预设的过度曝光阈值SAT;如果MAX大于或等于SAT,以P点为中心在P左右各取q个像素位置的值与预设的阈值SECTH比较;如果大于阈值SECTH的像素个数大于或等于预设值W,以P为中心分别向左右搜索最右端的大于SECTH的位置和最左端大于SECTH的位置,分别记为D和C,以C为起点向左取k/2像素点,和C点一起做最小二乘直线拟合,求得左边直线的参数,以D为起点向左取k/2像素点,和D点一起做最小二乘直线拟合,求得右边直线的参数;以设定的阈值SECTH代入经过拟合的直线,求取饱和信号的起始点m,终点n以及他们之间的距离Le;基于Le求取得到le;基于le得到光斑成像的估计位置。
- 根据权利要求1所述的采用CCD光敏器件的光斑成像方法,其特征在于,它还包括:如果MAX小于SAT,在最大值位置前后各选取k个像素位置作为激光光斑成像的范围,采用线性加权求重心的算法来求取光斑位置的中心,其中k为大于或等于1的正整数。
- 根据权利要求1所述的采用CCD光敏器件的光斑成像方法,其特征在于,它还包括:如果大于阈值SECTH的像素个数少于预设值W,在最大值位置前后各选取k个像素位置作为激光光斑成像的范围,采用线性加权求重心算法的算法来求取光斑位置的中心,其中k为大于或等于1的正整数。
- 根据权利要求1所述的采用CCD光敏器件的光斑成像方法,其特征在于,所述预设的阈值SAT、SECTH和W由实验确定。
- 根据权利要求1所述的采用CCD光敏器件的光斑成像方法,其特征在于,k依据视觉传感器检测范围内的激光光斑在CCD敏感器成像大小的估计范围确定。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510583225.9 | 2015-09-15 | ||
CN201510583225.9A CN106524901A (zh) | 2015-09-15 | 2015-09-15 | 采用ccd光敏器件的成像光斑计算方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017045304A1 true WO2017045304A1 (zh) | 2017-03-23 |
Family
ID=58288273
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/099554 WO2017045304A1 (zh) | 2015-09-15 | 2015-12-29 | 采用ccd光敏器件的成像光斑计算方法 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106524901A (zh) |
WO (1) | WO2017045304A1 (zh) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111383260A (zh) * | 2020-03-15 | 2020-07-07 | 北京航空航天大学 | 应用于可见光模态的自适应激光信息高速检测处理方法 |
CN111899297A (zh) * | 2020-08-06 | 2020-11-06 | 中国铁建重工集团股份有限公司 | 线结构光条纹中心提取方法 |
CN113192121A (zh) * | 2021-04-16 | 2021-07-30 | 西安理工大学 | 一种大气湍流下的光斑中心滑动加权质心定位方法 |
CN113658241A (zh) * | 2021-08-16 | 2021-11-16 | 北京的卢深视科技有限公司 | 单目结构光的深度恢复方法、电子设备及存储介质 |
CN114283170A (zh) * | 2021-12-24 | 2022-04-05 | 凌云光技术股份有限公司 | 一种光斑提取方法 |
CN114399434A (zh) * | 2021-12-17 | 2022-04-26 | 国科大杭州高等研究院 | 一种用于空间超远距星间激光链路建立的高精度光斑质心定位算法及其识别方法 |
CN115267869A (zh) * | 2022-07-13 | 2022-11-01 | 北京航空航天大学 | Gps拒止条件下的无人机群psd测距相对定位方法 |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105578009A (zh) * | 2015-12-28 | 2016-05-11 | 苏州中启维盛机器人科技有限公司 | 光斑成像装置 |
CN108427097B (zh) * | 2018-01-26 | 2020-06-16 | 深圳班翟机器人有限公司 | 线阵感光器件激光定位方法、装置、终端与计算机可读存储介质 |
CN108711134A (zh) * | 2018-04-09 | 2018-10-26 | 湖北三江航天万峰科技发展有限公司 | 一种高频线阵ccd图像处理 |
CN110491797B (zh) * | 2019-09-29 | 2021-10-22 | 云谷(固安)科技有限公司 | 线宽测量方法及设备 |
CN112066859A (zh) * | 2020-09-11 | 2020-12-11 | 广东博智林机器人有限公司 | 光斑位置的检测方法及光斑位置检测*** |
CN116213884B (zh) * | 2023-05-10 | 2023-08-22 | 南京理工大学 | 管-法兰微分阵列式划分及自适应焊接路径规划方法 |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101363718A (zh) * | 2008-09-17 | 2009-02-11 | 北京航空航天大学 | 一种双路质心跟随成像方法及装置 |
CN101515331A (zh) * | 2009-04-08 | 2009-08-26 | 中国科学院长春光学精密机械与物理研究所 | 一种邻域相关的亚像素定位方法 |
CN102193340A (zh) * | 2011-06-17 | 2011-09-21 | 中国科学院光电技术研究所 | 一种投影光刻调焦的图像处理方法 |
CN102496015A (zh) * | 2011-11-22 | 2012-06-13 | 南京航空航天大学 | 二维高斯分布光斑图像中心快速高精度定位方法 |
CN102967261A (zh) * | 2012-11-10 | 2013-03-13 | 华中科技大学 | 一种基于数字散斑相关法的激光位移测量方法 |
CN103617611A (zh) * | 2013-11-12 | 2014-03-05 | 清华大学 | 一种自动阈值分割光斑中心及尺寸检测方法 |
CN105578009A (zh) * | 2015-12-28 | 2016-05-11 | 苏州中启维盛机器人科技有限公司 | 光斑成像装置 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2928548B2 (ja) * | 1989-08-02 | 1999-08-03 | 株式会社日立製作所 | 立体形状検出方法及びその装置 |
CN100359286C (zh) * | 2004-07-08 | 2008-01-02 | 武汉理工大学 | 图像处理提高激光测量精度的方法 |
CN101458067B (zh) * | 2008-12-31 | 2010-09-29 | 苏州大学 | 激光光斑测量装置及其测量方法 |
CN103455813A (zh) * | 2013-08-31 | 2013-12-18 | 西北工业大学 | 一种ccd图像测量***光斑中心定位的方法 |
-
2015
- 2015-09-15 CN CN201510583225.9A patent/CN106524901A/zh active Pending
- 2015-12-29 WO PCT/CN2015/099554 patent/WO2017045304A1/zh active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101363718A (zh) * | 2008-09-17 | 2009-02-11 | 北京航空航天大学 | 一种双路质心跟随成像方法及装置 |
CN101515331A (zh) * | 2009-04-08 | 2009-08-26 | 中国科学院长春光学精密机械与物理研究所 | 一种邻域相关的亚像素定位方法 |
CN102193340A (zh) * | 2011-06-17 | 2011-09-21 | 中国科学院光电技术研究所 | 一种投影光刻调焦的图像处理方法 |
CN102496015A (zh) * | 2011-11-22 | 2012-06-13 | 南京航空航天大学 | 二维高斯分布光斑图像中心快速高精度定位方法 |
CN102967261A (zh) * | 2012-11-10 | 2013-03-13 | 华中科技大学 | 一种基于数字散斑相关法的激光位移测量方法 |
CN103617611A (zh) * | 2013-11-12 | 2014-03-05 | 清华大学 | 一种自动阈值分割光斑中心及尺寸检测方法 |
CN105578009A (zh) * | 2015-12-28 | 2016-05-11 | 苏州中启维盛机器人科技有限公司 | 光斑成像装置 |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111383260B (zh) * | 2020-03-15 | 2023-05-23 | 北京航空航天大学 | 应用于可见光模态的自适应激光信息高速检测处理方法 |
CN111383260A (zh) * | 2020-03-15 | 2020-07-07 | 北京航空航天大学 | 应用于可见光模态的自适应激光信息高速检测处理方法 |
CN111899297A (zh) * | 2020-08-06 | 2020-11-06 | 中国铁建重工集团股份有限公司 | 线结构光条纹中心提取方法 |
CN111899297B (zh) * | 2020-08-06 | 2024-01-23 | 中国铁建重工集团股份有限公司 | 线结构光条纹中心提取方法 |
CN113192121A (zh) * | 2021-04-16 | 2021-07-30 | 西安理工大学 | 一种大气湍流下的光斑中心滑动加权质心定位方法 |
CN113192121B (zh) * | 2021-04-16 | 2024-02-02 | 西安理工大学 | 一种大气湍流下的光斑中心滑动加权质心定位方法 |
CN113658241A (zh) * | 2021-08-16 | 2021-11-16 | 北京的卢深视科技有限公司 | 单目结构光的深度恢复方法、电子设备及存储介质 |
CN114399434A (zh) * | 2021-12-17 | 2022-04-26 | 国科大杭州高等研究院 | 一种用于空间超远距星间激光链路建立的高精度光斑质心定位算法及其识别方法 |
CN114399434B (zh) * | 2021-12-17 | 2024-05-28 | 国科大杭州高等研究院 | 一种用于空间超远距星间激光链路建立的高精度光斑质心定位算法及其识别方法 |
CN114283170A (zh) * | 2021-12-24 | 2022-04-05 | 凌云光技术股份有限公司 | 一种光斑提取方法 |
CN114283170B (zh) * | 2021-12-24 | 2024-05-03 | 北京元客视界科技有限公司 | 一种光斑提取方法 |
CN115267869A (zh) * | 2022-07-13 | 2022-11-01 | 北京航空航天大学 | Gps拒止条件下的无人机群psd测距相对定位方法 |
CN115267869B (zh) * | 2022-07-13 | 2024-04-12 | 北京航空航天大学 | Gps拒止条件下的无人机群psd测距相对定位方法 |
Also Published As
Publication number | Publication date |
---|---|
CN106524901A (zh) | 2017-03-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017045304A1 (zh) | 采用ccd光敏器件的成像光斑计算方法 | |
WO2017113146A1 (zh) | 光斑成像装置 | |
US9488469B1 (en) | System and method for high-accuracy measurement of object surface displacement using a laser displacement sensor | |
US10424078B2 (en) | Height measuring system and method | |
KR102056076B1 (ko) | 용접비드 비전 검사 장치 및 용접 불량 검사방법 | |
CN107084680B (zh) | 一种基于机器单目视觉的目标深度测量方法 | |
TWI393980B (zh) | The method of calculating the depth of field and its method and the method of calculating the blurred state of the image | |
Zhang et al. | A two-step method for extrinsic calibration between a sparse 3d lidar and a thermal camera | |
US9214024B2 (en) | Three-dimensional distance measurement apparatus and method therefor | |
CN108470356B (zh) | 一种基于双目视觉的目标对象快速测距方法 | |
CN109855603B (zh) | 一种聚焦测量方法及终端 | |
JP2008298685A (ja) | 計測装置及びプログラム | |
JP2007256091A (ja) | レンジファインダ校正方法及び装置 | |
WO2018120168A1 (zh) | 一种视觉检测方法及*** | |
CN112381847B (zh) | 管路端头空间位姿测量方法及*** | |
JP7353757B2 (ja) | アーチファクトを測定するための方法 | |
JP6694234B2 (ja) | 距離測定装置 | |
Itami et al. | A simple calibration procedure for a 2D LiDAR with respect to a camera | |
CN102967261A (zh) | 一种基于数字散斑相关法的激光位移测量方法 | |
CN112595385A (zh) | 一种目标物高度获取方法以及装置 | |
JPWO2016135856A1 (ja) | 3次元形状計測システムおよびその計測方法 | |
JP2013063487A (ja) | ロボットシステム | |
CN110657750B (zh) | 一种用于刀具刃口钝化的检测***和方法 | |
CN110020648B (zh) | 工件量测及定位方法 | |
KR20160148735A (ko) | 카메라 광중심 측정을 위한 영상 처리 장치 및 그 방법 |
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: 15903991 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22/08/2018) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15903991 Country of ref document: EP Kind code of ref document: A1 |