3D dimension measurement method and device based on line scanning image measuring instrument, line scanning image measuring instrument and storage medium

Through the line scanning image measuring instrument, a programming unit is built to generate a measurement program, which solves the problem that the existing technology cannot measure the 3D size of multiple solid layers and realizes efficient 3D size measurement.

CN118654570BActive Publication Date: 2024-12-13GOOD VISION PRECISION INSTR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410990430.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-12-13
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

The existing line scanning two-dimensional measurement equipment cannot simultaneously measure the 3D size of the workpiece to be measured with multiple solid layers, and the surface array equipment can measure the 3D size but is inefficient.

Method used

The line scan camera of the control line scans multiple solid layers of the workpiece to be measured by controlling the line scans, identifying solid objects, building a programming unit to generate a sub-measurement program, measuring layer by layer, and realizing 3D size measurement of the workpiece to be measured through the total measurement program .

Benefits of technology

Efficient 3D size measurement of the workpiece to be measured with multiple solid layers is realized, the measurement efficiency is improved, and the defect of inefficiency of the surface array equipment is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118654570B_ABST
    Figure CN118654570B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image scanning technology, and provides a 3D dimension measurement method, device, line scan image measuring instrument and storage medium based on line scan image measuring instrument, the method comprising: controlling the line scan camera to obtain the image of the Nth physical layer; constructing a programming unit including all physical objects according to all physical objects in the Nth physical layer; generating a sub-measurement program for measuring the physical objects on the Nth physical layer according to the programming unit; if N is not equal to Nmax, N=N+1, returning to the execution step to control the line scan camera in the line scan image measuring instrument to scan the Nth physical layer of the workpiece to be measured; if N is equal to Nmax, generating a total measurement program according to the sub-measurement programs corresponding to all physical layers, and measuring the workpiece to be measured according to the total measurement program. The present application generates a corresponding sub-measurement program for each physical layer, and can measure each physical layer in the workpiece to be measured through the total measurement program, thereby realizing the measurement of the 3D dimensions of the workpiece 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 image scanning technology, and in particular to a 3D dimension measurement method and device based on a line scanning image measuring instrument, a line scanning image measuring instrument and a storage medium. Background Art

[0002] Two-dimensional measuring equipment, also known as two-dimensional image measuring instrument, is a measuring equipment based on computer vision technology. It can present a two-dimensional image of the object being measured on the computer screen and perform measurement and calculation through software.

[0003] If a workpiece to be measured has multiple physical layers, and each physical layer has a large number of physical objects that need to be measured, the current line scanning two-dimensional measurement equipment can only measure one physical layer at a time to measure such a product, so it is impossible to measure the 3D size of the workpiece to be measured. Summary of the invention

[0004] In view of the shortcomings of the prior art, the present application provides a 3D dimension measurement method, device, line scan image measuring instrument and storage medium based on a line scan image measuring instrument, which is conducive to simultaneously measuring multiple physical layers of a workpiece to be measured and improving measurement efficiency.

[0005] To solve the above problems, the present invention provides the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a 3D dimension measurement method based on a line scan image measuring instrument, the method comprising:

[0007] Controlling the line scan camera in the line scan image measuring instrument to focus on the Nth physical layer of the workpiece to be measured to scan and obtain an image of the Nth physical layer;

[0008] Identify physical objects in the Nth physical layer according to the image of the Nth physical layer, and construct a programming unit including all the physical objects according to all the physical objects in the Nth physical layer; wherein N is a positive integer and the initial state of N is 1;

[0009] generating, according to the programming unit, a sub-measurement program for measuring a physical object on the Nth physical layer;

[0010] Determine whether N is equal to Nmax;

[0011] If N is not equal to Nmax, set N=N+1, and return to the execution step to control the line scan camera in the line scan image measuring instrument to scan the Nth physical layer of the workpiece to be measured;

[0012] If N is equal to Nmax, a total measurement program is generated according to the sub-measurement programs corresponding to all physical layers, and the workpiece to be measured is measured according to the total measurement program.

[0013] In some implementations, generating, according to the programming unit, a sub-measurement program for measuring the physical object on the Nth physical layer includes:

[0014] Determine all entity objects in the programming unit according to the programming unit corresponding to the Nth entity layer;

[0015] Set edge-finding parameters for each entity object;

[0016] Generate an edge-finding program for each entity object based on the edge-finding parameters;

[0017] A sub-measurement program for measuring all physical objects on the Nth physical layer is generated according to the edge-finding program of each physical object.

[0018] In some implementations, determining whether N is equal to Nmax includes:

[0019] Measuring the Nth physical layer according to the sub-measurement procedure to determine the profile of each physical object in the Nth physical layer;

[0020] determining whether the contour of each physical object captured by the sub-measurement program matches the contour in the programming unit;

[0021] If they match, determine whether N is equal to Nmax.

[0022] In some embodiments, if the two conditions match, determining whether N is equal to Nmax comprises:

[0023] If they match, the Nth programming unit is hidden and it is determined whether N is equal to Nmax.

[0024] In some embodiments, the method further comprises:

[0025] Calculate the detection parameters corresponding to each physical object according to the contour of each physical object in the Nth programming unit;

[0026] Receive an instruction to set an associated tag;

[0027] The detection parameters corresponding to the association tag setting instruction are marked with an association tag.

[0028] In some embodiments, identifying the physical objects in the Nth physical layer according to the image of the Nth physical layer, and constructing a programming unit including all the physical objects according to all the physical objects in the Nth physical layer, comprises:

[0029] Get light source parameters and scanning parameters;

[0030] According to the light source parameters and scanning parameters, a line scan camera in the line scan image measuring instrument is controlled to focus on the Nth physical layer of the workpiece to be measured for scanning.

[0031] In some implementations, measuring the workpiece to be measured according to the overall measurement procedure includes:

[0032] Measuring the workpiece to be measured according to the overall measurement procedure, identifying the contour of each solid object in each solid layer in the workpiece to be measured;

[0033] Calculate at least one detection parameter corresponding to each entity object according to the contour of each entity object;

[0034] When there are detection parameters with associated labels, determining all detection parameters with the same associated labels;

[0035] Determine a correlation function according to the correlation tag;

[0036] An association parameter between the detection parameters with the same association label is calculated according to the association function and the plurality of detection parameters.

[0037] In a second aspect, an embodiment of the present application provides a 3D dimension measuring device based on a line scan image measuring instrument, the device comprising:

[0038] The layering unit is used to control the line scan camera in the line scan image measuring instrument to focus on the Nth physical layer of the workpiece to be measured to scan and obtain an image of the Nth physical layer;

[0039] an acquisition unit, configured to identify physical objects in the Nth physical layer according to the image of the Nth physical layer, and construct a programming unit including all the physical objects according to all the physical objects in the Nth physical layer; wherein N is a positive integer and an initial state of N is 1;

[0040] a generating unit, configured to generate, according to the programming unit, a sub-measurement program for measuring a physical object on the Nth physical layer;

[0041] A judging unit, used for judging whether N is equal to Nmax;

[0042] A return unit is used for making N equal to N+1 if N is not equal to Nmax, and returning to the execution step to control the line scan camera in the line scan image measuring instrument to scan the Nth physical layer of the workpiece to be measured;

[0043] The measuring unit is used to generate a total measurement program according to the sub-measurement programs corresponding to all physical layers if N is equal to Nmax, and measure the workpiece to be measured according to the total measurement program.

[0044] In a third aspect, an embodiment of the present application provides a line scan image measuring instrument, comprising:

[0045] at least one processor; and,

[0046] a memory communicatively connected to at least one processor; wherein,

[0047] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to execute the 3D dimension measurement method based on the line scan image measuring instrument of the first aspect.

[0048] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores an executable program. The executable program is executed by a processor to implement the 3D dimension measurement method based on a line scan image measuring instrument as in the first aspect.

[0049] The present application provides a 3D dimension measurement method, device, line scan image measuring instrument and storage medium based on a line scan image measuring instrument. The method comprises: controlling a line scan camera in the line scan image measuring instrument to focus on the Nth physical layer of a workpiece to be measured for scanning, and obtaining an image of the Nth physical layer; identifying the physical objects in the Nth physical layer according to the image of the Nth physical layer, and constructing a programming unit including all the physical objects in the Nth physical layer according to all the physical objects in the Nth physical layer; wherein N is a positive integer and the initial state of N is 1; generating a sub-measurement program for measuring the physical objects on the Nth physical layer according to the programming unit; judging whether N is equal to Nmax; if N is not equal to Nmax, making N=N+1, and returning to the execution step of controlling the line scan camera in the line scan image measuring instrument to scan the Nth physical layer of the workpiece to be measured; if N is equal to Nmax, generating a total measurement program according to the sub-measurement programs corresponding to all the physical layers, and measuring the workpiece to be measured according to the total measurement program. The present application generates a corresponding sub-measurement program for each physical layer, and can measure each physical layer in the workpiece to be measured through the overall measurement program, thereby realizing the measurement of the 3D size of the workpiece to be measured. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a schematic diagram of the application scenario provided by this application.

[0051] Figure 2 It is a flow chart of a 3D dimension measurement method based on a line scan image measuring instrument provided in an embodiment of the present application.

[0052] Figure 3 yes Figure 2 A detailed flowchart of step 130 in FIG.

[0053] Figure 4It is a structural schematic diagram of a line scanning image measuring instrument provided in an embodiment of the present application.

[0054] Figure 5 It is a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0056] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0057] For the convenience of describing the first direction and the second direction in the embodiment of the present application, the first direction is the up-down direction in the drawings, the second direction is the front-back direction in the drawings, and the third direction is the left-right direction in the drawings. The x-axis arrow direction is referred to as the "up" direction in the following text, the y-axis arrow direction is referred to as the "back" direction in the following text, and the z-axis arrow direction is referred to as the "right" direction in the following text, which is not limited to the actual application of the present application.

[0058] Two-dimensional measuring equipment, also known as two-dimensional image measuring instrument, is a measuring equipment based on computer vision technology. It can present a two-dimensional image of the object being measured on the computer screen and perform measurement and calculation through software.

[0059] If a workpiece to be measured has multiple physical layers, and each physical layer has a large number of physical objects that need to be measured, the current line scan two-dimensional measurement equipment, that is, the image measuring instrument including the line scan camera, can only measure one physical layer at a time when measuring such a product, and cannot measure 3D dimensions.

[0060] Although the area array two-dimensional measurement device can measure 3D dimensions, it needs to take a photo of each physical object, and the measurement efficiency is low.

[0061] It is understandable that there are large differences in the field of view, scanning accuracy, etc. of area array cameras and line scan cameras. In the actual measurement process, it is difficult to simply replace the two with each other. That is, in a scene where an area array camera is required, it is generally not possible to directly replace an area array camera with a line scan camera, and in a scene where a line scan camera is required, it is generally not possible to directly replace a line scan camera with an area array camera.

[0062] See also Figure 1 , Figure 1 This is a schematic diagram of the application scenario provided by this application. Figure 1 As shown, the application scenario includes a line scan image measuring instrument 1 , and the line scan image measuring instrument 1 includes: a measuring plane 10 , a line scan camera 20 , a clamping device 30 and a detection component 40 .

[0063] In some embodiments, for ease of explanation, Figure 1 The mechanical coordinate system is defined in Figure 1 and the X, Y and Z axes are shown. The clamping device can move along the X and Y axes in the measurement plane, and the line scan camera can move along the Z axis.

[0064] But it is understandable that Figure 1 The mechanical coordinate system illustrated in FIG. 1 is only used to explain the movable directions of the line scan camera 20 and the clamping device 30 , and does not limit the movable ranges of the line scan camera 20 and the clamping device 30 .

[0065] In some embodiments, the clamping device 30 is used to clamp the detection member 40 , and can control the detection member 40 to rotate to perform a flipping operation, or can control the detection member 40 to move in the measurement plane 10 .

[0066] See also Figure 2 , Figure 2 3D dimension measurement method based on line scanning image measuring instrument provided by the embodiment of the present application is shown in FIG. Figure 2 As shown, the 3D dimension measurement method 100 based on the line scan image measuring instrument includes: steps 110 to 160.

[0067] Step 110: Control the line scan camera in the line scan image measuring instrument to focus on the Nth physical layer of the workpiece to be measured to scan and obtain an image of the Nth physical layer.

[0068] In some implementations, an operation instruction input by a user may be received to scan different physical layers.

[0069] In some implementations, a 3D model of the workpiece to be measured may be obtained to assist in determining the position and quantity of each physical layer.

[0070] In some embodiments, if the position and quantity of each physical layer are determined by obtaining a 3D model of the workpiece to be measured, the method further includes:

[0071] (1) Arranging all the physical objects according to the first coordinate axis coordinates of the physical objects; wherein the first coordinate axis coordinates are used to determine the distance between the line scan camera of the line scan image measuring instrument and the workpiece to be measured placed on the line scan image measuring instrument during measurement.

[0072] For example, Figure 1 When the line scan camera 20 in the embodiment moves along the Z axis, the distance between the line scan camera 20 and the workpiece 40 to be measured and clamped by the clamping device 30 placed on the line scan image measuring instrument 1 changes, so Figure 1 The Z axis in can be used as the first coordinate axis.

[0073] (2) Determine the physical objects with the same coordinates on the first coordinate axis as the physical objects on the same physical layer to obtain multiple physical layers, and determine the scanning order between the physical layers according to the first coordinate axis coordinates corresponding to each physical layer.

[0074] In some embodiments, the scanning order includes from low to high, from high to low, from left to right, from right to left, etc.

[0075] Exemplarily, entity objects whose Z-axis coordinates are all 3 are determined to be entity objects on the same entity layer.

[0076] (3) Determine a scanning height corresponding to each physical layer according to the first coordinate axis coordinate of each physical layer; wherein the scanning height is used to control a line scan camera in a line scan image measuring instrument to focus on the Nth physical layer of the workpiece to be measured.

[0077] Step 120: Identify the physical objects in the Nth physical layer according to the image of the Nth physical layer, and construct a programming unit including all the physical objects in the Nth physical layer according to all the physical objects in the Nth physical layer; wherein N is a positive integer and the initial state of N is 1.

[0078] In some embodiments, step 120 includes the following steps.

[0079] Step 121: Identify all entity objects based on the image of the Nth entity layer; wherein the entity objects include complex geometric entities and basic geometric entities.

[0080] Exemplarily, complex geometric entities include Polyline, BezierCurve, etc., and basic geometric entities include line, circle, arc, etc.

[0081] Step 122: Convert the complex geometric entities into basic geometric entities.

[0082] Step 123: Determine all entity objects in the Nth entity layer based on all basic geometric entities.

[0083] In some implementations, the present application requires decomposing complex geometric entities into basic geometric entities.

[0084] For example, taking the complex collective entity polyline segment as an example, the polyline segment is essentially a continuous line segment defined by a series of vertices. The polyline segment can be segmented according to the vertices and decomposed into multiple line segments, namely, lines in the basic geometric entity.

[0085] For example, taking a complex geometric entity as a Bezier curve, for a low-order Bezier curve, such as a quadratic Bezier curve or a cubic Bezier curve, the De Casteljau's algorithm can be used to segment the curve, and each small segment of the Bezier curve obtained by segmentation is approximated as a straight line segment; for a complex Bezier curve, the curvature of the Bezier curve can be used to find arcs in one or more basic geometric entities to convert the Bezier curve into a basic geometric entity.

[0086] Step 124: Construct a programming unit including all the entity objects according to all the entity objects in the Nth entity layer.

[0087] In some implementations, the programming unit is a minimum bounding rectangle including all entity objects in the Nth entity layer, which is called a canvas.

[0088] In some embodiments, step 120 includes the following steps.

[0089] Step 121: Obtain light source parameters and scanning parameters.

[0090] Step 122: According to the light source parameters and scanning parameters, a line scan camera in the line scan image measuring instrument is controlled to focus on the Nth physical layer of the workpiece to be measured for scanning.

[0091] In some embodiments, the light source parameters of each entity layer include light source brightness and light source type, and the light source type includes surface light and bottom light.

[0092] Specifically, when the light source parameter is surface light, the line scan camera of the line scan image measuring instrument and the lighting device emitting surface light are located on the same side of the physical layer, for example, both are located above the physical layer.

[0093] Specifically, when the light source parameter is bottom light, the line scan camera of the line scan image measuring instrument and the lighting device emitting bottom light are located on different sides of the physical layer, for example, the line scan camera is located above the physical layer, and the lighting device emitting bottom light is located below the physical layer.

[0094] In some embodiments, the scanning parameters include a scanning start point and a scanning end point and a scanning path.

[0095] In the present application, a scanning path from the starting point to the ending point that can scan all the physical objects on the canvas can be determined according to the starting point, the ending point and the coordinates of all the physical objects on the canvas.

[0096] Step 130: Generate a sub-measurement program for measuring the physical object on the Nth physical layer according to the programming unit.

[0097] In some embodiments, see Figure 3 , Figure 3 yes Figure 2 Detailed flow chart of step 130 in FIG. Figure 3 As shown, step 130 includes the following steps.

[0098] Step 131: Determine all physical objects in the programming unit according to the programming unit corresponding to the Nth physical layer.

[0099] Step 132: Setting edge-finding parameters for each entity object.

[0100] Step 133: Generate an edge-finding program for each entity object based on the edge-finding parameters.

[0101] Step 134: Generate a sub-measurement program for measuring all physical objects on the Nth physical layer according to the edge-finding program of each physical object.

[0102] In some implementations, the edge-finding parameters include edge-finding direction, detection algorithm type, and the like.

[0103] By using edge-finding parameters, the outline of the corresponding entity object can be captured, and after the outline is captured, the parameters of the entity object can be calculated.

[0104] Step 140: Determine whether N is equal to Nmax.

[0105] In some embodiments, step 140 includes the following steps.

[0106] (1) Measuring the Nth physical layer according to the sub-measurement procedure to determine the contour of each physical object in the Nth physical layer.

[0107] (2) Determine whether the contour of each physical object captured by the sub-measurement program is consistent with the contour in the programming unit.

[0108] (3) If they match, determine whether N is equal to Nmax.

[0109] In some implementations, the contours of each entity object captured by the sub-measurement program must be continuous, otherwise they will be identified as two different entity objects.

[0110] In some embodiments, the contour captured by the sub-measurement program is compared with the contour in the programming unit through a Convolutional Neural Network (CNN).

[0111] In some embodiments, the input to the CNN network is an image of a programming unit.

[0112] Optionally, the CNN includes an input layer, multiple convolutional layers, multiple pooling layers, and a fully connected layer:

[0113] Input layer: Receives image data containing the contours of solid objects, such as circle contours, and performs appropriate preprocessing, including resizing, normalization, etc.

[0114] Convolution layer + pooling layer: Design a combination of multiple convolution layers and pooling layers to extract local features in the image, including edges, corners, textures, etc. of contours.

[0115] Fully connected layer: maps the features extracted by the convolutional layer and the pooling layer to the final output category, which is "match" or "mismatch".

[0116] In some embodiments, since the CNN model usually requires the input image to have a fixed size, the image needs to be adjusted to the size required by the model. The size adjustment can be achieved by scaling, but when adjusting the size, it is necessary to pay attention to maintaining the aspect ratio of the image to avoid image deformation. If the aspect ratio cannot be maintained, for example, when the target size does not match the aspect ratio of the original image, the edge of the image can be filled after scaling, such as filling with black or white pixels.

[0117] In some embodiments, CNN needs to be optimized and trained before use, for example, using a labeled data set to train the CNN model, optimizing the model parameters through a back-propagation algorithm, and during the training process, a cross-entropy loss function can be used to measure the difference between the model's prediction results and the actual labels, and an optimization algorithm such as gradient descent can be used to update the model's weights and biases.

[0118] In some implementations, if the steps match, determining whether N is equal to Nmax includes: if they match, hiding the Nth programming unit, and determining whether N is equal to Nmax.

[0119] If they match, it proves that the programming program generated by this layer has a good edge-grabbing effect, and the Nth programming unit can be hidden, that is, the canvas corresponding to the Nth physical layer can be used to program the next physical layer.

[0120] Step 150: If N is not equal to Nmax, set N=N+1, and return to the execution step to control the line scan camera in the line scan image measuring instrument to scan the Nth physical layer of the workpiece to be measured.

[0121] Step 160: If N is equal to Nmax, generate a total measurement program according to the sub-measurement programs corresponding to all physical layers, and measure the workpiece to be measured according to the total measurement program.

[0122] In some embodiments, the 3D dimension measurement method based on the line scan image measuring instrument provided in the embodiment of the present application also includes the following steps.

[0123] (1) Calculate the detection parameters corresponding to each entity object according to the contour of each entity object in the Nth programming unit.

[0124] (2) Receive the associated tag setting instruction.

[0125] (3) Add an association tag to the detection parameter corresponding to the association tag setting instruction.

[0126] Specifically, sometimes it is necessary to perform associated measurements on detection parameters on different physical layers, such as measuring the center distance between a circle on the first physical layer and a circle on the second physical layer. For the detection parameters that need to be measured in an associated manner, the user can send an associated label setting instruction to allow the software to enter the associated measurement setting mode, and then select the detection parameters that need to be measured in an associated manner. The software will automatically add associated labels to these detection parameters.

[0127] In some implementations, the association tags also have numbers, such as association tag 1, association tag 2, and the like.

[0128] In some implementations, the user can set an association function for each association tag, for example, association tag 1 is used to determine the center distance of a circle, association tag 2 is used to determine the arc difference, association tag 3 is used to calculate concentricity, and so on.

[0129] In some implementations, each associated tag has a corresponding associated tag indication control. When the associated tag indication control is triggered, all entity objects in the programming unit except the entity object in the associated tag are hidden.

[0130] Exemplarily, when calculating the associated label of the circle center distance, only two circles used to calculate the circle center distance are displayed, and the remaining entity objects are hidden.

[0131] In some implementations, the present application may also display an auxiliary identifier reflecting the association function in the entity object with the association tag according to the detection parameters of the association tag, and display the association parameters.

[0132] Exemplarily, when the correlation parameter is the distance between the centers of the circles, the auxiliary mark reflecting the correlation function is a line between the centers of the two circles. In this case, the distance between the centers of the circles can be displayed in or beside the line.

[0133] Exemplarily, when the associated parameter is the radian difference, the radian difference for calculating the first arc and the second arc is defined, the second arc is indicated on the first arc by a dotted line of a different color from the first arc, and the first arc is indicated on the second arc by a dotted line of a different color from the first arc.

[0134] In some implementations, the steps in step 160 include measuring the workpiece to be measured according to the overall measurement procedure, and include the following steps.

[0135] (1) Measuring the workpiece to be measured according to the overall measurement procedure, and identifying the contour of each solid object in each solid layer in the workpiece to be measured.

[0136] (2) Calculating at least one detection parameter corresponding to each entity object according to the contour of each entity object.

[0137] (3) When there are detection parameters with associated labels, all detection parameters with the same associated labels are determined.

[0138] (4) Determine an association function based on the association label.

[0139] (5) Calculating association parameters between the detection parameters with the same association label according to the association function and the multiple detection parameters.

[0140] In some embodiments, the association function is used to calculate the association parameter between two detection parameters. If the association function corresponds to more than two detection parameters, the association function will be calculated in sequence starting from the highest first coordinate axis coordinate according to the first coordinate axis coordinate of the entity object corresponding to each detection parameter.

[0141] For example, to calculate the center distance of a circle, the detection parameters with associated labels are the center of the circle with the first coordinate axis coordinate of 1, the center of the circle with the first coordinate axis coordinate of 2, and the center of the circle with the first coordinate axis coordinate of 3, respectively. Then, the first coordinate axis coordinates of the entity object corresponding to each detection parameter are calculated in sequence according to the associated function. First, the center distance between the center of the circle with the first coordinate axis coordinate of 3 and the center of the circle with the first coordinate axis coordinate of 2 is calculated, and then the center distance between the center of the circle with the first coordinate axis coordinate of 2 and the center of the circle with the first coordinate axis coordinate of 1 is calculated.

[0142] It is understandable that in the related art, the line scan two-dimensional measurement equipment can only measure one physical layer at a time. Even if the workpiece to be measured has ten physical layers, even if the line scan camera scans each physical layer separately and scans ten times, it is still impossible to measure the 3D size of the workpiece to be measured. Therefore, each scan is not performed under the same program, and only the information of the plane can be obtained, and the correlation parameters between the planes cannot be calculated. The present application measures each physical layer layer by layer through a measurement program, and the scanning results of all physical layers are in the same program. Not only can the detection parameters of physical objects on multiple physical layers be measured simultaneously, but also the physical objects on different physical layers can be correlated and detected, thereby realizing the detection of the 3D size of the scanned workpiece.

[0143] The embodiment of the present application further provides a 3D dimension measuring device based on a line scan image measuring instrument, the device comprising:

[0144] The layering unit is used to control the line scan camera in the line scan image measuring instrument to focus on the Nth physical layer of the workpiece to be measured to scan and obtain an image of the Nth physical layer;

[0145] an acquisition unit, configured to identify physical objects in the Nth physical layer according to the image of the Nth physical layer, and construct a programming unit including all the physical objects according to all the physical objects in the Nth physical layer; wherein N is a positive integer and an initial state of N is 1;

[0146] a generating unit, configured to generate, according to the programming unit, a sub-measurement program for measuring a physical object on the Nth physical layer;

[0147] A judging unit, used for judging whether N is equal to Nmax;

[0148] A return unit is used for making N equal to N+1 if N is not equal to Nmax, and returning to the execution step to control the line scan camera in the line scan image measuring instrument to scan the Nth physical layer of the workpiece to be measured;

[0149] The measuring unit is used to generate a total measurement program according to the sub-measurement programs corresponding to all physical layers if N is equal to Nmax, and measure the workpiece to be measured according to the total measurement program.

[0150] See also Figure 4 , Figure 4 Schematic diagram of the structure of a line scanning image measuring instrument provided in an embodiment of the present application. Figure 4 As shown, the line scan image measuring instrument 200 includes: one or more processors 210 and a memory 220, Figure 4 A processor 210 is taken as an example.

[0151] In some implementations, the processor 210 and the memory 220 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.

[0152] In some embodiments, the processor 210 is used to control the line scan camera in the line scan image measuring instrument to focus on the Nth physical layer of the workpiece to be measured and scan it to obtain an image of the Nth physical layer; identify the physical objects in the Nth physical layer according to the image of the Nth physical layer, and construct a programming unit including all the physical objects in the Nth physical layer according to all the physical objects in the Nth physical layer; wherein N is a positive integer and the initial state of N is 1; generate a sub-measurement program for measuring the physical objects on the Nth physical layer according to the programming unit; determine whether N is equal to Nmax; if N is not equal to Nmax, make N=N+1, and return to the execution step of controlling the line scan camera in the line scan image measuring instrument to scan the Nth physical layer of the workpiece to be measured; if N is equal to Nmax, generate a total measurement program according to the sub-measurement programs corresponding to all physical layers, and measure the workpiece to be measured according to the total measurement program.

[0153] In some embodiments, the memory 220 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the program instructions / modules of the 3D dimension measurement method based on the line scan image measuring instrument in the embodiment of the present application. The processor 210 executes various functional applications and data processing of the line scan image measuring instrument by running the non-volatile software programs, instructions and modules stored in the memory 220, that is, the 3D dimension measurement method based on the line scan image measuring instrument in the above method embodiment is realized.

[0154] In some embodiments, the memory 220 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the line scan image measuring instrument, etc. In addition, the memory 220 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 220 may optionally include a memory remotely arranged relative to the processor 210, and these remote memories may be connected to the controller via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0155] In some embodiments, one or more modules are stored in the memory 220, and when executed by one or more processors 210, the 3D dimension measurement method based on the line scan image measuring instrument in any of the above method embodiments is executed, for example, the 3D dimension measurement method based on the line scan image measuring instrument described above is executed. Figure 2 Method steps 110 to 160 in.

[0156] Please refer to Figure 5 , Figure 5 The computer-readable storage medium 300 stores a program code 310, which can be called by a processor to execute the 3D dimension measurement method based on the line scanning image measuring instrument described in the above method embodiment.

[0157] The computer-readable storage medium 300 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium 300 has a storage space for program codes for executing any method steps in the above control method. These program codes may be read from or written to one or more computer program products. The program code may be compressed, for example, in an appropriate form.

[0158] In summary, the present application provides a 3D dimension measurement method, device, line scan image measuring instrument and storage medium based on a line scan image measuring instrument, the method comprising: controlling a line scan camera in the line scan image measuring instrument to focus on the Nth physical layer of a workpiece to be measured for scanning, and obtaining an image of the Nth physical layer; identifying the physical objects in the Nth physical layer according to the image of the Nth physical layer, and constructing a programming unit including all the physical objects in the Nth physical layer according to all the physical objects in the Nth physical layer; wherein N is a positive integer and the initial state of N is 1; generating a sub-measurement program for measuring the physical objects on the Nth physical layer according to the programming unit; judging whether N is equal to Nmax; if N is not equal to Nmax, making N=N+1, and returning to the execution step of controlling the line scan camera in the line scan image measuring instrument to scan the Nth physical layer of the workpiece to be measured; if N is equal to Nmax, generating a total measurement program according to the sub-measurement programs corresponding to all physical layers, and measuring the workpiece to be measured according to the total measurement program. The present application generates a corresponding sub-measurement program for each physical layer, and can measure each physical layer in the workpiece to be measured through the overall measurement program, thereby realizing the measurement of the 3D size of the workpiece to be measured.

[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A 3D dimension measurement method based on line scanning image measuring instrument, It is characterized in that The method comprises: Controlling the line scan camera in the line scan image measuring instrument to focus on the Nth physical layer of the workpiece to be measured to scan and obtain an image of the Nth physical layer; Identify physical objects in the Nth physical layer according to the image of the Nth physical layer, and construct a programming unit including all the physical objects according to all the physical objects in the Nth physical layer; wherein N is a positive integer and the initial state of N is 1; generating, according to the programming unit, a sub-measurement program for measuring a physical object on the Nth physical layer; Determine whether N is equal to Nmax; If N is not equal to Nmax, set N=N+1, and return to the execution step to control the line scan camera in the line scan image measuring instrument to scan the Nth physical layer of the workpiece to be measured; If N is equal to Nmax, a total measurement program is generated according to the sub-measurement programs corresponding to all physical layers, and the workpiece to be measured is measured according to the total measurement program; The generating, according to the programming unit, a sub-measurement program for measuring the physical object on the Nth physical layer comprises: Determine all entity objects in the programming unit according to the programming unit corresponding to the Nth entity layer; Set edge-finding parameters for each entity object; Generate an edge-finding program for each entity object based on the edge-finding parameters; Generate a sub-measurement program for measuring all physical objects on the Nth physical layer according to an edge-finding program for each physical object; The determining whether N is equal to Nmax includes: Measuring the Nth physical layer according to the sub-measurement procedure to determine the profile of each physical object in the Nth physical layer; determining whether the contour of each physical object captured by the sub-measurement program matches the contour in the programming unit; If they match, the Nth programming unit is hidden and it is determined whether N is equal to Nmax.

2. The 3D dimension measurement method based on the line scanning image measuring instrument according to claim 1, It is characterized in that The method further comprises: Calculate the detection parameters corresponding to each physical object according to the contour of each physical object in the Nth programming unit; Receive an associated tag setting instruction; The detection parameters corresponding to the association tag setting instruction are marked with an association tag.

3. The 3D dimension measurement method based on the line scanning image measuring instrument according to claim 1, It is characterized in that The control of the line scan camera in the line scan image measuring instrument to focus on the Nth physical layer of the workpiece to be measured for scanning includes: Get light source parameters and scanning parameters; According to the light source parameters and scanning parameters, a line scan camera in the line scan image measuring instrument is controlled to focus on the Nth physical layer of the workpiece to be measured for scanning.

4. The 3D dimension measurement method based on the line scanning image measuring instrument according to claim 1, It is characterized in that The measuring the workpiece to be measured according to the overall measurement procedure includes: Measuring the workpiece to be measured according to the overall measurement procedure, identifying the contour of each solid object in each solid layer in the workpiece to be measured; Calculate at least one detection parameter corresponding to each entity object according to the contour of each entity object; When there are detection parameters with associated labels, determining all detection parameters with the same associated labels; Determine a correlation function according to the correlation tag; An association parameter between the detection parameters with the same association label is calculated according to the association function and the plurality of detection parameters.

5. A 3D dimension measuring device based on line scanning image measuring instrument, It is characterized in that The device comprises: The layering unit is used to control the line scan camera in the line scan image measuring instrument to focus on the Nth physical layer of the workpiece to be measured to scan and obtain an image of the Nth physical layer; an acquisition unit, configured to identify physical objects in the Nth physical layer according to the image of the Nth physical layer, and construct a programming unit including all the physical objects according to all the physical objects in the Nth physical layer; wherein N is a positive integer and an initial state of N is 1; a generating unit, configured to generate, according to the programming unit, a sub-measurement program for measuring a physical object on the Nth physical layer; A judging unit, used for judging whether N is equal to Nmax; A return unit is used for making N equal to N+1 if N is not equal to Nmax, and returning to the execution step to control the line scan camera in the line scan image measuring instrument to scan the Nth physical layer of the workpiece to be measured; A measuring unit, configured to generate a total measurement program according to the sub-measurement programs corresponding to all physical layers if N is equal to Nmax, and measure the workpiece to be measured according to the total measurement program; The measuring unit is specifically used to determine all entity objects in the programming unit according to the programming unit corresponding to the Nth entity layer; set edge-finding parameters for each entity object; generate an edge-finding program for each entity object based on the edge-finding parameters; and generate a sub-measurement program for measuring all entity objects on the Nth entity layer according to the edge-finding program of each entity object; The measurement unit is specifically used to measure the Nth physical layer according to the sub-measurement program to determine the outline of each physical object in the Nth physical layer; determine whether the outline of each physical object captured by the sub-measurement program is consistent with the outline in the programming unit; if consistent, hide the Nth programming unit and determine whether N is equal to Nmax.

6. A line scan image measuring instrument, It is characterized in that The line scan image measuring instrument comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the 3D dimension measurement method based on the line scan image measuring instrument as described in any one of claims 1-4.

7. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores an executable program, and the executable program is executed by a processor to implement the 3D dimension measurement method based on a line scan image measuring instrument as described in any one of claims 1 to 4.