Calibration measurement method and system based on pixel mapping

By establishing the camera's pixel mapping relationship and fitting straight lines with horizontal offsets, the complex problem of the camera calibration process is solved, and fast and high-precision three-dimensional measurement is achieved.

CN116188590BActive Publication Date: 2025-08-12JIANGSU ZHONGKEGUANWEI AUTOMATION TECH CO LTD

Patent Information

Application Number
CN202211647121.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2025-08-12
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

In the prior art, the camera calibration method is complex and time-consuming, making it difficult to achieve fast, simple and efficient calibration and measurement, which affects the accuracy of the three-dimensional measurement results.

Method used

By establishing the camera's pixel position-height mapping relationship and pixel position-horizontal resolution mapping relationship, we determine the pixel horizontal offset fitting line, realize fast calibration, and output high-precision three-dimensional point clouds.

Benefits of technology

The calibration process is simplified while maintaining high-precision measurements, enabling the rapid output of high-precision 3D point clouds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116188590B_ABST
    Figure CN116188590B_ABST
Patent Text Reader

Abstract

The present invention relates to a calibration measurement method and system based on pixel mapping. The method comprises: providing a camera for measurement, and performing pixel mapping-based calibration on the camera, wherein, during calibration, a pixel position-horizontal resolution mapping relationship of the camera is established, and a pixel horizontal offset fitting line of the image captured by the camera is determined; when measuring an object based on the calibrated camera, at the current pixel coordinates of the object image, the spatial height of the object and the corresponding width change in the horizontal direction of the image are determined based on the camera's pixel position-horizontal resolution mapping relationship and the pixel horizontal offset fitting line; based on the determined spatial height of the object and the corresponding width change in the horizontal direction of the image, single-frame contour information is spliced along the object scanning direction and step size to output a three-dimensional point cloud of the object. The present invention can achieve rapid calibration of the camera, and when measuring with the calibrated camera, a high-precision three-dimensional point cloud can be output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a calibration measurement method and system, in particular to a calibration measurement method and system based on pixel mapping. Background Art

[0002] In industrial 3D measurement and machine vision applications, it is necessary to determine the mapping relationship between the 3D geometric position of a point on the surface of a spatial object and the corresponding point in the image. At this time, it is necessary to establish a geometric model of camera imaging and solve the model parameters. This process is called camera calibration. The accuracy of camera calibration directly affects the accuracy of the final measurement results.

[0003] Currently, traditional camera calibration methods require obtaining the internal and external parameters of the camera model separately, followed by a series of coordinate system transformations to obtain a 3D result. This entire calibration process is complex, time-consuming, and tedious. Therefore, achieving fast, simple, and efficient calibration and measurement is an urgent problem that needs to be solved. Summary of the Invention

[0004] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a calibration measurement method and system based on pixel mapping, which can achieve rapid calibration of cameras and output high-precision three-dimensional point clouds when measuring with a calibrated camera.

[0005] According to the technical solution provided by the present invention, a calibration measurement method based on pixel mapping includes:

[0006] A camera for measurement is provided, and the camera is calibrated based on pixel mapping. During the calibration, a pixel position-height mapping relationship and a pixel position-horizontal resolution mapping relationship of the camera are established, and a pixel horizontal offset fitting line of an image captured by the camera is determined.

[0007] When measuring an object using the calibrated camera, the object's spatial height and the corresponding width change in the horizontal direction of the image are determined based on the camera's pixel position-horizontal resolution mapping relationship and the pixel horizontal offset fitting line at the current pixel coordinates of the object image.

[0008] Based on the determined spatial height of the object and the corresponding width change in the horizontal direction of the image, single-frame contour information is spliced along the object scanning direction and step size to output a three-dimensional point cloud of the object.

[0009] When calibrating the camera, it includes:

[0010] Construct the camera's pixel position-height mapping relationship;

[0011] Based on the constructed pixel position-height mapping relationship, a camera height-horizontal resolution mapping relationship is established;

[0012] Based on the above-mentioned camera pixel position-height mapping relationship and height-horizontal resolution mapping relationship, establish the camera pixel position-horizontal resolution mapping relationship;

[0013] Based on the established pixel position-horizontal resolution mapping relationship, a pixel horizontal offset fitting line of the image captured by the camera is determined.

[0014] When building the camera's pixel position-height mapping relationship, it includes:

[0015] Providing a position height mapping model, dividing the position height mapping model into height intervals within the camera's height measurement domain, wherein the intervals of the divided intervals are smaller than the camera's height measurement accuracy;

[0016] Using a camera to acquire an image of the position height mapping model within the height measurement domain, and extracting all height values and pixel coordinates corresponding to the extracted height values, using the vertical pixel coordinates as the position of the current height on the image;

[0017] For the position height mapping model, the starting position of the height measurement is configured, and the camera's pixel position-height mapping relationship is constructed based on the height distribution relative to the starting position and the corresponding image pixel position distribution.

[0018] The position height mapping model includes stepped blocks with uniformly distributed height intervals;

[0019] For the position height mapping model using staircase blocks, the vertical pixel coordinates are used as the current height position on the image, then:

[0020] Extract the line segments corresponding to the steps in the image. For each step line segment, take the vertical pixel coordinate v of the midpoint of the line segment as the position of the current step height on the image.

[0021] When determining the camera's height-horizontal resolution mapping relationship, include:

[0022] Map the height h of the model's starting position relative to the position height i , calculated at the height h i Horizontal resolution Rx i , wherein the horizontal resolution Rx i for f is the focal length of the camera, WD is the working distance between the camera and the starting position of the position height mapping model;

[0023] Based on the above different heights h i Corresponding horizontal resolution, establish the camera height-horizontal resolution mapping relationship.

[0024] When determining the pixel horizontal offset fitting straight line of the image captured by the camera, including

[0025] Take the horizontal pixel coordinates and corresponding horizontal resolutions at two different heights, and calculate the horizontal offset of the pixels between the two heights;

[0026] According to the above pixel horizontal deviation and the vertical pixel coordinates of the two heights, a straight line fitting is performed to obtain a pixel horizontal offset fitting line after fitting.

[0027] Determining the object height and the corresponding width change in the horizontal direction of the image includes:

[0028] For the pixel coordinates of any pixel point of the object on the object image, traverse and search for the height position interval to which the pixel coordinates belong based on the pixel position-height mapping relationship;

[0029] For the height position interval found, use linear interpolation to calculate the object height and horizontal resolution corresponding to the current vertical pixel coordinate;

[0030] Fit a straight line according to the horizontal offset of the pixels and calculate the horizontal pixel coordinates after offset compensation;

[0031] Calculate the width direction position of the current pixel point based on the horizontal resolution and the compensated horizontal pixel coordinates;

[0032] Repeat the above steps to determine the spatial height of the object and the corresponding width change in the horizontal direction of the image.

[0033] A calibration measurement system based on pixel mapping includes a camera and a calibration measurement controller, wherein:

[0034] The calibration measurement controller calibrates the camera using the calibration measurement method described above, and uses the calibrated camera to measure the object to output a three-dimensional point cloud of the object.

[0035] For calibration of measurement controllers, including:

[0036] Height calibration module, used to obtain the height and corresponding pixel coordinates and establish the camera's pixel position-height mapping relationship;

[0037] The width calibration module is used to calculate the horizontal resolution at different heights and establish the camera's height-horizontal resolution mapping relationship;

[0038] The width compensation module is used to establish the camera's pixel position-horizontal resolution mapping relationship and determine the camera's pixel horizontal offset fitting line;

[0039] Coordinate calculation module, used to calculate the height and width coordinates of the object;

[0040] The point cloud output module is used to stitch together the coordinate calculation results of objects at different times and output a three-dimensional point cloud.

[0041] The advantages of this method include: by dividing the camera's measurement range into different heights, establishing a pixel-to-height mapping relationship for each height, and then establishing a horizontal resolution mapping relationship. This method then fits the horizontal offset coefficient to complete coordinate calculation and point cloud output. Compared to traditional calibration methods, this method simplifies the calibration process and makes it easier to implement while maintaining high measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 This is a flow chart of an embodiment of calibration measurement of the present invention.

[0043] Figure 2 A schematic diagram of the present invention using linear interpolation to calculate the object height and horizontal resolution corresponding to the current vertical pixel coordinate.

[0044] Figure 3 A schematic diagram of an embodiment of determining a horizontal pixel offset according to the present invention.

[0045] Figure 4 A schematic diagram showing a comparison of the height calculation results of the height calibration of the present invention.

[0046] Figure 5 Schematic diagram comparing the width calculation results of width calibration and compensation in the present invention.

[0047] Figure 6 A schematic diagram of an embodiment of outputting a three-dimensional point cloud according to the present invention. DETAILED DESCRIPTION

[0048] The present invention will be further described below with reference to specific drawings and embodiments.

[0049] To achieve rapid calibration, a high-precision three-dimensional point cloud can be output when measuring with a calibrated camera. In one embodiment of the present invention, a calibration measurement method based on pixel mapping includes:

[0050] A camera for measurement is provided, and the camera is calibrated based on pixel mapping. During the calibration, a pixel position-height mapping relationship and a pixel position-horizontal resolution mapping relationship of the camera are established, and a pixel horizontal offset fitting line of an image captured by the camera is determined.

[0051] When measuring an object using the calibrated camera, the object's spatial height and the corresponding width change in the horizontal direction of the image are determined based on the camera's pixel position-horizontal resolution mapping relationship and the pixel horizontal offset fitting line at the current pixel coordinates of the object image.

[0052] Based on the determined spatial height of the object and the corresponding width change in the horizontal direction of the image, single-frame contour information is spliced along the object scanning direction and step size to output a three-dimensional point cloud of the object.

[0053] Specifically, the camera used for measurement can adopt an existing commonly used form, and the type of camera can be selected according to the actual application requirements, so as to meet the actual application requirements. As can be seen from the above description, when using a camera to measure an object, the camera needs to be calibrated. In one embodiment of the present invention, the camera is calibrated based on a pixel mapping method, so that after calibration, the pixel position-height mapping relationship and the pixel position-horizontal resolution mapping relationship of the camera can be determined, and the pixel horizontal offset fitting line of the image captured by the camera can be obtained.

[0054] In specific implementation, for any point (u, v) on the image pixel coordinates and the corresponding point (x, y) on the image physical coordinates, we have: Among them, dx is the unit pixel size in the horizontal direction, and dy is the unit pixel size in the vertical direction. The unit pixel size dx in the horizontal direction and the unit pixel size dy in the vertical direction are related to the camera sensor chip, are inherent properties of the camera, and are generally known quantities.

[0055] In the world coordinate system, the width of an object corresponds to the horizontal direction of the image, the height of the object corresponds to the vertical direction of the image, and the object's motion / scanning direction is the object's length. Therefore, horizontal / vertical refers to the image, while length / width / height refers to the object in space.

[0056] For all objects in space, there is a starting position in height (Z=0 plane), but there is no specified uniform starting point for width. Generally, the leftmost end of the measured object is used as the starting point. Therefore, it is necessary to determine the width change corresponding to the object in the horizontal direction of the image.

[0057] When splicing single-frame contour information along the object scanning direction and step length, the specific process includes: calculating the object scanning step length, that is, the distance interval between adjacent frames step = V / f ps , where V is the scanning speed of the camera to the object, f ps is the camera frame rate.

[0058] Taking the scanning direction as the length direction of the object, the single-frame contour information containing the height and width is arranged in sequence along the length direction (the arrangement interval can be selected according to actual needs. For example, when transport scanning, an interval arrangement setting can be adopted). At this time, the single-frame contour information is spliced, and the splicing forms the three-dimensional point cloud of the object. In the three-dimensional point cloud of the object, the length coordinates of all contours in any frame can be expressed as N*step, where N is the frame number.

[0059] When calibrating a camera based on pixel mapping, in one embodiment of the present invention, the camera calibration includes:

[0060] Construct the camera's pixel position-height mapping relationship;

[0061] Based on the constructed pixel position-height mapping relationship, a camera height-horizontal resolution mapping relationship is established;

[0062] Based on the above-mentioned camera pixel position-height mapping relationship and height-horizontal resolution mapping relationship, establish the camera pixel position-horizontal resolution mapping relationship;

[0063] Based on the established pixel position-horizontal resolution mapping relationship, a pixel horizontal offset fitting line of the image captured by the camera is determined.

[0064] Figure 1 The flowchart of camera calibration and measurement using the calibrated camera is shown in FIG. Figure 1 It can be seen that during calibration, the camera's pixel position-height mapping relationship, height-horizontal resolution mapping relationship, and pixel position-horizontal resolution mapping relationship are generally constructed in sequence, and finally the camera's pixel horizontal offset fitting line can be determined.

[0065] Furthermore, when constructing the camera's pixel position-height mapping relationship, it includes:

[0066] Providing a position height mapping model, dividing the position height mapping model into height intervals within the camera's height measurement domain, wherein the intervals of the divided intervals are smaller than the camera's height measurement accuracy;

[0067] Using a camera to acquire an image of the position height mapping model within the height measurement domain, and extracting all height values and pixel coordinates corresponding to the extracted height values, using the vertical pixel coordinates as the position of the current height on the image;

[0068] For the position height mapping model, the starting position of the height measurement is configured, and the camera's pixel position-height mapping relationship is constructed based on the height distribution relative to the starting position and the corresponding image pixel position distribution.

[0069] In practice, a camera pixel position-height mapping relationship is constructed, primarily for camera height calibration. This is accomplished using a position-height mapping model. After configuring a starting position for height measurement, any height value extracted is the height difference relative to that starting position; of course, the configured starting position must be within the camera's height measurement domain.

[0070] In one embodiment of the present invention, the position height mapping model includes stepped blocks with uniformly spaced heights;

[0071] For the position height mapping model using staircase blocks, the vertical pixel coordinates are used as the current height position on the image, then:

[0072] Extract the line segments corresponding to the steps in the image. For each step line segment, take the vertical pixel coordinate v of the midpoint of the line segment as the position of the current step height on the image.

[0073] Specifically, for the step block used as the position height mapping model, the interval between adjacent steps may be 0.5 mm; and for the starting position, the bottom end of the step block may be used as the starting position.

[0074] Furthermore, when determining the camera's height-horizontal resolution mapping relationship, the following steps are included:

[0075] Map the height h of the model's starting position relative to the position height i , calculated at the height h i Horizontal resolution Rx i , wherein the horizontal resolution Rx i for f is the focal length of the camera, WD is the working distance between the camera and the starting position of the position height mapping model;

[0076] Based on the above different heights h i Corresponding horizontal resolution, establish the camera height-horizontal resolution mapping relationship.

[0077] Due to the nature of camera imaging, the width of objects captured within the same range of an image varies at different heights. Horizontally, within a row of an image, the image pixel size and actual physical distance are linearly related, known as horizontal resolution. Horizontal resolution Rx is calculated as the object point's offset distance divided by the horizontal offset distance of the image pixels. Generally, pixels within the same row of an image have consistent horizontal resolutions, while pixels in different rows have different horizontal resolutions.

[0078] For ease of calculation, the leftmost column of pixels in the image, u=0, is used as the horizontal / width starting point. However, when merged into a unified space, the starting positions at different heights are different, while the distance calculated based on the horizontal resolution remains unchanged. This is called the offset distance, or width change in physical space.

[0079] Suppose a point (u, v) on the image corresponds to a spatial point P, and the physical space point corresponding to the starting point (0, v) of the pixel row where (u, v) is located is used as the origin of the world coordinate system where P is located. Then P can be expressed as (X, Z), where X is the relative distance change along the horizontal direction of the image relative to the spatial origin; because the spatial origins at different heights are different, they are expressed as offsets, and Z is the height of the point. In the above formula, the height h of the step corresponding to the image coordinate can be expressedi .

[0080] In the above formula, h i is the height of the step corresponding to the image coordinate. From the above description, we can see that each height h i Corresponding to a horizontal resolution Rx i Based on the horizontal resolutions corresponding to all heights, a camera height-horizontal resolution mapping relationship can be established. Therefore, for any object, the height h obtained from the height calibration result can be used to calculate the horizontal resolution Rx at that height h using the above method.

[0081] According to the above pixel position-height mapping relationship, we can get Among them, v i are different vertical pixel coordinates in the image; combined with the height-horizontal resolution mapping relationship, we can get Then we get the pixel position-horizontal resolution mapping relationship

[0082] Furthermore, when determining the pixel horizontal offset fitting line of the image captured by the camera, it includes

[0083] Take the horizontal pixel coordinates and corresponding horizontal resolutions at two different heights, and calculate the horizontal offset of the pixels between the two heights;

[0084] According to the above pixel horizontal deviation and the vertical pixel coordinates of the two heights, a straight line fitting is performed to obtain a pixel horizontal offset fitting line after fitting.

[0085] As can be seen from the above description, since the widths of the outlines of the same object in each frame have different starting points, compensation is required to align the starting points. This means determining the pixel horizontal offset to fit the line. "Offset" in an image refers to the starting point in the image, while "offset" in space refers to the spatial origin, which corresponds to the image starting point. Furthermore, the two different heights used are generally based on what meets the requirements for line fitting. However, the greater the difference in height, the more accurately the fitted line matches the actual horizontal resolution distribution.

[0086] For fitting a straight line to the horizontal offset of pixels, a specific embodiment is given below, specifically:

[0087] When the position-height mapping model uses a staircase block, take the lowest and highest staircase heights and their corresponding horizontal pixel coordinates (u1, Rx1) and (u2, Rx2) on the staircase block image, align the two point widths, and calculate the pixel horizontal offset.

[0088] The height difference and the above-mentioned horizontal offset are used to fit a straight line, and the straight line coefficient is used as the pixel horizontal offset to fit the straight line.

[0089] Specifically, in the images at the above two heights, calculating the same object width change, we have: x1*Rx1=x2*Rx2, x1 and x2 are the coordinate points of the physical coordinates of the image. Since x1=u1*dx and x2=u2*dx, we have u1*Rx1=u2*Rx2, where Rx1 and Rx2 are the horizontal resolutions corresponding to the lowest and highest heights, respectively, and Rx1>Rx2; u1 and u2 respectively represent the corresponding pixel horizontal coordinates of the images at the two heights.

[0090] Let u2 be the image width, then the horizontal pixel difference between the two is u2-u1. Let the width of the object in the image where u1 is located be aligned with the image where u2 is located, then the position of u1 on the image will also move horizontally, and its pixel horizontal offset offset_x0 is The pixel horizontal offset can be calculated. The specific calculation method and process of the pixel horizontal offset can be referred to here.

[0091] Since horizontal resolution varies linearly with height, the horizontal offset also varies linearly at different heights. Using the horizontal pixel starting point u1 = 0 at the initial position (i.e., the lowest height) as the reference, the linear equation is fitted. Combined with the position-height mapping model established previously, the resulting pixel horizontal offset fitting line is offset_x = k*v + b, where k and b are the pixel horizontal offset fitting coefficients.

[0092] Furthermore, determining the object height and the width change corresponding to the image horizontal direction includes:

[0093] For the pixel coordinates of any pixel point of the object on the object image, traverse and search for the height position interval to which the pixel coordinates belong based on the pixel position-height mapping relationship;

[0094] For the height position interval found, use linear interpolation to calculate the object height and horizontal resolution corresponding to the current vertical pixel coordinate;

[0095] Fit a straight line according to the horizontal offset of the pixels and calculate the horizontal pixel coordinates after offset compensation;

[0096] Calculate the width direction position of the current pixel point based on the horizontal resolution and the compensated horizontal pixel coordinates;

[0097] Repeat the above steps to determine the spatial height of the object and the corresponding width change in the horizontal direction of the image.

[0098] Specifically, the height position interval to which the pixel coordinates belong is traversed and searched based on the pixel position-height mapping relationship; the horizontal offset is calculated using the horizontal offset coefficient to align the starting point of the width change; and the width change is determined using the height-horizontal resolution mapping relationship.

[0099] Since the height intervals in the position-height mapping model are relatively small, a linear relationship can be used to represent the position and height correspondence within a height interval. For the height position interval found, linear interpolation is used to calculate the object height and horizontal resolution corresponding to the current vertical pixel coordinate. An example is given below. Figure 2 As shown, specifically:

[0100] According to the position-height mapping model, there exists a position v1 corresponding to height h1, and a position v2 corresponding to height h2. For any v∈[v1,v2], there is

[0101]

[0102] Similarly, there is a horizontal resolution Rx1 corresponding to position v1 and a horizontal resolution Rx2 corresponding to position v2. Then:

[0103]

[0104] At this point, the height h and horizontal resolution Rx corresponding to any position v can be calculated.

[0105] According to the previously fitted pixel horizontal offset, the straight line is fitted.

[0106] offset_x=k*v+b

[0107] Among them, k and b are the fitting straight line coefficients.

[0108] Figure 3 In the calculation, any point on the image can be substituted into the corresponding compensation amount offset_x. The horizontal pixel coordinate after compensation is u′=u-offset_x, where u is the horizontal coordinate of the point on the image.

[0109] The following is a specific example to illustrate the change in the object height and the width of the image in the horizontal direction, specifically:

[0110] For any pixel point (u q ,v q ), traverse and search v based on the pixel position-height mapping relationship q The step height position interval to which it belongs;

[0111] Calculate v using linear interpolation q Corresponding object height coordinate z and horizontal resolution Rx q ;

[0112] Based on the above horizontal offset coefficient, calculate the pixel coordinate u′ after offset compensation q =u q-offset_x q , where offset_x q is the horizontal offset in pixels corresponding to the current height;

[0113] Calculate the width position of the current point based on the horizontal resolution and the compensated pixel coordinates; width position X = u′ q *Rx q .

[0114] Repeat all the above steps to calculate the spatial position (X, Z) of all pixels of the object in the image.

[0115] Figure 4 、 Figure 5 The figures show a comparison of the measurement accuracy errors of the height and width directions of the standard gauge block between the present invention and the traditional calibration method based on the calibration plate. As can be seen from the figures, the present invention simplifies the calibration process while maintaining a high level of measurement accuracy.

[0116] According to the above description, a calibration measurement system based on pixel mapping, in one embodiment of the present invention, includes a camera and a calibration measurement controller, wherein:

[0117] The calibration measurement controller calibrates the camera using the calibration measurement method described above, and uses the calibrated camera to measure the object to output a three-dimensional point cloud of the object.

[0118] Specifically, the calibration measurement controller can adopt an existing commonly used form, specifically capable of calibrating the camera and measuring the object based on the image of the object to be measured obtained by the camera. Figure 6 An embodiment of a three-dimensional point cloud of an object is shown in FIG.

[0119] In one embodiment of the present invention, the calibration measurement controller includes:

[0120] Height calibration module, used to obtain the height and corresponding pixel coordinates and establish the camera's pixel position-height mapping relationship;

[0121] The width calibration module is used to calculate the horizontal resolution at different heights and establish the camera's height-horizontal resolution mapping relationship;

[0122] The width compensation module is used to establish the camera's pixel position-horizontal resolution mapping relationship and determine the pixel horizontal offset fitting line;

[0123] Coordinate calculation module, used to calculate the height and width coordinates of the object;

[0124] The point cloud output module is used to stitch together the coordinate calculation results of objects at different times and output a three-dimensional point cloud.

[0125] During specific implementation, the corresponding working modes of the height calibration module, width calibration module, width compensation module, coordinate calculation module and point cloud output module can be specifically referred to the above description and will not be repeated here.

[0126] This method divides the camera's measurement range into different heights, establishes a pixel-to-height mapping for each height, and then creates a horizontal resolution mapping. It then fits the horizontal offset coefficient to complete coordinate calculation and point cloud output. Compared to traditional calibration methods, this method simplifies the calibration process and makes it easier to implement while maintaining high measurement accuracy.

[0127] The above embodiments are merely exemplary embodiments for illustrating the principles of the present invention and are not intended to limit the present invention in any form. Those skilled in the art will be able to utilize the above disclosed technical content to make slight changes or modifications to equivalent embodiments without departing from the scope of the present invention. However, any simple modifications, equivalent changes, and modifications to the above embodiments made in accordance with the technical essence of the present invention, without departing from the content of the present invention, shall still fall within the scope of protection of the present invention.

Claims

1. A calibration measurement method based on pixel mapping, characterized in that: The calibration measurement method comprises: A camera for measurement is provided, and the camera is calibrated based on pixel mapping. During the calibration, a pixel position-height mapping relationship and a pixel position-horizontal resolution mapping relationship of the camera are established, and a pixel horizontal offset fitting line of an image captured by the camera is determined. When measuring an object using the calibrated camera, the object's spatial height and the corresponding width change in the horizontal direction of the image are determined based on the camera's pixel position-horizontal resolution mapping relationship and the pixel horizontal offset fitting line at the current pixel coordinates of the object image. Based on the determined spatial height of the object and the corresponding width change in the horizontal direction of the image, single-frame contour information is stitched along the object scanning direction and step size to output a three-dimensional point cloud of the object; include: Construct the camera's pixel position-height mapping relationship; Based on the constructed pixel position-height mapping relationship, a camera height-horizontal resolution mapping relationship is established; Based on the above-mentioned camera pixel position-height mapping relationship and height-horizontal resolution mapping relationship, establish the camera pixel position-horizontal resolution mapping relationship; Based on the established pixel position-horizontal resolution mapping relationship, a pixel horizontal offset fitting line of the image captured by the camera is determined.

2. The pixel mapping-based calibration measurement method according to claim 1, wherein: When building the camera's pixel position-height mapping relationship, it includes: Providing a position height mapping model, dividing the position height mapping model into height intervals within the camera's height measurement domain, wherein the intervals of the divided intervals are smaller than the camera's height measurement accuracy; Using a camera to acquire an image of the position height mapping model within the height measurement domain, and extracting all height values and pixel coordinates corresponding to the extracted height values, using the vertical pixel coordinates as the position of the current height on the image; For the position height mapping model, the starting position of the height measurement is configured, and the camera's pixel position-height mapping relationship is constructed based on the height distribution relative to the starting position and the corresponding image pixel position distribution.

3. The pixel mapping-based calibration measurement method according to claim 2, wherein: The position height mapping model includes stepped blocks with uniformly distributed height intervals; For the position height mapping model using staircase blocks, the vertical pixel coordinates are used as the current height position on the image, then: Extract the line segments corresponding to the steps in the image. For each step line segment, take the vertical pixel coordinate v of the midpoint of the line segment as the position of the current step height on the image.

4. The pixel mapping-based calibration measurement method according to claim 2, wherein: When determining the camera's height-horizontal resolution mapping relationship, include: Map the height h of the model's starting position relative to the position height i , calculated at the height h i Horizontal resolution Rx i , wherein the horizontal resolution Rx i for f is the focal length of the camera, WD is the working distance between the camera and the starting position of the position height mapping model; Based on the above different heights h i Corresponding horizontal resolution, establish the camera height-horizontal resolution mapping relationship.

5. The pixel mapping-based calibration measurement method according to claim 4, wherein: When determining the pixel horizontal offset fitting straight line of the image captured by the camera, including Take the horizontal pixel coordinates and corresponding horizontal resolutions at two different heights, and calculate the horizontal offset of the pixels between the two heights; According to the above pixel horizontal deviation and the vertical pixel coordinates of the two heights, a straight line fitting is performed to obtain a pixel horizontal offset fitting line after fitting.

6. The pixel mapping-based calibration measurement method according to any one of claims 1 to 5, wherein: Determining the object height and the corresponding width change in the horizontal direction of the image includes: For the pixel coordinates of any pixel point of the object on the object image, traverse and search for the height position interval to which the pixel coordinates belong based on the pixel position-height mapping relationship; For the height position interval found, use linear interpolation to calculate the object height and horizontal resolution corresponding to the current vertical pixel coordinate; Fit a straight line according to the horizontal offset of the pixels and calculate the horizontal pixel coordinates after offset compensation; Calculate the width direction position of the current pixel point based on the horizontal resolution and the compensated horizontal pixel coordinates; Repeat the above steps to determine the spatial height of the object and the corresponding width change in the horizontal direction of the image.

7. A calibration measurement system based on pixel mapping, characterized in that: It includes a camera and a calibration measurement controller, wherein: The calibration measurement controller calibrates the camera using the calibration measurement method described in any one of claims 1 to 6, and uses the calibrated camera to measure the object to output a three-dimensional point cloud of the object.

8. The pixel mapping-based calibration measurement system according to claim 7, wherein: For calibration of measurement controllers, including: Height calibration module, used to obtain the height and corresponding pixel coordinates and establish the camera's pixel position-height mapping relationship; The width calibration module is used to calculate the horizontal resolution at different heights and establish the camera's height-horizontal resolution mapping relationship; The width compensation module is used to establish the camera's pixel position-horizontal resolution mapping relationship and determine the camera's pixel horizontal offset fitting line; Coordinate calculation module, used to calculate the height and width coordinates of the object; The point cloud output module is used to stitch together the coordinate calculation results of objects at different times and output a three-dimensional point cloud.

Citation Information

Patent Citations

  • Arm three-dimensional measurement method based on uniaxial MEMS fringe projection

    CN114820914A

Cited By

  • Calibration method based on two-dimensional image, three-dimensional reconstruction method and medium

    CN121582350A