Plane target metrology correction and measurement method and system based on RGB-D data
By using a planar target measurement and correction method based on RGB-D data, and leveraging camera intrinsic parameters and robust planar iterative fitting, a corrected image with physical scale information is generated. This addresses the shortcomings of monocular vision and 3D scanning methods, and achieves efficient and accurate planar target measurement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DALIAN MARITIME UNIVERSITY
- Filing Date
- 2026-04-15
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, monocular vision measurement has low accuracy, relies on regular rectangular targets, and the 3D scanning and reconstruction process is complex and the texture is easily distorted, resulting in image perspective distortion and inaccurate measurement of the real physical scale.
Based on RGB-D data, by acquiring RGB images and depth matrices, and using camera intrinsic parameters and robust plane iterative fitting, a local orthogonal coordinate system is constructed, establishing an inverse mapping relationship between pixel coordinates and the target plane, thereby generating a corrected image with physical scale information.
It achieves high-precision and rapid planar target measurement, eliminates perspective distortion, maintains the true physical scale of the image, simplifies the operation process, reduces the amount of calculation and complexity, and is suitable for a variety of application scenarios.
Smart Images

Figure CN122289350A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and image processing technology, and in particular to a planar target measurement correction and measurement method and system based on RGB-D data. Background Technology
[0002] In architectural decoration, criminal scene investigation, industrial testing, and daily life, it is often necessary to obtain the true dimensions of a target object or its orthophoto. For example, measuring the length and width of doors and windows, obtaining the front texture of a painting, or extracting text information from a document taken at an angle.
[0003] Existing solutions mainly fall into two categories: The first type is based on monocular vision, which typically requires the user to manually mark the four corner points in the image to define a rectangle, and then use perspective transformation to stretch it into a front view. This method heavily relies on the existence of regular rectangular objects in the scene and cannot obtain the true physical dimensions (only the scale is obtained).
[0004] The second category is mobile applications based on 3D scanning. These applications typically use SLAM technology to construct triangular meshes of the environment and then apply texture maps captured by the camera onto the mesh. However, existing 3D scanning applications usually require taking a large number of multi-angle photos around the object and stitching them together to ensure that the textures are not distorted. If only a single or small number of photos are taken, the resulting triangular meshes are often not fine enough, and direct texturing will result in severe stretching, tearing, or blurring of the image, failing to meet the requirements for high-precision visual observation.
[0005] In addition to dimensional measurement, there are numerous scenarios that only require "visual correction." For example, a user might look up at a rectangular light fixture on the ceiling to check details or measure its dimensions, or take a side view of a poster on a wall for OCR text recognition. In these scenarios, users do not need to build a complete 3D model; they only need to quickly obtain a frontal image that has perspective distortion eliminated and is proportionally correct. Existing 3D reconstruction processes are computationally intensive, time-consuming, and struggle to output clear texture maps for specific planar targets. Summary of the Invention
[0006] This invention provides a planar target measurement correction and system based on RGB-D data to overcome the problems of low monocular vision measurement accuracy, reliance on regular rectangular targets, and complex three-dimensional scanning reconstruction process and easy texture distortion in the prior art, which lead to perspective distortion in the obtained image and inaccurate measurement results of the true physical scale.
[0007] To achieve the above objectives, the technical solution of the present invention is as follows: A planar target measurement correction and measurement method based on RGB-D data includes: S1: Obtain the RGB image of the scene to be measured and the corresponding depth matrix data; S2: Obtain the camera intrinsic parameter matrix corresponding to the RGB image; S3: Select the ROI region on the RGB image, and convert the depth matrix data of the ROI region into a 3D point cloud in the camera coordinate system based on the camera intrinsic parameter matrix; S4: Perform robust plane iterative fitting on the 3D point cloud to obtain the target plane and plane equation parameters where the ROI region is located, and construct the local orthogonal coordinate system of the target plane; S5: Based on the camera intrinsic parameter matrix, the plane equation parameters of the target plane, and the local orthogonal coordinate system, establish an inverse mapping relationship between the pixel coordinates of the RGB image and the local coordinates of the target plane to generate a corrected image with physical scale information; S6: Determine the target to be measured on the corrected image, calculate its pixel Euclidean distance, and convert the pixel distance into the actual physical length according to the physical scale information of the corrected image to obtain the measurement result.
[0008] Furthermore, robust plane iterative fitting is performed on the 3D point cloud to obtain the target plane and plane equation parameters of the ROI region, including: Determine the number of planes in the ROI region. If the number of planes is 1, then execute the first fitting strategy, which is: Random sampling from 3D point cloud Each point generates a hypothetical planar model; Calculate the distance from all points in the 3D point cloud to the hypothetical planar model, and designate points whose distance is less than a preset threshold as inliers; The hypothetical plane model with the most interior points is selected as the target plane for the current fitting. If the number of planes is greater than or equal to m, and m≥2, then an iterative fitting strategy with an outlier removal mechanism is used for fitting. The specific steps are as follows: Remove the interior points corresponding to the target plane fitted by the first fitting strategy from the 3D point cloud. Repeat the fitting steps of the first fitting strategy on the remaining point cloud data until the number of fitted planes reaches m. Stop the iteration and find the hypothetical plane model with the most interior points from the m candidate planes fitted, as the final target plane. Calculate the unit normal vector and distance parameters of the target plane to obtain the plane equation parameters.
[0009] Furthermore, constructing a local orthogonal coordinate system for the target plane includes: Obtain the unit normal vector of the target plane, and select a reference vector that is not collinear with the unit normal vector; Based on the unit normal vector and the reference vector, two basis vectors that are located in the target plane and are mutually orthogonal are determined through vector orthogonalization operation or vector cross product operation; Using any point on the target plane as the origin, and combining two basis vectors, a local orthogonal coordinate system for the target plane is established.
[0010] Furthermore, based on the camera intrinsic parameter matrix, the plane equation parameters of the target plane, and the local orthogonal coordinate system, an inverse mapping relationship is established between the pixel coordinates of the RGB image and the local coordinates of the target plane to generate a corrected image with physical scale information, including: S51. Preset the physical resolution of the corrected image, wherein the physical resolution is expressed as the number of pixels per unit physical length; S52. For each pixel coordinate to be filled in the image to be corrected, calculate its corresponding two-dimensional physical coordinates in the local orthogonal coordinate system according to the physical resolution. S53. Based on the origin and two basis vectors of the local orthogonal coordinate system, the two-dimensional physical coordinates are converted into three-dimensional spatial point coordinates in the camera coordinate system; S54. Using the camera intrinsic parameter matrix, project the coordinates of the three-dimensional spatial points onto the pixel coordinate system of the original RGB image to obtain the sampling coordinates; S55. Obtain pixel values from the original RGB image through interpolation based on the sampling coordinates, and fill them into the current pixel coordinates of the image to be corrected to obtain a corrected image with physical scale information.
[0011] Based on the same inventive concept, a planar target measurement correction and measurement system based on RGB-D data is also proposed, which applies a planar target measurement correction and measurement method based on RGB-D data, including: a data acquisition module, a planar calculation module, a corrected image generation module, and an intelligent analysis and measurement module; The data acquisition module is used to acquire the RGB image of the scene to be measured, the corresponding depth matrix data, and camera intrinsic parameters, and to determine the ROI region on the RGB image. Based on the camera intrinsic parameter matrix, the depth matrix data of the ROI region is converted into a three-dimensional point cloud in the camera coordinate system. The planar solution module is used to perform robust planar iterative fitting on the 3D point cloud, obtain the target plane and plane equation parameters where the ROI region is located, and construct the local orthogonal coordinate system of the target plane; The corrected image generation module establishes an inverse mapping relationship between the pixel coordinates of the RGB image and the local coordinates of the target plane based on the camera intrinsic parameter matrix, the plane equation parameters of the target plane, and the local orthogonal coordinate system, thereby generating a corrected image with physical scale information. The intelligent analysis and measurement module is used to determine the target to be measured on the corrected image, calculate its pixel Euclidean distance, and convert the pixel distance into the actual physical length according to the physical scale information of the corrected image to obtain the measurement result.
[0012] Beneficial effects: This invention provides a planar target measurement correction and measurement method based on RGB-D data, which has the following advantages: 1. Breaking through traditional technical bottlenecks to achieve high-precision single-measurement: This invention makes full use of RGB-D depth data, and can automatically separate the target plane and obtain a corrected image with real physical scale through a single shot. It completely overcomes the limitation of monocular vision methods that cannot obtain real size, and avoids the image distortion problem caused by the need for a large number of photos to be stitched together in traditional 3D scanning methods, thus achieving high-precision and high-efficiency planar target measurement.
[0013] 2. Highly efficient calculation and easy operation, significantly improving user experience: This invention optimizes the processing of specific planar targets, avoiding the complex calculations required to build a complete 3D model. It has low computational load and fast response speed. At the same time, it eliminates the need for users to manually mark corner points or take photos from multiple angles. The operation is simple and intuitive, and it supports interactive measurement directly on the corrected image, which greatly reduces the threshold for use and the complexity of operation.
[0014] 3. Ensure the high quality and authenticity of the corrected images: This invention uses depth data to accurately calculate planar parameters, and the generated corrected image not only eliminates perspective distortion but also maintains the true physical scale of the image. This avoids the problems of image stretching, tearing, or blurring caused by imprecise meshes in traditional 3D reconstruction methods, ensuring the high precision required for visual observation.
[0015] 4. Wide range of applications and good device compatibility, making it easy to promote and popularize: This invention is applicable to professional scenarios such as building decoration, criminal investigation, and industrial inspection that require precise dimensional measurement, as well as to visual correction needs in daily life such as document correction and poster photography. It can make full use of existing smart devices with LiDAR, without the need for additional hardware, and is low in cost, highly adaptable, and easy to promote and popularize in various application scenarios. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 The flowchart of the planar target measurement correction and measurement method based on RGB-D data provided by the present invention is shown below. Figure 2 This is a system block diagram of the planar target measurement correction and measurement system based on RGB-D data provided by the present invention; Figure 3 A schematic diagram of the ROI region selected for the ceiling light fixture in the embodiment; Figure 4 This is a planar rendering of the ROI region's 3D point cloud fitting in the embodiment. Figure 5 This is a schematic diagram of the scaled corrected image of the fitted plane in the embodiment; Figure 6 This is a schematic diagram showing the measurement results of the ceiling light fixture in the embodiment. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] This embodiment provides a planar target measurement correction and measurement method based on RGB-D data, such as... Figure 1 As shown, it includes: S1: Obtain the RGB image of the scene to be measured and the corresponding depth matrix data; S2: Obtain the camera intrinsic parameter matrix corresponding to the RGB image; S3: Select the ROI region on the RGB image, and convert the depth matrix data of the ROI region into a 3D point cloud in the camera coordinate system based on the camera intrinsic parameter matrix; S4: Perform robust plane iterative fitting on the 3D point cloud to obtain the target plane and plane equation parameters where the ROI region is located, and construct the local orthogonal coordinate system of the target plane; S5: Based on the camera intrinsic parameter matrix, the plane equation parameters of the target plane, and the local orthogonal coordinate system, establish an inverse mapping relationship between the pixel coordinates of the RGB image and the local coordinates of the target plane to generate a corrected image with physical scale information; S6: Determine the target to be measured on the corrected image, calculate its pixel Euclidean distance, and convert the pixel distance into the actual physical length according to the physical scale information of the corrected image to obtain the measurement result.
[0020] In a specific embodiment, the method for obtaining the RGB image of the scene to be measured and the corresponding depth matrix data is as follows: Data of the scene under test is acquired using electronic devices with depth sensing capabilities (such as smartphones, tablets, or PCs with integrated LiDAR or connected depth cameras). This data includes: RGB image: resolution is .
[0021] Depth data: Records scene distance information.
[0022] If there is an extrinsic parameter offset or resolution inconsistency between the depth sensor and the RGB camera, spatial registration is performed in advance to ensure that each data point in the depth data corresponds one-to-one with the pixel coordinates of the RGB image in space.
[0023] This solution fully utilizes the depth information in RGB-D data, enabling rapid separation of the target plane and acquisition of a corrected image with true physical scale through a single shot. This avoids the tedious process of stitching together a large number of multi-angle photos required by traditional 3D scanning methods, significantly improving measurement efficiency.
[0024] In a specific embodiment, the method for obtaining the camera intrinsic parameter matrix corresponding to the RGB image is as follows: In this solution, the camera intrinsic parameter matrix is obtained by directly reading the calibration data provided by the device system API.
[0025] Obtaining the camera's intrinsic parameter matrix is a common technique in image processing. It can also be estimated using a pinhole camera model when the image resolution and camera field of view (FOV) are known. Therefore, the specific steps and processes for obtaining the camera's intrinsic parameter matrix will not be elaborated in detail.
[0026] In a specific embodiment, the scheme for selecting a Region of Interest (ROI) on the RGB image and converting the depth matrix data of the ROI region into a 3D point cloud in the camera coordinate system based on the camera intrinsic parameter matrix is as follows: In this scheme, regions of interest (ROIs) containing the target object are determined on the RGB image through bounding boxes or intelligent semantic segmentation. Based on the image coordinate mapping relationship, the local depth data corresponding to the ROI is extracted, and combined with camera intrinsic parameters, these depth pixels are back-projected into a 3D point cloud set in the camera coordinate system.
[0027] Region of Interest (ROI) selection is a common technique in image processing. Therefore, we will not elaborate on the specific steps of ROI selection. Those skilled in the art can select based on the actual image and region to be detected.
[0028] In a specific embodiment, the scheme for performing robust planar iterative fitting on the 3D point cloud to obtain the target plane and plane equation parameters where the ROI region is located, and constructing a local orthogonal coordinate system of the target plane is as follows: Determine the number of planes in the ROI region. If the number of planes is 1, then execute the first fitting strategy, which is: Random sampling from 3D point cloud Each point generates a hypothetical planar model; Calculate the distance from all points in the 3D point cloud to the hypothetical planar model, and designate points whose distance is less than a preset threshold as inliers; The hypothetical plane model with the most interior points is selected as the target plane for the current fitting. If the number of planes is greater than or equal to m, and m≥2, then an iterative fitting strategy with an outlier removal mechanism is used for fitting. The specific steps are as follows: Remove the interior points corresponding to the target plane fitted by the first fitting strategy from the 3D point cloud. Repeat the fitting steps of the first fitting strategy on the remaining point cloud data until the number of fitted planes reaches m. Stop the iteration and find the hypothetical plane model with the most interior points from the m candidate planes fitted, as the final target plane. Calculate the unit normal vector and distance parameters of the target plane to obtain the plane equation parameters. The mathematical expression for the plane is: ,in It is the normal vector. X is the distance parameter, and X is any coordinate. Constructing a local orthogonal coordinate system for the target plane includes the following steps: Obtain the unit normal vector of the target plane, and select a reference vector that is not collinear with the unit normal vector; Based on the unit normal vector and the reference vector, two basis vectors that are located in the target plane and are mutually orthogonal are determined through vector orthogonalization operation or vector cross product operation; Using any point on the target plane as the origin, and combining two basis vectors, establish a local orthogonal coordinate system; Specifically, in this scheme, the fitted plane normal vector is used. As the Z-axis direction, a non-parallel reference vector is selected. (For example, the Y-axis of the world coordinate system or any fixed vector).
[0029] The first basis vector in the plane is calculated using Schmitt orthogonalization. The formula is as follows:
[0030] The second basis vector in the plane is calculated using the cross product of vectors. The formula is as follows:
[0031] Choose the center of an interior point on the plane as the local origin. The local orthogonal coordinate system is established by combining the first basis vector and the second basis vector.
[0032] This embodiment optimizes the processing for specific planar targets, avoiding the computational overhead of building a complete 3D model. It has low computational load and short processing time, making it particularly suitable for scenarios that require rapid acquisition of orthophotos of planar targets, such as architectural decoration measurement, criminal scene investigation, industrial inspection, and dimensional measurement in daily life.
[0033] In a specific embodiment, based on the camera intrinsic parameter matrix, the plane equation parameters of the target plane, and the local orthogonal coordinate system, a reverse mapping relationship is established between the pixel coordinates of the RGB image and the local coordinates of the target plane to generate a corrected image with physical scale information. S51. Preset the physical resolution of the corrected image, wherein the physical resolution is expressed as the number of pixels per unit physical length; S52. For each pixel coordinate to be filled in the image to be corrected, calculate its corresponding two-dimensional physical coordinates in the local orthogonal coordinate system according to the physical resolution. S53. Based on the origin and two basis vectors of the local orthogonal coordinate system, the two-dimensional physical coordinates are converted into three-dimensional spatial point coordinates in the camera coordinate system; S54. Using the camera intrinsic parameter matrix, project the coordinates of the three-dimensional spatial points onto the pixel coordinate system of the original RGB image to obtain the sampling coordinates; S55. Obtain pixel values from the original RGB image through interpolation based on the sampling coordinates, and fill them into the current pixel coordinates of the image to be corrected to obtain a corrected image with physical scale information.
[0034] Specifically, this scheme uses a reverse mapping mechanism to generate images with physical scale: Set the resolution of the output image. ; Iterate through each pixel of the output image Convert it to physical plane coordinates ; Calculate spatial coordinates: ; Projection and Interpolation: Using Intrinsic Parameters calculate Projected coordinates on the original RGB image .like If the value is not an integer, bilinear interpolation is used to obtain the color value.
[0035] This invention uses depth data to accurately calculate planar parameters, and the generated corrected image not only eliminates perspective distortion but also maintains the true physical scale of the image. This avoids the problems of image stretching, tearing, or blurring caused by imprecise meshes in traditional 3D reconstruction methods, ensuring the high precision required for visual observation.
[0036] In a specific embodiment, the method for determining the target to be measured on the corrected image, calculating its pixel Euclidean distance, and converting the pixel distance into actual physical length based on the physical scale information of the corrected image to obtain the measurement result is as follows: The specific methods for selecting and measuring target points include the following implementation forms: 1. Manual Interaction Mode: Responds to user touch operations on the rectified image and obtains the coordinates of the measurement endpoints; 2. Feature snapping mode: Real-time detection of image gradient changes around the user's touch position, using edge detection or corner detection algorithms to automatically snap the measurement cursor to the geometric feature points of the image; 3. Intelligent Automatic Mode: Utilizes pre-trained computer vision algorithm models or deep neural network models to analyze images, automatically identify semantic targets in the images and output their bounding boxes, contours or key points, and directly calculate physical dimensions based on the recognition results.
[0037] This invention not only provides visual correction, but also supports interactive measurement on the corrected image. Users can directly measure parameters such as distance and angle between any two points on a correctly scaled front view, providing a more convenient and accurate measurement tool for practical applications.
[0038] This embodiment also provides a planar target measurement and correction system based on RGB-D data, such as... Figure 2 As shown, it includes: a data acquisition module, a plane calculation module, a corrected image generation module, and an intelligent analysis and measurement module; The data acquisition module is used to acquire the RGB image of the scene to be measured, the corresponding depth matrix data, and camera intrinsic parameters, and determine the ROI region on the RGB image. Based on the camera intrinsic parameter matrix, the depth matrix data of the ROI region is converted into a 3D point cloud in the camera coordinate system. The plane calculation module is used to perform robust plane iterative fitting on the 3D point cloud, obtain the target plane where the ROI region is located and the plane equation parameters, and construct a local orthogonal coordinate system of the target plane. The corrected image generation module establishes an inverse mapping relationship between the pixel coordinates of the RGB image and the local coordinates of the target plane based on the camera intrinsic parameter matrix, the plane equation parameters of the target plane, and the local orthogonal coordinate system, thereby generating a corrected image with physical scale information. Specifically, based on OpenGL or an image processing engine, pixel remapping operations are performed using shaders or parallel computing units to output the corrected front view in real time or near real time. The intelligent analysis and measurement module is used to determine the target to be measured on the corrected image, calculate its pixel Euclidean distance, and convert the pixel distance into the actual physical length according to the physical scale information of the corrected image to obtain the measurement result. Specifically, this module contains two sub-units: Interactive subunit: Provides a graphical user interface (GUI) that responds to user clicks, line drawing, and gesture zoom commands.
[0039] AI Inference Engine: Integrates a lightweight deep learning model. This engine is used to perform feature analysis on image data, execute object detection and semantic segmentation tasks, and automatically output the key-point coordinates or contour set of the target object in the image coordinate system, thereby realizing a fully automated measurement function of "instant measurement".
[0040] Example 1: Imagine a user standing on the ground, looking up at a rectangular ceiling light. Figure 3 As shown, the original image size is 1920x1440. The ROI region is selected within the original image. The selected ceiling light area was fitted, and the result is as follows: Figure 4 As shown in the figure, the blue area is the result of the first fitting, and the green area is the plane of the second fitting, which is the ceiling light plane that needs to be corrected in the end. Before correction: Due to perspective, the lamps in the original photo appear as trapezoids or irregular quadrilaterals. The shape is such that the edges at a distance appear shorter than those closer to the surface; After correction: such as Figure 5As shown, after the above processing steps, the system outputs a top-view orthographic view of the luminaire, as shown in the figure. In this figure, the luminaire is restored to a standard rectangle, and the aspect ratio of the luminaire in the image strictly matches its actual physical dimensions. Figure 5 The image is a scaled image with a preset physical resolution of 1.25mm / px and a corrected image size of 1990x1758. Measurement results as follows Figure 6 As shown, after clicking with the mouse, the measurement results on both sides are 0.602m and 1.096m, and the actual length of the lamp is 0.6m and 1.09m.
[0041] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A planar target measurement and correction method based on RGB-D data, characterized in that, include: S1: Obtain the RGB image of the scene to be measured and the corresponding depth matrix data; S2: Obtain the camera intrinsic parameter matrix corresponding to the RGB image; S3: Select the ROI region on the RGB image, and convert the depth matrix data of the ROI region into a 3D point cloud in the camera coordinate system based on the camera intrinsic parameter matrix; S4: Perform robust plane iterative fitting on the 3D point cloud to obtain the target plane and plane equation parameters where the ROI region is located, and construct the local orthogonal coordinate system of the target plane; S5: Based on the camera intrinsic parameter matrix, the plane equation parameters of the target plane, and the local orthogonal coordinate system, establish an inverse mapping relationship between the pixel coordinates of the RGB image and the local coordinates of the target plane to generate a corrected image with physical scale information; S6: Determine the target to be measured on the corrected image, calculate its pixel Euclidean distance, and convert the pixel distance into the actual physical length according to the physical scale information of the corrected image to obtain the measurement result.
2. The planar target measurement and correction method based on RGB-D data according to claim 1, characterized in that, Robust plane iterative fitting is performed on the 3D point cloud to obtain the target plane and plane equation parameters of the ROI region, including: Determine the number of planes in the ROI region. If the number of planes is 1, then execute the first fitting strategy, which is: Random sampling from 3D point cloud Each point generates a hypothetical planar model; Calculate the distance from all points in the 3D point cloud to the hypothetical planar model, and designate points whose distance is less than a preset threshold as inliers; The hypothetical plane model with the most interior points is selected as the target plane for the current fitting. If the number of planes is greater than or equal to m, and m≥2, then an iterative fitting strategy with an outlier removal mechanism is used for fitting. The specific steps are as follows: Remove the interior points corresponding to the target plane fitted by the first fitting strategy from the 3D point cloud. Repeat the fitting steps of the first fitting strategy on the remaining point cloud data until the number of fitted planes reaches m. Stop the iteration and find the hypothetical plane model with the most interior points from the m candidate planes fitted, as the final target plane. Calculate the unit normal vector and distance parameters of the target plane to obtain the plane equation parameters.
3. The planar target measurement correction and measurement method based on RGB-D data according to claim 2, characterized in that, Constructing a local orthogonal coordinate system for the target plane includes: Obtain the unit normal vector of the target plane as the Z-axis, and select a reference vector that is not collinear with the unit normal vector; Based on the unit normal vector and the reference vector, two basis vectors that are located in the target plane and are mutually orthogonal are determined through vector orthogonalization operation or vector cross product operation; Using any point on the target plane as the origin, and combining two basis vectors, a local orthogonal coordinate system for the target plane is established.
4. The planar target measurement correction and measurement method based on RGB-D data according to claim 3, characterized in that, Based on the camera intrinsic parameter matrix, the plane equation parameters of the target plane, and the local orthogonal coordinate system, an inverse mapping relationship is established between the pixel coordinates of the RGB image and the local coordinates of the target plane to generate a corrected image with physical scale information, including: S51. Preset the physical resolution of the corrected image, wherein the physical resolution is expressed as the number of pixels per unit physical length; S52. For each pixel coordinate to be filled in the image to be corrected, calculate its corresponding two-dimensional physical coordinates in the local orthogonal coordinate system according to the physical resolution. S53. Based on the origin and two basis vectors of the local orthogonal coordinate system, the two-dimensional physical coordinates are converted into three-dimensional spatial point coordinates in the camera coordinate system; S54. Using the camera intrinsic parameter matrix, project the coordinates of the three-dimensional spatial points onto the pixel coordinate system of the original RGB image to obtain the sampling coordinates; S55. Obtain pixel values from the original RGB image through interpolation based on the sampling coordinates, and fill them into the current pixel coordinates of the image to be corrected to obtain a corrected image with physical scale information.
5. A planar target measurement and correction system based on RGB-D data, employing the planar target measurement and correction method based on RGB-D data as described in claim 1, characterized in that... include: The module comprises a data acquisition module, a planar solution module, a corrected image generation module, and an intelligent analysis and measurement module. The data acquisition module is used to acquire the RGB image of the scene to be measured, the corresponding depth matrix data, and camera intrinsic parameters, and to determine the ROI region on the RGB image. Based on the camera intrinsic parameter matrix, the depth matrix data of the ROI region is converted into a three-dimensional point cloud in the camera coordinate system. The planar solution module is used to perform robust planar iterative fitting on the 3D point cloud, obtain the target plane and plane equation parameters where the ROI region is located, and construct the local orthogonal coordinate system of the target plane; The corrected image generation module establishes an inverse mapping relationship between the pixel coordinates of the RGB image and the local coordinates of the target plane based on the camera intrinsic parameter matrix, the plane equation parameters of the target plane, and the local orthogonal coordinate system, thereby generating a corrected image with physical scale information. The intelligent analysis and measurement module is used to determine the target to be measured on the corrected image, calculate its pixel Euclidean distance, and convert the pixel distance into the actual physical length according to the physical scale information of the corrected image to obtain the measurement result.