Industrial detection method and device

By collecting images of three-dimensional target plates under different lighting conditions and processing the height conversion relationship of the calibration object, the problem of high cost of detecting the appearance quality of the battery cell in the prior art is solved, and high-precision quantitative analysis is achieved, and high-precision measurement and defect classification are achieved.

CN119803313APending Publication Date: 2025-04-11苏州凌云光工业智能技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411873145.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When testing the appearance quality of new energy lithium battery cells, the prior art has high cost, large installation space, and high-precision quantitative analysis cannot be performed, and the product cannot be graded based on the depth or height of the defect.

Method used

By collecting multiple images of the three-dimensional target plate under different lighting conditions, the first measured height and the first real height of the calibration object are obtained, the height conversion relationship is obtained, and the second real height of the object to be measured is then calculated.

Benefits of technology

It reduces cost and installation space, realizes high-precision measurement and quantitative analysis, broadens applicable scenarios, and can perform high-precision defect grading of objects to be tested.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119803313A_ABST
    Figure CN119803313A_ABST
Patent Text Reader

Abstract

The invention discloses an industrial detection method and device, and belongs to the technical field of industrial detection. The industrial detection method comprises the following steps: processing a plurality of first images corresponding to a three-dimensional target plate acquired under different illumination conditions and the same acquisition view angle to obtain a first measurement height corresponding to each calibration object in the three-dimensional target plate; processing the first measurement height and the first real height corresponding to each calibration object to obtain a height conversion relation corresponding to each group of target height sets; and calculating a second real height corresponding to the to-be-measured object based on the obtained second measurement height corresponding to the to-be-measured object and the height conversion relation corresponding to the target height set where the second measurement height is located. According to the industrial detection method, on the basis that the cost and the installation space are reduced, high-precision measurement can be carried out on the to-be-detected object, the industrial detection method is suitable for high-precision quantitative analysis, and the application scene is widened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of industrial detection technology, and in particular, relates to an industrial detection method and device. Background Art

[0002] In the new energy lithium battery industry, it is necessary to focus on testing the appearance quality of the battery cells to ensure the safety of the battery and personnel. When detecting defects such as pits and foreign matter on the surface of the battery cells, the traditional detection method mainly uses 2D+laser 3D solutions for detection, but this method is expensive and requires a large installation space, and the popularity rate is not high; there are also methods of defect detection using photometric stereo reconstruction algorithms in related technologies, which can reduce costs and installation space, but this method can only perform qualitative analysis and cannot perform high-precision measurements on the workpiece to be tested. It is not suitable for high-precision quantitative analysis, such as being unable to grade products based on the depth or height of the defects, and the applicable scenarios are limited. Summary of the invention

[0003] The present application aims to solve at least one of the technical problems existing in the related art. To this end, the present application proposes an industrial detection method and device, which can perform high-precision measurement of the object to be measured on the basis of reducing the cost and installation space, is suitable for high-precision quantitative analysis, and broadens the applicable scenarios.

[0004] In a first aspect, the present application provides an industrial detection method, the method comprising:

[0005] Processing a plurality of first images corresponding to the three-dimensional target plate collected under different lighting conditions and the same collection angle of view to obtain a first measurement height corresponding to each calibration object in the three-dimensional target plate; each calibration object is a hemisphere with a first real height, and the first real height is the depth of the calibration object relative to the target plane of the three-dimensional target plate;

[0006] Processing the first measured height and the first true height corresponding to each of the calibration objects to obtain a height conversion relationship corresponding to each group of target height sets; the target height set includes a first measured height set and a first true height set, and in the same group of the target height sets, at least one first measured height included in the first measured height set corresponds to at least one first true height included in the first true height set one by one; the height conversion relationship is used to characterize the conversion relationship between the first measured height set and the first true height set in the same group of the target height sets;

[0007] Based on the acquired second measured height corresponding to the object to be measured and the height conversion relationship corresponding to the target height set where the second measured height is located, the second real height corresponding to the object to be measured is calculated.

[0008] According to the industrial detection method provided in the embodiment of the present application, by performing segmented calibration on the first measured height and the first true height corresponding to the calibration object, a height conversion relationship corresponding to each group of target height sets is obtained, which greatly reduces the overfitting error caused by calibration according to the entire depth range and improves the calibration accuracy. Therefore, the second true height corresponding to the object to be measured calculated according to the height conversion relationship has higher accuracy and precision. On the basis of reducing costs and installation space, the object to be measured can also be measured with high precision, which is suitable for high-precision quantitative analysis and broadens the applicable scenarios.

[0009] The industrial detection method of an embodiment of the present application, wherein the first measured height and the first true height corresponding to each calibration object are processed to obtain the height conversion relationship corresponding to each set of target height sets, comprises:

[0010] Based on the first measured height and the first true height corresponding to each of the calibration objects, obtaining multiple sets of target height sets;

[0011] Based on the first measured height set and the first real height set included in each group of the target height sets, a height conversion relationship corresponding to each group of the target height sets is obtained.

[0012] The industrial detection method of an embodiment of the present application, based on the first measured height set and the first real height set included in each group of the target height set, obtains the height conversion relationship corresponding to each group of the target height set, including:

[0013] Taking a first real height set in the same group of the target height set as a dependent variable and a first measured height set corresponding to the first real height set as an independent variable, constructing a linear equation between the first real height set and the first measured height set;

[0014] Based on the first real altitude set and the first measured altitude set, the linear equation is solved by using the least square method to obtain the altitude conversion relationship corresponding to the target altitude set.

[0015] An industrial inspection method according to an embodiment of the present application, obtaining multiple sets of target height sets based on the first measured height and the first true height corresponding to each of the calibration objects, includes:

[0016] sorting the first measured heights in a target order based on the magnitude of the first measured heights to sequentially obtain a plurality of first measured height sets; sorting the first real heights in the target order based on the magnitude of the first real heights to sequentially obtain a plurality of first real height sets; the number of the plurality of first measured height sets is the same as the number of the plurality of first real height sets;

[0017] The target altitude set is obtained based on the first measured altitude set and a first real altitude set corresponding to the first measured altitude set.

[0018] An industrial inspection method according to an embodiment of the present application, wherein a plurality of first images corresponding to a three-dimensional target plate collected under different lighting conditions and the same collection angle are processed to obtain a first measurement height corresponding to each calibration object in the three-dimensional target plate, comprises:

[0019] Performing fusion processing on the multiple first images to obtain a second image corresponding to the three-dimensional target plate;

[0020] Based on the normal vector corresponding to each pixel point in the second image, a first measurement height corresponding to each calibration object is calculated.

[0021] The industrial inspection method of an embodiment of the present application, wherein the first measurement height corresponding to each calibration object is calculated based on the normal vector corresponding to each pixel point in the second image, comprises:

[0022] Based on the normal vector corresponding to each pixel point, a target gradient corresponding to each pixel point is calculated;

[0023] Based on the target gradient of each pixel point corresponding to the calibration object, a first measurement height corresponding to the calibration object is calculated.

[0024] An industrial inspection method according to an embodiment of the present application, wherein the second real height corresponding to the object to be measured is calculated based on the acquired second measured height corresponding to the object to be measured and the height conversion relationship corresponding to the target height set where the second measured height is located, comprises:

[0025] Based on the second measured height and the upper limit value and the lower limit value corresponding to each of the target height sets, determining the target height set in which the second measured height is located from the plurality of target height sets;

[0026] The second true height is calculated based on the second measured height and the height conversion relationship corresponding to the target height set where the second measured height is located.

[0027] In a second aspect, the present application provides an industrial detection device, the device comprising:

[0028] A first processing module is used to process a plurality of first images corresponding to the three-dimensional target plate collected under different lighting conditions and the same collection angle of view to obtain a first measurement height corresponding to each calibration object in the three-dimensional target plate; each calibration object is a hemisphere with a first real height, and the first real height is the depth of the calibration object relative to the target plane of the three-dimensional target plate;

[0029] A second processing module is used to process the first measured height and the first true height corresponding to each of the calibration objects to obtain a height conversion relationship corresponding to each group of target height sets; the target height set includes a first measured height set and a first true height set, and in the same group of target height sets, at least one first measured height included in the first measured height set corresponds to at least one first true height included in the first true height set; the height conversion relationship is used to characterize the conversion relationship between the first measured height set and the first true height set in the same group of target height sets;

[0030] The third processing module is used to calculate a second real height corresponding to the object to be measured based on the acquired second measured height corresponding to the object to be measured and the height conversion relationship corresponding to the target height set where the second measured height is located.

[0031] According to the industrial detection device provided in the embodiment of the present application, by performing segmented calibration on the first measured height and the first true height corresponding to the calibration object, a height conversion relationship corresponding to each group of target height sets is obtained, which greatly reduces the overfitting error caused by calibration according to the entire depth range and improves the calibration accuracy. Therefore, the second true height corresponding to the object to be measured calculated according to the height conversion relationship has higher accuracy and precision. On the basis of reducing the cost and installation space, the object to be measured can also be measured with high precision, which is suitable for high-precision quantitative analysis and broadens the applicable scenarios.

[0032] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the industrial detection method as described in the first aspect above when executing the computer program.

[0033] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the industrial detection method as described in the first aspect above.

[0034] The above one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:

[0035] By calibrating the first measured height and the first true height corresponding to the calibration object in sections, the height conversion relationship corresponding to each group of target height sets is obtained, which greatly reduces the overfitting error caused by calibration according to the entire depth range and improves the calibration accuracy. As a result, the second true height corresponding to the object to be measured calculated according to the height conversion relationship has higher accuracy and precision. On the basis of reducing costs and installation space, it can also perform high-precision measurement of the object to be measured, which is suitable for high-precision quantitative analysis and broadens the applicable scenarios.

[0036] Furthermore, based on the height of the calibration object, each first measured height and each first true height are sorted in target order to obtain multiple first measured height sets and multiple first true height sets, and then multiple groups of target height sets are obtained, so that the height conversion relationship corresponding to each target height set can be solved in segments, which can minimize the calibration error and improve the calibration accuracy.

[0037] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0039] Figure 1 It is a schematic diagram of the process of the industrial detection method provided in the embodiment of the present application;

[0040] Figure 2 This is one of the principle schematic diagrams of the industrial detection method provided in the embodiment of the present application;

[0041] Figure 3 This is the second principle schematic diagram of the industrial detection method provided in the embodiment of the present application;

[0042] Figure 4 This is the third principle schematic diagram of the industrial detection method provided in the embodiment of the present application;

[0043] Figure 5 is a schematic diagram of the structure of an industrial detection device provided in an embodiment of the present application;

[0044] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0046] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0047] The industrial detection method, industrial detection device, electronic device and readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0048] The industrial detection method may be applied to a terminal, and may be specifically executed by hardware or software in the terminal.

[0049] The terminal includes, but is not limited to, a portable communication device such as a mobile phone or tablet computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad).

[0050] In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse and a joystick.

[0051] The industrial detection method provided in the embodiment of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the industrial detection method. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, and wearable devices. The industrial detection method provided in the embodiment of the present application is described below using the electronic device as an example of the execution subject.

[0052] like Figure 1 As shown, the industrial detection method includes: step 110, step 120 and step 130.

[0053] Step 110: Processing a plurality of first images corresponding to the three-dimensional target plate collected under different lighting conditions and the same collection angle of view to obtain a first measurement height corresponding to each calibration object in the three-dimensional target plate;

[0054] In this step, a plurality of light source devices may be provided, each of which is installed at a different position, that is, a plurality of light source directions may be used to illuminate the three-dimensional target plate.

[0055] Each light source device can emit parallel light of equal cross-section. The light source device may include a telecentric light source. The light emitted by the light source device has uniform intensity. The light source device may also be set as a long-distance point light source. The selection can be based on user needs and is not limited in this application.

[0056] An image sensor can be used to capture images of the three-dimensional target plate. The image sensor can be fixedly installed above the three-dimensional target plate. The image sensor can be perpendicular to the plane where the three-dimensional target plate is located. The three-dimensional target plate can be placed in the center of the image sensor's capture field of view.

[0057] The image sensor may include a telecentric lens or a long focal lens so that there is no distortion of the three-dimensional target plate in the first image.

[0058] When performing image acquisition, any one of the multiple light source devices can be controlled to be turned on, and the other light source devices can be turned off to provide different lighting conditions.

[0059] A plurality of calibration objects can be arranged on the three-dimensional target plate, such as Figure 2 The top view of the three-dimensional target plate is illustrated, and each calibration object is a hemisphere with a first real height, wherein the hemisphere can be a convex hemisphere or a concave hemisphere, such as Figure 3 and Figure 4 shown.

[0060] The first true height is the depth of the calibration object relative to the target plane of the three-dimensional target plate, such as Figure 3 and Figure 4 As shown in h.

[0061] In the actual implementation process, a high-precision 3D laser sensor or interferometer can be used to measure the first real height of each calibration object.

[0062] Multiple calibration objects can be arranged in an array in increasing or decreasing order according to their true heights, such as Figure 2 A 4*4 three-dimensional target plate is illustrated.

[0063] The surface coating of the three-dimensional target plate and each calibration object adopts a light-colored smooth diffuse reflection coating, so that the surface of the three-dimensional target plate and the calibration object has Lambertian reflection characteristics, that is, the three-dimensional target plate and the calibration object can diffusely reflect the incident light, and the intensity of the reflected light in each direction is consistent.

[0064] The first image may be a grayscale image, and the pixel values ​​of each pixel in the first image may be different.

[0065] The illumination conditions corresponding to the first images are different, so the grayscale values ​​of the calibration objects in the first images may be different.

[0066] The first measured height is a measured value calculated based on the grayscale value or other parameters of the calibration object in the first image.

[0067] The first measured height is a dimensionless height. There is a corresponding relationship between the first measured height and the first true height. When the corresponding relationship between the two is known, the actual height can be calculated through the measured height and the corresponding relationship in industrial detection.

[0068] Step 120: Process the first measured height and the first true height corresponding to each calibration object to obtain a height conversion relationship corresponding to each set of target height sets;

[0069] In this step, each target altitude set may include a first measured altitude set and a first true altitude set.

[0070] In the same group of target height sets, the number of elements in the first measured height set is consistent with the number of elements in the first real height set, that is, at least one first measured height included in the first measured height set corresponds one to one with at least one first real height included in the first real height set.

[0071] In the actual implementation process, multiple calibration objects can be arranged in an array in a manner of increasing or decreasing actual heights.

[0072] Then, according to the first measured heights corresponding to the calibration objects, the multiple first measured heights are arranged in a manner of increasing or decreasing measured heights, so that in the target height set obtained by grouping, at least one first measured height and at least one first height can correspond one to one.

[0073] The height conversion relationship is used to characterize the conversion relationship between the first measured height set and the first real height set in the same set of target height sets.

[0074] The height conversion relationship corresponding to each group of target height sets is different, and each height conversion relationship can be expressed as a linear relationship.

[0075] During the research and development process, the inventors discovered that the calibration objects on the three-dimensional target plate have different corresponding real heights, that is, the imaging surfaces of the calibration objects are not on the same plane, and within the entire depth range, there is a nonlinear relationship between the first measured height and the first real height; in the present application, by dividing the first measured height and the first real height into multiple height sequences, and then solving the linear height conversion relationship corresponding to each segment of the target height set respectively, the overfitting error can be minimized, the calibration accuracy is improved, and thus the subsequent detection accuracy can be improved.

[0076] In the present application, a plurality of calibration objects with different real heights are arranged on a three-dimensional target plate, and the correspondence between the two is calculated based on the real height and measured height of each calibration object. The obtained correspondence has high stability and strong anti-interference ability.

[0077] Step 130 : Based on the acquired second measured height corresponding to the object to be measured and the height conversion relationship corresponding to the target height set where the second measured height is located, a second real height corresponding to the object to be measured is calculated.

[0078] In this step, the object to be tested may be a workpiece to be tested in an industrial testing process, for example, the object to be tested may include a cell in a battery.

[0079] The second measurement height is a dimensionless height corresponding to the object to be measured, for example, it may be a measurement height corresponding to a defective area in the object to be measured.

[0080] The method for obtaining the second measured height is similar to the method for obtaining the first measured height, and will not be described in detail here.

[0081] Each target height set has an upper limit value and a lower limit value. When the second measurement height is determined, the target height set where the second measurement height is located can be found, and then the second true height can be calculated based on the height conversion relationship corresponding to the target height set obtained during the calibration process.

[0082] The second real height may be a real height corresponding to a target area in the object to be measured, for example, a real height corresponding to a defect area on the surface of the object to be measured (ie, the depth of the defect relative to the surface of the object to be measured).

[0083] For example, when detecting defects such as pits and foreign matter on the surface of a battery cell, images of the battery cell can be captured to obtain a second measured height corresponding to each defect object on the surface of the battery cell. Then, based on the height conversion relationship corresponding to the target height set where the second measured height is located, the second true height corresponding to each defect object can be calculated. Based on the second true height, the battery cell can be defectively graded. For example, when a deep pit is measured on the surface of the battery cell, the battery cell can be determined to be a defective product.

[0084] According to the industrial detection method provided in the embodiment of the present application, by performing segmented calibration on the first measured height and the first true height corresponding to the calibration object, a height conversion relationship corresponding to each group of target height sets is obtained, which greatly reduces the overfitting error caused by calibration according to the entire depth range and improves the calibration accuracy. Therefore, the second true height corresponding to the object to be measured calculated according to the height conversion relationship has higher accuracy and precision. On the basis of reducing costs and installation space, the object to be measured can also be measured with high precision, which is suitable for high-precision quantitative analysis and broadens the applicable scenarios.

[0085] In some embodiments, step 120 may include:

[0086] Acquire multiple sets of target height sets based on the first measured height and the first true height corresponding to each calibration object;

[0087] Based on the first measured height set and the first real height set included in each group of target height sets, a height conversion relationship corresponding to each group of target height sets is obtained.

[0088] In this embodiment, each group of target altitude sets includes a first measured altitude set and a first true altitude set.

[0089] The first measured height set may include a plurality of first measured heights arranged from large to small or from small to large.

[0090] For example, the multiple first measured heights are 6, 5, 4, 3, 2 and 1. When three first measured heights are grouped together, two first measured height sets can be obtained: {6, 5, 4} and {3, 2, 1}.

[0091] The first real height set may include a plurality of first real heights arranged from large to small or from small to large, and the plurality of first measurement sets may be acquired according to the acquisition method of the first measurement height set.

[0092] For example, multiple first true heights are 10, 9, 8, 7, 6 and 5, and two first true height sets can be obtained: {10,9,8} and {7,6,5}, and the first measured height set {6,5,4} corresponds to the first true height set {10,9,8}, and each element in {6,5,4} corresponds one to one with each element in {10,9,8}. For example, 6 and 10 are the first measured height and first true height corresponding to the same calibration object, respectively; the first measured height set {3,2,1} corresponds to the first true height set {7,6,5}, and each element in {3,2,1} corresponds one to one with each element in {7,6,5}.

[0093] The height conversion relationship corresponding to each target height set can be solved separately, and the first measured height set and the first true height set included in each target height set can be used to solve the height conversion relationship between the first measured height set and the first true height set under the target height set.

[0094] In some embodiments, obtaining multiple sets of target height sets based on the first measured height and the first true height corresponding to each calibration object may include:

[0095] Based on the size of each first measured height, the first measured heights are sorted in a target order to sequentially obtain a plurality of first measured height sets; based on the size of each first real height, the first real heights are sorted in a target order to sequentially obtain a plurality of first real height sets;

[0096] A target altitude set is obtained based on the first measured altitude set and a first true altitude set corresponding to the first measured altitude set.

[0097] In this embodiment, the target order may be from large to small, or from small to large.

[0098] For example, the first measured heights may be sorted in descending order based on the sizes of the first measured heights, and then a plurality of first measured height sets may be sequentially divided.

[0099] Based on the sizes of the first real heights, the first real heights are sorted in descending order, and multiple first real height sets can also be divided in sequence.

[0100] The number of the plurality of first measured altitude sets is the same as the number of the plurality of first true altitude sets.

[0101] In the actual implementation process, assuming that there are M calibration objects on the three-dimensional target plate, the first measurement height of each calibration object is measured as:

[0102] X={x1,x2,…,x m ,x m+1 ,x m+2 ,…,x m*2 ,…,x (k-1)*m+1 ,x (k-1)*m+2 ,…,x km}

[0103] The first true height of each calibration object is:

[0104] Y={y1,y2,…,y n ,y n+1 ,y m+2 ,…,y m*2 ,…,y (k-1)*m+1,y (k-1)*m+2 ,…,y km}

[0105] The first measured height and the first true height can be sorted in descending order according to the depth (first measured height / first true height). With m elements as a group, k=M / m groups of first measured height sets and k groups of first true height sets can be separated:

[0106] X={X1,X2,…,X k}, Y={Y1,Y2,…,Y k}

[0107] in, X k is the first measured height set of the kth group, Y k is the first real height set of the kth group, and the target height set of the kth group includes X k and Y k .

[0108] Each first measured height set includes m first measured heights, and each first true height set includes m first true heights.

[0109] Wherein, each first measurement height set may be:

[0110] X1={x1,x2,…,x m},X2={x m+1 ,x m+2 ,…,x m*2},…,X k ={x (k-1)*m+1 ,x (k-1)*m+2 ,…,x km}

[0111] Each first true height set may be:

[0112] Y1={y1,y2,…,y m},Y2={y m+1 ,y m+2 ,…,y m*2},…,Y k ={y (k-1)*m+1 ,y (k-1)*m+2 ,…,y km}

[0113] The first measured height set and the first real height set obtained after sorting correspond to each other, that is, X k and Y k The elements included in the one-to-one correspondence, such as, x km and kmThey are respectively the first measured height and the first true height corresponding to the same calibration object.

[0114] Then, the first measured altitude set and a first true altitude set corresponding to the first measured altitude set may be determined as a target altitude set.

[0115] In some embodiments, based on the first measured height set and the first real height set included in each set of target height sets, obtaining the height conversion relationship corresponding to each set of target height sets may include:

[0116] Taking the first real height set in the same set of target height sets as the dependent variable and the first measured height set corresponding to the first real height set as the independent variable, constructing a linear equation between the first real height set and the first measured height set;

[0117] Based on the first real height set and the first measured height set, the linear equation is solved by using the least square method to obtain a height conversion relationship corresponding to the target height set.

[0118] In this embodiment, the linear equations constructed by each target height set may be the same, and then the parameters in the linear equation may be solved based on the first real height set and the first measured height set included in each target height set to obtain the height conversion relationship corresponding to each target height set.

[0119] The linear equation is used to characterize the corresponding relationship between the first measured height set and the first true height set in the target height set.

[0120] In actual implementation, for example, X k As the independent variable, Y k As the dependent variable, establish a linear equation:

[0121]

[0122] in, Y k represents the first real height set of the kth group, X k represents the first measured height set of the kth group, X k and Y k The length of X is m, that is, k and Y k Each includes m elements, N represents the Nth-order linear equation, represents the nth power of the first measured height set of the kth group, that is, a n,k Represents the coefficient (unknown quantity) of the linear equation corresponding to the kth group of data. k and X k In the case ofn,k , thus obtaining the linear equation corresponding to each target height set, that is, the height conversion relationship.

[0123] According to the industrial inspection method provided in the embodiment of the present application, each first measured height and each first true height are sorted in target order based on the height size of the calibration object to obtain multiple first measured height sets and multiple first true height sets, and then obtain multiple groups of target height sets, so that the height conversion relationship corresponding to each target height set can be solved in segments, which can maximize the reduction of calibration errors and improve calibration accuracy.

[0124] In some embodiments, step 110 may include:

[0125] Performing fusion processing on the multiple first images to obtain a second image corresponding to the three-dimensional target plate;

[0126] Based on the normal vector corresponding to each pixel point in the second image, a first measurement height corresponding to each calibration object is calculated.

[0127] In this embodiment, each first image contains complete information of the three-dimensional target plate.

[0128] The multiple first images may be registered so that the multiple first images are aligned in the same coordinate system, and then an image fusion algorithm (such as weighted average, maximum fusion or multi-resolution fusion, etc.) may be used to merge the registered images into a second image.

[0129] For each first image, the brightness value of each pixel may be calculated, and the brightness value is used to characterize the reflection condition of the three-dimensional target plate under different illumination conditions.

[0130] Based on the photometric stereo method, a set of equations between the brightness value of the pixel and the normal vector can be established. The set of equations can include multiple equations corresponding to multiple different lighting conditions.

[0131] The normal vector of each pixel point in the second image can be obtained by solving the equation group, and the normal vector is used to represent the direction of the surface of the three-dimensional target plate at the point.

[0132] In some embodiments, calculating the first measured height corresponding to each calibration object based on the normal vector corresponding to each pixel point in the second image may include:

[0133] Based on the normal vector corresponding to each pixel point, the target gradient corresponding to each pixel point is calculated;

[0134] Based on the target gradient of each pixel point corresponding to the calibration object, a first measurement height corresponding to the calibration object is calculated.

[0135] In this embodiment, after obtaining the normal vector corresponding to each pixel point, the gradient may be further calculated, and the gradient may be used to characterize the spatial variation of the brightness value of the image.

[0136] The target gradient is a vector, and the target gradient may include two components: a component along the x direction (dx) and a component along the y direction (dy).

[0137] In the actual execution process, dx and dy can be obtained by performing operations such as rotation and projection on the normal vector.

[0138] Then dx and dy are combined into a gradient vector, the target gradient, which describes the rate of change of the brightness of the image at that point.

[0139] The target gradient is the derivative of the height function, and the first measured height can be recovered by integrating the gradient.

[0140] For example, a height field can be initialized, which can be a flat plane or an initial shape based on prior knowledge, and the height field can be used as the starting point of the gradient integration;

[0141] Then, a suitable gradient integration algorithm can be selected to calculate the first measured height, such as Poisson integral, least squares method or level set method, which can gradually update the height field in an iterative manner to match the input gradient field.

[0142] In the process of gradient integration, the height field can be continuously updated iteratively. In each iteration, a new height value is calculated based on the current gradient field and height field, and updated to the height field until the height field reaches a stable state or meets certain convergence conditions, and the iteration stops.

[0143] In some embodiments, step 130 may include:

[0144] Based on the second measured height and the upper limit and lower limit corresponding to each target height set, determining the target height set where the second measured height is located from the plurality of target height sets;

[0145] Based on the second measured height and the height conversion relationship corresponding to the target height set where the second measured height is located, a second real height is calculated.

[0146] In this embodiment, each first measured height is arranged according to the size of the first measured height, thereby obtaining a plurality of first measured height sets; and each first real height is arranged according to the size of the first real height, thereby obtaining a plurality of first real height sets, and the target height set finally obtained corresponds to an upper limit value and a lower limit value.

[0147] For example, the first measured heights are arranged in descending order, and the obtained first measured height sets may be:

[0148] X1={x1,x2,…,x m},X2={x m+1 ,x m+2 ,…,x m*2},…,X k ={x (k-1)*m+1 ,x (k-1)*m+2 ,…,x km}

[0149] Among them, x1>x2>>x m , x m >x m+1 , x m+1 >x m+2 >>x m*2 , x m*2 >>x (k-1)*m+1 , x (k-1)*m+1 >x (k-1)*m+2 >>x km .

[0150] Each first true height set may be:

[0151] Y1={y1,y2,…,y m},Y2={y m+1 ,y m+2 ,…,y m*2},…,Y k ={y (k-1)*m+1 ,y (k-1)*m+2 ,…,y km}

[0152] Among them, y1>y2>>y m ,y m >y m+1 ,y m+1 >y m+2 >>y m*2 ,y m*2 >>y (k-1)*m+1 ,y (k-1)*m+1 >y (k-1)*m+2 >>y km .

[0153] At the first measured height x m In this case, it can be determined that the first measured height set where the first measured height is located is X1. Then, according to the height conversion relationship corresponding to X1, the first measured height can be substituted into the height conversion relationship corresponding to X1 (e.g., it can be a linear equation) to calculate the second true height corresponding to the object to be measured.

[0154] The industrial detection device provided in the present application is described below. The industrial detection device described below and the industrial detection method described above can be referenced to each other.

[0155] The industrial detection method provided in the embodiment of the present application can be executed by an industrial detection device. The industrial detection device provided in the embodiment of the present application is described by taking an industrial detection device executing the industrial detection method as an example.

[0156] The embodiment of the present application also provides an industrial detection device.

[0157] like Figure 5 As shown, the industrial detection device includes: a first processing module 510 , a second processing module 520 and a third processing module 530 .

[0158] The first processing module 510 is used to process a plurality of first images corresponding to the three-dimensional target plate collected under different lighting conditions and the same collection angle of view to obtain a first measurement height corresponding to each calibration object in the three-dimensional target plate; each calibration object is a hemisphere with a first real height, and the first real height is the depth of the calibration object relative to the target plane of the three-dimensional target plate;

[0159] The second processing module 520 is used to process the first measured height and the first true height corresponding to each calibration object, and obtain the height conversion relationship corresponding to each group of target height sets; the target height set includes the first measured height set and the first true height set, and in the same group of target height sets, at least one first measured height included in the first measured height set corresponds to at least one first true height included in the first true height set; the height conversion relationship is used to characterize the conversion relationship between the first measured height set and the first true height set in the same group of target height sets;

[0160] The third processing module 530 is used to calculate a second real height corresponding to the object to be measured based on the acquired second measured height corresponding to the object to be measured and the height conversion relationship corresponding to the target height set where the second measured height is located.

[0161] According to the industrial detection device provided in the embodiment of the present application, by performing segmented calibration on the first measured height and the first true height corresponding to the calibration object, a height conversion relationship corresponding to each group of target height sets is obtained, which greatly reduces the overfitting error caused by calibration according to the entire depth range and improves the calibration accuracy. Therefore, the second true height corresponding to the object to be measured calculated according to the height conversion relationship has higher accuracy and precision. On the basis of reducing the cost and installation space, the object to be measured can also be measured with high precision, which is suitable for high-precision quantitative analysis and broadens the applicable scenarios.

[0162] In some embodiments, the second processing module 520 may also be used to:

[0163] Acquire multiple sets of target height sets based on the first measured height and the first true height corresponding to each calibration object;

[0164] Based on the first measured height set and the first real height set included in each group of target height sets, a height conversion relationship corresponding to each group of target height sets is obtained.

[0165] In some embodiments, the second processing module 520 may also be used to:

[0166] Taking the first real height set in the same set of target height sets as the dependent variable and the first measured height set corresponding to the first real height set as the independent variable, constructing a linear equation between the first real height set and the first measured height set;

[0167] Based on the first real height set and the first measured height set, the linear equation is solved by using the least square method to obtain a height conversion relationship corresponding to the target height set.

[0168] In some embodiments, the second processing module 520 may also be used to:

[0169] The first measured heights are sorted in a target order based on the size of each first measured height, so as to sequentially obtain a plurality of first measured height sets; the first real heights are sorted in a target order based on the size of each first real height, so as to sequentially obtain a plurality of first real height sets; the number of the plurality of first measured height sets is the same as the number of the plurality of first real height sets;

[0170] A target altitude set is obtained based on the first measured altitude set and a first true altitude set corresponding to the first measured altitude set.

[0171] In some embodiments, the first processing module 510 may also be used to:

[0172] Performing fusion processing on the multiple first images to obtain a second image corresponding to the three-dimensional target plate;

[0173] Based on the normal vector corresponding to each pixel point in the second image, a first measurement height corresponding to each calibration object is calculated.

[0174] In some embodiments, the first processing module 510 may also be used to:

[0175] Based on the normal vector corresponding to each pixel point, the target gradient corresponding to each pixel point is calculated;

[0176] Based on the target gradient of each pixel point corresponding to the calibration object, a first measurement height corresponding to the calibration object is calculated.

[0177] In some embodiments, the third processing module 530 may also be used to:

[0178] Based on the second measured height and the upper limit and lower limit corresponding to each target height set, determining the target height set where the second measured height is located from the plurality of target height sets;

[0179] Based on the second measured height and the height conversion relationship corresponding to the target height set where the second measured height is located, a second real height is calculated.

[0180] The industrial detection device in the embodiment of the present application can be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtualreality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personalcomputer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.

[0181] The industrial detection device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0182] The industrial detection device provided in the embodiment of the present application can achieve Figures 1 to 4 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0183] In some embodiments, Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a computer program stored in the memory 602 and executable on the processor 601. When the program is executed by the processor 601, each process of the above-mentioned industrial detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0184] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0185] On the other hand, the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the various processes of the above-mentioned industrial detection method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0186] On the other hand, the present application also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it is implemented to perform the various processes of the above-mentioned industrial detection method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0187] On the other hand, an embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned industrial detection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0188] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0189] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0190] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution can be essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.

[0191] 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 deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An industrial detection method, characterized in that: include: Processing a plurality of first images corresponding to the three-dimensional target plate collected under different lighting conditions and the same collection angle of view to obtain a first measurement height corresponding to each calibration object in the three-dimensional target plate; each calibration object is a hemisphere with a first real height, and the first real height is the depth of the calibration object relative to the target plane of the three-dimensional target plate; Processing the first measured height and the first true height corresponding to each of the calibration objects to obtain a height conversion relationship corresponding to each group of target height sets; the target height set includes a first measured height set and a first true height set, and in the same group of the target height sets, at least one first measured height included in the first measured height set corresponds to at least one first true height included in the first true height set one by one; the height conversion relationship is used to characterize the conversion relationship between the first measured height set and the first true height set in the same group of the target height sets; Based on the acquired second measured height corresponding to the object to be measured and the height conversion relationship corresponding to the target height set where the second measured height is located, the second real height corresponding to the object to be measured is calculated.

2. The industrial detection method according to claim 1, characterized in that: The processing of the first measured height and the first true height corresponding to each calibration object to obtain the height conversion relationship corresponding to each set of target height sets includes: Based on the first measured height and the first true height corresponding to each of the calibration objects, obtaining multiple sets of target height sets; Based on the first measured height set and the first real height set included in each group of the target height sets, a height conversion relationship corresponding to each group of the target height sets is obtained.

3. The industrial detection method according to claim 2, characterized in that: The acquiring, based on the first measured height set and the first real height set included in each group of the target height sets, a height conversion relationship corresponding to each group of the target height sets comprises: Taking a first real height set in the same group of the target height set as a dependent variable and a first measured height set corresponding to the first real height set as an independent variable, constructing a linear equation between the first real height set and the first measured height set; Based on the first real altitude set and the first measured altitude set, the linear equation is solved by using the least square method to obtain the altitude conversion relationship corresponding to the target altitude set.

4. The industrial detection method according to claim 2, characterized in that: The step of acquiring multiple sets of target height sets based on the first measured height and the first true height corresponding to each of the calibration objects includes: sorting the first measured heights in a target order based on the magnitude of the first measured heights to sequentially obtain a plurality of first measured height sets; sorting the first real heights in the target order based on the magnitude of the first real heights to sequentially obtain a plurality of first real height sets; the number of the plurality of first measured height sets is the same as the number of the plurality of first real height sets; The target altitude set is obtained based on the first measured altitude set and a first real altitude set corresponding to the first measured altitude set.

5. The industrial detection method according to any one of claims 1 to 4, characterized in that: The method of processing a plurality of first images corresponding to the three-dimensional target plate collected under different lighting conditions and the same collection angle of view to obtain a first measurement height corresponding to each calibration object in the three-dimensional target plate includes: Performing fusion processing on the multiple first images to obtain a second image corresponding to the three-dimensional target plate; Based on the normal vector corresponding to each pixel point in the second image, a first measurement height corresponding to each calibration object is calculated.

6. The industrial detection method according to claim 5, characterized in that: The calculating, based on the normal vector corresponding to each pixel point in the second image, a first measurement height corresponding to each calibration object includes: Based on the normal vector corresponding to each pixel point, a target gradient corresponding to each pixel point is calculated; Based on the target gradient of each pixel point corresponding to the calibration object, a first measurement height corresponding to the calibration object is calculated.

7. The industrial detection method according to any one of claims 1 to 4, characterized in that: The step of calculating the second real height corresponding to the object to be measured based on the acquired second measured height corresponding to the object to be measured and the height conversion relationship corresponding to the target height set where the second measured height is located comprises: Based on the second measured height and the upper limit value and the lower limit value corresponding to each of the target height sets, determining the target height set in which the second measured height is located from the plurality of target height sets; The second true height is calculated based on the second measured height and the height conversion relationship corresponding to the target height set where the second measured height is located.

8. An industrial detection device, characterized in that: include: A first processing module is used to process a plurality of first images corresponding to the three-dimensional target plate collected under different lighting conditions and the same collection angle of view to obtain a first measurement height corresponding to each calibration object in the three-dimensional target plate; each calibration object is a hemisphere with a first real height, and the first real height is the depth of the calibration object relative to the target plane of the three-dimensional target plate; A second processing module is used to process the first measured height and the first true height corresponding to each of the calibration objects to obtain a height conversion relationship corresponding to each group of target height sets; the target height set includes a first measured height set and a first true height set, and in the same group of target height sets, at least one first measured height included in the first measured height set corresponds to at least one first true height included in the first true height set; the height conversion relationship is used to characterize the conversion relationship between the first measured height set and the first true height set in the same group of target height sets; The third processing module is used to calculate a second real height corresponding to the object to be measured based on the acquired second measured height corresponding to the object to be measured and the height conversion relationship corresponding to the target height set where the second measured height is located.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the industrial detection method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the industrial detection method according to any one of claims 1 to 7 is implemented.