WO2012019370A1 - 一种摄像机定标方法、图像处理设备和机动车辆 - Google Patents

一种摄像机定标方法、图像处理设备和机动车辆 Download PDF

Info

Publication number
WO2012019370A1
WO2012019370A1 PCT/CN2010/076001 CN2010076001W WO2012019370A1 WO 2012019370 A1 WO2012019370 A1 WO 2012019370A1 CN 2010076001 W CN2010076001 W CN 2010076001W WO 2012019370 A1 WO2012019370 A1 WO 2012019370A1
Authority
WO
WIPO (PCT)
Prior art keywords
particle
camera
image
fitness value
value
Prior art date
Application number
PCT/CN2010/076001
Other languages
English (en)
French (fr)
Inventor
吴泽俊
Original Assignee
武汉大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 武汉大学 filed Critical 武汉大学
Priority to PCT/CN2010/076001 priority Critical patent/WO2012019370A1/zh
Publication of WO2012019370A1 publication Critical patent/WO2012019370A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30204Marker

Definitions

  • the present invention relates to the field of camera calibration technologies, and in particular, to a camera calibration method, an image processing device, and a motor vehicle.
  • a camera calibration method an image processing device, and a motor vehicle.
  • the relationship between a three-dimensional geometric position of a point on a surface of a space object and its corresponding point in the image is determined by the geometric model of the camera imaging, and the parameters are camera parameters.
  • This parameter includes the camera's internal geometry and optical characteristics (internal parameters), as well as the camera's three-dimensional position and orientation (external parameters) relative to the world coordinate system. These parameters must be obtained through experiments and calculations. This process is called camera calibration.
  • the correspondence between the world coordinates and the image coordinates can be established by the calibration of the camera, and the image is converted into a view such as a bird's eye view through the angle of view transformation.
  • This technology can be applied to areas such as on-board camera calibration, robot hand-eye calibration, and mobile camera calibration.
  • Camera calibration technology is mainly divided into traditional camera calibration technology, camera calibration technology based on active vision and self-calibration technology.
  • Conventional camera calibration technology has high calibration accuracy, but its requirements for experimental environment and experimental control are too high. For example, the positional relationship between the template and the camera is required to be fixed. This calibration technique is often unable to be applied because it cannot meet the conditions.
  • the camera calibration technology and self-calibration technology based on active vision are more flexible, but these technologies have the following disadvantages: It is often necessary to control the camera motion to collect images at different positions, and the calibration time is long; many models are Based on the linear hypothesis, for a complete projective model, that is, when there is a skew factor, the calibration accuracy is not high; for the simultaneous calibration of internal parameters and external parameters, it is not well solved; Detection, but in the super wide-angle camera calibration shooting, a large distortion will occur, and corner detection cannot be performed.
  • the main technical problem to be solved by the present invention is to provide a camera calibration method, an image processing apparatus and apparatus, and a motor vehicle, which reduce the requirements for the calibration environment and reduce the calibration time.
  • a camera calibration method including the steps of:
  • Obtaining a template image step capturing a predetermined template to obtain a template image
  • Step of assigning parameters Allocating a series of parameters using a convergence algorithm, the one parameter series including One or more sets of camera parameters;
  • Calculating the fitness value step comparing the difference between the template image and the ideal world image of the predetermined template to obtain an adaptation value, the fitness value calculation step comprising:
  • Terminating the judging step judging whether the fitness value calculation result satisfies the set termination condition, and when the fitness value calculation result satisfies the termination condition, a set of camera parameters associated with the fitness value is used as a calibration parameter; when the termination condition is not met, the process continues Perform the Assign Parameters step to regenerate a series of parameters.
  • an image processing apparatus including:
  • a camera device configured to capture a predetermined template to obtain a template image
  • An allocation parameter module configured to allocate a parameter series by using a convergence algorithm, where the one parameter series includes one or more sets of camera parameters;
  • the fitness value calculation module is configured to compare the difference between the template image and the ideal world image of the predetermined template to obtain an adaptation value, where the fitness value calculation module includes:
  • An image coordinate calculation unit configured to calculate image coordinates of the template image according to a conversion relationship between world coordinates and image coordinates of the template image created in advance and the assigned camera parameters;
  • a pixel difference value calculation unit configured to calculate a sum of pixel difference values of the same image coordinates between the template image and the ideal world image, and obtain an adaptive value associated with each group of camera parameters
  • a termination determining module configured to determine whether the fitness value calculation result satisfies the set termination condition, and when the fitness value calculation result satisfies the termination condition, a set of camera parameters associated with the fitness value is used as a calibration parameter; when the termination condition is not met Continue to execute the Assign Parameters step and regenerate a series of parameters.
  • the present invention also provides a motor vehicle including the above image processing apparatus.
  • FIG. 1 is a schematic structural diagram of an image processing apparatus in an embodiment
  • FIG. 2 is a schematic structural diagram of an adaptive value calculation module in an embodiment
  • FIG. 3 is a schematic structural diagram of a parameter allocation module in an embodiment
  • 4 is a schematic structural diagram of an image processing apparatus in another embodiment
  • 5 is a flow chart of a method for automatically scaling a camera in an embodiment
  • Figure 6 is a template image acquired by the camera
  • Figure 7 is an image after binarization of the template image
  • Figure 9 is a schematic diagram showing the effect of image correction after camera calibration.
  • FIG. 1 is a schematic structural diagram of an image processing apparatus according to an embodiment.
  • the image processing apparatus includes an image capturing apparatus 10, an allocation parameter module 30, an adaptive value calculating module 40, and a termination determining module 50.
  • the camera device 10 is configured to acquire a template image by capturing a predetermined template, and the camera device 10 may be a camera, a camera or other device capable of capturing an image.
  • a pre-customized template is placed in an area that the camera unit 10 can photograph, and the camera unit 10 is controlled to be photographed as usual.
  • the pre-customized template can be a black and white plane with a specified peripheral size and number of squares.
  • the pre-customized template can also be a flat body between black and white.
  • the ideal world image of the customized template has been pre-stored in the storage device in the image processing device, and the ideal world image is the image captured according to the idealized aperture imaging principle.
  • the allocation parameter module 30 is configured to allocate a parameter series by using a convergence algorithm.
  • a parameter series may include a set of camera parameters, and may also include multiple sets of camera parameters, and each set of camera parameters includes camera external parameters and camera internal parameters.
  • the camera external parameters refer to the three-dimensional position and direction of the camera relative to the world coordinate system, such as position height, rotation angle, translation direction and size.
  • the internal parameters of the camera refer to the internal geometric and optical characteristics of the camera, such as focal length, scale factor and lens distortion.
  • the fitness value calculation module 40 is configured to compare the difference between the template image and the ideal world image of the predetermined template to obtain an adaptation value.
  • the template image captured by the camera 10 is different from the ideal world image of the template, and there is a certain correspondence between the two, and the correspondence is determined by the camera parameters.
  • the machine parameters are scaling parameters for converting an image naturally captured by the camera 10 into a world image represented by image coordinates.
  • the fitness value is the difference between the template image and the ideal world image of the template.
  • the termination determining module 50 is configured to determine whether the fitness value calculation result satisfies the set termination condition, and when the fitness value calculation result satisfies the termination condition, a set of camera parameters associated with the fitness value is used as a calibration parameter; when the termination condition is not met Continue to execute the Assign Parameters step and regenerate a series of parameters.
  • the fitness value calculation module 40 includes an image coordinate calculation unit 41 and a pixel difference value calculation unit 42.
  • the image coordinate calculation unit 41 is for calculating the image coordinates of the template image based on the conversion relationship between the world coordinates of the template image and the image coordinates and the assigned camera parameters.
  • the normal image of the captured template is converted into a world image of the template by a pre-established correspondence model between the image coordinates and the world coordinates, so that the template image can establish a determined world image when the camera parameters are determined.
  • Optimizing the camera parameters also optimizes the world image of the template, which transforms the camera calibration problem into a camera parameter optimization problem, and gradually finds the optimal solution to complete the camera calibration.
  • the camera device is not required to acquire the image of the template at a specific position and from a specific angle, and the camera device can capture the image of the predetermined template as a normal image, thereby reducing the requirement for the calibration environment. .
  • the camera only needs to acquire images once, and does not need to acquire images from different positions and directions multiple times, so it is not necessary to process multiple images, thus shortening the calibration time.
  • the image coordinate calculation unit 41 is configured to establish a correspondence between image coordinates and world coordinates, and includes an external parameter calculation unit 411 and an internal parameter calculation unit 413, and the external parameter calculation unit 411 is configured to establish according to external parameters.
  • the correspondence between the world coordinates and the camera coordinates, that is, the camera coordinates of the template image are calculated according to the conversion relationship between the world coordinates of the template image and the camera coordinates and the external parameters of the camera.
  • the internal parameter calculation unit 413 is configured to establish a correspondence between the corrected camera coordinates and image coordinates according to the internal parameters, that is, calculate a template image according to a conversion relationship between camera coordinates and image coordinates of the template image and a camera internal parameter. Image coordinates. Those skilled in the art will recognize that image coordinates of the template image can also be calculated by other methods.
  • the image coordinate calculation unit 41 further includes a distortion correction unit 412 for correcting the camera coordinates according to distortion parameters in internal parameters, and an interpolation unit 414 for The decimals in the coordinate relationship are converted to integers.
  • the pixel difference value calculation unit 42 is configured to calculate a sum of pixel difference values of the same image coordinates between the template image and the ideal world image, thereby obtaining an adaptation value associated with each group of camera parameters.
  • the convergence algorithm used by the distribution parameter module 30 may be a particle swarm intelligence algorithm, and the distribution parameter module 30 uses a particle swarm intelligence algorithm to allocate a parameter series for each iterative calculation.
  • the allocation parameter module 30 includes an initialization unit 31, an fitness value evaluation unit 32, a density calculation unit 33, and a particle evolution unit 34.
  • the initialization unit 31 is configured to initialize the algorithm parameters when performing the first iteration calculation, and divide the solution space according to the number of particles to generate an initial solution.
  • Each set of camera parameters is taken as the coordinates of a particle, that is, each set of camera parameters determines a particle.
  • the fitness value evaluation unit 32 is used to evaluate the fitness value of the position where the particle is located, and finds the optimal particle and the worst particle calculated by the iteration according to the fitness value, and the optimal particle is the minimum fitness value with the fitness value.
  • An associated set of camera parameters determined particles, the worst particles being particles determined by a set of camera parameters associated with a maximum fitness value in the fitness value.
  • the density calculation unit 33 is used to calculate the density of the particle population used in the calculation of the fitness value step for this iteration.
  • the particle evolution unit 34 is configured to determine a parameter series for the next calculation of the fitness value step according to the particle population density.
  • the particle population density When the particle population density is judged to be low, the particle is moved toward the optimal particle to determine the next calculation of the fitness value.
  • the parameter series in the step when the particle population density is judged to be high, the particles are moved toward the worst particle motion to determine the parameter series used in the next calculation of the fitness value step.
  • the image processing apparatus further includes an image pre-processing module 20 for performing denoising processing on the template image captured by the camera 10, which is different from the above embodiment. , to make the image clearer.
  • image pre-processing module 20 includes a grayscale histogram unit 21, a segmentation threshold unit 22, and a binarization unit 23. The image processed by the image pre-processing module 20 is output to the fitness value calculation module 40 for calculating the fitness value of each group of camera parameters.
  • the grayscale histogram unit 21 generates a gray histogram according to the image statistics; the segmentation threshold unit 22 divides the gray histogram into a high gray class and a low gray class, and determines the split valve according to the principle that the distance between the two types is the largest.
  • the binarization unit 23 binarizes the image according to the segmentation threshold.
  • the allocation parameter module, the fitness value calculation module, and the termination judgment module may be independent processors, or may be divided into several discrete processors according to their functions, or two or three modules may be integrated into one.
  • the processor implements the functions of each module by executing computer executable instructions.
  • a flowchart of a camera automatic calibration method based on the above image processing apparatus includes the following steps:
  • Step S11 Acquiring a predetermined template to obtain a template image.
  • the acquired template image is a black and white image.
  • Step S12 Perform denoising processing on the collected template image.
  • the segmentation threshold is determined according to the principle that the variance between the two classes is the largest, and the image is binarized to reduce the influence of image noise.
  • the calculation method of the segmentation threshold is: For a certain image, t is the segmentation threshold of the foreground and the background, the pre-attraction number occupies an image ratio of w0, and the average pixel is uO; the background point occupies an image ratio of wl, and the average pixel is ul.
  • the binarization unit binarizes the image according to the segmentation threshold t, and the final processed image is as shown in FIG.
  • Step S13 Allocating a parameter series by using a convergence algorithm, each parameter series includes one or more sets of camera parameters, and each set of camera parameters includes camera external parameters and camera internal parameters.
  • the convergence algorithm can be a particle intelligence algorithm, a genetic algorithm, an ant algorithm or a fish group algorithm.
  • a set of camera parameters corresponds to one particle; when a genetic algorithm is used to assign a parameter series for iterative calculation, a set of camera parameters corresponds to one chromosome; when a fish swarm algorithm is used for iterative calculation In the parameter series, a set of camera parameters corresponds to a fish; when the ant algorithm is used to assign a parameter series for iterative calculation, a set of camera parameters corresponds to an ant.
  • the convergence algorithm is initialized to randomly distribute or evenly distribute the particles/chromosomes/ants, thereby grouping a parameter series for the first iteration calculation, which can include only one particle/chromosome.
  • / Ant which includes only a set of camera parameters, can also include multiple particles/chromosomes/ants, including multiple sets of camera parameters, such as 50 particles/chromosome/ant.
  • the convergence algorithm generates a new series of parameters according to certain rules.
  • Step S14 Calculate the image coordinates of the template image according to the conversion relationship model between the world coordinates and the image coordinates of the previously established template image and the assigned camera parameters.
  • the conversion relationship model between the world coordinates of the template image and the image coordinates can be established in the following manner:
  • the relationship between the camera coordinates and the world coordinates is first established according to the external parameters of the camera. Its calculation formula is:
  • t 3xl is the translation vector
  • ? 3x3 is the rotation matrix
  • dz is the camera coordinate
  • (X W Y W Z For world coordinates.
  • the camera coordinates are corrected according to the radial distortion parameters and the tangential distortion parameters.
  • the calculation formula o o is:
  • the relationship between the camera coordinates and the image coordinates is established according to the internal parameters of the camera; the calculation formula is:
  • (u, v) represents the coordinates in the image coordinate system
  • the origin is at the (u0, ⁇ ) pixel point, indicating the size of one pixel (the unit is: mm)
  • f is the focal length of the camera, which is the camera coordinate system. Skewness.
  • the template image coordinates are integerized by bilinear interpolation processing, and finally the relationship between the template image coordinates and the world coordinates is determined.
  • the template image coordinates are integerized using bilinear interpolation, and the calculation formula is:
  • step S14 first, using the assigned camera external parameters, the camera coordinates of the template image can be calculated using equation (1) in the case where the world coordinates of the template image are known. Then, using the assigned camera internal parameters, in the case where the camera coordinates of the template image are known, the image coordinates of the template image can be calculated using equation (3) to form a world image of the template determined by the image coordinates.
  • Step S15 Calculate a sum of pixel difference values of the same image coordinates between the template image and the ideal world image, and obtain an adaptive value associated with each group of camera parameters.
  • N represents the pixel value on the coordinates (i, j) on the template image
  • represents the pixel value of the coordinate (i, j) on the ideal world image
  • Sum represents the sum of the pixel difference values of the world image and the ideal world image
  • the template shape that is, the ideal world image is known
  • the sum of the pixel difference values of the template image and the ideal world image is taken as a function value of the optimization function model
  • the camera parameter is a variable.
  • the variable is changed to change the function value.
  • the smaller the sum of the pixel difference values the better the camera parameters.
  • Step S16 determining whether the fitness value calculation result satisfies the set termination condition, and executing step S17 when the fitness value calculation result satisfies the termination condition, and continuing to perform step S13 when the termination condition is not satisfied, and regenerating a parameter series.
  • the set termination conditions include: a combination of any one or more of the convergence algorithm running times reaching the set value, the number of iterative calculations reaching the set value, and the fitness value reaching the expected value.
  • a process for determining whether the fitness value calculation result satisfies the set termination condition is as shown in FIG. 8, and includes:
  • step S161 it is judged whether the number of iteration calculations reaches the set number of times, and if so, step S17 is performed, otherwise step S162 is continued.
  • Step S162 determining whether the adaptive value in the iterative calculation is smaller than the expected value, if yes, executing step S17; otherwise, continuing to step S163.
  • Step S163 determining whether the running number of the convergence algorithm reaches the set value, and if yes, executing step S17.
  • termination condition determining step one or two termination conditions may be reduced on the basis of the foregoing embodiment, and the judgment order may be arbitrarily changed, or only the selection order may be selected. a termination condition.
  • Step S17 Output a set of camera parameters associated with the fitness value as a calibration parameter, and end the iterative calculation.
  • Figure 9 is an effect diagram of the template image correction after the camera calibration.
  • the pixel value corresponding to each world coordinate is defined as a particle, and the position of the particle is used to represent the solution of the problem to be optimized, and the degree of each particle depends on the fitness value determined by the objective function of the problem to be optimized (ie, Sum value), the smaller the fitness value, the better the representative particle.
  • the camera parameter array as the particle position, that is, a particle is a set of camera parameters.
  • the particles are randomly distributed in the solution space, and calculated in each iteration An example with 50 particles is shown, that is, 50 sets of camera parameters are generated for each iteration calculation.
  • the adaptive value calculation step 50 adaptive values associated with the respective camera parameters are respectively calculated using the generated 50 sets of camera parameters.
  • the calculated fitness value the fitness value of the position of the particle is evaluated, and the optimal particle and the worst particle are obtained according to the fitness value. The smaller the fitness value is, the particle is optimal, the larger the adaptation value is, the worse the particle is.
  • the step of finding the optimal particle and worst particle calculated by this iteration includes the following steps:
  • the individual or group optimal particles find the individual or group optimal particles and use the individual or group optimal particles as the optimal particles calculated by this iteration, find the worst particles of the individual or group and The worst particle of the group is the worst particle calculated by this iteration, and finds the individual particle or individual or group worst particle of each particle, and the individual optimal particle of the particle is calculated with the particle.
  • a particle determined by a set of camera parameters associated with a minimum fitness value of the fitness value wherein the individual worst particle of the particle is a particle determined by a set of camera parameters associated with a maximum fitness value of the fitness values calculated by the particle.
  • the group optimal particle of the certain particle is a particle determined by a set of camera parameters associated with a minimum fitness value of all individual optimal particle fitness values, and the group worst particle of the certain particle is the worst particle fitness value of all individuals
  • the maximum adaptive value in the associated particle set is determined by a set of camera parameters.
  • each particle has 10 fitness values
  • the minimum fitness value and the maximum fitness value are found in the 10 fitness values of each particle.
  • the particle corresponding to the minimum fitness value is an individual optimal particle
  • the particle corresponding to the maximum fitness value is the worst particle of the individual.
  • 50 individual optimal particles and 50 individual worst particles can be found, and the minimum adaptive value is found in 50 individual optimal particles, and the particle corresponding to the minimum fitness value is the group optimal particle.
  • the largest fitness value is found in the worst particles of 50 individuals, and the particle corresponding to the maximum adaptation value is the group's worst particle.
  • the step of finding the optimal particle and worst particle calculated by this iteration includes the following steps:
  • the particle population density is calculated after determining the optimal and worst particles.
  • the calculating the population density of the particles comprises: calculating an average of all the dimensions of all the particles to obtain a central particle; calculating a sum of squares of spatial Euclidean distances of the respective particles and the central particle. If the square sum exceeds the set threshold, the particle density is considered to be low, and if it is lower than the set threshold, the particle density is considered to be high. Particle evolution is then performed based on the particle population density.
  • the step size of each movement of the particles can be calculated in real time according to the formula. It can also be specified that the step distance is a certain value. The particles used for this iteration can be used for the next iteration calculation after adding or subtracting the step distance. particle. At the same time, the particles are mutated with a certain probability and randomly distributed in the range of solvable solutions.
  • the camera calibration problem is transformed into a parameter optimization problem, and the particle swarm optimization algorithm is used to solve the camera to complete the camera calibration.
  • the search accuracy is higher, there is no local convergence phenomenon, and the global optimal can be searched for more probability.
  • the calibration parameters improve the calibration accuracy and reduce the calibration time.
  • the embodiments include multiple steps, some of which may be implemented by executing machine-executable instructions by a general purpose or special purpose computer (or other electronic device). In addition, these steps can also be implemented by hardware including specific logic circuits or by a combination of hardware, software, and/or firmware.
  • a particular embodiment can also be a computer program product that performs the processes described herein, and includes a machine readable medium having stored therein instructions executable by a computer (or other electronic device).
  • Machine-readable media includes, but is not limited to, hardware drives, floppy disks, optical disks, CD ROMs, DVD ROMs, ROMs, RAMs, EPROMs, EEPROMs, magnetic or optical cards, solid state storage devices, or other types of media suitable for storing electronic instructions.
  • Machine readable medium includes, but is not limited to, hardware drives, floppy disks, optical disks, CD ROMs, DVD ROMs, ROMs, RAMs, EPROMs, EEPROMs, magnetic or optical cards, solid state storage devices, or other types of media suitable for storing electronic instructions. Machine readable medium.
  • the steps and image processing apparatus in the above embodiments may be integrated on a motor vehicle or may be fabricated as a separate device mounted on a motor vehicle for safe driving and safe parking of the motor vehicle.
  • the steps and image processing apparatus in the above embodiments can be used on an intelligent robot or other image processing apparatus.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Studio Devices (AREA)

Description

一种摄像机定标方法、 图像处理设备和机动车辆
技术领域 本发明属于摄像机定标技术领域, 具体涉及一种摄像机定标方法、 图像处 理设备和机动车辆。 背景技术 空间物体表面某点的三维几何位置与其在图像中对应点间的相互关系由摄 像机成像的几何模型决定, 其参数就是摄像机参数。 该参数包括摄像机内部几 何和光学特性(内部参数), 以及摄像机相对世界坐标系的三维位置和方向 (外 部参数)。 这些参数必须通过实验和计算得到, 这个过程称为摄像机定标。
在摄像机成像中, 通过摄像机的定标可以建立世界坐标与图像坐标的对应 关系, 再通过视角变换将图像转化为俯瞰图等视图。 这种技术可应用于如车载 摄像机定标、 机器人手眼定标、 移动摄像机定标等领域。
摄像机定标技术主要分为传统的摄像机定标技术、 基于主动视觉的摄像机 定标技术和自定标技术。 传统摄像机定标技术标定精度较高, 但是其对实验环 境和实验控制要求太高, 例如要求模板与摄像机的位置关系固定, 这种定标技 术往往因为不能满足条件而无法应用。 基于主动视觉的摄像机定标技术和自定 标技术较为灵活, 但是此类技术存在以下一些缺点: 往往需要对摄像运动进行 一定的控制从而采集不同位置的图像, 定标时间长; 许多模型都是基于线性假 设的, 对于完全的射影模型, 即当有畸变因子 (skew factor )存在时, 定标精度 不高; 对于同时标定内部参数和外部参数的情况还不能很好地解决; 往往需要 角点检测, 但在超广角摄像机定标拍摄下会发生很大的畸变, 无法进行角点检 测。 发明内容 本发明要解决的主要技术问题是提供一种摄像机定标方法、 图像处理设备 和装置和机动车辆, 降低对定标环境的要求, 减少了定标时间。
根据本发明的一方面, 提供一种摄像机定标方法, 包括步骤:
获取模板图像步骤: 对预定模板进行拍摄获取模板图像;
分配参数步骤: 利用收敛算法分配一个参数系列, 所述一个参数系列包括 一组或多组摄像机参数;
计算适应值步骤: 比较模板图像与预定模板的理想世界图像的差异, 得到 适应值, 所述适应值计算步骤包括:
根据预先建立的模板图像的世界坐标和图像坐标之间的转换关系以及分配 的摄像机参数, 计算模板图像的图像坐标; 和
计算模板图像与理想世界图像之间相同图像坐标的像素差异值的总和, 得 到与各组摄像机参数相关联的适应值;
终止判断步骤: 判断适应值计算结果是否满足设定的终止条件, 当适应值 计算结果满足终止条件时将与该适应值相关联的一组摄像机参数作为定标参 数; 当没有满足终止条件时继续执行分配参数步骤, 重新产生一个参数系列。
根据本发明的另一方面, 提供一种图像处理设备, 包括:
摄像装置, 用于对预定模板进行拍摄获取模板图像;
分配参数模块, 用于利用收敛算法分配一个参数系列, 所述一个参数系列 包括一组或多组摄像机参数;
适应值计算模块, 用于比较模板图像与预定模板的理想世界图像的差异, 从而得到适应值, 所述适应值计算模块包括:
图像坐标计算单元, 用于根据预先建立的模板图像的世界坐标和图像坐标 之间的转换关系以及分配的摄像机参数, 计算模板图像的图像坐标; 和
像素差异值计算单元, 用于计算模板图像与理想世界图像之间相同图像坐 标的像素差异值的总和, 得到与各组摄像机参数相关联的适应值;
终止判断模块, 用于判断适应值计算结果是否满足设定的终止条件, 当适 应值计算结果满足终止条件时将与该适应值相关联的一组摄像机参数作为定标 参数; 当没有满足终止条件时继续执行分配参数步骤, 重新产生一个参数系列。
本发明还提供一种包括上述图像处理设备的机动车辆。
与现有技术相比, 本发明通过将摄像机定标问题转化为参数优化问题, 减 少对定标环境的要求和定标时间, 提高了定标精度。 附图说明 图 1为一种实施例中图像处理设备的结构示意图;
图 2为一种实施例中适应值计算模块的结构示意图;
图 3为一种实施例中分配参数模块的结构示意图;
图 4为另一种实施例中图像处理设备的结构示意图; 图 5为一种实施例中摄像机自动定标方法的流程图;
图 6为摄像机获取的模板图像;
图 7为模板图像二值化后的图像;
图 8为一种实施例中判断是否满足设定的终止条件的流程图;
图 9为完成摄像机定标后图像矫正的效果示意图。 具体实施方式 下面通过具体实施方式结合附图对本发明作进一步详细说明。
在下面具体的描述中, 为了深入理解以下所描述的实施例, 提供了 ί艮多具 体细节。 然而, 本领域的技术人员应该认识到, 其中一个或几个具体细节可以 省略, 或者可以用其他的方法, 器件或材料来代替。 在有些情况下, 有些操作 没有图示也没有详细描述。
请参考图 1 , 图 1示出了一种实施例中图像处理设备的结构示意图, 图像处 理设备包括摄像装置 10、 分配参数模块 30、 适应值计算模块 40和终止判断模 块 50。
摄像装置 10用于对预定模板进行摄像获取模板图像, 摄像装置 10可以是 摄像机、 摄像头或其它可拍摄图像的装置。 当需要定标时, 在摄像装置 10可拍 摄到的区域内放置预先定制的模板, 控制摄像装置 10像通常拍照一样拍摄。 预 先定制的模板可以是黑白格相间的平面体, 具有指定的***尺寸和方格数量。 预先定制的模板也可以是黑白条相间的平面体。 为用于后面的对比, 在图像处 理设备中的存储装置中已经预先存储了该定制模板的理想世界图像, 理想世界 图像就是按照理想化的小孔成像原理拍摄到的图像。
分配参数模块 30用于利用收敛算法分配一个参数系列,一个参数系列可以包 括一组摄像机参数, 也可以包括多组摄像机参数, 每组摄像机参数都包括摄像 机外部参数和摄像机内部参数。 摄像机外部参数是指摄像机相对世界坐标系的 三维位置和方向, 比如位置高度、 旋转角度、 平移方向和大小等。 摄像机内部 参数是指摄像机内部几何和光学特性, 比如焦距、 比例因子和镜头畸变等。 当 进行第一次适应值计算时, 分配参数模块 30进行初始化, 随机或均勾产生一参 数系列用于适应值的计算。
适应值计算模块 40用于比较模板图像与预定模板的理想世界图像的差异, 从而得到适应值。 摄像装置 10 自然拍摄的模板图像不同于模板的理想世界图 像, 两者之间存在一定的对应关系, 而该对应关系由摄像机参数决定, 该摄像 机参数就是用于将摄像装置 10 自然拍摄的图像转换成由图像坐标表示的世界 图像的定标参数。 本实施例中, 适应值为模板图像与模板的理想世界图像之间 的差异。
终止判断模块 50用于判断适应值计算结果是否满足设定的终止条件, 当适 应值计算结果满足终止条件时将与该适应值相关联的一组摄像机参数作为定标 参数; 当没有满足终止条件时继续执行分配参数步驟, 重新产生一个参数系列。
请参考图 2, 在一种实施例中, 所述适应值计算模块 40包括图像坐标计算 单元 41和像素差异值计算单元 42。 图像坐标计算单元 41用于根据预先建立的 模板图像的世界坐标和图像坐标之间的转换关系以及分配的摄像机参数, 计算 模板图像的图像坐标。
上述实施例中, 将拍摄的模板的普通图像通过预先建立的图像坐标与世界 坐标的对应关系模型转换成模板的世界图像, 使模板图像在摄像机参数确定的 情况下可建立确定的世界图像, 不断优化摄像机参数也使模板的世界图像得到 不断优化, 从而将摄像机定标问题转化为摄像机参数优化问题, 逐步寻找最优 解, 从而完成摄像机定标。 在摄像机参数优化过程中, 不要求摄像装置在特定 的位置和从特定的角度来采集模板的图像, 摄像装置可如拍摄普通图像一样来 拍摄预定模板的图像, 因此降低了对定标环境的要求。 在摄像机参数优化过程 中, 摄像装置只需要采集一次图像即可, 不需要从不同的位置和方向多次采集 图像, 因此也不需要对多个图像进行处理, 因此缩短了定标的时间。
在一种实施例中, 所述图像坐标计算单元 41用于建立图像坐标与世界坐标 的对应关系, 包括外部参数计算单元 411和内部参数计算单元 413, 外部参数计 算单元 411 用于根据外部参数建立世界坐标与摄像机坐标的对应关系, 即根据 预先建立的模板图像的世界坐标和摄像机坐标之间的转换关系以及摄像机外部 参数计算模板图像的摄像机坐标。 内部参数计算单元 413 用于根据内部参数建 立所述矫正后的摄像机坐标与图像坐标的对应关系, 即根据预先建立的模板图 像的摄像机坐标和图像坐标之间的转换关系以及摄像机内部参数计算模板图像 的图像坐标。 本领域技术人员应该认识到, 还可以通过其它方法计算模板图像 的图像坐标。
在另一实施例中, 图像坐标计算单元 41还包括畸变矫正单元 412和插值单 元 414,畸变矫正单元 413用于根据内部参数中的畸变参数矫正所述摄像机坐标; 插值单元 414用于将所述坐标关系中的小数转化为整数形式。
像素差异值计算单元 42用于计算模板图像与理想世界图像之间相同图像坐 标的像素差异值的总和, 从而得到与各组摄像机参数相关联的适应值。 请参考图 3, 在一种实施例中, 分配参数模块 30所用的收敛算法可以是粒 子群智能算法, 分配参数模块 30利用粒子群智能算法为每次的迭代计算分配一 个参数系列。 在一具体实施例中, 分配参数模块 30包括初始化单元 31、 适应值 评价单元 32、 密度计算单元 33和粒子进化单元 34。 初始化单元 31用于在进行 第一次迭代计算时初始化算法参数, 将解空间按照粒子数分割从而生成初始解。 将每组摄像机参数作为一个粒子的坐标, 即每组摄像机参数决定一个粒子。 适 应值评价单元 32用于评价粒子所处位置的适应值的优劣, 根据适应值查找出本 次迭代计算的最优粒子和最差粒子, 所述最优粒子为与适应值中最小适应值相 关联的一组摄像机参数确定的粒子, 所述最差粒子为与适应值中最大适应值相 关联的一组摄像机参数确定的粒子。 密度计算单元 33用于计算用于本次迭代计 算适应值步骤中的粒子群体的密度。 粒子进化单元 34用于根据粒子群体密度确 定用于下次计算适应值步骤中的参数系列, 当粒子群体密度判断为低时, 使粒 子朝着最优粒子运动从而确定用于下次计算适应值步骤中的参数系列; 当粒子 群体密度判断为高时, 使粒子背向最坏粒子运动从而确定用于下次计算适应值 步骤中的参数系列。
在如图 4 所示的另一实施例中, 与上述实施例不同的是图像处理设备还包 括图像前处理模块 20, 图像前处理模块 20用于对摄像装置 10拍摄的模板图像 进行去噪处理, 使图像更清晰。 在一种实施例中, 图像前处理模块 20包括灰度 直方图单元 21、 分割阈值单元 22和二值化单元 23。 图像前处理模块 20处理后 的图像输出给适应值计算模块 40用于计算各组摄像机参数的适应值。 灰度直方 图单元 21根据图像统计生成灰度直方图; 分割阔值单元 22将灰度直方图分为 高灰度类与低灰度类, 并根据两类之间距离最大的原则确定分割阀值; 二值化 单元 23依据所述分割阀值将图像进行二值化转化。
上述实施例中, 分配参数模块、 适应值计算模块和终止判断模块可以是各 自独立的处理器, 也可以是根据自身功能分成若干分立的处理器, 也可以是两 个或三个模块集成在一个处理器中, 处理器通过执行计算机可执行指令实现各 模块的功能。
请参考图 5 , 在一种实施例中, 基于上述图像处理设备的一种摄像机自动定 标方法流程图包括以下步骤:
步骤 S11 : 对预定模板进行拍摄获取模板图像, 如图 6所示, 在一种实施例 中, 获取的模板图像为黑白相间的图像。
步骤 S12: 对采集的模板图像进行去噪处理。
具体的, 首先统计图像的像素直方图, 假定阀值将直方图划分为高像素与 低像素两类, 根据两个类间方差值最大的原则确定分割阀值, 对图像进行二值 化处理, 降低图像噪声影响。
其中, 分割阀值计算方法为: 对某张图像, 记 t为前景与背景的分割阈值, 前景点数占图像比例为 w0, 平均像素为 uO; 背景点数占图像比例为 wl , 平均 像素为 ul。 图像的总平均像素为: u=wO¾0+wl*ul。 从最小像素值到最大像素 值遍历 t, 当 t使得值 g=wO*(uO-u)2+wl*(ul-u)2 最大时 t即为分割的最佳阈值。 二值化单元依据分割阀值 t对图像进行二值化处理,最终处理后的图像如图 7所 示。
步骤 S13: 利用收敛算法分配一个参数系列,每个参数系列包括一组或多组 摄像机参数, 每组摄像机参数包括摄像机外部参数和摄像机内部参数。 收敛算 法可以是粒子智能算法、 遗传算法、 蚂蚁算法或鱼群算法。 当采用粒子智能算 法为迭代计算分配参数系列时, 一组摄像机参数对应一个粒子; 当采用遗传算 法为迭代计算分配参数系列时, 一组摄像机参数对应一个染色体; 当采用鱼群 算法为迭代计算分配参数系列时, 一组摄像机参数对应一条鱼; 当采用蚂蚁算 法为迭代计算分配参数系列时, 一组摄像机参数对应一个蚂蚁。 当第一次进行 迭代计算时, 收敛算法进行初始化, 使粒子 /染色体 /蚂蚁随机分布或均勾分布, 从而为第一次的迭代计算分组一个参数系列, 该参数系列可以只包括一个粒子 / 染色体 /蚂蚁, 即只包括一组摄像机参数, 也可以包括多个粒子 /染色体 /蚂蚁, 即 包括多组摄像机参数, 例如 50个粒子 /染色体 /蚂蚁。 在以后的迭代计算中, 收 敛算法根据一定的规则产生新的参数系列。
步骤 S14:根据预先建立的模板图像的世界坐标和图像坐标之间的转换关系 模型以及分配的摄像机参数, 计算模板图像的图像坐标。
在一种实施例中, 模板图像的世界坐标和图像坐标之间的转换关系模型可 通过以下方式建立:
假设摄像机参数已知的情况下, 建立模板图像坐标与世界坐标之间的对应 关系。 具体包括步骤:
第一步, 先根据摄像机外部参数确立摄像机坐标与世界坐标的关系。 其计 算公式为:
( 1 )
Figure imgf000007_0001
其中 t3xl为平移向量, ?3x3为旋转矩阵, d z 为摄像机坐标, (XW YW Z 为世界坐标。
第二步, 再根据径向畸变参数和切向畸变参数, 对摄像机坐标进行修正 其计算公式 o o为:
o丄
X二 x(l + /^m2 + k2m4) + 2pxxy + /?2( 2 +2x2)
(2) y - yil + k^m1 + k2mA) + 2p2xy -\- p1(m2 +2x2) 式中, ^和 是由小孔模型计算出来的图像点坐标的理想值,(X, y)为实际图 像点的坐标; w2= + , kl、 k2为径向畸变系数, pl、 p2为切向畸变系数。
第三步, 根据摄像机内部参数建立摄像机坐标与图像坐标的关系; 其计算 公式为:
0 u,
V。 (3) z
Figure imgf000008_0001
其中, (u, v)表示图像坐标系中的坐标, 原点位于(u0, νθ)像素点上, 表 示一个像素点的大小(其单位为: 毫米), f为摄像机焦距, 为摄像机坐标系的 偏斜度。
第四步, 为了提高了摄像机定标精度, 利用双线性插值处理对模板图像坐 标进行整数化处理, 最终确定模板图像坐标和世界坐标的关系。 利用双线性插 值将模板图像坐标整数化, 其计算公式为:
f ( , y) = ax + by + cxy + d (4)
根据坐标位置最邻近的若干个坐标点的像素值, 再通过加权平均计算得出。 因此在步骤 S14 中, 首先利用分配的摄像机外部参数, 在模板图像的世界 坐标已知的情况下, 利用公式(1)可计算出模板图像的摄像机坐标。 然后利用 分配的摄像机内部参数,在模板图像的摄像机坐标已知的情况下, 利用公式(3) 可计算出模板图像的图像坐标, 形成由图像坐标确定的模板的世界图像。
步骤 S15:计算模板图像与理想世界图像之间相同图像坐标的像素差异值的 总和, 得到与各组摄像机参数相关联的适应值。
其中, 所述像素差异值的总和的计算公式为:
Sum - 其中, N表示模板图像上坐标 (i, j ) 上的像素值, Μ .表示理想世界图像 上坐标 (i,j ) 的像素值, Sum表示世界图像和理想世界图像像素差异值的总和, 也就是适应值, 每个适应值与一组摄像机参数相关联。 图像中每个坐标是对应 一个像素值, 相同的坐标对于两幅不同的图就会有不同的像素值, 已知具体的 一个参数数组就可以计算出 Sum的值。
已知模板形状, 即理想世界图像是已知的, 将模板图像与理想世界图像的 像素差异值的总和作为优化函数模型的函数值, 摄像机参数为变量。 改变变量, 使函数值改变, 本实施例中, 像素差异值的总和越小, 摄像机参数越优。
步骤 S16: 判断适应值计算结果是否满足设定的终止条件, 当适应值计算结 果满足终止条件时执行步骤 S17, 当没有满足终止条件时继续执行步骤 S13, 重 新产生一个参数系列。
设定的终止条件包括: 收敛算法运行次数达到设定值、 迭代计算的次数达 到设定值和适应值达到预期值中的任一或两个以上的组合。 在一种实施例中, 判断适应值计算结果是否满足设定的终止条件的流程如图 8所示, 包括:
步骤 S161 , 判断迭代计算的次数是否达到设定的次数, 如果是, 则执行步 骤 S17, 否则继续步骤 S162。
步骤 S162, 判断本次迭代计算中是否有适应值小于预期值, 如果有, 则执 行步骤 S17, 否则继续步骤 S163。
步骤 S163 , 判断收敛算法的运行次数是否达到设定值, 如果是, 则执行步 骤 S17。
当然, 本领域根据此处公开的内容应该认识到, 终止条件判断步骤中还可 以是在上述实施例的基础上减少一个或两个终止条件, 也可以任意改变其判断 顺序, 也可以只选择其中的一个终止条件。
步骤 S17: 将与该适应值相关联的一组摄像机参数作为定标参数输出, 结束 迭代计算。
利用确定的定标参数对平时拍摄的图像进行矫正, 图 9 为完成摄像机定标 后模板图像矫正的效果图。
下面以收敛算法采用粒子群智能算法为例, 说明如何分配摄像机参数。 本实施例中, 将每个世界坐标对应的像素值定义为一个粒子, 用粒子的位 置表示待优化问题的解, 每个粒子的优劣程度取决于待优化问题目标函数确定 的适应值 (即 Sum值), 适应值越小, 代表粒子越优。
首先, 定义摄像机参数数组为粒子位置, 即一个粒子就是一组摄像机参数。 初始化粒子群算法参数及粒子位置, 粒子随机分布在解空间, 以每次迭代计算 具有 50个粒子为例进行说明, 即每次迭代计算产生 50组摄像机参数。
在适应值计算步骤中, 采用产生的 50组摄像机参数分别计算出与各自摄像 机参数相关联的 50个适应值。 根据计算出的适应值, 评价粒子所处位置的适应 值的优劣, 根据适应值得到最优粒子和最坏粒子, 适应值越小, 粒子最优, 适 应值越大, 粒子越差。 在一种实施例中, 查找本次迭代计算的最优粒子和最差 粒子步骤包括以下步骤:
根据历次计算出的与各粒子相关联的适应值, 查找个体或者群体最优粒子 并将个体或者群体最优粒子作为本次迭代计算的最优粒子, 查找个体或者群体 最差粒子并将个体或者群体最差粒子作为本次迭代计算的最差粒子, 找出各粒 子的个体或群体最优粒子、 个体或群体最差粒子, 所述某粒子的个体最优粒子 为与该粒子历次计算出的适应值中最小适应值相关联的一组摄像机参数确定的 粒子, 所述某粒子的个体最差粒子为与该粒子历次计算出的适应值中最大适应 值相关联的一组摄像机参数确定的粒子。 所述某粒子的群体最优粒子为所有个 体最优粒子适应值中的最小适应值相关联的一组摄像机参数确定的粒子, 所述 某粒子的群体最差粒子为所有个体最差粒子适应值中的最大适应值相关联的一 组摄像机参数确定的粒子。
例如有 50个粒子参加迭代计算, 共进行了 10次迭代计算, 即每个粒子都 有 10个适应值, 在每个粒子的 10个适应值中查找出最小的适应值和最大的适 应值, 该最小适应值对应的粒子为个体最优粒子, 该最大适应值对应的粒子为 个体最差粒子。 按照上述方法可找到 50个个体最优粒子和 50个个体最差粒子, 在 50个个体最优粒子中再查找出最小的适应值, 该最小适应值对应的粒子为群 体最优粒子。 同样, 在 50个个体最差粒子中再查找出最大的适应值, 该最大适 应值对应的粒子为群体最差粒子。
在另一种实施例中, 查找本次迭代计算的最优粒子和最差粒子步骤包括以 下步驟:
在本次迭代计算得到的适应值中找出最大适应值和最小适应值, 将与最小 适应值相关联的一组摄像机参数确定的粒子作为本次迭代计算的最优粒子, 将 与最大适应值相关联的一组摄像机参数确定的粒子作为本次迭代计算的最差粒 子。
确定最优和最差粒子后计算粒子群体密度。 在一种实施例中, 所述粒子群 体密度的计算步骤包括: 计算所有粒子各维度的平均值, 得到中心粒子; 计算 各个粒子与中心粒子的空间欧氏距离的平方和。 若该平方和超过设定的阀值则 认为粒子密度为低, 若低于设定的阀值则认为粒子密度为高。 然后根据粒子群体密度的情况, 进行粒子进化。
当群体密度较低时, 粒子朝着最优粒子运动; 而当群体密度较高时, 粒子 背向最差粒子运动。 粒子每次运动的步距可根据公式实时计算出来, 也可以规 定步距为一确定的值, 用于本次迭代计算的粒子加上或减去步距后可得到用于 下一次迭代计算的粒子。 同时, 粒子以一定的概率产生变异, 而随机分布在可 行解范围。
本实施例通过将摄像机定标问题转化为参数优化问题, 并利用粒子群优化 算法进行求解以完成摄像机定标, 搜索的精度更高, 无局部收敛现象, 可以更 大概率搜索到全局最优的定标参数, 提高了定标精度, 并且减少了定标时间。
实施例中包括多个步骤,而其中一些步骤可以通过通用或专用的计算机(或 其他电子器件)执行机器可执行指令来实现。 另外, 这些步骤也可以通过包含 有特定逻辑电路的硬件或者通过硬件、 软件和 /或固件的组合来实现。
具体实施例也可以是一个可完成这里所描述的过程的计算机程序产品, 它 包括一个可机读的介质, 介质中存储有计算机(或其他电子器件)可执行的指 令。可机读介质包括但不限于硬件驱动器、软盘、光盘、 CD ROM、 DVD ROM、 ROM,, RAM, EPROM、 EEPROM、 磁卡或光卡、 固体存储器件或其他类型 的适用于存储电子指令的媒介 /可机读介质。
上述实施例中的步骤和图像处理设备可以集成在机动车辆上, 也可以制作 成一个单独的设备安装在机动车辆上, 用于机动车辆的安全驾驶和安全泊车。 上述实施例中的步骤和图像处理设备可以用于智能机器人或其他图像处理设备 上。
以上内容是结合具体的实施方式对本发明所作的进一步详细说明, 不能认 定本发明的具体实施只局限于这些说明。 对于本发明所属技术领域的普通技术 人员来说, 在不脱离本发明构思的前提下, 还可以做出若干筒单推演或替换, 都应当视为属于本发明的保护范围。

Claims

1. 一种摄像机定标方法, 其特征在于, 包括:
获取模板图像步骤: 对预定模板进行拍摄获取模板图像; 分配参数步骤: 利用收敛算法分配一个参数系列, 所述一个参数系列包括 一组或多组摄像机参数;
计算适应值步骤: 比较模板图像与预定模板的理想世界图像的差异, 得到 适应值, 所述适应值计算步骤包括:
根据预先建立的模板图像的世界坐标和图像坐标之间的转换关系以及分配 的摄像机参数, 计算模板图像的图像坐标; 和
计算模板图像与理想世界图像之间相同图像坐标的像素差异值的总和, 得 到与各组摄像机参数相关联的适应值;
终止判断步骤: 判断适应值计算结果是否满足设定的终止条件, 当适应值 计算结果满足终止条件时将与该适应值相关联的一组摄像机参数作为定标参 数; 当没有满足终止条件时继续执行分配参数步骤, 重新产生一个参数系列。
2. 如权利要求 1 所述的方法, 其特征在于, 所述分配的每组摄像机参 数包括摄像机外部参数和摄像机内部参数, 所述根据模板图像的世界坐标和图 像坐标之间的转换关系以及分配的摄像机参数计算模板图像的图像坐标包括: 根据预先建立的模板图像的世界坐标和摄像机坐标之间的转换关系以及摄 像机外部参数计算模板图像的摄像机坐标;
根据预先建立的模板图像的摄像机坐标和图像坐标之间的转换关系以及摄 像机内部参数计算模板图像的图像坐标。
3. 如权利要求 1或 2所述的方法, 其特征在于, 所述收敛算法为粒子 群智能算法。
4. 如权利要求 3 所述的方法, 其特征在于, 利用粒子群智能算法计算 摄像机参数包括: 将母組摄像机麥数作为一个粒于的坐标, 很据 值查找出枣次遮代计界 的最优粒子和最差粒子, 所述最优粒子为与适应值中最小适应值相关联的一组 摄像机参数确定的粒子, 所述最差粒子为与适应值中最大适应值相关联的一组 摄像机参数确定的粒子;
计算用于本次迭代计算适应值步骤中的粒子群体的密度;
根据粒子群体密度确定用于下次计算适应值步骤中的参数系列, 当粒子群 体密度判断为低时, 使粒子朝着最优粒子运动从而确定用于下次计算适应值步 骤中的参数系列; 当粒子群体密度判断为高时, 使粒子背向最坏粒子运动从而 确定用于下次计算适应值步骤中的参数系列。
5. 如权利要求 4所述的方法, 其特征在于, 所述一个参数系列包括多 组摄像机参数 , 所述查找本次迭代计算的最优粒子和最差粒子步骤包括:
根据历次计算出的与各粒子相关联的适应值, 查找个体或者群体最优粒子 并将个体或者群体最优粒子作为本次迭代计算的最优粒子, 查找个体或者群体 最差粒子并将个体或者群体最差粒子作为本次迭代计算的最差粒子, 所述某粒 子的个体最优粒子为与该粒子历次计算出的适应值中最小适应值相关联的一组 摄像机参数确定的粒子, 所述某粒子的个体最差粒子为与该粒子历次计算出的 适应值中最大适应值相关联的一组摄像机参数确定的粒子, 所述某粒子的群体 最优粒子为所有个体最优粒子适应值中的最小适应值相关联的一组摄像机参数 确定的粒子, 所述某粒子的群体最差粒子为所有个体最差粒子适应值中的最大 适应值相关联的一组摄像机参数确定的粒子。
6. 如权利要求 4所述的方法, 其特征在于, 所述查找本次迭代计算的 最优粒子和最差粒子步骤包括:
在本次迭代计算得到的适应值中找出最大适应值和最小适应值, 将与最小 适应值相关联的一组摄像机参数确定的粒子作为本次迭代计算的最优粒子, 将 与最大适应值相关联的一组摄像机参数确定的粒子作为本次迭代计算的最差粒 子。
7. 如权利要求 4所述的方法, 其特征在于, 所述粒子群体密度的计算 步骤包括: 计算所有粒子各维度的平均值, 得到中心粒子; 计算各个粒子与中 心粒子的空间欧氏距离的平方和, 若该平方和超过设定的阀值则认为粒子群体 密度为低, 若低于设定的阀值则认为粒子群体密度为高。
8. 如权利要求 1至 7中任一项所述的方法, 其特征在于, 用于进行第 一次适应值计算的参数系列为随机产生。
9. 如权利要求 1至 8中任一项所述的方法, 其特征在于, 所述设定的 终止条件包括: 收敛算法运行次数达到设定值、 迭代计算的次数达到设定值和 适应值达到预期值中的任一或两个以上的组合。
10. 如权利要求 1 所述的方法, 其特征在于, 所述收敛算法还包括遗传 算法、 蚂蚁算法或鱼群算法。
11. 一种图像处理设备, 其特征在于包括:
摄像装置, 用于对预定模板进行拍摄获取模板图像; 分配参数模块, 用于利用收敛算法分配一个参数系列, 所述一个参数系列 包括一组或多组摄像机参数; 适应值计算模块, 用于比较模板图像与预定模板的理想世界图像的差异, 从而得到适应值, 所述适应值计算模块包括: 图像坐标计算单元, 用于根据预先建立的模板图像的世界坐标和图像坐标 之间的转换关系以及分配的摄像机参数, 计算模板图像的图像坐标; 和 像素差异值计算单元, 用于计算模板图像与理想世界图像之间相同图像坐 标的像素差异值的总和, 得到与各组摄像机参数相关联的适应值; 终止判断模块, 用于判断适应值计算结果是否满足设定的终止条件, 当适 应值计算结果满足终止条件时将与该适应值相关联的一组摄像机参数作为定标 参数; 当没有满足终止条件时继续执行分配参数步骤, 重新产生一个参数系列。
12. 如权利要求 11所述的图像处理设备, 其特征在于, 所述分配的每组 摄像机参数包括摄像机外部参数和摄像机内部参数, 所述图像坐标计算单元用 于根据预先建立的模板图像的世界坐标和摄像机坐标之间的转换关系以及摄像 机外部参数计算模板图像的摄像机坐标, 根据预先建立的模板图像的摄像机坐 标和图像坐标之间的转换关系以及摄像机内部参数计算模板图像的图像坐标。
13. 如权利要求 11或 12所述的图像处理设备, 其特征在于, 所述分配 参数模块利用粒子群智能算法为每次的迭代计算分配一个参数系列。
14. 如权利要求 13所述的图像处理设备, 其特征在于, 所述分配参数模 块包括:
适应值评价单元, 用于将每组摄像机参数作为一个粒子的坐标, 根据适应 值查找出本次迭代计算的最优粒子和最差粒子, 所述最优粒子为与适应值中最 小适应值相关联的一组摄像机参数确定的粒子, 所述最差粒子为与适应值中最 大适应值相关联的一组摄像机参数确定的粒子;
密度计算单元, 用于计算用于本次迭代计算适应值步骤中的粒子群体的密 度;
粒子进化单元, 用于根据粒子群体密度确定用于下次计算适应值步骤中的 参数系列, 当粒子群体密度判断为低时, 使粒子朝着最优粒子运动从而确定用 于下次计算适应值步骤中的参数系列; 当粒子群体密度判断为高时, 使粒子背 向最坏粒子运动从而确定用于下次计算适应值步骤中的参数系列。
15. 如权利要求 14所述的图像处理设备, 其特征在于, 所述一个参数系 列包括多组摄像机参数, 所述适应值评价单元用于:
根据历次计算出的与各粒子相关联的适应值, 查找个体最优粒子或者群体 最优粒子并将个体或者群体最优粒子作为本次迭代计算的最优粒子, 查找个体 最差粒子或者群体最差粒子并将个体或者群体最差粒子作为本次迭代计算的最 差粒子, 所述某粒子的个体最优粒子为与该粒子历次计算出的适应值中最小适 应值相关联的一组摄像机参数确定的粒子, 所述某粒子的个体最差粒子为与该 粒子历次计算出的适应值中最大适应值相关联的一组摄像机参数确定的粒子, 所述某粒子的群体最优粒子为所有个体最优粒子适应值中的最小适应值相关联 的一组摄像机参数确定的粒子, 所述某粒子的群体最差粒子为所有个体最差粒 子适应值中的最大适应值相关联的一组摄像机参数确定的粒子。
16. 如权利要求 14所述的图像处理设备, 其特征在于, 所述适应值评价 单元用于:
在本次迭代计算得到的适应值中找出最大适应值和最小适应值, 将与最小 适应值相关联的一组摄像机参数确定的粒子作为本次迭代计算的最优粒子, 将 与最大适应值相关联的一组摄像机参数确定的粒子作为本次迭代计算的最差粒 子。
17. 如权利要求 14所述的图像处理设备, 其特征在于, 所述密度计算单 元用于: 计算所有粒子各维度的平均值, 得到中心粒子; 计算各个粒子与中心 粒子的空间欧氏距离的平方和, 若该平方和超过设定的阀值则认为粒子群体密 度为低, 若低于设定的阀值则认为粒子群体密度为高。
18. 如权利要求 11至 17 中任一项所述的图像处理设备, 其特征在于, 用于进行第一次适应值计算的参数系列为随机产生。
19. 如权利要求 11所述的图像处理设备, 其特征在于, 所述设定的终止 条件包括: 收敛算法运行次数达到设定值、 迭代计算的次数达到设定值和适应 值达到预期值中的任一或两个以上的组合。
20. 一种包括如权利要求 11至 19中任一项所述的图像处理设备的机动 车辆。
PCT/CN2010/076001 2010-08-13 2010-08-13 一种摄像机定标方法、图像处理设备和机动车辆 WO2012019370A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2010/076001 WO2012019370A1 (zh) 2010-08-13 2010-08-13 一种摄像机定标方法、图像处理设备和机动车辆

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2010/076001 WO2012019370A1 (zh) 2010-08-13 2010-08-13 一种摄像机定标方法、图像处理设备和机动车辆

Publications (1)

Publication Number Publication Date
WO2012019370A1 true WO2012019370A1 (zh) 2012-02-16

Family

ID=45567298

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/076001 WO2012019370A1 (zh) 2010-08-13 2010-08-13 一种摄像机定标方法、图像处理设备和机动车辆

Country Status (1)

Country Link
WO (1) WO2012019370A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651957A (zh) * 2016-10-19 2017-05-10 大连民族大学 基于模板的单目视觉目标空间定位方法
CN109829950A (zh) * 2019-01-16 2019-05-31 北京中科慧眼科技有限公司 双目相机标定参数的检测方法,装置与自动驾驶***

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025824A (zh) * 2007-03-30 2007-08-29 东南大学 三维扫描***中的基于固定参数与可变参数的标定方法
JP2009168461A (ja) * 2008-01-10 2009-07-30 Panasonic Corp カメラ校正装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025824A (zh) * 2007-03-30 2007-08-29 东南大学 三维扫描***中的基于固定参数与可变参数的标定方法
JP2009168461A (ja) * 2008-01-10 2009-07-30 Panasonic Corp カメラ校正装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GAO, LINLONG ET AL.: "Method of Parameter Optimization Based on Generic Algorithm for Camera Calibration in Stereo Vision", COMPUTER ENGINEERING AND APPLICATIONS, vol. 43, no. 15, 21 May 2007 (2007-05-21), pages 196 - 197,229 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651957A (zh) * 2016-10-19 2017-05-10 大连民族大学 基于模板的单目视觉目标空间定位方法
CN106651957B (zh) * 2016-10-19 2019-07-30 大连民族大学 基于模板的单目视觉目标空间定位方法
CN109829950A (zh) * 2019-01-16 2019-05-31 北京中科慧眼科技有限公司 双目相机标定参数的检测方法,装置与自动驾驶***

Similar Documents

Publication Publication Date Title
JP7085726B2 (ja) ロボットの目標物体把持位置の検出方法
CN101957990B (zh) 一种摄像机定标方法、图像处理设备和机动车辆
KR101420549B1 (ko) 쿼리 및 모델 이미지들에서 검출된 키포인트들을 클러스터링함에 따른 특징 매칭 방법, 디바이스 그리고 프로세서 판독가능 매체
CN107533754B (zh) 在深度卷积网络中降低图像分辨率
WO2019085621A1 (zh) 目标追踪方法、装置及追踪器
CA3066502A1 (en) Determining positions and orientations of objects
CN112233181A (zh) 6d位姿识别的方法、装置及计算机存储介质
CN111028151B (zh) 基于图残差神经网络融合的点云数据拼接方法
CN113034600B (zh) 基于模板匹配的无纹理平面结构工业零件识别和6d位姿估计方法
CN112819772A (zh) 一种高精度快速图形检测识别方法
WO2021179485A1 (zh) 图像矫正处理方法、装置、存储介质及计算机设备
WO2022205605A1 (zh) 图像边缘特征库构建方法、装置、计算机设备及存储介质
CN109447117B (zh) 双层车牌识别方法、装置、计算机设备及存储介质
CN111080542B (zh) 图像处理方法、装置、电子设备以及存储介质
US20220270215A1 (en) Method for applying bokeh effect to video image and recording medium
CN110689578A (zh) 一种基于单目视觉的无人机障碍物识别方法
Raza et al. Artificial intelligence based camera calibration
CN111815715A (zh) 变焦云台摄像机的标定方法、装置及存储介质
JP7121132B2 (ja) 画像処理方法、装置及び電子機器
CN113034526B (zh) 一种抓取方法、抓取装置及机器人
WO2012019370A1 (zh) 一种摄像机定标方法、图像处理设备和机动车辆
JP7294454B2 (ja) オブジェクト検出方法及びオブジェクト検出装置
JP2006130212A (ja) 異常陰影候補検出方法、および装置、ならびにプログラム
CN114612698A (zh) 一种基于层级匹配的红外与可见光图像配准方法及***
CN102354399B (zh) 一种摄像机外部参数自定标方法及装置

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: 10855791

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10855791

Country of ref document: EP

Kind code of ref document: A1