Calibration method, device and system of visual equipment

By using cameras with different imaging dimensions in a multi-modal vision system, the point cloud conversion relationship between the two cameras is obtained, which solves the problem of being unable to obtain the internal parameters of the line laser 3D camera and realizes the calibration of visual equipment.

CN118587296APending Publication Date: 2024-09-03SUNWODA MOBILITY ENERGY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410624286.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In the existing multi-modal vision system, the internal parameters and imaging process of the line laser 3D camera cannot be obtained, resulting in the inability to complete the calibration.

Method used

By using a first camera and a second camera with different imaging dimensions, the calibration result of the first camera is determined, and the point cloud conversion relationship between the two cameras is obtained based on the imaging results of the first camera and the second camera, and then the second camera is determined The calibration results are obtained to complete the calibration of the visual equipment.

Benefits of technology

There is no need to obtain the internal parameters and imaging process of the second camera. The calibration result of the second camera can be determined only through the calibration result of the first camera and the point cloud conversion relationship between the two cameras, achieving effective calibration of visual equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587296A
    Figure CN118587296A
Patent Text Reader

Abstract

The invention discloses a calibration method, device and system for vision equipment, and belongs to the technical field of machine vision calibration, and the method comprises the steps: firstly, determining a calibration result of a first camera, obtaining the imaging results of the first camera for a calibration object at a plurality of preset collection positions, and obtaining a plurality of first images; determining a second image and a third image used for representing the binocular stereoscopic vision image in the first image, and determining a first point cloud based on the second image and the third image; obtaining an imaging point cloud of the calibration object by a second camera as a second point cloud; after the first point cloud and the second point cloud are registered, the conversion relation of imaging point clouds between the first camera and the second camera is determined, the calibration result of the second camera is determined based on the calibration result of the first camera and the conversion relation, and calibration of the visual equipment is completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of machine vision calibration, and in particular to a calibration method, device and system for visual equipment. Background Art

[0002] 2D and 3D multimodal vision systems include 2D area array cameras, line laser 3D cameras, etc.; 2D cameras usually use calibration plates to solve the conversion relationship between coordinate systems, and their camera parameters are usually easy to obtain; while line laser 3D cameras usually only output three-dimensional spatial information, and do not open their internal parameters and process images taken by the camera to the outside world. Therefore, it is difficult to calibrate multimodal vision systems using existing traditional methods. Summary of the invention

[0003] Purpose of the invention: The purpose of the embodiments of the present application is to provide a calibration method, device and system for a visual device, aiming to solve the technical problem in the prior art that calibration cannot be completed due to the inability to obtain the internal parameters and imaging process of the line laser 3D camera in the multimodal vision system.

[0004] Technical solution: In a first aspect, an embodiment of the present application provides a calibration method for a visual device, wherein the visual device includes a first camera and a second camera, and the imaging dimensions of the first camera and the second camera are different; the calibration method includes:

[0005] Determining a first calibration result of the first camera;

[0006] Acquire a plurality of first images, where the first images are images of the calibration object acquired by the first camera based on each preset acquisition position;

[0007] Determine a second image and a third image from the plurality of the first images, wherein the second image and the third image are configured to represent a binocular stereoscopic vision image;

[0008] Based on the second image and the third image, acquiring a first point cloud of the calibration object;

[0009] Acquire a second point cloud of the calibration object, where the second point cloud is a point cloud of the calibration object collected by the second camera;

[0010] The first point cloud and the second point cloud are registered, and based on a conversion relationship between the first point cloud and the second point cloud and the first calibration result, a second calibration result of the second camera is determined.

[0011] In some embodiments, the number of the third images is multiple; the step of obtaining the first point cloud of the calibration object includes:

[0012] Acquire a plurality of third point clouds, each of the third point clouds being generated by combining the second image and a single third image;

[0013] determining a fourth point cloud and a fifth point cloud from the plurality of third point clouds;

[0014] Based on the fourth point cloud and the fifth point cloud, the first point cloud is acquired.

[0015] In some embodiments, the calibration object includes a standard sphere, and before determining the fourth point cloud and the fifth point cloud from the plurality of third point clouds, the calibration method further includes:

[0016] Performing a first fitting on each of the third point clouds to determine the center coordinates and radius of the standard sphere corresponding to each of the third point clouds;

[0017] Determine an average coordinate based on a plurality of the spherical center coordinates;

[0018] Determine the deviation of each of the spherical center coordinates, wherein the deviation is the distance between the spherical center coordinate and the average coordinate;

[0019] Based on the radius, the third point cloud corresponding to the sphere center coordinates whose deviation is greater than a preset deviation threshold is updated until a convergence condition is met.

[0020] In some embodiments, the step of updating the third point cloud corresponding to the sphere center coordinates whose deviation is greater than a preset deviation threshold based on the radius includes:

[0021] Determining an average radius, the average radius being an average of a plurality of the radii;

[0022] Discrete points are determined and deleted, and the third point cloud is updated, wherein the discrete points are sampling points whose distances to the coordinates of the sphere center are greater than the average radius.

[0023] In some embodiments, the convergence condition includes:

[0024] Performing a second fitting on the updated third point cloud, and updating the sphere center coordinates and the radius based on a result of the second fitting;

[0025] updating the average coordinates and the deviations;

[0026] In response to the deviation satisfying a preset accuracy condition, convergence is determined.

[0027] In some embodiments, the characterization formula of the accuracy condition includes:

[0028]

[0029] Wherein, k is the number of the deviations; x is the ranking number of the deviations; d x is the value of the x-th deviation; q is the preset accuracy value; and m is the number of the third point cloud.

[0030] In some embodiments, the step of performing a second fitting on the updated third point cloud comprises:

[0031] Determining the weight of each sampling point in the third point cloud;

[0032] constructing an error function based on the weights and the coordinates of the sampling points;

[0033] The error function is fitted based on the coordinates of the sampling points, and a minimum value of the error function is determined as a result of the second fitting.

[0034] In some embodiments, the characterization formula of the error function includes:

[0035]

[0036] Wherein, V2 is the error function; N is the number of the sampling points; i is the sequence number of the sampling points; w i is the weight of the coordinate of the i-th sampling point; X i is the X-axis coordinate of the i-th sampling point; i is the Y-axis coordinate of the i-th sampling point; Z i is the Z-axis coordinate of the ith sampling point; A = -2X0, X0 is the X-axis coordinate of the sphere center coordinate; B = -2Y0, Y0 is the Y-axis coordinate of the sphere center coordinate; C = -2Z0, Z0 is the Z-axis coordinate of the sphere center coordinate; D = X0 2 +Y0 2 +Z0 2 .

[0037] In some embodiments, the step of determining a fourth point cloud and a fifth point cloud from the plurality of third point clouds comprises:

[0038] Determine the fourth point cloud, where the fourth point cloud is the third point cloud corresponding to the sphere center coordinates where the deviation is the minimum value;

[0039] The fifth point cloud is determined, where the fifth point cloud is the third point cloud corresponding to the sphere center coordinates whose deviation is greater than the minimum value.

[0040] In some embodiments, the step of obtaining the first point cloud includes:

[0041] Determine a sixth point cloud, where the sixth point cloud is a coincident point cloud of the fourth point cloud and each of the fifth point clouds;

[0042] The first point cloud is constructed based on the sixth point cloud.

[0043] In some embodiments, the step of acquiring a plurality of the third point clouds comprises:

[0044] The second image is stereo matched with each of the third images to obtain the corresponding third point cloud.

[0045] In some embodiments, the step of determining the conversion relationship between the first point cloud and the second point cloud comprises:

[0046] Performing a first registration on the first point cloud and the second point cloud to obtain a first transformation matrix;

[0047] A second registration is performed on the first transformation matrix to obtain a second transformation matrix, where the second transformation matrix is ​​used to characterize the conversion relationship between the first point cloud and the second point cloud.

[0048] In a second aspect, an embodiment of the present application provides a calibration device for a visual device, wherein the visual device includes a first camera and a second camera, and the imaging dimensions of the first camera and the second camera are different; the calibration device includes:

[0049] a first module, the first module being configured to determine a first calibration result of the first camera;

[0050] A second module, wherein the second module is configured to acquire a plurality of first images, where the first images are images of the calibration object acquired by the first camera based on each preset acquisition position;

[0051] A third module, the third module is configured to determine a second image and a third image from the plurality of the first images, wherein the second image and the third image are configured to represent a binocular stereoscopic vision image;

[0052] A fourth module, wherein the fourth module is configured to acquire a first point cloud of the calibration object based on the second image and the third image;

[0053] A fifth module, wherein the fifth module is configured to obtain a second point cloud of the calibration object, where the second point cloud is a point cloud of the calibration object collected by the second camera;

[0054] The sixth module is configured to align the first point cloud and the second point cloud, and determine the second calibration result of the second camera based on the conversion relationship between the first point cloud and the second point cloud and the first calibration result.

[0055] In a third aspect, an embodiment of the present application provides a calibration system for a visual device, comprising:

[0056] Calibration object;

[0057] a first camera, wherein the first camera is configured to capture a plurality of first images of the calibration object based on each preset capture position;

[0058] a second camera, wherein the imaging dimension of the second camera is different from that of the first camera, and the second camera is configured to collect a second point cloud of the calibration object;

[0059] A controller connected to the first camera and the second camera, and configured to execute the calibration method of the visual device as described in any one of the first aspects; or, the controller is provided with a calibration device of the visual device as described in the second aspect.

[0060] In some embodiments, the plurality of acquisition positions are evenly distributed along a straight line.

[0061] In some embodiments, the first camera has a fixed first acquisition angle, the second camera has a fixed second acquisition angle, and the second acquisition angle is the same as the first acquisition angle;

[0062] The field of view of the first camera at a first position and a field of view of the first camera at a second position both cover the calibration object, the first position is a position at the head end of the plurality of acquisition positions, and the second position is a position at the end of the plurality of acquisition positions.

[0063] Beneficial effect: Compared with the prior art, the embodiment of the present application provides a calibration method for a visual device, which includes a first camera and a second camera with different imaging dimensions. First, the calibration result of the first camera is determined, and then the conversion relationship between the imaging point clouds of the first camera and the second camera is determined based on the imaging results of the first camera and the second camera. The calibration result of the second camera is determined based on the calibration result of the first camera and the conversion relationship to complete the calibration of the visual device. When determining the conversion relationship, the present application obtains the imaging results of the calibration object by the first camera at multiple preset acquisition positions to obtain multiple first images; determines the second image and the third image used to characterize the binocular stereo vision image in the first image, and determines the first point cloud based on the second image and the third image; obtains the imaging point cloud of the calibration object by the second camera, which is the second point cloud; and determines the conversion relationship between the imaging point clouds of the first camera and the second camera after registering the first point cloud and the second point cloud. The present application does not need to obtain the internal parameters and imaging process of the second camera. The calibration result of the second camera can be determined only through the calibration result of the first camera and the conversion relationship between the imaging point clouds of the two cameras, and the calibration of the second camera and the overall visual device is completed. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0065] Figure 1 A schematic diagram of the structure of a calibration system for a visual device provided in an embodiment of the present application;

[0066] Figure 2 A flowchart of a method for calibrating a visual device provided in an embodiment of the present application;

[0067] Figure 3 A module connection diagram of a calibration device for a visual device provided in an embodiment of the present application;

[0068] Figure 4 A schematic diagram of a first camera acquiring a first image at different acquisition positions;

[0069] Figure numerals: 1. stage; 2. calibration object; 3. first camera; 4. second camera; 5. light source; 10. first module; 20. second module; 30. third module; 40. fourth module; 50. fifth module; 60. sixth module. DETAILED DESCRIPTION

[0070] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0071] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0072] See also Figure 1 , an embodiment of the present application provides a calibration system for a visual device, comprising:

[0073] Calibration object 2; In the embodiment of the present application, the number of calibration objects 2 is not less than 3, and at the same time, the distance between any two adjacent calibration objects 2 is different, so as to limit all degrees of freedom of calibration objects 2 in space and obtain a unique conversion relationship; Specifically, calibration object 2 can be a standard sphere or a cubic standard block. The embodiment of the present application uses a standard sphere as calibration object 2;

[0074] Carrier 1, carrier 1 is used for carrying calibration object 2;

[0075] A first camera 3, the first camera 3 is configured to capture a plurality of first images of the calibration object 2 based on each preset capture position;

[0076] A second camera 4 , where the imaging dimension of the second camera 4 is different from that of the first camera 3 , and the second camera 4 is configured to collect a second point cloud of the calibration object 2 ;

[0077] A light source 5, which is disposed below the first camera 3 and is used to illuminate the calibration object 2;

[0078] A controller is connected to the first camera 3 and the second camera 4 and is used to execute the calibration method of the visual device provided in the embodiment of the present application; or, the controller is provided with a calibration device of the visual device provided in the embodiment of the present application.

[0079] In some embodiments, the plurality of acquisition positions are evenly distributed along the straight line direction.

[0080] In some embodiments, the first camera 3 has a fixed first acquisition angle, the second camera 4 has a fixed second acquisition angle, and the second acquisition angle is the same as the first acquisition angle; the field of view of the first camera 3 at the first position and the field of view at the second position both cover the calibration object 2, the first position is a position at the head end among multiple acquisition positions, and the second position is a position at the end among multiple acquisition positions.

[0081] Accordingly, see Figure 1 , Figure 2 and Figure 4, the embodiment of the present application provides a calibration method for a visual device, which can be used in the calibration system of the visual device provided in the embodiment of the present application, firstly determine the calibration result of the first camera 3, then determine the conversion relationship of the imaging point cloud between the first camera 3 and the second camera 4 based on the imaging results of the first camera 3 and the second camera 4, and determine the calibration result of the second camera 4 based on the calibration result of the first camera 3 and the conversion relationship, so as to complete the calibration of the visual device. When determining the conversion relationship, the present application obtains the imaging results of the calibration object 2 by the first camera 3 at multiple preset acquisition positions respectively to obtain multiple first images; determines the second image and the third image used to characterize the binocular stereo vision image in the first image, and determines the first point cloud based on the second image and the third image; obtains the imaging point cloud of the calibration object 2 by the second camera 4, which is the second point cloud; and determines the conversion relationship of the imaging point cloud between the first camera 3 and the second camera 4 after registering the first point cloud and the second point cloud. This application does not need to obtain the internal parameters and imaging process of the second camera 4. The calibration result of the second camera 4 can be determined only through the calibration result of the first camera 3 and the conversion relationship between the imaging point clouds of the two cameras to complete the calibration of the second camera 4 and the overall visual device.

[0082] In some embodiments, the first camera 3 and the second camera 4 are respectively a 2D array camera and a 3D line laser camera with different imaging dimensions. Since the calibration result of the 2D array camera can be obtained through self-calibration, and the 3D line laser camera does not open the internal parameters and internal imaging process of the device, and only outputs the imaging result; therefore, this application studies the conversion relationship between the imaging point cloud of the first camera 3 and the second camera 4, and proposes a method for solving the calibration result of the second camera 4 by combining the first calibration result and the conversion relationship, so as to complete the calibration of the second camera 4 and the overall visual device.

[0083] See also Figure 2 In some embodiments, the calibration method of the visual device provided in the embodiment of the present application specifically includes the following steps:

[0084] Step 100: Determine a first calibration result of the first camera 3 .

[0085] In some embodiments, when the first camera 3 is a 2D area array camera, a self-calibration method is used to determine the internal and external parameters of the first camera 3 by acquiring a homography matrix of feature points in an image and an actual self-calibration object.

[0086] In some embodiments, step 100 is implemented by following steps 110 to 130:

[0087] Step 110 : Determine the self-calibration object of the first camera 3 .

[0088] In some embodiments, the self-calibration object of the first camera 3 can be a chessboard or a circle center calibration plate.

[0089] Step 120 : Acquire an image of the self-calibration object through the first camera 3 .

[0090] In some embodiments, taking the self-calibration object as a chessboard as an example, when the first camera 3 is fixed, the chessboard is placed in the field of view of the first camera 3, and multiple groups of images of the chessboard in different positions are captured by the first camera 3, while ensuring that each area of ​​the chessboard in the image has image data. Specifically, there are no less than 4 groups of images of the chessboard, and in order to ensure the self-calibration accuracy of the first camera 3, the embodiment of the present application collects 15 groups of images of the chessboard.

[0091] Step 130: Obtain a first calibration result of the first camera 3 based on the self-calibrated image.

[0092] In some embodiments, Zhang's calibration method is used to obtain the internal and external parameters of the first camera 3, that is, the first calibration result:

[0093]

[0094] Among them, K is the internal parameter matrix of the first camera 3; α is the pixel length of the focal length in the X-axis direction; β is the pixel length of the focal length in the Y-axis direction; γ is the radial distortion parameter; u0 is the coordinate of the principal point of the pixel in the X-axis; v0 is the coordinate of the principal point of the pixel in the Y-axis; H is the external parameter matrix of the first camera 3; R is the rotation matrix; and T is the translation matrix.

[0095] Step 200: Acquire a plurality of first images, where the first images are images of the calibration object 2 captured by the first camera 3 based on each preset capture position.

[0096] In some embodiments, multiple acquisition positions with the same spacing are preset along the straight line direction to provide image acquisition points for the first camera 3 and the second camera 4. Specifically, a slide rail can be laid between the multiple acquisition positions to connect the multiple acquisition positions, so that the first camera 3 and the second camera 4 can reach the designated acquisition position along the slide rail.

[0097] In some embodiments, the calibration object 2 is a three-dimensional standard block, for example, the calibration object 2 may be a standard sphere or a cubic standard block, etc. In the embodiment of the present application, a standard sphere is used as the calibration object 2 .

[0098] Specifically, the camera end of the first camera 3 faces the calibration object 2 to obtain the imaging result of the calibration object 2 to obtain the first image; at the same time, the first camera 3 has a fixed first acquisition angle, that is, the first camera 3 acquires the first image at the first acquisition angle at each acquisition position.

[0099] Step 300: Determine a second image and a third image from a plurality of first images, wherein the second image and the third image are configured to represent a binocular stereoscopic vision image.

[0100] In some embodiments, the second image and the third image may be any first image among a plurality of first images; and then a single second image and a single third image are selected to form a binocular stereo image.

[0101] Step 400: Acquire a first point cloud of the calibration object 2 based on the second image and the third image.

[0102] In some embodiments, step 400 is implemented by following steps 410 to 470:

[0103] Step 410: Acquire multiple third point clouds, each third point cloud being generated by combining the second image and a single third image.

[0104] In some embodiments, one second image is set, and multiple third images are set. One second image is combined with each third image to form multiple binocular stereoscopic vision images. For example, when n acquisition positions are set, the first camera 3 can respectively acquire first images at n acquisition positions, and acquire a total of n first images. When selecting the second image, the first image acquired at any acquisition position can be selected as the second image, and the remaining first images can be selected as the third image. The second image and each third image are combined to obtain n-1 binocular stereoscopic vision images. For example, along the setting direction of multiple acquisition positions, the first image acquired at the first acquisition position can be selected as the second image, and the first images acquired at subsequent acquisition positions are all third images.

[0105] Specifically, after determining a plurality of binocular stereo vision images, the PatchMatch stereo matching algorithm is used to perform stereo matching on the plurality of binocular stereo vision images, and further three-dimensionally reconstruct a plurality of standard sphere space point cloud data, that is, a plurality of third point clouds.

[0106] Step 420: Perform a first fitting on each third point cloud to determine the center coordinates and radius of the standard sphere corresponding to each third point cloud.

[0107] In some embodiments, before fitting the calibration object 2 based on each third point cloud, a statistical filtering algorithm is used to process each third point cloud to filter out outlier noise points in the third point cloud, and voxel downsampling is used to streamline the third point cloud to improve the data processing speed of the third point cloud.

[0108] Specifically, the present application adopts the least square method to perform a first fitting on the third point cloud through the sampling points to obtain the optimal solution of the sphere center coordinates and the radius. Step 420 is implemented by following the steps 421 to 422:

[0109] Step 421: construct a fitting function based on the sampling points.

[0110] In some embodiments, step 421 is implemented by following steps 4211 to 4212:

[0111] Step 4211: traverse all sampling points in the third point cloud to obtain the coordinates of each sampling point; assuming that the coordinates of the center of the standard sphere to be solved in the third point cloud are (X0, Y0, Z0), and the radius of the standard sphere to be solved is R, construct the center equation of the standard sphere based on the coordinates of multiple sampling points in the third point cloud, the coordinates of the center of the standard sphere to be solved (X0, Y0, Z0) and the radius R of the standard sphere to be solved:

[0112] X i 2 +Y i 2 +Z i 2 -2X0X i -2Y0Y i -2Z0Z i +X0 2 +Y0 2 +Z0 2 =R 2 ;

[0113] Among them, X i is the X-axis coordinate of the i-th sampling point; Y i is the Y-axis coordinate of the i-th sampling point; Z i is the Z-axis coordinate of the ith sampling point; X0 is the X-axis coordinate of the sphere center coordinate; Y0 is the Y-axis coordinate of the sphere center coordinate; Z0 is the Z-axis coordinate of the sphere center coordinate.

[0114] Step 4212: Determine the fitting function based on the sphere center equation:

[0115]

[0116] Where V1 is the fitting function; i is the order of the sampling points; N is the number of sampling points; X i is the X-axis coordinate of the i-th sampling point; Y i is the Y-axis coordinate of the i-th sampling point; Z i is the Z-axis coordinate of the ith sampling point; X0 is the X-axis coordinate of the sphere center coordinate; Y0 is the Y-axis coordinate of the sphere center coordinate; Z0 is the Z-axis coordinate of the sphere center coordinate; R is the radius.

[0117] Step 422: Obtain the first minimum value of the fitting function and determine it as the fitting result corresponding to the third point cloud.

[0118] In some embodiments, the first minimum value includes an optimal solution for the coordinates of the sphere center and an optimal solution for the radius; specifically, based on the coordinates of the sampling points, the fitting function is fitted and solved using the least squares method to obtain the optimal solution for the coordinates of the sphere center and the optimal solution for the radius.

[0119] Step 430: Determine an average coordinate based on the multiple sphere center coordinates.

[0120] Specifically, in at least one spherical center coordinate, the average coordinate value of each coordinate axis is determined; and the average coordinate is determined based on each average coordinate value.

[0121] Step 440: Determine the deviation of each sphere center coordinate, where the deviation is the distance between the sphere center coordinate and the average coordinate.

[0122] Specifically, after the sphere center coordinates corresponding to each third point cloud are obtained, the average coordinates of the sphere center coordinates are obtained from the multiple sphere center coordinates, and the deviation of the sphere center coordinates is measured by the distance between the average coordinate and each sphere center coordinate.

[0123] Step 450: Based on the radius, update the third point cloud corresponding to the sphere center coordinates whose deviation is greater than a preset deviation threshold until the convergence condition is met.

[0124] Specifically, the third point cloud corresponding to the sphere center coordinates with excessive deviation is updated, and the discrete points in the point cloud are removed to improve the construction accuracy of the third point cloud and ensure the construction accuracy of the subsequent first point cloud.

[0125] In some embodiments, the selection of the deviation threshold is defined according to specific engineering requirements. For example, in this application, the deviation threshold is set to 0.1.

[0126] In some embodiments, step 450 is implemented by following steps 451 to 455:

[0127] Step 451: Determine an average radius, where the average radius is the average value of multiple radii.

[0128] Specifically, among the third point clouds, an average value of the radii corresponding to the third point clouds is determined.

[0129] Step 452: Determine and delete discrete points, and update the third point cloud. The discrete points are sampling points whose distance to the coordinates of the sphere center is greater than the average radius.

[0130] In some embodiments, after the discrete points are deleted and the third point cloud is updated, it is still necessary to confirm whether the plurality of third point clouds meet the convergence condition, which specifically includes the following steps:

[0131] Step 453: Perform a second fit on the updated third point cloud, and update the sphere center coordinates and radius based on the result of the second fit.

[0132] In some embodiments, the present application introduces the coordinate weights of the sampling points, and fits the updated third point cloud again by iterative reweighted least squares method, so as to update the sphere center coordinates and radius corresponding to the third point cloud by the fitting result, and obtain a more accurate fitting result, which can effectively ensure the robustness of the calibration result. Step 453 is implemented by the following steps 4531 to 4533:

[0133] Step 4531: Determine the weight of each sampling point in the third point cloud.

[0134] In some embodiments, the present application removes sampling points in the third point cloud that exceed the distance threshold by assigning zero weights to update the third point cloud. Specifically, before updating the third point cloud, weights are pre-assigned to each sampling point in the third point cloud. Since the purpose of the present application is to remove sampling points by assigning zero weights, no special requirements are made for the pre-assigned weight values. For the convenience of calculation, the weight value pre-assigned to each sampling point in the present application is 1. When updating the third point cloud, the weights of the sampling points outside the distance threshold are updated to 0 to achieve the purpose of removing the point and updating the third point cloud. The distance threshold is the average value of the radius corresponding to the third point cloud.

[0135] Step 4532: Construct an error function based on the weights and the coordinates of the sampling points.

[0136] Specifically, the characterization formula of the error function includes:

[0137]

[0138] Where V2 is the error function; N is the number of sampling points; i is the order of the sampling points; w i is the weight of the coordinate of the i-th sampling point; X i is the X-axis coordinate of the i-th sampling point; Y i is the Y-axis coordinate of the i-th sampling point; Z i is the Z-axis coordinate of the i-th sampling point; A = -2X0, X0 is the X-axis coordinate of the sphere center coordinate; B = -2Y0, Y0 is the Y-axis coordinate of the sphere center coordinate; C = -2Z0, Z0 is the Z-axis coordinate of the sphere center coordinate; D = X0 2 +Y0 2 +z0 2 .

[0139] After taking partial derivatives of A, B, C, and D, the matrix form of the error function is expressed as follows:

[0140]

[0141] Step 4533: Fit the error function based on the coordinates of the sampling points, and determine the minimum value of the error function as the result of the second fitting.

[0142] Specifically, the error function is fitted and the minimum value of the error function is obtained, including the center coordinates and radius of the standard sphere in the third point cloud after updating.

[0143] Step 454: Update the average coordinates and deviations.

[0144] Specifically, the center coordinates and radius obtained based on the second fitting result are used as new center coordinates and radius. Among multiple third point clouds, the center coordinates of the third point cloud that meets the deviation threshold and convergence conditions are used as the reference, and the average coordinates are updated based on step 430; the deviation is updated based on the updated center coordinates combined with step 440.

[0145] Finally, the updated deviation is compared with the preset accuracy condition, and whether convergence is determined based on the comparison result, which specifically includes the following steps:

[0146] Step 455: In response to the deviation satisfying a preset accuracy condition, convergence is determined.

[0147] Specifically, the characterization formulas of the accuracy conditions include:

[0148]

[0149] Where k is the number of deviations; x is the ranking number of the deviation; d x is the value of the x-th deviation; q is a preset accuracy value. Specifically, the accuracy threshold can be defined based on specific engineering conditions. For example, in this application, the accuracy threshold is set to 0.1; m is the number of the third point cloud.

[0150] Step 460: Determine a fourth point cloud and a fifth point cloud from the plurality of third point clouds.

[0151] Specifically, a fourth point cloud is determined, where the fourth point cloud is the third point cloud corresponding to the sphere center coordinates with the minimum deviation.

[0152] Specifically, a fifth point cloud is determined, where the fifth point cloud is the third point cloud corresponding to the sphere center coordinates whose deviation is greater than the minimum value.

[0153] Specifically, the third point cloud corresponding to the sphere center coordinates with the smallest deviation is selected as the fourth point cloud, and the third point clouds corresponding to the other sphere center coordinates with larger deviations are selected as the fifth point cloud, so as to improve the accuracy of the first point cloud when the first point cloud is subsequently generated by using the fourth point cloud as the reference point cloud and coordinating with multiple fifth point clouds.

[0154] Step 470: Based on the fourth point cloud and the fifth point cloud, obtain the first point cloud.

[0155] In some embodiments, the fourth point cloud is matched and combined with each fifth point cloud respectively. Specifically, the number of fifth point clouds can be single or multiple. At the same time, when the accuracy requirement is high, only the updated third point cloud can be selected as the fifth point cloud. When the accuracy requirement is low, the deviation can be ignored, and the third point cloud other than the fourth point cloud can be selected as the fifth point cloud. In each matching combination, all sampling points of the fourth point cloud and the fifth point cloud are traversed, and the point cloud repeated by the fourth point cloud and the fifth point cloud is retained as the sixth point cloud. The sixth point cloud is spliced ​​between multiple matching combinations to obtain the first point cloud.

[0156] In some embodiments, in order to ensure the uniqueness of the solution to the transformation relationship, when constructing the first point cloud, it is necessary to obtain at least three groups of first point cloud data of the calibration objects 2 to limit all degrees of freedom of the calibration objects 2; specifically, the calibration objects 2 can be set at at least three positions with different distances between adjacent positions, and the method of steps 200 to 400 is executed for the calibration objects 2 at each position to obtain multiple first point clouds; based on the same design scheme, in order to improve the execution efficiency of the method, the present application sets at least 3 calibration objects 2, and the distances between adjacent calibration objects 2 are different. The field of view of the first camera 3 includes all calibration objects 2 for imaging at the same time. All calibration objects 2 are in the same coordinate system. The method of steps 200 to 400 is executed only once to obtain the first point clouds of all calibration objects 2 in the same coordinate system.

[0157] Step 500 : Acquire a second point cloud of the calibration object 2 , where the second point cloud is the point cloud of the calibration object 2 captured by the second camera 4 .

[0158] Specifically, the second camera 4 is a line laser 3D camera. The line laser 3D camera and the 2D area array camera are synchronously fixed on the slide rail. The line laser 3D camera and the 2D area array camera synchronously capture the image of the calibration object 2. The line laser 3D camera directly generates a second point cloud of the calibration object 2.

[0159] In some embodiments, a second point cloud corresponding to each calibration object 2 is synchronously acquired corresponding to each first point cloud, so as to perform point cloud registration later and acquire a conversion relationship between the first point cloud and the second point cloud.

[0160] Step 600: registering the first point cloud and the second point cloud, and determining a second calibration result of the second camera 4 based on a conversion relationship between the first point cloud and the second point cloud and the first calibration result.

[0161] Specifically, after obtaining multiple first point clouds corresponding to multiple calibration objects 2 in the spatial coordinate system of the first camera 3, and multiple second point clouds corresponding to multiple calibration objects 2 in the spatial coordinate system of the second camera 4, the corresponding first point clouds and second point clouds are respectively aligned to obtain the conversion relationship between the first point clouds and the second point clouds.

[0162] In some embodiments, step 600 is implemented by following steps 610 to 620:

[0163] Step 610: Perform a first registration on the first point cloud and the second point cloud to obtain a first transformation matrix.

[0164] In some embodiments, the embodiments of the present application use a coarse registration algorithm to perform a first registration on the first point cloud and the second point cloud, ensuring that the first point cloud and the second point cloud can obtain a good initial registration posture and avoid falling into a local optimum. Specifically, the embodiments of the present application use a four-point congruent sets registration algorithm (4-Points Congruent sets, 4PCS) to coarsely register the first point cloud and the second point cloud. The principle is to use the characteristics that the proportion of line segments occupied by intersection points remains unchanged after rigid transformation and the Euclidean distance between points remains unchanged, and to find 4 approximately coplanar points (approximately congruent four-point sets) in the target point cloud to correspond to it as much as possible, so as to calculate the transformation matrix using the least squares method, iteratively select multiple groups of bases based on the RANSAC algorithm framework, and compare them according to the evaluation criteria of the maximum common point set to obtain the optimal transformation.

[0165] Step 620: Perform a second registration on the first transformation matrix to obtain a second transformation matrix, where the second transformation matrix is ​​used to represent the conversion relationship between the first point cloud and the second point cloud.

[0166] In some embodiments, the embodiments of the present application use a precise registration algorithm to perform a second registration on the first transformation matrix until the first point cloud and the second point cloud overlap to obtain a second transformation matrix. Specifically, the precise registration algorithm in the present application uses a variance minimization iterative matching algorithm (VMM). The variance minimization iterative matching algorithm constructs an objective function based on the square sum of the residuals of the measured point distance and its mean deviation distance, which can effectively suppress the matching tilt problem caused by uneven point clouds. By linearly solving the motion spinor of each iteration, it has a second-order convergence characteristic and a fast convergence speed. Its objective function is as follows:

[0167]

[0168] Wherein, F is the solution function of the second transformation matrix; (r, t) is the second transformation matrix, r is the rotation matrix in the second transformation matrix, t is the translation matrix in the second transformation matrix; c is the number of measurement points; d i is the distance from the ith measuring point to the tangent plane after a single-step iteration.

[0169] It can be understood that an embodiment of the present application provides a calibration method for a visual device, the visual device includes a first camera 3 and a second camera 4 with different imaging dimensions, firstly determining the calibration result of the first camera 3, then determining the conversion relationship of the imaging point cloud between the first camera 3 and the second camera 4 based on the imaging results of the first camera 3 and the second camera 4, and determining the calibration result of the second camera 4 based on the calibration result of the first camera 3 and the conversion relationship, so as to complete the calibration of the visual device. When determining the conversion relationship, the present application obtains the imaging results of the calibration object 2 by the first camera 3 at multiple preset acquisition positions respectively to obtain multiple first images; determines the second image and the third image used to characterize the binocular stereo vision image in the first image, and determines the first point cloud based on the second image and the third image; obtains the imaging point cloud of the calibration object 2 by the second camera 4, which is the second point cloud; and determines the conversion relationship of the imaging point cloud between the first camera 3 and the second camera 4 after registering the first point cloud and the second point cloud. This application does not need to obtain the internal parameters and imaging process of the second camera 4. The calibration result of the second camera 4 can be determined only through the calibration result of the first camera 3 and the conversion relationship between the imaging point clouds of the two cameras to complete the calibration of the second camera 4 and the overall visual device.

[0170] Accordingly, see Figure 3 , an embodiment of the present application further provides a calibration device for a visual device, the visual device comprising:

[0171] The first camera 3 and the second camera 4 have different imaging dimensions; the calibration device includes:

[0172] A first module 10, the first module 10 is configured to determine a first calibration result of the first camera 3;

[0173] A second module 20, the second module 20 is configured to acquire a plurality of first images, where the first image is an image of the calibration object 2 acquired by the first camera 3 based on each preset acquisition position;

[0174] A third module 30, the third module 30 is configured to determine a second image and a third image from the plurality of first images, the second image and the third image being configured to represent a binocular stereoscopic vision image;

[0175] A fourth module 40, the fourth module 40 is configured to obtain a first point cloud of the calibration object 2 based on the second image and the third image;

[0176] A fifth module 50, the fifth module 50 is configured to obtain a second point cloud of the calibration object 2, where the second point cloud is a point cloud of the calibration object 2 acquired by the second camera 4;

[0177] The sixth module 60 is configured to register the first point cloud and the second point cloud, and determine a second calibration result of the second camera 4 based on the conversion relationship between the first point cloud and the second point cloud and the first calibration result.

[0178] In some embodiments, the fourth module 40 is specifically used for:

[0179] Acquire a plurality of third point clouds, each third point cloud being generated by combining the second image and the single third image;

[0180] determining a fourth point cloud and a fifth point cloud from the plurality of third point clouds;

[0181] The first point cloud is obtained based on the fourth point cloud and the fifth point cloud.

[0182] In some embodiments, the fourth module 40 is specifically used for:

[0183] Performing a first fitting on each third point cloud to determine the center coordinates and radius of a standard sphere corresponding to each third point cloud;

[0184] Determining an average coordinate based on the plurality of spherical center coordinates;

[0185] Determine the deviation of each sphere center coordinate, the deviation is the distance between the sphere center coordinate and the average coordinate;

[0186] Based on the radius, the third point cloud corresponding to the sphere center coordinates whose deviation is greater than the preset deviation threshold is updated until the convergence condition is met.

[0187] In some embodiments, the fourth module 40 is specifically used for:

[0188] Determine an average radius, where the average radius is the average of multiple radii;

[0189] Determine and delete discrete points, and update the third point cloud. The discrete points are sampling points whose distance to the coordinates of the sphere center is greater than the average radius.

[0190] In some embodiments, the fourth module 40 is specifically used for:

[0191] Performing a second fitting on the updated third point cloud, and updating the sphere center coordinates and radius based on the result of the second fitting;

[0192] Update mean coordinates and deviations;

[0193] In response to the deviation satisfying a preset accuracy condition, convergence is determined.

[0194] In some embodiments, the fourth module 40 is specifically used for:

[0195] The characterization formulas of the accuracy conditions include:

[0196]

[0197] Where k is the number of deviations; x is the ranking number of the deviation; d x is the value of the xth deviation; q is the preset accuracy value; m is the number of the third point cloud.

[0198] In some embodiments, the fourth module 40 is specifically used for:

[0199] Determine the weight of each sampling point in the third point cloud;

[0200] Construct an error function based on the weights and the coordinates of the sampling points;

[0201] An error function is fitted based on the coordinates of the sampling points, and a minimum value of the error function is determined as a result of the second fitting.

[0202] In some embodiments, the fourth module 40 is specifically used for:

[0203] The characterization formula of the error function includes:

[0204]

[0205] Where V2 is the error function; N is the number of sampling points; i is the order of the sampling points; w i is the weight of the coordinate of the i-th sampling point; X i is the X-axis coordinate of the i-th sampling point; Y i is the Y-axis coordinate of the i-th sampling point; Z i is the Z-axis coordinate of the i-th sampling point; A = -2X0, X0 is the X-axis coordinate of the sphere center coordinate; B = -2Y0, Y0 is the Y-axis coordinate of the sphere center coordinate; C = -2Z0, Z0 is the Z-axis coordinate of the sphere center coordinate; D = X0 2 +Y0 2 +Z0 2 .

[0206] In some embodiments, the fourth module 40 is specifically used for:

[0207] Determine a fourth point cloud, where the fourth point cloud is the third point cloud corresponding to the coordinates of the sphere center with the minimum deviation;

[0208] A fifth point cloud is determined, where the fifth point cloud is the third point cloud corresponding to the sphere center coordinates whose deviation is greater than the minimum value.

[0209] In some embodiments, the fourth module 40 is specifically used for:

[0210] Determine a sixth point cloud, where the sixth point cloud is a coincident point cloud of the fourth point cloud and each of the fifth point clouds;

[0211] The first point cloud is constructed based on the sixth point cloud.

[0212] In some embodiments, the fourth module 40 is specifically used for:

[0213] The second image is stereo matched with each third image to obtain a corresponding third point cloud.

[0214] In some embodiments, the sixth module 60 is specifically used for:

[0215] Performing a first registration on the first point cloud and the second point cloud to obtain a first transformation matrix;

[0216] A second registration is performed on the first transformation matrix to obtain a second transformation matrix, where the second transformation matrix is ​​used to represent a conversion relationship between the first point cloud and the second point cloud.

[0217] The present application has introduced in detail a calibration method, device and system for a visual device provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for calibrating a visual device, characterized in that: The visual device comprises a first camera (3) and a second camera (4), wherein the imaging dimensions of the first camera (3) and the second camera (4) are different; and the calibration method comprises: Determining a first calibration result of the first camera (3); Acquire a plurality of first images, wherein the first images are images of the calibration object (2) acquired by the first camera (3) based on each preset acquisition position; Determine a second image and a third image from the plurality of the first images, wherein the second image and the third image are configured to represent a binocular stereoscopic vision image; Based on the second image and the third image, obtaining a first point cloud of the calibration object (2); Acquire a second point cloud of the calibration object (2), the second point cloud being the point cloud of the calibration object (2) acquired by the second camera (4); The first point cloud and the second point cloud are registered, and based on the conversion relationship between the first point cloud and the second point cloud and the first calibration result, a second calibration result of the second camera (4) is determined.

2. The method for calibrating a visual device according to claim 1, characterized in that: The number of the third images is multiple; the step of obtaining the first point cloud of the calibration object (2) comprises: Acquire a plurality of third point clouds, each of the third point clouds being generated by combining the second image and a single third image; determining a fourth point cloud and a fifth point cloud from the plurality of third point clouds; Based on the fourth point cloud and the fifth point cloud, the first point cloud is acquired.

3. The method for calibrating a visual device according to claim 2, characterized in that: The calibration object (2) includes a standard sphere. Before determining the fourth point cloud and the fifth point cloud from the plurality of third point clouds, the calibration method further includes: Performing a first fitting on each of the third point clouds to determine the center coordinates and radius of the standard sphere corresponding to each of the third point clouds; Determine an average coordinate based on the plurality of spherical center coordinates; Determine the deviation of each of the spherical center coordinates, wherein the deviation is the distance between the spherical center coordinate and the average coordinate; Based on the radius, the third point cloud corresponding to the sphere center coordinates whose deviation is greater than a preset deviation threshold is updated until a convergence condition is met.

4. The method for calibrating a visual device according to claim 3, characterized in that: The step of updating the third point cloud corresponding to the sphere center coordinates whose deviation is greater than a preset deviation threshold based on the radius includes: Determining an average radius, the average radius being an average of a plurality of the radii; Discrete points are determined and deleted, and the third point cloud is updated, wherein the discrete points are sampling points whose distances to the coordinates of the sphere center are greater than the average radius.

5. The method for calibrating a visual device according to claim 3, characterized in that: The convergence conditions include: Performing a second fitting on the updated third point cloud, and updating the sphere center coordinates and the radius based on a result of the second fitting; updating the average coordinates and the deviations; In response to the deviation satisfying a preset accuracy condition, convergence is determined.

6. The method for calibrating a visual device according to claim 5, characterized in that: The characterization formula of the accuracy condition includes: Wherein, k is the number of the deviations; x is the ranking number of the deviations; d x is the value of the x-th deviation; q is the preset accuracy value; and m is the number of the third point cloud.

7. The method for calibrating a visual device according to claim 5, characterized in that: The step of performing a second fitting on the updated third point cloud comprises: Determining the weight of each sampling point in the third point cloud; constructing an error function based on the weights and the coordinates of the sampling points; The error function is fitted based on the coordinates of the sampling points, and a minimum value of the error function is determined as a result of the second fitting.

8. The method for calibrating a visual device according to claim 7, characterized in that: The characterization formula of the error function includes: Wherein, V2 is the error function; N is the number of the sampling points; i is the sequence number of the sampling points; w i is the weight of the coordinate of the i-th sampling point; X i is the X-axis coordinate of the i-th sampling point; i is the Y-axis coordinate of the i-th sampling point; Z i is the Z-axis coordinate of the ith sampling point; A = -2X0, X0 is the X-axis coordinate of the sphere center coordinate; B = -2Y0, Y0 is the Y-axis coordinate of the sphere center coordinate; C = -2Z0, Z0 is the Z-axis coordinate of the sphere center coordinate; D = X0 2 +Y0 2 +Z0 2 .

9. The method for calibrating a visual device according to claim 3, characterized in that: The step of determining a fourth point cloud and a fifth point cloud from the plurality of third point clouds comprises: Determine the fourth point cloud, where the fourth point cloud is the third point cloud corresponding to the sphere center coordinates where the deviation is the minimum value; The fifth point cloud is determined, where the fifth point cloud is the third point cloud corresponding to the sphere center coordinates whose deviation is greater than the minimum value.

10. The method for calibrating a visual device according to claim 2, characterized in that: The step of acquiring the first point cloud comprises: Determine a sixth point cloud, where the sixth point cloud is a coincident point cloud of the fourth point cloud and each of the fifth point clouds; The first point cloud is constructed based on the sixth point cloud.

11. The method for calibrating a visual device according to claim 2, characterized in that: The step of acquiring a plurality of the third point clouds comprises: The second image is stereo matched with each of the third images to obtain the corresponding third point cloud.

12. The method for calibrating a visual device according to claim 1, characterized in that: The step of determining the conversion relationship between the first point cloud and the second point cloud comprises: Performing a first registration on the first point cloud and the second point cloud to obtain a first transformation matrix; A second registration is performed on the first transformation matrix to obtain a second transformation matrix, where the second transformation matrix is ​​used to characterize the conversion relationship between the first point cloud and the second point cloud.

13. A calibration device for a visual device, characterized in that: The visual device comprises a first camera (3) and a second camera (4), wherein the imaging dimensions of the first camera (3) and the second camera (4) are different; and the calibration device comprises: A first module (10), wherein the first module (10) is configured to determine a first calibration result of the first camera (3); A second module (20), the second module (20) being configured to acquire a plurality of first images, the first images being images of the calibration object (2) acquired by the first camera (3) based on each preset acquisition position; A third module (30), the third module (30) being configured to determine a second image and a third image from the plurality of first images, the second image and the third image being configured to represent a binocular stereoscopic vision image; A fourth module (40), the fourth module (40) being configured to acquire a first point cloud of the calibration object (2) based on the second image and the third image; A fifth module (50), the fifth module (50) being configured to obtain a second point cloud of the calibration object (2), the second point cloud being the point cloud of the calibration object (2) acquired by the second camera (4); A sixth module (60), wherein the sixth module (60) is configured to register the first point cloud and the second point cloud, and determine a second calibration result of the second camera (4) based on a conversion relationship between the first point cloud and the second point cloud and the first calibration result.

14. A visual equipment calibration system, characterized in that: include: Calibration object (2); A first camera (3), wherein the first camera (3) is configured to capture a plurality of first images of the calibration object (2) based on each preset capture position; a second camera (4), the imaging dimension of the second camera (4) being different from that of the first camera (3), and the second camera (4) being configured to collect a second point cloud of the calibration object (2); A controller, wherein the controller is connected to the first camera (3) and the second camera (4) and is configured to execute the calibration method of the visual device as described in any one of claims 1 to 12; or, the controller is provided with a calibration device of the visual device as described in claim 13.

15. The visual device calibration system according to claim 14, characterized in that: The plurality of collection positions are evenly distributed along the straight line direction.

16. The visual device calibration system according to claim 15, characterized in that: The first camera (3) has a fixed first acquisition angle, and the second camera (4) has a fixed second acquisition angle, and the second acquisition angle is the same as the first acquisition angle; The field of view of the first camera (3) at a first position and at a second position both cover the calibration object (2), the first position being a position at the head end among the plurality of acquisition positions, and the second position being a position at the end among the plurality of acquisition positions.