A product size measurement method, device, equipment and medium

By using the top and bottom cameras to determine the tilt angle and perform rotation adjustment when measuring the size of the power lithium battery module, combined with the calibration block angle, the problem of large measurement errors is solved and higher-precision dimensional measurement is achieved.

CN115615361BActive Publication Date: 2025-10-03HANGZHOU ANMAISHENG INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211335169.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-28
Publication Date
2025-10-03
Estimated Expiration
2042-10-28

AI Technical Summary

Technical Problem

When measuring the size of power lithium battery modules, the existing technology fails to effectively consider the rotation angle of the product incoming and the installation angle of the dual 3D cameras, resulting in a large deviation between the measured value and the actual value.

Method used

The surface of the product to be measured is photographed by preset top and bottom cameras, the tilt angle is determined and rotation adjustment is performed, and the tilt angle of the preset calibration block is combined to obtain the real surface to reduce measurement errors.

Benefits of technology

The product material and camera installation angle are taken into consideration during the measurement process, which reduces the deviation between the measured value and the true value and improves the measurement accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115615361B_ABST
    Figure CN115615361B_ABST
Patent Text Reader

Abstract

The present application discloses a product size measurement method, device, equipment and medium, which relates to the field of three-dimensional measurement technology. The method includes: photographing the product to be measured by a preset top camera and a preset bottom camera to obtain the upper surface and the lower surface of the product to be measured, and determining the inclination angle of the upper surface and the inclination angle of the lower surface of the product to be measured based on the upper surface and the lower surface of the product to be measured; determining the inclination angle of the product to be measured based on the inclination angle of the upper surface and the inclination angle of the lower surface of the product to be measured and the inclination angle of the upper surface and the lower surface of the calibration block of a preset calibration block; rotating and adjusting the upper surface and the lower surface of the product to be measured according to the inclination angle of the product to be measured to obtain the actual upper surface and the actual lower surface of the product to be measured; and determining the size of the product to be measured based on the actual upper surface and the actual lower surface of the product to be measured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of three-dimensional measurement technology, and in particular to a product size measurement method, device, equipment and medium. Background Art

[0002] Amidst the rapid growth in the penetration of new energy vehicles, the lithium battery industry remains highly prosperous, with particularly significant growth in power lithium batteries. As a key component of new energy batteries, controlling dimensional tolerances during the manufacturing process is crucial. Without proper tolerance control, product installation at the customer end is impossible. Therefore, key dimensions of the battery module require control and measurement. Traditional measurement methods rely on manual measurement using gauges and plug gauges. Currently, some automated inspection equipment uses 3D cameras to capture battery values ​​such as the height and width of the module battery pack.

[0003] However, in the 3D camera installation angle, the angle between the upper 3D laser emitting end and the reflecting end at the object normal vector is , the angle between the laser emitting end and the reflecting end of the lower 3D camera at the object normal vector In the actual installation process, it is difficult to ensure that the dual 3D cameras are installed at the same angle, and the posture of the incoming objects is not fixed, that is to say and The angles are often not equal, and the angles of the battery modules are often different during the battery module incoming process. Limited by the accuracy of mechanical assembly and motion mechanism, and the angle It is not a fixed value. In the related art, the top camera is required to and the angle of the bottom camera installation The same, and the actual module material The angle of the calibration block can be guaranteed to be the same every time, but the actual installation process and the posture of the product are difficult to achieve, so the calculation method itself has a large error. The angle calibration of the 3D camera itself is a relatively complex process that requires high precision. Different installation angles will also interfere with the depth information value after the laser is reflected back. In other words, even with the same depth information, the height value of the actual object represented by different installation angles may not be the same. Therefore, in the actual calibration and calculation process, the influence of the angle has a great impact on the conversion of the final point cloud data and the final actual calculation process. The current measurement technology does not consider the impact of the measurement value after the product angle is rotated or the camera angle changes, resulting in the measured value deviating from the true value when the product posture changes. In summary, how to consider the rotation angle of the product when it is incoming and the installation angle of the dual 3D camera when measuring the size of the product to be measured to reduce the deviation between the measured value and the true value needs to be further solved. Summary of the Invention

[0004] In view of this, the present invention aims to provide a product dimension measurement method, device, equipment, and medium that can take into account the rotation angle of the incoming product and the installation angle of the dual 3D cameras when measuring the dimensions of the product to be measured, thereby reducing the deviation between the measured value and the true value. The specific solution is as follows:

[0005] In a first aspect, the present application discloses a method for measuring product dimensions, comprising:

[0006] The product to be tested is photographed by a preset top camera and a preset bottom camera to obtain an upper surface of the product to be tested and a lower surface of the product to be tested, and an inclination angle of the upper surface of the product to be tested and an inclination angle of the lower surface of the product to be tested are determined according to the upper surface of the product to be tested and the lower surface of the product to be tested;

[0007] Determining the inclination angle of the product to be tested based on the inclination angle of the upper surface of the product to be tested, the inclination angle of the lower surface of the product to be tested, and the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block of the preset calibration block;

[0008] Rotating and adjusting the upper surface of the product to be tested and the lower surface of the product to be tested according to the inclination angle of the product to be tested to obtain the real upper surface of the product to be tested and the real lower surface of the product to be tested;

[0009] The size of the product to be tested is determined according to the upper surface of the actual product to be tested and the lower surface of the actual product to be tested.

[0010] Optionally, before photographing the product to be tested by a preset top camera and a preset bottom camera to obtain an upper surface of the product to be tested and a lower surface of the product to be tested, and determining an inclination angle of the upper surface of the product to be tested and an inclination angle of the lower surface of the product to be tested based on the upper surface of the product to be tested and the lower surface of the product to be tested, the method further includes:

[0011] The preset calibration block is photographed by a preset top camera and a preset bottom camera to obtain the upper surface and the lower surface of the calibration block, and the inclination angle of the upper surface and the inclination angle of the lower surface of the calibration block are determined according to the upper surface and the lower surface of the calibration block.

[0012] Optionally, photographing the product to be tested by a preset top camera and a preset bottom camera to obtain an upper surface of the product to be tested and a lower surface of the product to be tested, and determining an inclination angle of the upper surface of the product to be tested and an inclination angle of the lower surface of the product to be tested based on the upper surface of the product to be tested and the lower surface of the product to be tested, includes:

[0013] The product to be tested is photographed by a preset top camera and a preset bottom camera, and a preset number of measurement areas are selected from the photographing areas of the preset top camera and the preset bottom camera, and then the upper surface and the lower surface of the product to be tested are obtained by fitting based on the least squares method;

[0014] According to the upper surface of the product to be tested and the lower surface of the product to be tested, the direction vector and the normal vector of the upper surface of the product to be tested and the direction vector and the normal vector of the lower surface of the product to be tested are obtained respectively, and the inclination angle of the upper surface of the product to be tested and the inclination angle of the lower surface of the product to be tested are determined according to the direction vector and the normal vector of the upper surface of the product to be tested and the lower surface of the product to be tested.

[0015] Optionally, determining the inclination angle of the product to be tested based on the inclination angle of the upper surface of the product to be tested, the inclination angle of the lower surface of the product to be tested, and the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block of a preset calibration block includes:

[0016] The inclination angle of the product to be tested is determined based on the sum of the difference between the inclination angle of the upper surface of the product to be tested and the inclination angle of the upper surface of the calibration block of the preset calibration block and the difference between the inclination angle of the lower surface of the product to be tested and the inclination angle of the lower surface of the calibration block.

[0017] Optionally, the rotating and adjusting the upper surface of the product to be tested and the lower surface of the product to be tested according to the inclination angle of the product to be tested to obtain the real upper surface of the product to be tested and the real lower surface of the product to be tested includes:

[0018] Rotating and adjusting the upper surface of the product to be tested according to the inclination angle of the product to be tested to obtain the real upper surface of the product to be tested;

[0019] The lower surface of the product to be tested is rotated and adjusted according to the inclination angle of the product to be tested to obtain the real lower surface of the product to be tested.

[0020] Optionally, the rotating and adjusting the upper surface of the product to be tested according to the inclination angle of the product to be tested to obtain the real upper surface of the product to be tested includes:

[0021] The upper surface of the product to be tested is adjusted according to the inclination angle of the product to be tested and the inclination angle of the upper surface of the product to be tested;

[0022] determining an upper surface rotation offset according to the adjusted upper surface of the product to be tested, and determining an upper surface intercept diagram using the upper surface of the product to be tested and the upper surface rotation offset;

[0023] Determining the actual upper surface of the product to be tested based on the upper surface of the product to be tested and the upper surface intercept diagram;

[0024] Accordingly, the step of rotating and adjusting the lower surface of the product to be tested according to the inclination angle of the product to be tested to obtain the actual lower surface of the product to be tested includes:

[0025] The lower surface of the product to be tested is adjusted according to the inclination angle of the product to be tested and the inclination angle of the lower surface of the product to be tested;

[0026] determining a lower surface rotation offset according to the adjusted lower surface of the product to be tested, and determining a lower surface intercept diagram using the lower surface of the product to be tested and the lower surface rotation offset;

[0027] The actual lower surface of the product to be tested is determined according to the lower surface of the product to be tested and the lower surface intercept diagram.

[0028] Optionally, determining the size of the product to be tested according to the upper surface of the actual product to be tested and the lower surface of the actual product to be tested includes:

[0029] The size of the product to be tested is determined according to the pixel accuracy of the preset top camera and the preset bottom camera, the pixel values ​​of the measuring points on the upper surface and the lower surface of the real product to be tested, and the real values ​​of the preset calibration block at the measuring points.

[0030] In a second aspect, the present application discloses a product size measuring device, comprising:

[0031] a surface inclination angle determination module, configured to photograph the product to be tested using a preset top camera and a preset bottom camera to obtain an upper surface and a lower surface of the product to be tested, and determine an inclination angle of the upper surface and the lower surface of the product to be tested based on the upper surface and the lower surface of the product to be tested;

[0032] A product tilt angle determination module, configured to determine the tilt angle of the product to be tested based on the tilt angle of the upper surface of the product to be tested, the tilt angle of the lower surface of the product to be tested, and the tilt angle of the upper surface of the calibration block and the tilt angle of the lower surface of the calibration block of a preset calibration block;

[0033] a real surface determination module, configured to rotate and adjust the upper surface and the lower surface of the product to be tested according to the inclination angle of the product to be tested, so as to obtain the real upper surface and the real lower surface of the product to be tested;

[0034] The size determination module is used to determine the size of the product to be tested according to the upper surface of the real product to be tested and the lower surface of the real product to be tested.

[0035] In a third aspect, the present application discloses an electronic device, comprising:

[0036] Memory, used to store computer programs;

[0037] A processor is used to execute the computer program to implement the steps of the product size measurement method disclosed above.

[0038] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the product size measurement method disclosed above are implemented.

[0039] When measuring the size of a product, the present application photographs the product to be measured by a preset top camera and a preset bottom camera to obtain the upper surface and the lower surface of the product to be measured, and determines the inclination angle of the upper surface of the product to be measured and the inclination angle of the lower surface of the product to be measured based on the upper surface and the inclination angle of the lower surface of the product to be measured, determines the inclination angle of the product to be measured based on the inclination angle of the upper surface and the inclination angle of the lower surface of the product to be measured and the inclination angle of the upper surface and the lower surface of the calibration block of a preset calibration block, rotates and adjusts the upper surface and the lower surface of the product to be measured according to the inclination angle of the product to be measured to obtain the real upper surface and the real lower surface of the product to be measured, and determines the size of the product to be measured based on the real upper surface and the real lower surface of the product to be measured. It can be seen that when measuring the product size, the present application first photographs the product to be measured by a preset top camera and a preset bottom camera to obtain the upper surface of the product to be measured and the lower surface of the product to be measured, and determines the inclination angle of the upper surface of the product to be measured and the inclination angle of the lower surface of the product to be measured based on the upper surface of the product to be measured and the lower surface of the product to be measured. Further, the inclination angle of the product to be measured is determined based on the inclination angle of the upper surface of the product to be measured and the inclination angle of the lower surface of the product to be measured and the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block of the preset calibration block. The upper surface of the product to be measured and the lower surface of the product to be measured are rotated and adjusted according to the inclination angle of the product to be measured to obtain the real upper surface of the product to be measured and the real lower surface of the product to be measured. Finally, the size of the product to be measured is determined based on the real upper surface of the product to be measured and the real lower surface of the product to be measured. It can be seen that when measuring the product size, the present application determines the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block when calibrating the preset calibration block, that is, takes into account the installation angle of the preset top camera and the preset bottom camera; on the other hand, based on the inclination angle of the upper surface of the product to be measured and the inclination angle of the lower surface of the product to be measured and the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block of the preset calibration block, the inclination angle of the product to be measured is determined, and the surface of the product to be measured obtained by photographing is rotated and adjusted according to the inclination angle of the product to be measured to obtain the adjusted real surface of the product to be measured, so that the installation angle of the top camera is taken into account in the process of measuring the product size. and the angle of the bottom camera installation And the actual module materials The angle of the image is adjusted and the surface captured is adjusted to reduce the error in the product size measurement process. In summary, this application can take into account the rotation angle of the product when it is incoming and the installation angle of the dual 3D cameras when measuring the size of the product to be measured, thereby reducing the deviation between the measured value and the true value. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0041] Figure 1 A flow chart of a product size measurement method provided in this application;

[0042] Figure 2 Schematic diagram of the product size measuring device provided for this application;

[0043] Figure 3 A flow chart of a specific product size measurement method provided in this application;

[0044] Figure 4 A schematic diagram of the structure of a product size measuring device provided in this application;

[0045] Figure 5 This is a structural diagram of an electronic device provided in this application. DETAILED DESCRIPTION

[0046] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0047] In the related art, the top camera is required and the angle of the bottom camera installation The same, and the actual module material The angle can be guaranteed to be the same as the calibration block every time, but the actual installation process and the product incoming posture are difficult to achieve, so the calculation method itself has a large error. The angle calibration of the 3D camera itself is a relatively complex process with high precision requirements. Different installation angles will also interfere with the depth information value after the laser is reflected back. In other words, even with the same depth information, the height value of the actual object represented by different installation angles may not be the same. Therefore, in the actual calibration and calculation process, the influence of the angle has a great impact on the conversion of the final point cloud data and the final actual calculation process. The current measurement technology does not consider the impact of the measurement value after the product angle is rotated or the camera angle changes, resulting in the measured value deviating from the true value when the product posture changes. To this end, the present application provides a product size measurement method that can take into account the rotation angle of the product when it is incoming and the installation angle of the dual 3D camera when measuring the size of the product to be measured, thereby reducing the deviation between the measured value and the true value.

[0048] The embodiment of the present invention discloses a method for measuring product dimensions. Figure 1 As shown, the method includes:

[0049] Step S11: photographing the product to be tested by a preset top camera and a preset bottom camera to obtain the upper surface and the lower surface of the product to be tested, and determining the upper surface inclination angle and the lower surface inclination angle of the product to be tested according to the upper surface and the lower surface of the product to be tested.

[0050] In this embodiment, the schematic diagram of the product size measuring device is as follows Figure 2 As shown, it can be understood that the module is the product to be tested, and the installation angle of the top camera is preset. Installation angle with preset bottom camera It is difficult to maintain complete consistency during the actual installation process, and the angle of the product during the actual production process There is no guarantee that it will be consistent with the calibration block. Furthermore, before measuring the product size, it also includes: photographing the preset calibration block with a preset top camera and a preset bottom camera to obtain the upper surface of the calibration block and the lower surface of the calibration block, and determining the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block based on the upper surface of the calibration block and the lower surface of the calibration block. In a specific embodiment, when calibrating the preset calibration block with the preset top camera and the preset bottom camera, 8 measurement areas are selected in the area where the preset top camera and the preset bottom camera photograph the calibration block, and the planes corresponding to the upper surface and the lower surface of the calibration block are respectively fitted using the least squares method to obtain the direction vector and the normal vector of the upper surface and the lower surface of the calibration block, further record the normal vector values ​​of the upper surface and the lower surface of the calibration block, and obtain the inclination angle of the upper surface of the calibration block And the inclination angle of the lower surface of the calibration block , that is, get the installation angle of the preset top camera Installation angle with preset bottom camera .

[0051] In this embodiment, the upper surface of the product to be tested and the lower surface of the product to be tested are obtained by photographing the product to be tested with a preset top camera and a preset bottom camera, and the inclination angle of the upper surface of the product to be tested and the inclination angle of the lower surface of the product to be tested are determined based on the upper surface of the product to be tested and the lower surface of the product to be tested, including: photographing the product to be tested with a preset top camera and a preset bottom camera, and selecting a preset number of measurement areas in the photographing areas of the preset top camera and the preset bottom camera, and then fitting based on the least squares method to obtain the upper surface of the product to be tested and the lower surface of the product to be tested; obtaining the direction vector and normal vector of the upper surface of the product to be tested and the direction vector and normal vector of the lower surface of the product to be tested respectively based on the upper surface of the product to be tested and the lower surface of the product to be tested, and determining the inclination angle of the upper surface of the product to be tested and the inclination angle of the lower surface of the product to be tested based on the direction vector and normal vector of the upper surface of the product to be tested and the lower surface of the product to be tested. Specifically, the same method as that used in calibration of the preset calibration block is adopted to obtain the inclination angle of the upper surface of the product to be tested. Inclination angle with the lower surface of the product to be tested .

[0052] Step S12: determining the inclination angle of the product to be tested based on the inclination angle of the upper surface of the product to be tested, the inclination angle of the lower surface of the product to be tested, and the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block.

[0053] In this embodiment, the inclination angle of the product to be tested is determined based on the inclination angle of the upper surface of the product to be tested, the inclination angle of the lower surface of the product to be tested, and the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block of a preset calibration block. Specifically, the inclination angle of the product to be tested is determined based on the inclination angle of the upper surface of the product to be tested, the inclination angle of the lower surface of the product to be tested, and the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block of a preset calibration block. Through the above technical solution, the inclination angle of the product to be tested is obtained, so that the upper surface of the product to be tested and the lower surface of the product to be tested can be rotated and adjusted according to the inclination angle of the product to be tested to obtain the actual upper surface of the product to be tested and the actual lower surface of the product to be tested.

[0054] Step S13: rotating and adjusting the upper surface of the product to be tested and the lower surface of the product to be tested according to the tilt angle of the product to be tested, so as to obtain the real upper surface of the product to be tested and the real lower surface of the product to be tested.

[0055] In this embodiment, the upper surface and the lower surface of the product to be tested are rotated and adjusted according to the inclination angle of the product to be tested to obtain the real upper surface and the real lower surface of the product to be tested. Specifically, the surface of the product to be tested obtained by the camera is rotated and adjusted according to the inclination angle of the product to be tested to obtain the adjusted real surface of the product to be tested. Through the above technical solution, the top camera installation angle is taken into account during the product size measurement process. and the angle of the bottom camera installation And the actual module materials The angle of the camera can be adjusted to reduce the error in the product size measurement process.

[0056] Step S14: determining the size of the product to be tested according to the upper surface of the actual product to be tested and the lower surface of the actual product to be tested.

[0057] In this embodiment, the size of the product to be tested is determined based on the upper surface of the real product to be tested and the lower surface of the real product to be tested. Through the above technical solution, the inclination angle of the upper surface of the preset calibration block and the inclination angle of the lower surface of the calibration block are determined when calibrating the preset calibration block, that is, the installation angle of the preset top camera and the preset bottom camera are taken into consideration; on the other hand, the inclination angle of the product to be tested is determined based on the inclination angle of the upper surface of the product to be tested and the inclination angle of the lower surface of the product to be tested and the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block of the preset calibration block, and the surface of the product to be tested that is photographed is rotated and adjusted according to the inclination angle of the product to be tested to obtain the adjusted surface of the real product to be tested, so that the installation angle of the top camera is taken into consideration in the process of measuring the product size. and the angle of the bottom camera installation And the actual module materials The angle of the camera can be adjusted to reduce the error in the product size measurement process.

[0058] It can be seen that when measuring the product size, this embodiment first photographs the product to be measured by a preset top camera and a preset bottom camera to obtain the upper surface of the product to be measured and the lower surface of the product to be measured, and determines the inclination angle of the upper surface of the product to be measured and the inclination angle of the lower surface of the product to be measured based on the upper surface of the product to be measured and the lower surface of the product to be measured. Further, the inclination angle of the product to be measured is determined based on the inclination angle of the upper surface of the product to be measured and the inclination angle of the lower surface of the product to be measured and the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block of the preset calibration block. The upper surface of the product to be measured and the lower surface of the product to be measured are rotated and adjusted according to the inclination angle of the product to be measured to obtain the real upper surface of the product to be measured and the real lower surface of the product to be measured. Finally, the size of the product to be measured is determined based on the real upper surface of the product to be measured and the real lower surface of the product to be measured. It can be seen that when measuring the product size, the present application determines the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block when calibrating the preset calibration block, that is, takes into account the installation angle of the preset top camera and the preset bottom camera; on the other hand, based on the inclination angle of the upper surface of the product to be measured and the inclination angle of the lower surface of the product to be measured and the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block of the preset calibration block, the inclination angle of the product to be measured is determined, and the surface of the product to be measured obtained by photographing is rotated and adjusted according to the inclination angle of the product to be measured to obtain the adjusted real surface of the product to be measured, so that the installation angle of the top camera is taken into account in the process of measuring the product size. and the angle of the bottom camera installation And the actual module materials The angle of the image is adjusted and the surface captured is adjusted to reduce the error in the product size measurement process. In summary, this application can take into account the rotation angle of the product when it is incoming and the installation angle of the dual 3D cameras when measuring the size of the product to be measured, thereby reducing the deviation between the measured value and the true value.

[0059] See also Figure 3 As shown, the embodiment of the present invention discloses a specific product size measurement method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution.

[0060] Step S21: photographing the product to be tested by a preset top camera and a preset bottom camera to obtain the upper surface and the lower surface of the product to be tested, and determining the inclination angle of the upper surface and the inclination angle of the lower surface of the product to be tested based on the upper surface and the lower surface of the product to be tested.

[0061] Step S22: determining the inclination angle of the product to be tested based on the sum of the difference between the inclination angle of the upper surface of the product to be tested and the inclination angle of the upper surface of the calibration block of the preset calibration block and the difference between the inclination angle of the lower surface of the product to be tested and the inclination angle of the lower surface of the calibration block.

[0062] In this embodiment, the inclination angle of the product to be tested is determined based on the sum of the difference between the inclination angle of the upper surface of the product to be tested and the inclination angle of the upper surface of the calibration block of the preset calibration block, and the difference between the inclination angle of the lower surface of the product to be tested and the inclination angle of the lower surface of the calibration block. Specifically, the inclination angle of the product to be tested is:

[0063] ;

[0064] in, Indicates the inclination angle of the upper surface of the calibration block; Indicates the inclination angle of the lower surface of the calibration block; Indicates the inclination angle of the upper surface of the product to be tested; Indicates the inclination angle of the lower surface of the product to be tested.

[0065] Step S23: rotating and adjusting the upper surface of the product to be tested and the lower surface of the product to be tested according to the tilt angle of the product to be tested, so as to obtain the real upper surface of the product to be tested and the real lower surface of the product to be tested.

[0066] In this embodiment, the upper surface of the product to be tested is rotated and adjusted according to the inclination angle of the product to be tested to obtain the real upper surface of the product to be tested; the lower surface of the product to be tested is rotated and adjusted according to the inclination angle of the product to be tested to obtain the real lower surface of the product to be tested. Specifically, the adjusted upper surface of the product to be tested is obtained according to the inclination angle of the product to be tested and the inclination angle of the upper surface of the product to be tested; the upper surface rotation offset is determined according to the adjusted upper surface of the product to be tested, and the upper surface intercept diagram is determined by using the upper surface of the product to be tested and the upper surface rotation offset; the real upper surface of the product to be tested is determined according to the upper surface of the product to be tested and the upper surface intercept diagram; accordingly, the rotation adjustment of the lower surface of the product to be tested according to the inclination angle of the product to be tested to obtain the real lower surface of the product to be tested includes: obtaining the adjusted lower surface of the product to be tested according to the inclination angle of the product to be tested and the inclination angle of the lower surface of the product to be tested; determining the lower surface rotation offset according to the adjusted lower surface of the product to be tested, and determining the lower surface intercept diagram by using the lower surface of the product to be tested and the lower surface rotation offset; and determining the real lower surface of the product to be tested according to the lower surface of the product to be tested and the lower surface intercept diagram.

[0067] In a specific embodiment, the normal vector of the upper surface of the product to be tested is adjusted to: , obtain the adjusted upper surface of the product to be tested, and determine the slope of the unit vector X direction corresponding to the new plane according to the adjusted upper surface of the product to be tested , the slope in the Y direction , and obtain the upper surface rotation offset k:

[0068] ;

[0069] Furthermore, an upper surface intercept diagram is determined using the upper surface of the product to be tested and the rotational offset of the upper surface. The upper surface intercept diagram is obtained by multiplying the upper surface of the product to be tested by k, and the upper surface intercept diagram is subtracted from the upper surface of the product to be tested to obtain the actual upper surface of the product to be tested. It will be understood that the method for obtaining the actual lower surface of the product to be tested corresponds to the method for obtaining the actual upper surface of the product to be tested described above.

[0070] Step S24: Determine the size of the product to be tested based on the pixel accuracy of the preset top camera and the preset bottom camera, the pixel values ​​of the measurement points on the upper surface and the lower surface of the actual product to be tested, and the actual values ​​of the preset calibration block at the measurement points.

[0071] In this embodiment, the dimensions of the product to be tested are determined based on the pixel accuracy of the preset top camera and the preset bottom camera, the pixel values ​​of the measurement points on the upper and lower surfaces of the actual product to be tested, and the actual values ​​of the preset calibration block at the measurement points. Specifically, after angle calibration, the dimension Height of the product to be tested is:

[0072] ;

[0073] in, Expressed as the pixel accuracy of the preset top camera in the Z direction; The pixel value in the Z direction of the preset calibration block at the preset top camera measurement point; It represents the pixel value in the Z direction of the same measurement point on the upper surface of the product obtained by the preset top camera; Expressed as the pixel accuracy of the preset bottom camera in the Z direction; The pixel value in the Z direction of the preset calibration block at the preset bottom camera measurement point; It means the pixel value in the Z direction of the same measurement point on the lower surface of the product is obtained by the bottom-mounted top camera; Represents the actual value of the preset calibration block at the measurement point. The product measurement value is equal to the pixel difference between the top and bottom surfaces at their respective measurement points multiplied by the pixel accuracy, plus the standard value of the calibration block, which is the final product dimensional measurement value.

[0074] See also Figure 4 As shown, the embodiment of the present application discloses a product size measuring device, comprising:

[0075] a surface inclination angle determination module 11, configured to photograph the product to be tested using a preset top camera and a preset bottom camera to obtain an upper surface and a lower surface of the product to be tested, and determine an inclination angle of the upper surface and the lower surface of the product to be tested based on the upper surface and the lower surface of the product to be tested;

[0076] A product tilt angle determination module 12 is configured to determine the tilt angle of the product to be tested based on the tilt angle of the upper surface of the product to be tested, the tilt angle of the lower surface of the product to be tested, and the tilt angle of the upper surface of the calibration block and the tilt angle of the lower surface of the calibration block of a preset calibration block;

[0077] A real surface determination module 13 is configured to rotate and adjust the upper surface and the lower surface of the product to be tested according to the inclination angle of the product to be tested, so as to obtain the real upper surface and the real lower surface of the product to be tested;

[0078] The size determination module 14 is configured to determine the size of the product to be tested according to the upper surface of the actual product to be tested and the lower surface of the actual product to be tested.

[0079] It can be seen that when measuring the product size, this embodiment first photographs the product to be measured by a preset top camera and a preset bottom camera to obtain the upper surface of the product to be measured and the lower surface of the product to be measured, and determines the inclination angle of the upper surface of the product to be measured and the inclination angle of the lower surface of the product to be measured based on the upper surface of the product to be measured and the lower surface of the product to be measured. Further, the inclination angle of the product to be measured is determined based on the inclination angle of the upper surface of the product to be measured and the inclination angle of the lower surface of the product to be measured and the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block of the preset calibration block. The upper surface of the product to be measured and the lower surface of the product to be measured are rotated and adjusted according to the inclination angle of the product to be measured to obtain the real upper surface of the product to be measured and the real lower surface of the product to be measured. Finally, the size of the product to be measured is determined based on the real upper surface of the product to be measured and the real lower surface of the product to be measured. It can be seen that when measuring the product size, the present application determines the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block when calibrating the preset calibration block, that is, takes into account the installation angle of the preset top camera and the preset bottom camera; on the other hand, based on the inclination angle of the upper surface of the product to be measured and the inclination angle of the lower surface of the product to be measured and the inclination angle of the upper surface of the calibration block and the inclination angle of the lower surface of the calibration block of the preset calibration block, the inclination angle of the product to be measured is determined, and the surface of the product to be measured obtained by photographing is rotated and adjusted according to the inclination angle of the product to be measured to obtain the adjusted real surface of the product to be measured, so that the installation angle of the top camera is taken into account in the process of measuring the product size. and the angle of the bottom camera installation And the actual module materials The angle of the image is adjusted and the surface captured is adjusted to reduce the error in the product size measurement process. In summary, this application can take into account the rotation angle of the product when it is incoming and the installation angle of the dual 3D cameras when measuring the size of the product to be measured, thereby reducing the deviation between the measured value and the true value.

[0080] In some specific embodiments, the product size measuring device further comprises:

[0081] The calibration module is used to photograph a preset calibration block through a preset top camera and a preset bottom camera to obtain the upper surface and the lower surface of the calibration block, and determine the inclination angle of the upper surface and the inclination angle of the lower surface of the calibration block according to the upper surface and the lower surface of the calibration block.

[0082] In some specific embodiments, the surface inclination angle determination module 11 specifically includes:

[0083] a surface determination unit, configured to photograph the product to be tested using a preset top camera and a preset bottom camera, select a preset number of measurement areas from the photographing areas of the preset top camera and the preset bottom camera, and then perform fitting based on a least squares method to obtain the upper surface and the lower surface of the product to be tested;

[0084] The inclination angle calculation unit is used to obtain the direction vector and normal vector of the upper surface of the product to be tested and the direction vector and normal vector of the lower surface of the product to be tested respectively according to the upper surface of the product to be tested and the lower surface of the product to be tested, and determine the inclination angle of the upper surface of the product to be tested and the inclination angle of the lower surface of the product to be tested according to the direction vector and normal vector of the upper surface of the product to be tested and the lower surface of the product to be tested.

[0085] In some specific embodiments, the product inclination angle determination module 12 is specifically used to determine the inclination angle of the product to be tested based on the sum of the difference between the inclination angle of the upper surface of the product to be tested and the inclination angle of the upper surface of the calibration block of a preset calibration block, and the difference between the inclination angle of the lower surface of the product to be tested and the inclination angle of the lower surface of the calibration block.

[0086] In some specific embodiments, the real surface determination module 13 specifically includes:

[0087] An upper surface adjustment unit, configured to rotationally adjust the upper surface of the product to be tested according to the inclination angle of the product to be tested to obtain a true upper surface of the product to be tested;

[0088] The lower surface adjustment unit is used to rotate and adjust the lower surface of the product to be tested according to the inclination angle of the product to be tested to obtain the real lower surface of the product to be tested.

[0089] In some specific embodiments, the upper surface adjustment unit is specifically configured to: obtain an adjusted upper surface of the product to be tested based on the inclination angle of the product to be tested and the inclination angle of the upper surface of the product to be tested; determine an upper surface rotation offset based on the adjusted upper surface of the product to be tested, and determine an upper surface intercept diagram using the upper surface of the product to be tested and the upper surface rotation offset; determine the actual upper surface of the product to be tested based on the upper surface of the product to be tested and the upper surface intercept diagram;

[0090] Correspondingly, the lower surface adjustment unit is specifically used to: obtain the adjusted lower surface of the product to be tested according to the inclination angle of the product to be tested and the inclination angle of the lower surface of the product to be tested; determine the lower surface rotation offset according to the adjusted lower surface of the product to be tested, and determine the lower surface intercept diagram using the lower surface of the product to be tested and the lower surface rotation offset; determine the actual lower surface of the product to be tested according to the lower surface of the product to be tested and the lower surface intercept diagram.

[0091] In some specific embodiments, the size determination module 14 is specifically used to determine the size of the product to be tested based on the pixel accuracy of the preset top camera and the preset bottom camera, the pixel values ​​of the measurement points on the upper surface of the actual product to be tested and the lower surface of the actual product to be tested, and the actual value of the preset calibration block at the measurement point.

[0092] Figure 5 An electronic device 20 provided in an embodiment of the present application is shown. The electronic device 20 may further include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the product size measurement method disclosed in any of the aforementioned embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0093] In this embodiment, the power supply 23 is used to provide voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0094] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0095] The operating system 221 is used to manage and control the hardware devices on the electronic device 20, and the computer program 222 can be Windows Server, NetWare, Unix, Linux, etc. In addition to including a computer program capable of implementing the product size measurement method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program capable of implementing other specific tasks.

[0096] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when executed by a processor, the computer program implements the aforementioned product size measurement method. The specific steps of this method can be referred to the corresponding contents disclosed in the aforementioned embodiments and will not be repeated here.

[0097] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0098] The above is a detailed introduction to the product size measurement method, device, equipment and medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A product size measurement method, characterized in that: include: The product to be tested is photographed by a preset top camera and a preset bottom camera to obtain an upper surface of the product to be tested and a lower surface of the product to be tested, and an inclination angle of the upper surface of the product to be tested and an inclination angle of the lower surface of the product to be tested are determined according to the upper surface of the product to be tested and the lower surface of the product to be tested; Determining the inclination angle of the product to be tested based on the sum of the difference between the inclination angle of the upper surface of the product to be tested and the inclination angle of the upper surface of the calibration block of the preset calibration block and the difference between the inclination angle of the lower surface of the product to be tested and the inclination angle of the lower surface of the calibration block; The upper surface and lower surface of the product to be tested are adjusted according to the inclination angle of the product to be tested and the inclination angles of the upper surface and lower surface of the product to be tested; Determining the corresponding upper surface rotation offset and lower surface rotation offset according to the adjusted upper surface and lower surface of the product to be tested, respectively, and determining an upper surface intercept diagram using the upper surface of the product to be tested and the upper surface rotation offset, and determining a lower surface intercept diagram using the lower surface of the product to be tested and the lower surface rotation offset; Determining the actual upper surface of the product to be tested based on the upper surface of the product to be tested and the upper surface intercept diagram, and determining the actual lower surface of the product to be tested based on the lower surface of the product to be tested and the lower surface intercept diagram; The size of the product to be tested is determined according to the upper surface of the actual product to be tested and the lower surface of the actual product to be tested.

2. The product size measurement method according to claim 1, characterized in that: Before photographing the product to be tested by a preset top camera and a preset bottom camera to obtain an upper surface of the product to be tested and a lower surface of the product to be tested, and determining an inclination angle of the upper surface of the product to be tested and an inclination angle of the lower surface of the product to be tested based on the upper surface of the product to be tested and the lower surface of the product to be tested, the method further includes: The preset calibration block is photographed by a preset top camera and a preset bottom camera to obtain the upper surface and the lower surface of the calibration block, and the inclination angle of the upper surface and the inclination angle of the lower surface of the calibration block are determined according to the upper surface and the lower surface of the calibration block.

3. The product size measurement method according to claim 1, characterized in that: The method of photographing the product to be tested by a preset top camera and a preset bottom camera to obtain an upper surface of the product to be tested and a lower surface of the product to be tested, and determining an inclination angle of the upper surface of the product to be tested and an inclination angle of the lower surface of the product to be tested according to the upper surface of the product to be tested and the lower surface of the product to be tested, includes: The product to be tested is photographed by a preset top camera and a preset bottom camera, and a preset number of measurement areas are selected from the photographing areas of the preset top camera and the preset bottom camera, and then the upper surface and the lower surface of the product to be tested are obtained by fitting based on the least squares method; According to the upper surface of the product to be tested and the lower surface of the product to be tested, the direction vector and the normal vector of the upper surface of the product to be tested and the direction vector and the normal vector of the lower surface of the product to be tested are obtained respectively, and the inclination angle of the upper surface of the product to be tested and the inclination angle of the lower surface of the product to be tested are determined according to the direction vector and the normal vector of the upper surface of the product to be tested and the lower surface of the product to be tested.

4. The product size measurement method according to claim 1, characterized in that: The determining the size of the product to be tested according to the upper surface of the actual product to be tested and the lower surface of the actual product to be tested includes: The size of the product to be tested is determined according to the pixel accuracy of the preset top camera and the preset bottom camera, the pixel values ​​of the measuring points on the upper surface and the lower surface of the real product to be tested, and the real values ​​of the preset calibration block at the measuring points.

5. A product size measuring device, characterized in that: include: a surface inclination angle determination module, configured to photograph the product to be tested using a preset top camera and a preset bottom camera to obtain an upper surface and a lower surface of the product to be tested, and determine an inclination angle of the upper surface and the lower surface of the product to be tested based on the upper surface and the lower surface of the product to be tested; A product tilt angle determination module, configured to determine the tilt angle of the product to be tested based on the tilt angle of the upper surface of the product to be tested, the tilt angle of the lower surface of the product to be tested, and the tilt angle of the upper surface of the calibration block and the tilt angle of the lower surface of the calibration block of a preset calibration block; The product size measuring device is used to obtain the corresponding upper and lower surfaces of the product to be measured according to the inclination angle of the product to be measured and the inclination angles of the upper and lower surfaces of the product to be measured; The product dimension measuring device is configured to determine the corresponding upper surface rotation offset and lower surface rotation offset according to the adjusted upper surface and lower surface of the product to be measured, respectively, and to determine an upper surface intercept diagram using the upper surface of the product to be measured and the upper surface rotation offset, and to determine a lower surface intercept diagram using the lower surface of the product to be measured and the lower surface rotation offset; The product size measuring device is used to determine the actual upper surface of the product to be measured based on the upper surface of the product to be measured and the upper surface intercept diagram, and to determine the actual lower surface of the product to be measured based on the lower surface of the product to be measured and the lower surface intercept diagram; The size determination module is used to determine the size of the product to be tested according to the upper surface of the real product to be tested and the lower surface of the real product to be tested.

6. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the product size measurement method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that Used to store a computer program; wherein, when the computer program is executed by a processor, the steps of the product size measurement method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Method and system for measuring horizontal inclined angle of product surface

    CN109916341A

  • 3D shape measuring device

    KR102052612B1