Data analysis method and system applied to structured light ranging camera

By preprocessing and correcting the initial data of the structured light ranging camera, and using the singular area optimization model and scene optimization database to improve the accuracy and adaptability of the measurement data, the measurement accuracy and environmental adaptation of the structured light ranging camera are solved. The problem of insufficient sexuality achieves a three-dimensional reconstruction effect with high precision and robustness.

CN119478242AInactive Publication Date: 2025-02-18SUZHOU XINGXIBO INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411667073.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The structured light ranging camera is affected by factors such as optical distortion, differences in reflection characteristics and ambient light interference during measurement, resulting in insufficient measurement accuracy and environmental adaptability.

Method used

By preprocessing the initial depth data and light intensity distribution data, distortion correction and reflection error compensation, an initial three-dimensional model is constructed and optimized using the singular region optimization model. At the same time, a scene optimization portrait and database are constructed based on historical measurement examples and environmental information, and a singular area optimization plan is formulated to improve the accuracy and adaptability of the measurement data.

Benefits of technology

It improves the accuracy and robustness of the three-dimensional reconstruction model, enhances the environmental adaptability and anti-interference ability during measurement, and ensures high quality and reliability of the measurement results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478242A_ABST
    Figure CN119478242A_ABST
Patent Text Reader

Abstract

The invention discloses a data analysis method and system applied to a structured light ranging camera, and the method comprises the steps: obtaining initial depth data and light intensity distribution data of a to-be-measured target, and carrying out the data preprocessing, and obtaining first analysis information; distortion correction and reflection error compensation are carried out to obtain second analysis information, and an initial three-dimensional model of the to-be-measured target is constructed according to the second analysis information; constructing a singular region optimization model, extracting point cloud data distribution characteristics of each region of the to-be-detected target, judging whether a singular region exists or not, and performing optimization; acquiring historical measurement instances and measurement environment information of a to-be-measured target, performing category division on the historical measurement instances, and constructing a scene optimization portrait and a first database; and forming a measurement data portrait of the next measurement target based on the depth data, the light intensity distribution data and the measurement environment data of the next measurement target, and making a singular region optimization scheme. The precision and robustness of the three-dimensional reconstruction model are improved, and meanwhile, the environmental suitability during measurement is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data analysis, and in particular to a data analysis method and system applied to a structured light ranging camera. Background Art

[0002] The structured light ranging camera is a device based on active projected light source and 3D reconstruction technology, which is widely used in industrial measurement, robot navigation, virtual reality and other fields. Its basic principle is to project light of a specific structure onto the target surface, and use the camera to capture the image of the light reflected by the target, and deduce the 3D geometric information of the target based on the deformation or offset of the light. However, due to the working environment and imaging characteristics of the structured light ranging camera, the data collected by it is usually affected by many factors, including optical distortion, reflection characteristic differences, and ambient light interference.

[0003] At the same time, when using structured light ranging cameras for measurement, due to the different environments of the measurement scenes, environmental adaptation to the measurement scene is an important factor affecting the final measurement accuracy. Therefore, how to improve the accuracy of the measurement results and the adaptability of the measurement environment is an urgent problem to be solved. Summary of the invention

[0004] The present invention overcomes the defects of the prior art and provides a data analysis method and system applied to a structured light ranging camera, an important purpose of which is to improve the accuracy and robustness of a three-dimensional reconstruction model.

[0005] To achieve the above-mentioned purpose, the present invention provides a data analysis method for a structured light ranging camera in a first aspect, comprising:

[0006] Measuring the target to be measured to obtain initial depth data and light intensity distribution data of the target to be measured and performing data preprocessing to obtain first analysis information;

[0007] Performing distortion correction and reflection error compensation on the first analysis information to obtain second analysis information, and constructing an initial three-dimensional model of the target to be measured according to the second analysis information;

[0008] Constructing a singular region optimization model, extracting the distribution characteristics of point cloud data of each region of the target to be measured based on the initial three-dimensional model, determining whether there is a singular region and optimizing it using the singular region optimization model to obtain an optimized three-dimensional model;

[0009] Obtaining historical measurement instances of the target to be measured and corresponding measurement environment information, classifying each historical measurement instance into categories, and constructing a scene optimization portrait and a first database;

[0010] A measurement data portrait of the next measurement target is constructed based on the depth data, light intensity distribution data and measurement environment data of the next measurement target, and a singular area optimization plan is formulated through the first database.

[0011] In this solution, the measurement of the target to be measured to obtain the initial depth data and light intensity distribution data of the target to be measured and preprocessing the data to obtain the first analysis information specifically includes:

[0012] The structured light ranging camera is used to measure the target to obtain the initial depth data and light intensity distribution data of the target to be measured;

[0013] Preset the Gaussian kernel size and sigma value, introduce the Gaussian spatial filtering algorithm to perform noise reduction on the acquired depth data, generate a depth data matrix according to the initial depth data, traverse each pixel point in the depth data matrix based on the preset Gaussian kernel size and sigma value, and perform weighted average calculation with the pixels in the surrounding neighborhood;

[0014] The weighted average value is used as the new value of the current pixel for iterative calculation until all depth data are traversed to obtain the preprocessed depth data;

[0015] Generate a light intensity distribution matrix according to the acquired light intensity distribution data, preset a light intensity threshold and perform threshold processing on the light intensity distribution matrix, remove data less than the light intensity threshold, and obtain pre-processed light intensity distribution data;

[0016] Generate a validity matrix according to the pre-processed light intensity distribution data, screen the mathematical depth data to obtain screened depth data; combine the screened depth data and the pre-processed light intensity distribution data to form the first analysis information.

[0017] In this solution, the first analysis information is subjected to distortion correction and reflection error compensation to obtain second analysis information, and an initial three-dimensional model of the target to be measured is constructed according to the second analysis information, specifically including:

[0018] Acquire internal and external parameter parameters of the target structured light ranging camera, wherein the internal and external parameter parameters include an internal parameter matrix, a distortion coefficient, a rotation matrix, and a translation vector, construct a distortion model based on the acquired internal and external parameter parameters, and input the first analysis information to perform distortion correction;

[0019] A bilinear interpolation algorithm is introduced to remap the pixels after distortion correction from the input image space to the output image space, calculate the grayscale value of the mapped pixels and generate the corrected depth matrix;

[0020] Acquire light intensity distribution data based on the corrected depth matrix, calculate the incident angle of each depth point in combination with the measurement light source and the target structured light ranging camera position, and construct a depth data map using the corrected depth matrix;

[0021] Surface curvature fitting is performed based on the constructed depth data graph, Gaussian curvature is used to describe the surface smoothness of the target to be measured, and a reflection error compensation function is established in combination with the surface smoothness of the target to be measured and the calculated incident angle to perform reflection error compensation, thereby obtaining second analysis information;

[0022] Constructing a three-dimensional coordinate system, using the second analysis information and the internal and external parameters of the target structured light ranging camera to transform each pixel into a three-dimensional point in the three-dimensional coordinate system and performing global coordinate system mapping to obtain corresponding three-dimensional coordinate information;

[0023] The point cloud data of the target to be measured is generated by converting the acquired three-dimensional coordinate information, and the point cloud data model is converted into a continuous surface model based on the triangulation method. The surface model is rendered and visualized to generate the initial three-dimensional model of the target to be measured.

[0024] In this solution, the singular region optimization model is constructed, and the distribution characteristics of the point cloud data of each region of the target to be measured are extracted based on the initial three-dimensional model, and it is determined whether there is a singular region and optimized using the singular region optimization model to obtain an optimized three-dimensional model, which specifically includes:

[0025] Acquire an initial three-dimensional model of the target to be measured, extract point cloud data distribution characteristics of each area of ​​the target to be measured based on the initial three-dimensional model, perform sparse area detection using the DBSCAN algorithm, and obtain sparse area detection information;

[0026] Constructing a singular region judgment rule, extracting point cloud density features and point cloud quantity features in each sparse region according to the sparse region detection information, and using the singular region judgment rule to analyze whether the corresponding sparse region is a singular region, to obtain singular region analysis information;

[0027] Based on ELM, a singular region optimization model is constructed, the input weights and bias parameters of the ELM network are randomly generated, the PSO algorithm is introduced for model optimization, the positions of the input weights and bias parameters of the ELM in the search space are encoded and the initial population is generated;

[0028] Preset the fitness function, calculate the fitness value of each particle in the initial population according to the fitness function, and judge it with the preset threshold to determine the individual extreme value and the global extreme value and update the position and speed;

[0029] Iterate according to the above steps until the maximum number of iterations is reached or the stopping criterion is met to obtain the optimal solution, decode the optimal solution to obtain the optimal weight and bias parameters of the ELM network, and optimize the singular region optimization model;

[0030] Based on the singular region analysis information, point cloud data and corresponding depth data and light intensity data in each singular region are extracted to form first feature information, and input into the optimized singular region optimization model to optimize the singular region to obtain singular region optimization information;

[0031] Point cloud optimization data is generated according to the singular area optimization information, the point cloud sparse area in the initial three-dimensional model of the target to be measured is optimized to obtain an optimized three-dimensional model, and a measurement report of the target to be measured is generated based on the optimized three-dimensional model for push.

[0032] In this solution, the acquisition of historical measurement instances of the target to be measured and the corresponding measurement environment information, classification of each historical measurement instance, and construction of a scene optimization portrait and a first database specifically include:

[0033] Based on data retrieval, historical measurement instances of the target to be measured and corresponding measurement environment information are obtained, wherein the historical measurement instances include corresponding measurement parameters and measurement optimization schemes, and the measurement environment is taken as the first category, and the Euclidean distance between the measurement environments corresponding to each historical measurement optimization instance is calculated;

[0034] The calculated Euclidean distance is compared with a preset threshold. If the calculated Euclidean distance is greater than the preset threshold, it means that the corresponding historical measurement instances are of the same category. The iterative analysis is performed until all historical measurement instances are analyzed to obtain the first category classification information.

[0035] Extracting measurement parameter features of historical measurement instances under each measurement environment category according to the first category division information, taking the test parameter features as the second category, and performing clustering second category division using a K-means clustering algorithm to obtain second category division information;

[0036] According to the second category classification information, a correlation path is formed with measurement scenario-measurement parameter-measurement optimization scheme as the correlation order, and a measurement scenario optimization portrait is constructed according to the formed correlation path;

[0037] The optimized portrait of the measurement scene is stored in a database and a first database is constructed.

[0038] In this solution, the depth data, light intensity distribution data and measurement environment data of the next measurement target constitute the measurement data portrait of the next measurement target, and the singular area optimization solution is formulated through the first database, specifically including:

[0039] Acquire the depth data and light intensity distribution data output by the structured light ranging camera when measuring the next measurement target, and acquire the measurement environment data when measuring the next measurement target, so as to form a measurement data portrait of the next measurement target;

[0040] Acquire a first database, and perform similarity calculation between a measurement data portrait of a measurement target and an optimized portrait of a measurement scene stored in the first database to obtain a similarity value;

[0041] Preset a similarity threshold, compare the calculated similarity value with the similarity threshold, select the measurement scene optimization portrait corresponding to the similarity threshold greater than the similarity threshold, and mark it as a candidate portrait;

[0042] Extract the similarity values ​​between each candidate portrait and the measured data portrait, sort them and generate a sorting table, and select the candidate portrait with the largest similarity value as the target portrait;

[0043] The measurement data portrait of the measurement target is used to generate the corresponding three-dimensional model and perform singular area detection. The measurement optimization scheme features corresponding to the target portrait are extracted and applied to the singular area optimization model to optimize the singular area of ​​the current measurement target.

[0044] A second aspect of the present invention provides a data analysis system applied to a structured light ranging camera, the system comprising: a memory and a processor, the memory containing a data analysis method program applied to the structured light ranging camera, the data analysis method program applied to the structured light ranging camera being executed by the processor to implement the following steps:

[0045] Measuring the target to be measured to obtain initial depth data and light intensity distribution data of the target to be measured and performing data preprocessing to obtain first analysis information;

[0046] Performing distortion correction and reflection error compensation on the first analysis information to obtain second analysis information, and constructing an initial three-dimensional model of the target to be measured according to the second analysis information;

[0047] Constructing a singular region optimization model, extracting the distribution characteristics of point cloud data of each region of the target to be measured based on the initial three-dimensional model, determining whether there is a singular region and optimizing it using the singular region optimization model to obtain an optimized three-dimensional model;

[0048] Obtaining historical measurement instances of the target to be measured and corresponding measurement environment information, classifying each historical measurement instance into categories, and constructing a scene optimization portrait and a first database;

[0049] A measurement data portrait of the next measurement target is constructed based on the depth data, light intensity distribution data and measurement environment data of the next measurement target, and a singular area optimization plan is formulated through the first database.

[0050] The present invention discloses a data analysis method and system for a structured light ranging camera, including: obtaining initial depth data and light intensity distribution data of a target to be measured and performing data preprocessing to obtain first analysis information; performing distortion correction and reflection error compensation to obtain second analysis information, and constructing an initial three-dimensional model of the target to be measured according to the second analysis information; constructing a singular region optimization model, extracting point cloud data distribution characteristics of each region of the target to be measured, judging whether there is a singular region and optimizing it; obtaining historical measurement instances and measurement environment information of the target to be measured, classifying each historical measurement instance, and constructing a scene optimization portrait and a first database; constructing a measurement data portrait of the next measurement target based on the depth data, light intensity distribution data and measurement environment data of the next measurement target, and formulating a singular region optimization plan. The accuracy and robustness of the three-dimensional reconstruction model are improved, and the environmental adaptability during measurement is enhanced. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments or exemplary embodiments of the present invention, the drawings required for use in the embodiments or exemplary descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained according to the drawings without paying creative work.

[0052] Figure 1 A flow chart of a data analysis method applied to a structured light ranging camera provided by one embodiment of the present invention;

[0053] Figure 2 A flow chart of a scene adaptation method applied to a structured light ranging camera provided by one embodiment of the present invention;

[0054] Figure 3 A block diagram of a data analysis system applied to a structured light ranging camera provided by one embodiment of the present invention;

[0055] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0056] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0057] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0058] Figure 1 A flow chart of a data analysis method applied to a structured light ranging camera provided by one embodiment of the present invention;

[0059] like Figure 1 As shown, the present invention provides a flow chart of a data analysis method applied to a structured light ranging camera, comprising:

[0060] S102, measuring the target to be measured to obtain initial depth data and light intensity distribution data of the target to be measured and performing data preprocessing to obtain first analysis information;

[0061] S104, performing distortion correction and reflection error compensation on the first analysis information to obtain second analysis information, and constructing an initial three-dimensional model of the target to be measured according to the second analysis information;

[0062] S106, constructing a singular region optimization model, extracting the distribution characteristics of point cloud data of each region of the target to be measured based on the initial three-dimensional model, determining whether there is a singular region and optimizing using the singular region optimization model to obtain an optimized three-dimensional model;

[0063] S108, obtaining historical measurement instances of the target to be measured and corresponding measurement environment information, classifying each historical measurement instance into categories, and constructing a scene optimization portrait and a first database;

[0064] S110, constructing a measurement data portrait of the next measurement target based on the depth data, light intensity distribution data and measurement environment data of the next measurement target, and formulating a singular area optimization plan through the first database.

[0065] It should be noted that the present invention provides a data analysis method and system for structured light ranging cameras, which obtains the first analysis information by obtaining the initial depth data and light intensity distribution data of the target to be measured and performing data preprocessing. Subsequently, the first analysis information is subjected to distortion correction and reflection error compensation to obtain the second analysis information, and the initial three-dimensional model of the target to be measured is constructed according to the second analysis information, thereby obtaining a three-dimensional model constructed by the original measurement data. Then, a singular region optimization model is constructed, and the point cloud data distribution characteristics of each region of the target to be measured are extracted through the initial three-dimensional model, and it is determined whether there is a singular region and optimized, wherein the singular region is an area where the point cloud data is less than a threshold, which represents that the corresponding area has insufficient measurement accuracy or lack of information. Then, in view of the environmental impact problem, by obtaining the historical measurement instances and measurement environment information of the target to be measured, each historical measurement instance is classified, and a scene optimization portrait and a first database are constructed. Based on the depth data, light intensity distribution data and measurement environment data of the next measurement target, a measurement data portrait of the next measurement target is constructed, and a singular region optimization plan is formulated to improve the adaptability to the environment and the anti-interference ability during measurement. Improve the accuracy and robustness of 3D reconstruction models while enhancing environmental adaptability during measurement.

[0066] Further, in a preferred real-time example of the present invention, the step of measuring the target to be measured to obtain initial depth data and light intensity distribution data of the target to be measured and performing data preprocessing to obtain first analysis information specifically includes:

[0067] The structured light ranging camera is used to measure the target to obtain the initial depth data and light intensity distribution data of the target to be measured;

[0068] Preset the Gaussian kernel size and sigma value, introduce the Gaussian spatial filtering algorithm to perform noise reduction on the acquired depth data, generate a depth data matrix according to the initial depth data, traverse each pixel point in the depth data matrix based on the preset Gaussian kernel size and sigma value, and perform weighted average calculation with the pixels in the surrounding neighborhood;

[0069] The weighted average value is used as the new value of the current pixel for iterative calculation until all depth data are traversed to obtain the preprocessed depth data;

[0070] Generate a light intensity distribution matrix according to the acquired light intensity distribution data, preset a light intensity threshold and perform threshold processing on the light intensity distribution matrix, remove data less than the light intensity threshold, and obtain pre-processed light intensity distribution data;

[0071] Generate a validity matrix according to the pre-processed light intensity distribution data, screen the mathematical depth data to obtain screened depth data; combine the screened depth data and the pre-processed light intensity distribution data to form the first analysis information.

[0072] It should be noted that the initial depth data and light intensity distribution data of the target to be measured are obtained by measuring the target to be measured based on the structured light ranging camera. The initial depth data reflects the three-dimensional spatial information of the target, and the light intensity distribution data records the reflection intensity of the target surface to the projected light. These two types of data together constitute the basis for subsequent analysis. When processing the initial depth data, the Gaussian kernel size and sigma value (standard deviation) are preset, and the Gaussian spatial filtering algorithm is introduced to perform noise reduction processing on it. Specifically, a depth data matrix is ​​first generated according to the initial depth data, and each element of the matrix corresponds to the depth value of a certain point on the target surface. Then, based on the preset Gaussian kernel size and sigma value, each pixel in the depth data matrix is ​​traversed. For each pixel, a weighted average calculation is performed in combination with the pixel values ​​in its surrounding neighborhood to smooth the high-frequency noise in the depth data. The weighted average is used as the new value of the current pixel, and the algorithm processes the entire matrix through iterative calculation until all depth data are traversed, thereby generating preprocessed depth data. At the same time, in order to eliminate invalid data that may exist in areas with low light intensity, a light intensity threshold is preset and the light intensity distribution matrix is ​​threshold processed. Next, a validity matrix is ​​generated based on the preprocessed light intensity distribution data, which marks which points in the depth data are valid. On this basis, the depth data is further screened to retain those valid depth points corresponding to the validity matrix, thereby obtaining the screened depth data. Finally, the screened depth data is combined with the preprocessed light intensity distribution data to form the first analysis information. This improves the smoothness and accuracy of the depth data, filters out data in areas with insufficient or unreliable light intensity, and lays a solid foundation for subsequent analysis and modeling.

[0073] Furthermore, in a preferred real-time example of the present invention, the distortion correction and reflection error compensation are performed on the first analysis information to obtain second analysis information, and an initial three-dimensional model of the target to be measured is constructed according to the second analysis information, specifically including:

[0074] Acquire internal and external parameter parameters of the target structured light ranging camera, wherein the internal and external parameter parameters include an internal parameter matrix, a distortion coefficient, a rotation matrix, and a translation vector, construct a distortion model based on the acquired internal and external parameter parameters, and input the first analysis information to perform distortion correction;

[0075] A bilinear interpolation algorithm is introduced to remap the pixels after distortion correction from the input image space to the output image space, calculate the grayscale value of the mapped pixels and generate the corrected depth matrix;

[0076] Acquire light intensity distribution data based on the corrected depth matrix, calculate the incident angle of each depth point in combination with the measurement light source and the target structured light ranging camera position, and construct a depth data map using the corrected depth matrix;

[0077] Surface curvature fitting is performed based on the constructed depth data graph, Gaussian curvature is used to describe the surface smoothness of the target to be measured, and a reflection error compensation function is established in combination with the surface smoothness of the target to be measured and the calculated incident angle to perform reflection error compensation, thereby obtaining second analysis information;

[0078] Constructing a three-dimensional coordinate system, using the second analysis information and the internal and external parameters of the target structured light ranging camera to transform each pixel into a three-dimensional point in the three-dimensional coordinate system and performing global coordinate system mapping to obtain corresponding three-dimensional coordinate information;

[0079] The acquired three-dimensional coordinate information is converted and processed to generate point cloud data of the target to be measured. The point cloud data model is converted into a continuous surface model based on the triangulation method. The surface model is rendered and visualized to generate an initial three-dimensional model of the target to be measured.

[0080] It should be noted that the internal and external parameters of the camera, including the internal parameter matrix, distortion coefficient, rotation matrix and translation vector, are obtained to describe the spatial relationship in the optical distortion and imaging process. A distortion model is constructed based on the internal and external parameters, and the depth and light intensity data contained in the first analysis information are distorted. In order to improve the correction accuracy, a bilinear interpolation algorithm is used to map the corrected pixel points from the input image space to the output image space according to the distortion model, and the grayscale value of each mapped pixel is calculated to finally generate a corrected depth matrix. After obtaining the corrected depth matrix, the light intensity distribution data is further extracted, and the incident angle corresponding to each depth point is calculated by combining the position of the measured light source and the camera. Subsequently, a depth data map is constructed using the corrected depth matrix to describe the morphological information of the target surface in three-dimensional space. The surface curvature fitting analysis is performed based on the depth data map, and Gaussian curvature is introduced to quantify the smoothness of the target surface. Gaussian curvature provides a tool to measure the local geometric characteristics of a surface, which can distinguish between flat areas, convex areas or concave areas. Combined with the smoothness of the surface and the calculated incident angle, a reflection error compensation function is established to correct the depth measurement error caused by the reflection characteristics of the target surface, further optimize the accuracy of the measurement data, and generate the second analysis information. On this basis, the internal and external parameters of the target camera are used to construct a three-dimensional coordinate system, and the pixel points in the second analysis information are converted into a three-dimensional coordinate system to obtain the three-dimensional coordinate information corresponding to each point. Subsequently, the point cloud data of the target to be measured is generated based on the obtained three-dimensional coordinate information. Point cloud data is a collection of discrete points on the target surface, representing the geometric shape of the target. The point cloud data model is further processed by triangulation to convert the discrete point set into a continuous surface model. The surface model can more intuitively represent the details and overall shape of the target surface. Finally, the surface model is rendered and visualized to generate the initial three-dimensional model of the target to be measured, providing a basis for subsequent analysis and application.

[0081] Further, in a preferred real-time example of the present invention, the construction of the singular region optimization model, extracting the distribution characteristics of the point cloud data of each region of the target to be measured based on the initial three-dimensional model, determining whether there is a singular region and optimizing using the singular region optimization model to obtain an optimized three-dimensional model, specifically includes:

[0082] Acquire an initial three-dimensional model of the target to be measured, extract point cloud data distribution characteristics of each area of ​​the target to be measured based on the initial three-dimensional model, perform sparse area detection using the DBSCAN algorithm, and obtain sparse area detection information;

[0083] Constructing a singular region judgment rule, extracting point cloud density features and point cloud quantity features in each sparse region according to the sparse region detection information, and using the singular region judgment rule to analyze whether the corresponding sparse region is a singular region, to obtain singular region analysis information;

[0084] Based on ELM, a singular region optimization model is constructed, the input weights and bias parameters of the ELM network are randomly generated, the PSO algorithm is introduced for model optimization, the positions of the input weights and bias parameters of the ELM in the search space are encoded and the initial population is generated;

[0085] Preset the fitness function, calculate the fitness value of each particle in the initial population according to the fitness function, and judge it with the preset threshold to determine the individual extreme value and the global extreme value and update the position and speed;

[0086] Iterate according to the above steps until the maximum number of iterations is reached or the stopping criterion is met to obtain the optimal solution, decode the optimal solution to obtain the optimal weight and bias parameters of the ELM network, and optimize the singular region optimization model;

[0087] Based on the singular region analysis information, point cloud data and corresponding depth data and light intensity data in each singular region are extracted to form first feature information, and input into the optimized singular region optimization model to optimize the singular region to obtain singular region optimization information;

[0088] Point cloud optimization data is generated according to the singular area optimization information, the point cloud sparse area in the initial three-dimensional model of the target to be measured is optimized to obtain an optimized three-dimensional model, and a measurement report of the target to be measured is generated based on the optimized three-dimensional model for push.

[0089] It should be noted that, first, the point cloud data of different regions in the three-dimensional model are extracted, and the DBSCAN (density-based spatial clustering algorithm) is used to detect sparse regions of the point cloud data. DBSCAN determines which regions have sparse point cloud data through density thresholds, thereby marking sparse regions that may need further processing. After the sparse region detection is completed, the judgment rules of the singular region are constructed, and the point cloud data features in the sparse region are further analyzed to analyze which sparse regions may have geometric or measurement anomalies, thereby generating analysis information of the singular region. In order to further process the singular region, a singular region optimization model is constructed based on the extreme learning machine (ELM) to improve the point cloud quality of the singular region. In order to improve the optimization effect of the model, the particle swarm optimization (PSO) algorithm is introduced to adjust these parameters. In the optimization process of PSO, an initial population containing multiple particles is generated by encoding the position of the weight and bias parameters, and the performance of the particles is evaluated according to the fitness function. The PSO algorithm iteratively updates the velocity and position of the particles, and finally converges to the global optimal solution, from which the optimal weight and bias parameters of the ELM network are decoded to optimize the singular region optimization model. After the optimization model is built, the point cloud data of the corresponding area is extracted according to the analysis information of the singular area, and the first feature information is formed by combining the depth data and the light intensity data. These feature information are input into the optimized ELM model, and the point cloud data of the singular area is optimized to reduce errors and data incompleteness, and obtain the optimization information of the singular area. Based on the optimized singular area information, new point cloud data is generated to replace and improve the point cloud performance of the sparse area in the initial three-dimensional model, and an optimized three-dimensional model is generated. This optimized three-dimensional model better reflects the real structure and characteristics of the target, and can significantly improve the quality of the model and the reliability of the measurement. Finally, a measurement report of the target to be measured is generated based on the optimized three-dimensional model, and it is pushed to the relevant terminal to provide users with accurate measurement results and analysis support.

[0090] Further, in a preferred real-time example of the present invention, the obtaining of historical measurement instances of the target to be measured and the corresponding measurement environment information, classifying each historical measurement instance, and constructing a scene optimization portrait and a first database specifically includes:

[0091] Based on data retrieval, historical measurement instances of the target to be measured and corresponding measurement environment information are obtained, wherein the historical measurement instances include corresponding measurement parameters and measurement optimization schemes, and the measurement environment is taken as the first category, and the Euclidean distance between the measurement environments corresponding to each historical measurement optimization instance is calculated;

[0092] The calculated Euclidean distance is compared with a preset threshold. If the calculated Euclidean distance is greater than the preset threshold, it means that the corresponding historical measurement instances are of the same category. The iterative analysis is performed until all historical measurement instances are analyzed to obtain the first category classification information.

[0093] Extracting measurement parameter features of historical measurement instances under each measurement environment category according to the first category division information, taking the test parameter features as the second category, and performing clustering second category division using a K-means clustering algorithm to obtain second category division information;

[0094] According to the second category classification information, a correlation path is formed with measurement scenario-measurement parameter-measurement optimization scheme as the correlation order, and a measurement scenario optimization portrait is constructed according to the formed correlation path;

[0095] The optimized portrait of the measurement scene is stored in a database and a first database is constructed.

[0096] It should be noted that historical measurement instances of the target to be measured and their corresponding measurement environment information are obtained based on data retrieval to provide reference and optimization support for the measurement task. These historical measurement instances contain multiple measurement parameters and corresponding optimization schemes. Based on the measurement environment as the classification basis, the Euclidean distance between the measurement environments of each historical measurement instance is calculated to evaluate the similarity between different measurement environments. The calculation of the Euclidean distance can quantify the degree of difference between different measurement environments. If the calculated Euclidean distance is greater than the preset threshold, it means that these measurement environments can be classified into the same category. By iteratively analyzing all historical measurement instances, the classification of the measurement environment is gradually completed to form the first category division information. On the basis of the first category division information, the measurement parameter features used in the historical measurement instances under each measurement environment category are further extracted. Taking these measurement parameters as the analysis object, the K-means clustering algorithm is used to classify them, identify the similarity between the parameter features, and thus realize the second category division. Based on the second category division information, an association path with the measurement scenario, measurement parameter and measurement optimization scheme as the association order is further constructed. In this way, the logical relationship between parameter selection and optimization scheme in different measurement scenarios is clearly described, which is convenient for quick reference and use. Subsequently, an optimized portrait of the measurement scenario is generated through the constructed association path. The optimized portrait can fully reflect the historical experience and optimization strategy in a specific measurement environment. These optimized portraits are stored in the database to form a first database centered on the measurement scenario. This database not only provides rich reference materials for subsequent measurement tasks, but also realizes the accumulation and iteration of knowledge through continuous data updating and optimization, and improves the environmental adaptability and optimization efficiency in complex measurement tasks.

[0097] Furthermore, in a preferred real-time example of the present invention, the depth data, light intensity distribution data and measurement environment data of the next measurement target constitute a measurement data portrait of the next measurement target, and a singular area optimization plan is formulated through the first database, specifically including:

[0098] Acquire the depth data and light intensity distribution data output by the structured light ranging camera when measuring the next measurement target, and acquire the measurement environment data when measuring the next measurement target, so as to form a measurement data portrait of the next measurement target;

[0099] Acquire a first database, and perform similarity calculation between a measurement data portrait of a measurement target and an optimized portrait of a measurement scene stored in the first database to obtain a similarity value;

[0100] Preset a similarity threshold, compare the calculated similarity value with the similarity threshold, select the measurement scene optimization portrait corresponding to the similarity threshold greater than the similarity threshold, and mark it as a candidate portrait;

[0101] Extract the similarity values ​​between each candidate portrait and the measured data portrait, sort them and generate a sorting table, and select the candidate portrait with the largest similarity value as the target portrait;

[0102] The measurement data portrait of the measurement target is used to generate the corresponding three-dimensional model and perform singular area detection. The measurement optimization scheme features corresponding to the target portrait are extracted and applied to the singular area optimization model to optimize the singular area of ​​the current measurement target.

[0103] It should be noted that when measuring the next measurement target, the depth data and light intensity distribution data output by the structured light ranging camera are obtained, and the relevant measurement environment data during the measurement process are collected, and these data are combined to generate the measurement data portrait of the next measurement target. The portrait describes the specific data characteristics and environmental information of the measurement target in detail, which serves as the basis for subsequent analysis. Subsequently, the stored measurement scene optimization portraits are extracted from the first database, and the measurement data portraits are similarly calculated with these optimization portraits to evaluate the similarity between the current measurement target and the historical measurement scene. Through this similarity calculation, the correlation between the current measurement target and the historical optimization scheme is quantified. Subsequently, a similarity threshold is preset, and the similarity value is compared with the threshold. For the measurement scene optimization portraits whose calculation results are greater than the threshold, they are marked as candidate portraits. These candidate portraits represent the historical measurement scenes and their optimization scheme characteristics related to the current measurement target. On this basis, the specific similarity values ​​between the candidate portraits and the measurement data portraits are extracted, these similarity values ​​are sorted, and a sorting table is generated to clearly show the priorities of different candidate portraits. Finally, the candidate portrait with the highest similarity value is selected from the sorting table and marked as the target portrait for optimization reference of the current measurement task. Finally, the initial 3D model is generated using the measurement data portrait of the current measurement target, and the singular area is detected based on the model. The corresponding measurement optimization solution features are extracted through the target portrait and applied to the singular area optimization model to optimize the singular area in the current measurement target. The accuracy and efficiency of 3D model generation and optimization in the current measurement task are improved, thereby ensuring the high quality and reliability of the measurement results.

[0104] Figure 2 A flow chart of a scene adaptation method applied to a structured light ranging camera provided by one embodiment of the present invention;

[0105] like Figure 2 As shown, the present invention provides a flow chart of a scene adaptation method applied to a structured light ranging camera, comprising:

[0106] S202, measuring the target to be measured based on the structured light ranging camera to obtain initial depth data and light intensity distribution data of the target to be measured and preprocessing, and after the preprocessing, performing distortion correction and reflection error compensation to obtain second analysis information;

[0107] S204, constructing an initial three-dimensional model of the target to be measured according to the second analysis information, performing singular region detection, and outputting the initial three-dimensional model if no singular region exists;

[0108] S206, if there is a singular area, obtain measurement environment information, combine the initial depth data and light intensity distribution data of the target to be measured to generate a measurement data portrait, and perform similarity calculation with the measurement scene optimization portrait stored in the first database;

[0109] S208, if there are similar measurement scene optimization portraits, select the portrait with the highest similarity to generate an optimization solution, and apply it to the singular region optimization model to perform singular region optimization;

[0110] S210: If there is no similar measurement scene optimization portrait, extract the point cloud data and the corresponding depth data and light intensity data in each singular area, input them into the singular area optimization model to obtain the optimization parameters to generate an optimized three-dimensional model, and construct a new measurement scene portrait to update the first database.

[0111] It should be noted that when measuring, the initial data is obtained through the structured light ranging camera, and then preprocessing, correction and compensation are performed based on the initial data to generate an initial three-dimensional model. If there is no singular area in the generated three-dimensional model at this time, that is, the three-dimensional information of a certain area is too sparse, it means that the current imaging effect is good and no optimization is required. If there is a singular area, it means that the measurement accuracy is abnormal due to environmental influences. At this time, by analyzing whether there is a similar historical solution in the first database; if so, it is directly used in the singular area optimization model to optimize the singular area, thereby accelerating data processing efficiency and improving imaging effects; if not, based on the current measurement data, the corresponding optimization parameters are regenerated to fill the corresponding singular area to improve the final detection accuracy and effect.

[0112] Figure 3 A data analysis system 3 applied to a structured light ranging camera is provided in one embodiment of the present invention. The system comprises: a memory 31 and a processor 32. The memory 31 contains a data analysis method program applied to the structured light ranging camera. When the data analysis method program applied to the structured light ranging camera is executed by the processor 32, the following steps are implemented:

[0113] Measuring the target to be measured to obtain initial depth data and light intensity distribution data of the target to be measured and performing data preprocessing to obtain first analysis information;

[0114] Performing distortion correction and reflection error compensation on the first analysis information to obtain second analysis information, and constructing an initial three-dimensional model of the target to be measured according to the second analysis information;

[0115] Constructing a singular region optimization model, extracting the distribution characteristics of point cloud data of each region of the target to be measured based on the initial three-dimensional model, determining whether there is a singular region and optimizing it using the singular region optimization model to obtain an optimized three-dimensional model;

[0116] Obtaining historical measurement instances of the target to be measured and corresponding measurement environment information, classifying each historical measurement instance into categories, and constructing a scene optimization portrait and a first database;

[0117] A measurement data portrait of the next measurement target is constructed based on the depth data, light intensity distribution data and measurement environment data of the next measurement target, and a singular area optimization plan is formulated through the first database.

[0118] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0119] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0120] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0121] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.

[0122] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0123] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A data analysis method applied to a structured light ranging camera, characterized in that: include: Measuring the target to be measured to obtain initial depth data and light intensity distribution data of the target to be measured and performing data preprocessing to obtain first analysis information; Performing distortion correction and reflection error compensation on the first analysis information to obtain second analysis information, and constructing an initial three-dimensional model of the target to be measured according to the second analysis information; Constructing a singular region optimization model, extracting the distribution characteristics of point cloud data of each region of the target to be measured based on the initial three-dimensional model, determining whether there is a singular region and optimizing it using the singular region optimization model to obtain an optimized three-dimensional model; Obtaining historical measurement instances of the target to be measured and corresponding measurement environment information, classifying each historical measurement instance into categories, and constructing a scene optimization portrait and a first database; A measurement data portrait of the next measurement target is constructed based on the depth data, light intensity distribution data and measurement environment data of the next measurement target, and a singular area optimization plan is formulated through the first database.

2. The data analysis method for a structured light ranging camera according to claim 1, characterized in that: The measuring of the target to be measured to obtain initial depth data and light intensity distribution data of the target to be measured and performing data preprocessing to obtain first analysis information specifically includes: The structured light ranging camera is used to measure the target to obtain the initial depth data and light intensity distribution data of the target to be measured; Preset the Gaussian kernel size and sigma value, introduce the Gaussian spatial filtering algorithm to perform noise reduction on the acquired depth data, generate a depth data matrix according to the initial depth data, traverse each pixel point in the depth data matrix based on the preset Gaussian kernel size and sigma value, and perform weighted average calculation with the pixels in the surrounding neighborhood; The weighted average value is used as the new value of the current pixel for iterative calculation until all depth data are traversed to obtain the preprocessed depth data; Generate a light intensity distribution matrix according to the acquired light intensity distribution data, preset a light intensity threshold and perform threshold processing on the light intensity distribution matrix, remove data less than the light intensity threshold, and obtain pre-processed light intensity distribution data; Generate a validity matrix according to the pre-processed light intensity distribution data, screen the mathematical depth data to obtain screened depth data; combine the screened depth data and the pre-processed light intensity distribution data to form the first analysis information.

3. The data analysis method for a structured light ranging camera according to claim 1, characterized in that: The step of performing distortion correction and reflection error compensation on the first analysis information to obtain second analysis information, and constructing an initial three-dimensional model of the target to be measured according to the second analysis information specifically includes: Acquire internal and external parameter parameters of the target structured light ranging camera, wherein the internal and external parameter parameters include an internal parameter matrix, a distortion coefficient, a rotation matrix, and a translation vector, construct a distortion model based on the acquired internal and external parameter parameters, and input the first analysis information to perform distortion correction; A bilinear interpolation algorithm is introduced to remap the pixels after distortion correction from the input image space to the output image space, calculate the grayscale value of the mapped pixels and generate the corrected depth matrix; Acquire light intensity distribution data based on the corrected depth matrix, calculate the incident angle of each depth point in combination with the measurement light source and the target structured light ranging camera position, and construct a depth data map using the corrected depth matrix; Surface curvature fitting is performed based on the constructed depth data graph, Gaussian curvature is used to describe the surface smoothness of the target to be measured, and a reflection error compensation function is established in combination with the surface smoothness of the target to be measured and the calculated incident angle to perform reflection error compensation, thereby obtaining second analysis information; Constructing a three-dimensional coordinate system, using the second analysis information and the internal and external parameters of the target structured light ranging camera to transform each pixel into a three-dimensional point in the three-dimensional coordinate system and performing global coordinate system mapping to obtain corresponding three-dimensional coordinate information; The acquired three-dimensional coordinate information is converted and processed to generate point cloud data of the target to be measured. The point cloud data model is converted into a continuous surface model based on the triangulation method. The surface model is rendered and visualized to generate an initial three-dimensional model of the target to be measured.

4. The data analysis method for a structured light ranging camera according to claim 1, characterized in that: The constructing of the singular region optimization model, extracting the distribution characteristics of the point cloud data of each region of the target to be measured based on the initial three-dimensional model, determining whether there is a singular region and optimizing using the singular region optimization model to obtain an optimized three-dimensional model, specifically includes: Acquire an initial three-dimensional model of the target to be measured, extract point cloud data distribution characteristics of each area of ​​the target to be measured based on the initial three-dimensional model, perform sparse area detection using the DBSCAN algorithm, and obtain sparse area detection information; Constructing a singular region judgment rule, extracting point cloud density features and point cloud quantity features in each sparse region according to the sparse region detection information, and using the singular region judgment rule to analyze whether the corresponding sparse region is a singular region, to obtain singular region analysis information; Based on ELM, a singular region optimization model is constructed, the input weights and bias parameters of the ELM network are randomly generated, the PSO algorithm is introduced for model optimization, the positions of the input weights and bias parameters of the ELM in the search space are encoded and the initial population is generated; Preset the fitness function, calculate the fitness value of each particle in the initial population according to the fitness function, and judge it with the preset threshold to determine the individual extreme value and the global extreme value and update the position and speed; Iterate according to the above steps until the maximum number of iterations is reached or the stopping criterion is met to obtain the optimal solution, decode the optimal solution to obtain the optimal weight and bias parameters of the ELM network, and optimize the singular region optimization model; Based on the singular region analysis information, point cloud data and corresponding depth data and light intensity data in each singular region are extracted to form first feature information, and input into the optimized singular region optimization model to optimize the singular region to obtain singular region optimization information; Point cloud optimization data is generated according to the singular area optimization information, the point cloud sparse area in the initial three-dimensional model of the target to be measured is optimized to obtain an optimized three-dimensional model, and a measurement report of the target to be measured is generated based on the optimized three-dimensional model for push.

5. The data analysis method for a structured light ranging camera according to claim 1, characterized in that: The obtaining of historical measurement instances of the target to be measured and corresponding measurement environment information, classifying each historical measurement instance into categories, and constructing a scene optimization portrait and a first database specifically includes: Based on data retrieval, historical measurement instances of the target to be measured and corresponding measurement environment information are obtained, wherein the historical measurement instances include corresponding measurement parameters and measurement optimization schemes, and the measurement environment is taken as the first category, and the Euclidean distance between the measurement environments corresponding to each historical measurement optimization instance is calculated; The calculated Euclidean distance is compared with a preset threshold. If the calculated Euclidean distance is greater than the preset threshold, it means that the corresponding historical measurement instances are of the same category. The iterative analysis is performed until all historical measurement instances are analyzed to obtain the first category classification information. Extracting measurement parameter features of historical measurement instances under each measurement environment category according to the first category division information, taking the test parameter features as the second category, and performing clustering second category division using a K-means clustering algorithm to obtain second category division information; According to the second category classification information, a correlation path is formed with measurement scenario-measurement parameter-measurement optimization scheme as the correlation order, and a measurement scenario optimization portrait is constructed according to the formed correlation path; The optimized portrait of the measurement scene is stored in a database and a first database is constructed.

6. The data analysis method for a structured light ranging camera according to claim 1, characterized in that: The depth data, light intensity distribution data and measurement environment data of the next measurement target are used to form a measurement data portrait of the next measurement target, and a singular area optimization plan is formulated through the first database, specifically including: Acquire the depth data and light intensity distribution data output by the structured light ranging camera when measuring the next measurement target, and acquire the measurement environment data when measuring the next measurement target, so as to form a measurement data portrait of the next measurement target; Acquire a first database, and perform similarity calculation between a measurement data portrait of a measurement target and an optimized portrait of a measurement scene stored in the first database to obtain a similarity value; Preset a similarity threshold, compare the calculated similarity value with the similarity threshold, select the measurement scene optimization portrait corresponding to the similarity threshold greater than the similarity threshold, and mark it as a candidate portrait; Extract the similarity values ​​between each candidate portrait and the measured data portrait, sort them and generate a sorting table, and select the candidate portrait with the largest similarity value as the target portrait; The measurement data portrait of the measurement target is used to generate the corresponding three-dimensional model and perform singular area detection. The measurement optimization scheme features corresponding to the target portrait are extracted and applied to the singular area optimization model to optimize the singular area of ​​the current measurement target.

7. A data analysis system for a structured light ranging camera, characterized in that: The system includes: a memory and a processor, wherein the memory contains a data analysis method program applied to a structured light ranging camera, and when the data analysis method program applied to a structured light ranging camera is executed by the processor, the following steps are implemented: Measuring the target to be measured to obtain initial depth data and light intensity distribution data of the target to be measured and performing data preprocessing to obtain first analysis information; Performing distortion correction and reflection error compensation on the first analysis information to obtain second analysis information, and constructing an initial three-dimensional model of the target to be measured according to the second analysis information; Constructing a singular region optimization model, extracting the distribution characteristics of point cloud data of each region of the target to be measured based on the initial three-dimensional model, determining whether there is a singular region and optimizing it using the singular region optimization model to obtain an optimized three-dimensional model; Obtaining historical measurement instances of the target to be measured and corresponding measurement environment information, classifying each historical measurement instance into categories, and constructing a scene optimization portrait and a first database; A measurement data portrait of the next measurement target is constructed based on the depth data, light intensity distribution data and measurement environment data of the next measurement target, and a singular area optimization plan is formulated through the first database.