A method, device and equipment for measuring surface flatness of cabinet products
Through three-dimensional scanning and feature index calculation, combined with least squares method and quadratic surface fitting, the thermal expansion and contraction problem in the surface flatness detection of cabinet products is solved, and more accurate flatness measurement is achieved, which improves detection efficiency and finished products. Rate.
Patent Information
- Application Number
- CN202411018547.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-07-29
AI Technical Summary
The prior art is that thermal expansion and contraction caused by temperature changes in the surface flatness detection of cabinet products, resulting in uneven characteristics. The existing random consistency sampling method is difficult to accurately reflect the true plane of cabinet products, affecting the accuracy of measurement results.
Point cloud data is obtained through a three-dimensional scanner, the characteristic index of each point is calculated, the least squares method and quadratic surface fit is used, and the surface normal and non-leveling possibility evaluation values are combined, and iterative fit is performed by random consistent sampling method to obtain More in line with the actual fitting plane, and then judge the surface flatness.
More accurate surface flatness measurement results than the prior art are achieved, reducing the influence of human factors, and improving detection efficiency and yield.
Smart Images

Figure CN118548828B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of object surface measurement, and in particular to a surface flatness measurement method, device and equipment for cabinet products. Background Art
[0002] Cabinet products generally refer to metal or non-metal casings used to store, fix and protect electronic equipment (such as servers, network equipment, power supply equipment, etc.). They are widely used in data centers, communication base stations, industrial control and other fields. The design and manufacture of cabinets need to meet specific technical standards and performance requirements to ensure the safe, stable and efficient operation of internal equipment. Flatness is an important link in the production process of cabinet products. Its uneven surface will not only affect the overall quality of the product, but may also cause problems in subsequent processes and reduce the yield rate.
[0003] Therefore, by testing the flatness, the product quality can be effectively controlled to avoid unqualified products caused by the surface. At present, due to the different temperatures in the production process of cabinet products, the material expands and contracts, forming uneven features, which will make the cabinet products present a certain curvature. In the prior art, random consistency sampling is often used to detect the flatness of the cabinet, and then the points are fitted into a plane, and the flatness of the point cloud is determined by the difference between the surface of the cabinet product and the fitting plane. Among them, since the construction of the fitting plane using random consistency sampling depends on the selection of sampling points and inner points during the algorithm iteration process, if the sampling points and the inner points selected during the algorithm iteration process are point cloud data with uneven features, the fitting plane will not reflect the true plane of the cabinet product, thereby affecting the judgment result of the cabinet surface flatness. Summary of the invention
[0004] In order to solve the above technical problems, the purpose of the present invention is to provide a surface flatness measurement method, device and equipment for cabinet products to improve the above problems. In order to achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0005] In a first aspect, the present application provides a surface flatness measurement method for cabinet products, the method comprising: scanning the cabinet to be inspected by means of a three-dimensional scanner, and obtaining the scanning results to obtain three-dimensional point cloud data corresponding to the cabinet to be inspected; calculating according to the local flatness of the three-dimensional point cloud data to obtain the characteristic index corresponding to each point; performing plane fitting on the characteristic index as the selected object of a preset random consistent sampling method to obtain a fitting plane; calculating the vertical distance between each point and the fitting plane one by one; and obtaining the surface flatness measurement result of the cabinet to be inspected according to the vertical distance corresponding to each point.
[0006] In combination with the first aspect, in a possible implementation method, the characteristic index corresponding to each point is calculated based on the local flatness of the three-dimensional point cloud data, including: calculating the surface normal possibility evaluation value within the preset neighborhood range based on each of the points one by one; calculating the surface unevenness possibility evaluation value within the preset neighborhood range based on each of the points one by one; and calculating according to the surface normal possibility evaluation value and the surface unevenness possibility evaluation value corresponding to each of the points to obtain the characteristic index corresponding to each point.
[0007] In combination with the first aspect, in a possible implementation method, the surface normal possibility evaluation value within the preset neighborhood range is calculated based on each of the points one by one, including: using the least squares method to perform plane fitting on the preset neighborhood range where a point is located, and obtaining the determination coefficient corresponding to the plane fitting, and recording it as the corrected fitting determination coefficient; using the least squares method to perform quadratic surface fitting on the preset neighborhood range where a point is located, and obtaining the determination coefficient corresponding to the quadratic surface fitting, and recording it as the corrected determination coefficient; calculating the unit normal vector of each point within the preset neighborhood range one by one; and calculating the surface normal possibility evaluation value corresponding to each point based on the corrected fitting determination coefficient, the corrected determination coefficient and the unit normal vector corresponding to each point.
[0008] In combination with the first aspect, in a possible implementation method, the surface non-flatness possibility evaluation value within the preset neighborhood range is calculated based on each of the points one by one, including: calculating the angle between each neighborhood fitting plane and the horizontal plane one by one, each of the neighborhood fitting planes is obtained by plane fitting of the preset neighborhood range of a point; calculating the unit normal vector of each point within the preset neighborhood range one by one; and calculating the surface non-flatness possibility evaluation value corresponding to each point based on the preset unit vector in the vertical direction, the angle corresponding to each point, the unit normal vector and the surface normal possibility evaluation value.
[0009] In combination with the first aspect, in a possible implementation method, the characteristic indicators are used as the selected objects of the preset random consistent sampling method to perform plane fitting to obtain a fitting plane, including: dividing all the characteristic indicators according to a preset division threshold to obtain an in-place point set and an out-of-place point set; cyclically taking out a point from the out-of-place point set and adding it to the in-place point set, and calculating a loop iteration index after each loop until the loop iteration index is greater than the preset loop threshold, the loop iteration index being calculated by the mean of the selected indicators corresponding to the in-place point set and the out-of-place point set; performing plane fitting according to the in-place point set to obtain a fitting plane.
[0010] In combination with the first aspect, in a possible implementation method, the surface flatness measurement result of the cabinet to be inspected is obtained according to the vertical distance corresponding to each point, including: screening all points according to a preset distance threshold and the vertical distance corresponding to each point to obtain a non-flat point cloud set; calculating the proportion of the non-flat point cloud set in the total number of points in the three-dimensional point cloud data to obtain the proportion; and judging the surface flatness measurement result of the cabinet to be inspected according to the proportion.
[0011] In the second aspect, the present application also provides a surface flatness measurement device for cabinet products, including: a scanning module, used to scan the cabinet to be inspected through a three-dimensional scanner, and obtain the scanning results to obtain three-dimensional point cloud data corresponding to the cabinet to be inspected; a first calculation module, used to calculate according to the local flatness of the three-dimensional point cloud data, and obtain the characteristic index corresponding to each point; a fitting module, used to use the characteristic index as the selected object of a preset random consistent sampling method to perform plane fitting, and obtain a fitting plane; a second calculation module, used to calculate the vertical distance between each point and the fitting plane one by one; a logic module, used to judge the surface flatness measurement result of the cabinet to be inspected according to the corresponding vertical distance of each point.
[0012] In combination with the second aspect, in a possible implementation method, the first calculation module includes: a third calculation module, which is used to calculate the surface normal possibility evaluation value within the preset neighborhood range based on each of the points one by one; a fourth calculation module, which is used to calculate the surface non-flatness possibility evaluation value within the preset neighborhood range based on each of the points one by one; and a feature calculation module, which is used to calculate according to the surface normal possibility evaluation value and the surface non-flatness possibility evaluation value corresponding to each of the points, to obtain the feature index corresponding to each point.
[0013] In combination with the second aspect, in a possible implementation method, the fitting module includes: a division module, which is used to divide all the characteristic indicators according to a preset division threshold to obtain an in-office point set and an out-office point set; a loop module, which is used to cyclically take out a point from the out-office point set and add it to the in-office point set, and calculate a loop iteration index after each loop until the loop iteration index is greater than the preset loop threshold, and the loop iteration index is calculated by the average of the selected indicators corresponding to the in-office point set and the out-office point set; a plane fitting module, which is used to perform plane fitting according to the in-office point set to obtain a fitting plane.
[0014] In a third aspect, the present application also provides a surface flatness measurement device for cabinet products, comprising: a memory for storing a computer program; and a processor for implementing the steps of the above-mentioned surface flatness measurement method for cabinet products when executing the computer program.
[0015] The present invention has the following beneficial effects:
[0016] The present invention determines the characteristic index of each point cloud through the point cloud shape features within the neighborhood of each point, and uses the characteristic index as the basis for selecting a cyclic iteration of the random consistent sampling method. The fitting plane determined by using the characteristic index as the iteration basis of the random consistent sampling method is more in line with the actual state of the cabinet to be inspected. Finally, the surface flatness measurement result of the cabinet to be inspected is judged by the distance between the fitting plane and each point, thereby achieving a more accurate surface flatness measurement result than in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are 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 based on these drawings without paying creative work.
[0018] Figure 1 A schematic flow chart of a method for measuring surface flatness of a cabinet product provided in Embodiment 1 of the present invention;
[0019] Figure 2 A schematic flow chart of step S2 provided in Example 1 of the present invention;
[0020] Figure 3 A schematic flow chart of step S3 provided in Example 1 of the present invention;
[0021] Figure 4 A schematic flow chart of step S5 provided in Example 1 of the present invention;
[0022] Figure 5 This is a schematic diagram of the structure of the surface flatness measuring device for cabinet products described in Embodiment 2 of the present invention;
[0023] Figure 6 This is a schematic diagram of the structure of the surface flatness measuring device for cabinet products described in Example 3 of the present invention.
[0024] Markings in the figure:
[0025] 800. Surface flatness measuring equipment for cabinet products; 801. Processor; 802. Memory; 803. Multimedia component; 804. I / O interface; 805. Communication component. DETAILED DESCRIPTION
[0026] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a surface flatness measurement method, device and equipment for cabinet products proposed by the present invention, its specific implementation method, structure, features and effects in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0027] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0028] Embodiment 1:
[0029] A specific solution of a method for measuring the surface flatness of a cabinet product provided by the present invention is described in detail below with reference to the accompanying drawings.
[0030] See also Figure 1 , which shows a flow chart of a surface flatness measurement method for a cabinet product provided by an embodiment of the present invention, including step S1, step S2, step S3, step S4 and step S5.
[0031] S1. Scan the cabinet to be inspected by using a three-dimensional scanner, and obtain the scanning result to obtain the three-dimensional point cloud data corresponding to the cabinet to be inspected.
[0032] In this embodiment, the three-dimensional scanning is used to extract data from the cabinet to be inspected and the flatness measurement is performed based on the obtained three-dimensional point cloud data, which can greatly improve the inspection efficiency and save time and labor costs. In addition, there is no need to contact the surface of the cabinet to be inspected, which can avoid possible damage or interference to the surface of the cabinet to be inspected, and also reduce the influence of human factors and subjective factors on the flatness judgment results. Therefore, in this embodiment, a three-dimensional laser is used to obtain the three-dimensional point cloud data of the cabinet product, and the three-dimensional point cloud data is used to measure the flatness of the surface of the cabinet to be inspected.
[0033] S2. Calculate according to the local flatness of the three-dimensional point cloud data to obtain a characteristic index corresponding to each point.
[0034] Specifically, in this embodiment, it is considered that the unevenness of the cabinet product to be tested is caused by temperature differences, such as thermal expansion and contraction to form arc features. Specifically, the surface of the cabinet to be tested is uneven. The arc-shaped bending feature can be represented by the height information of each point in the point cloud data, which is exactly the feature of bending that can be reflected in the three-dimensional point cloud data. That is, please refer to Figure 2 , this step includes step S21, step S22 and step S23.
[0035] S21, calculating the surface normal possibility evaluation value within the preset neighborhood range based on each of the points one by one.
[0036] In this embodiment, it is considered that this curved structure reflects that the neighborhood of a point in the three-dimensional point cloud data presents a certain curvature. Although the plane feature presented is weak, this embodiment uses this feature difference to determine the possibility that the data point is a normal surface of the cabinet product. Specifically, in this application, step S21 includes step S211, step S212, step S213 and step S214.
[0037] S211, using the least squares method to perform plane fitting on the neighborhood of each point, obtain the determination coefficient corresponding to the plane fitting, and record it as the correction fitting determination coefficient R1, wherein the neighborhood is a range consisting of a circle with the point as the center and a radius with a preset value. It should be noted that the preset value of the present application is r, that is, a plane fitting is performed on all points within a circle with the point as the center and r as the radius.
[0038] S212. Use the least squares method to fit the quadratic surface in the neighborhood of each point, and obtain the determination coefficient corresponding to the quadratic surface fitting, which is recorded as the corrected determination coefficient .
[0039] S213, calculating the unit normal vector of each point within the preset neighborhood range one by one.
[0040] S214. Calculate the surface normal possibility assessment value corresponding to each point according to the correction fitting determination coefficient, the correction determination coefficient and the unit normal vector corresponding to each point.
[0041] The surface normality evaluation value of each point mentioned in this step is calculated as follows:
[0042]
[0043] in, Indicates the normal possibility evaluation value of the surface corresponding to each point; It represents the correction fitting determination coefficient obtained by using the least squares plane fitting in the preset neighborhood of the point. It represents the correction coefficient of determination of the quadratic surface fitting in the preset neighborhood of the point. It reflects the local structural characteristics of the point cloud; Represents the unit normal vector corresponding to the i-th point in the neighborhood, where the unit normal vector is obtained by constructing the covariance matrix of all points in the neighborhood with a radius of r with this point as the center, calculating the eigenvalues and eigenvectors corresponding to the covariance matrix, and the unit eigenvector corresponding to the minimum eigenvalue is the normal vector of the point cloud; Represents the mean vector of all normal vectors in the neighborhood, representing the average normal vector of the neighborhood point cloud, represents the angle between the normal vector of the i-th point cloud in the neighborhood and the average normal vector, Respectively represent the mean and variance of the angle within the neighborhood; () represents the normalization function.
[0044] In the above formula, The ratio reflects the curvature of the sector. The larger the value, the more obvious the fluctuation of curvature in the neighborhood, and the greater the possibility of curvature. The smaller the value, the more plane characteristics are presented, and the angle data of all points are more concentrated, thus showing a strong directional consistency. The surface normal possibility assessment value The larger the value, the more likely it is that the surface of the cabinet to be tested is normal. The higher the authenticity of the fitted plane, the more accurate the flatness data calculated and measured. The above calculation formula can effectively eliminate the interference of inaccurate shape features of the neighborhood on the selection of points in the bureau.
[0045] S22, calculating the surface unevenness possibility evaluation value within the preset neighborhood range based on each of the points one by one.
[0046] In practice, the following situations may occur: the defects of the cabinet to be inspected are too large, so the shape characteristics of the point cloud cannot be accurately represented by the neighborhood of only one point, such as because the product has obvious concave. It is similar to the fact that when a piece of paper is picked up, one side has an obvious downward tilt due to gravity, resulting in it not being on the same plane. Therefore, the above-mentioned point with non-flatness in an area also has a large possibility of having a normal surface.
[0047] The above-mentioned phenomenon of excessive defects will cause the local point cloud to also present the characteristics of an approximate plane. Therefore, in this implementation, the angle between the plane obtained by fitting the preset neighborhood range where a point is located and the horizontal plane is also used to reflect the surface characteristics of the cabinet product represented by the point. The larger the angle and the smaller the possibility of a normal surface, the greater the possibility that the point will appear as an uneven point cloud; and if all points in the neighborhood present the above-mentioned characteristics, the greater the possibility that they will appear as uneven points. Therefore, this step S22 also includes steps S221, S222 and S223 to calculate the evaluation value of the possibility of unevenness of each surface.
[0048] S221, calculating the angle between each neighborhood fitting plane and the horizontal plane one by one, each of the neighborhood fitting planes is obtained by plane fitting in the neighborhood where each point is located.
[0049] S222. Calculate the unit normal vector of the neighborhood of each point one by one.
[0050] S223. Calculate the surface non-flatness possibility evaluation value corresponding to each point according to the preset unit vector in the vertical direction, the angle corresponding to each point, the unit normal vector and the surface normality possibility evaluation value.
[0051] The calculation method of the surface unevenness possibility evaluation value mentioned in this step is as follows:
[0052]
[0053] in, It represents the angle between the fitting plane obtained by the i-th point cloud in the neighborhood and the horizontal plane, which reflects the possibility of curvature of the local point cloud. The larger the angle with the horizontal direction, the greater the curvature, and thus the greater the possibility of non-flatness. It represents the normal possibility evaluation value of the surface corresponding to the i-th point. The smaller the value, the greater the possibility of non-flatness. represents the unit normal vector corresponding to the i-th point, represents the unit normal vector in the vertical direction, It represents the difference between the unit normal vector corresponding to the i-th point and the vertical direction. The larger the difference is, the greater the possibility that the point cloud has structural defects and is not flat. represents the non-flat feature of the i-th point cloud, Represents the mean value of the non-flat features in the neighborhood, reflecting the possibility of non-flatness of the point cloud. Represents the normalized function, and q represents the surface non-flatness possibility evaluation value corresponding to a point.
[0054] In the above calculation formula, it eliminates the interference caused by the unclear response to the concave-convex or curved features of the cabinet to be inspected due to the small neighborhood of the point. The defect characteristics of each point in the neighborhood reflect the concave-convex or curved features of the neighborhood representing the surface of the cabinet to be inspected as a whole.
[0055] S23, calculating according to the surface normal possibility evaluation value and the surface unevenness possibility evaluation value corresponding to each of the points, to obtain the characteristic index corresponding to each point.
[0056] Among them, the characteristic index calculation method in this application is as follows:
[0057]
[0058] Where t is the surface normal probability assessment value, is the possible evaluation value of surface non-flatness, and x is the characteristic index.
[0059] That is, through the above steps, in this embodiment, the local flatness of the three-dimensional point cloud data is used to determine the surface normal possibility evaluation value and the surface unevenness possibility evaluation value of each point, and the above two evaluations are combined and fused as the basis for point selection using random consistent sampling. For details, please refer to the content of step S3.
[0060] S3. Using the characteristic index as a selected object of a preset random consistent sampling method to perform plane fitting to obtain a fitting plane.
[0061] It should be noted that in this embodiment, the existing random consistent sampling method can be used to select feature indicators and perform a plane fitting process based on the selected results. Among them, the initial in-place point in the existing random consistent sampling method can be formed by selecting a point with a larger feature indicator, and its cyclic fitting process is a prior art and will not be repeated in this application.
[0062] At the same time, this embodiment also provides an improved random uniform sampling method for plane fitting. For details, please refer to Figure 3 , step S3 includes step S31, step S32 and step S33.
[0063] S31. Divide all the characteristic indicators according to a preset division threshold to obtain an in-office point set and an out-office point set.
[0064] The preset division threshold in this step is 0.8, and the point with a characteristic index greater than 0.8 is regarded as an element of the in-point set, and the point with a characteristic index less than or equal to 0.8 is regarded as an element of the out-point set.
[0065] S32, cyclically taking out a point from the external point set and adding it to the internal point set, and calculating a loop iteration index after each loop until the loop iteration index is greater than a preset loop threshold, the loop iteration index being calculated by the average of the candidate indicators corresponding to the internal point set and the external point set.
[0066] Specifically, the calculation method of the circulation index in this step is as follows:
[0067]
[0068] in, represents the mean value of the candidate index corresponding to the set of points in the bureau, Represents the mean value of the candidate index of the external point set. The greater the difference between the two, the greater the mean value of the candidate index of the internal point set and the smaller the mean value of the candidate index of the external point set, which means that the data in the current external point set can well meet the surface fitting of the cabinet to be detected, and the greater the possibility of stopping iteration; Represents the loop iteration index. When the loop iteration index is greater than the preset loop threshold 0.9, the iteration stops. Among them, the mean value of the selected index The average value of the characteristic index corresponding to all points in the internal point set is calculated; the average value of the selected index It is obtained by calculating the average value of the characteristic indicators corresponding to all points in the outlier point set.
[0069] In this embodiment, the error calculation in the random consistent sampling method of the prior art is replaced by the above-mentioned cyclic iteration index, and the point data in the random consistent sampling method of the prior art is replaced by the characteristic index. It can be better reflected in the plane fitting process that the current in-field point set fitting result can fit the actual surface situation of the cabinet to be inspected well, and the best fitting plane can be obtained.
[0070] S33, performing plane fitting according to the internal point set to obtain a fitting plane.
[0071] S4. Calculate the vertical distance between each point and the fitting plane one by one.
[0072] S5. Obtain the surface flatness measurement result of the cabinet to be tested according to the vertical distance corresponding to each point.
[0073] In this application, all points are classified and analyzed by setting distance thresholds. For details, please refer to Figure 4 , step S5 includes step S51, step S52 and step S53.
[0074] S51, all points are screened according to a preset distance threshold and the vertical distance corresponding to each point to obtain a non-flat point cloud set. The preset distance threshold mentioned in this step is 2.
[0075] That is, the preset distance threshold set by the above steps regards points greater than the preset distance threshold as uneven points, forming an uneven point cloud set.
[0076] S52, calculating the proportion of the non-flat point cloud set to the total number of points in the three-dimensional point cloud data to obtain a proportion;
[0077] S53: Obtain a surface flatness measurement result of the cabinet to be inspected according to the proportion.
[0078] In this embodiment, an exemplary judgment process is given. If the proportion of the non-flat point cloud set is less than 2%, the flatness of the cabinet to be tested is considered to be excellent; if the proportion is between 2% and 10%, the flatness is good; if the proportion exceeds 10%, the flatness is unqualified. However, the above content is an exemplary example, and those skilled in the art can modify the above judgment method according to actual conditions, and no specific restrictions are made in this application.
[0079] Embodiment 2:
[0080] like Figure 5 As shown, this embodiment provides a surface flatness measurement device for cabinet products, the device comprising:
[0081] A scanning module is used to scan the cabinet to be inspected through a three-dimensional scanner, and obtain the scanning result to obtain the three-dimensional point cloud data corresponding to the cabinet to be inspected;
[0082] A first calculation module, used for calculating according to the local flattening condition of the three-dimensional point cloud data to obtain a characteristic index corresponding to each point;
[0083] A fitting module, used for performing plane fitting using the characteristic index as a selected object of a preset random consistent sampling method to obtain a fitting plane;
[0084] A second calculation module, used for calculating the vertical distance between each point and the fitting plane one by one;
[0085] The logic module is used to determine the surface flatness measurement result of the cabinet to be tested according to the vertical distance corresponding to each point.
[0086] In some possible embodiments, the first calculation module includes:
[0087] A third calculation module is used to calculate the surface normal possibility evaluation value within a preset neighborhood range based on each of the points one by one;
[0088] A fourth calculation module is used to calculate the surface unevenness possibility evaluation value within a preset neighborhood range based on each of the points one by one;
[0089] The feature calculation module is used to calculate the feature index corresponding to each point according to the surface normal possibility evaluation value and the surface unevenness possibility evaluation value corresponding to each point.
[0090] In some possible embodiments, the fitting module includes:
[0091] A division module, used to divide all the characteristic indicators according to a preset division threshold value to obtain an in-office point set and an out-office point set;
[0092] A loop module, used to loop out a point from the external point set and add it to the internal point set, and calculate a loop iteration index after each loop until the loop iteration index is greater than a preset loop threshold, wherein the loop iteration index is calculated by the average of the candidate indexes corresponding to the internal point set and the external point set;
[0093] The plane fitting module is used to perform plane fitting according to the local point set to obtain a fitting plane.
[0094] It should be noted that, regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.
[0095] Embodiment 3:
[0096] Corresponding to the above method embodiment, this embodiment also provides a surface flatness measuring device for cabinet products. The surface flatness measuring device for cabinet products described below and the surface flatness measuring method for cabinet products described above can refer to each other.
[0097] Figure 6 FIG. 8 is a block diagram of a surface flatness measuring device 800 for a cabinet product according to an exemplary embodiment. Figure 6 As shown, the surface flatness measuring device 800 for cabinet products may include: a processor 801 and a memory 802. The surface flatness measuring device 800 for cabinet products may also include one or more of a multimedia component 803, an I / O interface 804, and a communication component 805.
[0098] The processor 801 is used to control the overall operation of the surface flatness measuring device 800 for cabinet products to complete all or part of the steps in the above-mentioned surface flatness measuring method for cabinet products. The memory 802 is used to store various types of data to support the operation of the surface flatness measuring device 800 for cabinet products, and these data may include, for example, instructions for any application or method operated on the surface flatness measuring device 800 for cabinet products, as well as application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 802 or sent via the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules can be keyboards, mice, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the surface flatness measuring device 800 for cabinet products and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 can include: Wi-Fi module, Bluetooth module, NFC module.
[0099] In an exemplary embodiment, the surface flatness measuring device 800 for cabinet products can be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), digital signal processors (Digital Signal Processing Device, referred to as DSP), digital signal processing devices (Digital Signal Processing Device, referred to as DSPD), programmable logic devices (Programmable Logic Device, referred to as PLD), field programmable gate arrays (Field Programmable Gate Array, referred to as FPGA), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned surface flatness measuring method for cabinet products.
[0100] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0101] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A surface flatness measurement method for cabinet products. It is characterized in that The method comprises: Scan the cabinet to be inspected by a 3D scanner, and obtain the scanning result to obtain the 3D point cloud data corresponding to the cabinet to be inspected; Calculate the local flatness of the three-dimensional point cloud data to obtain a characteristic index corresponding to each point; The characteristic index is used as a selected object of a preset random consistent sampling method to perform plane fitting to obtain a fitting plane; Calculate the vertical distance between each point and the fitting plane one by one; The surface flatness measurement result of the cabinet to be tested is obtained according to the vertical distance corresponding to each point; According to the local flattening of the three-dimensional point cloud data, the characteristic index corresponding to each point is calculated, including: Calculating a surface normality probability evaluation value within a preset neighborhood range based on each of the points one by one; Calculating the surface unevenness possibility evaluation value within the preset neighborhood range based on each of the points one by one; Calculate the characteristic index corresponding to each point according to the surface normal possibility evaluation value and the surface unevenness possibility evaluation value corresponding to each point; Calculate the surface normality probability evaluation value within the preset neighborhood range based on each of the points one by one, including: The least square method is used to perform plane fitting on the neighborhood of each point to obtain the determination coefficient corresponding to the plane fitting, and the coefficient is recorded as the correction fitting determination coefficient. The neighborhood is a range consisting of a circle with the point as the center and a radius of a preset value; The least square method is used to fit the quadratic surface in the neighborhood of each point, and the determination coefficient corresponding to the quadratic surface fitting is obtained and recorded as the corrected determination coefficient; Calculate the unit normal vector of the neighborhood of each point one by one; The surface normal possibility assessment value corresponding to each point is calculated based on the correction fitting determination coefficient, correction determination coefficient and unit normal vector corresponding to each point. The calculation method is as follows: in, Indicates the normal possibility evaluation value of the surface corresponding to each point; represents the correction fitting determination coefficient obtained by using the least squares plane fitting method for the neighborhood of each point, represents the corrected determination coefficient of the quadratic surface fitting for the neighborhood of each point, Represents the unit normal vector corresponding to the i-th point in the neighborhood of each point, Represents the mean vector of all normal vectors in the neighborhood of each point, representing the average normal vector of the neighborhood point cloud, represents the angle between the normal vector of the i-th point cloud in the neighborhood of each point and the average normal vector, Respectively represent the mean and variance of the angle in the neighborhood of each point; () represents the normalization function; The surface unevenness possibility evaluation value within the preset neighborhood range is calculated based on each of the points one by one, including: Calculate the angle between each neighborhood fitting plane and the horizontal plane one by one, each of the neighborhood fitting planes is obtained by plane fitting of the neighborhood where each point is located; Calculate the unit normal vector of the neighborhood of each point one by one; The surface unevenness possibility evaluation value corresponding to each point is calculated based on the preset unit vector in the vertical direction, the angle corresponding to each point, the unit normal vector and the surface normal possibility evaluation value. The calculation method is as follows: in, represents the angle between the fitting plane obtained by the i-th point cloud in the neighborhood and the horizontal plane, represents the normal possibility evaluation value of the surface corresponding to the i-th point, represents the unit normal vector corresponding to the i-th point, represents the unit vector in the vertical direction, represents the non-flat feature of the i-th point cloud, represents the mean value of the non-flat features in the neighborhood, and q represents the surface non-flatness possibility evaluation value corresponding to each point; The characteristic index is calculated as follows: Among them, x is the characteristic index corresponding to each point.
2. The method for measuring the surface flatness of a cabinet product according to claim 1, It is characterized in that The characteristic index is used as a selected object of a preset random consistent sampling method to perform plane fitting to obtain a fitting plane, including: Dividing all the characteristic indicators according to a preset dividing threshold to obtain an in-office point set and an out-office point set; A point is taken out from the external point set in a loop and added to the internal point set, and a loop iteration index is calculated after each loop until the loop iteration index is greater than a preset loop threshold, and the loop iteration index is calculated by the average of the candidate indexes corresponding to the internal point set and the external point set; A plane fitting is performed according to the internal point set to obtain a fitting plane.
3. The method for measuring the surface flatness of a cabinet product according to claim 1, It is characterized in that The surface flatness measurement results of the cabinet to be tested are obtained based on the vertical distance corresponding to each point, including: All points are screened according to the preset distance threshold and the vertical distance corresponding to each point to obtain a non-flat point cloud set; Calculate the proportion of the non-flat point cloud set to the total number of points in the three-dimensional point cloud data to obtain a proportion; The surface flatness measurement result of the cabinet to be tested is obtained according to the proportion.
4. A surface flatness measuring device for cabinet products, It is characterized in that include: A scanning module is used to scan the cabinet to be inspected through a three-dimensional scanner, and obtain the scanning result to obtain the three-dimensional point cloud data corresponding to the cabinet to be inspected; A first calculation module, used for calculating according to the local flattening condition of the three-dimensional point cloud data to obtain a characteristic index corresponding to each point; A fitting module, used for performing plane fitting using the characteristic index as a selected object of a preset random consistent sampling method to obtain a fitting plane; A second calculation module, used for calculating the vertical distance between each point and the fitting plane one by one; A logic module, used to determine the surface flatness measurement result of the cabinet to be tested according to the vertical distance corresponding to each point; The first calculation module includes: A third calculation module is used to calculate the surface normal possibility evaluation value within a preset neighborhood range based on each of the points one by one; A fourth calculation module is used to calculate the surface unevenness possibility evaluation value within a preset neighborhood range based on each of the points one by one; A feature calculation module, used to calculate the feature index corresponding to each point according to the surface normal possibility evaluation value and the surface unevenness possibility evaluation value corresponding to each point; Calculate the surface normality probability evaluation value within the preset neighborhood range based on each of the points one by one, including: The least square method is used to perform plane fitting on the neighborhood of each point to obtain the determination coefficient corresponding to the plane fitting, and the coefficient is recorded as the correction fitting determination coefficient. The neighborhood is a range consisting of a circle with the point as the center and a radius of a preset value; The least square method is used to fit the quadratic surface in the neighborhood of each point, and the determination coefficient corresponding to the quadratic surface fitting is obtained and recorded as the corrected determination coefficient; Calculate the unit normal vector of the neighborhood of each point one by one; The surface normal possibility assessment value corresponding to each point is calculated based on the correction fitting determination coefficient, correction determination coefficient and unit normal vector corresponding to each point. The calculation method is as follows: in, Indicates the normal possibility evaluation value of the surface corresponding to each point; represents the correction fitting determination coefficient obtained by using the least squares plane fitting method for the neighborhood of each point, represents the corrected determination coefficient of the quadratic surface fitting for the neighborhood of each point, Represents the unit normal vector corresponding to the i-th point in the neighborhood of each point, Represents the mean vector of all normal vectors in the neighborhood of each point, representing the average normal vector of the neighborhood point cloud, represents the angle between the normal vector of the i-th point cloud in the neighborhood of each point and the average normal vector, Respectively represent the mean and variance of the angle in the neighborhood of each point; () represents the normalization function; The surface unevenness possibility evaluation value within the preset neighborhood range is calculated based on each of the points one by one, including: Calculate the angle between each neighborhood fitting plane and the horizontal plane one by one, each of the neighborhood fitting planes is obtained by plane fitting of the neighborhood where each point is located; Calculate the unit normal vector of the neighborhood of each point one by one; The surface unevenness possibility evaluation value corresponding to each point is calculated based on the preset unit vector in the vertical direction, the angle corresponding to each point, the unit normal vector and the surface normal possibility evaluation value. The calculation method is as follows: in, represents the angle between the fitting plane obtained by the i-th point cloud in the neighborhood and the horizontal plane, represents the normal possibility evaluation value of the surface corresponding to the i-th point, represents the unit normal vector corresponding to the i-th point, represents the unit vector in the vertical direction, represents the non-flat feature of the i-th point cloud, represents the mean value of the non-flat features in the neighborhood, and q represents the surface non-flatness possibility evaluation value corresponding to each point; The characteristic index is calculated as follows: Among them, x is the characteristic index corresponding to each point.
5. The surface flatness measuring device for cabinet products according to claim 4, It is characterized in that The fitting module comprises: A division module, used to divide all the characteristic indicators according to a preset division threshold value to obtain an in-office point set and an out-office point set; A loop module, used to loop out a point from the external point set and add it to the internal point set, and calculate a loop iteration index after each loop until the loop iteration index is greater than a preset loop threshold, wherein the loop iteration index is calculated by the average of the candidate indexes corresponding to the internal point set and the external point set; The plane fitting module is used to perform plane fitting according to the local point set to obtain a fitting plane.
6. A surface flatness measurement device for cabinet products. It is characterized in that include: Memory for storing computer programs; A processor is used to implement the steps of the surface flatness measurement method for cabinet products as described in any one of claims 1 to 3 when executing the computer program.
